Store HTML in /templates/partials/

This commit is contained in:
2024-07-04 03:04:49 +02:00
parent e58dba6a4c
commit c5a562004a
4 changed files with 42 additions and 40 deletions

View File

@ -1,5 +1,4 @@
{% load static %}
{% load socialaccount %}
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
@ -15,46 +14,10 @@
<link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
{% for message in messages %}
<div class="alert alert-dismissible {{ message.tags }} fade show"
role="alert">
<div>{{ message | safe }}</div>
<button type="button"
class="btn-close"
data-bs-dismiss="alert"
aria-label="Close"></button>
</div>
{% endfor %}
{% include "partials/alerts.html" %}
<article class="container mt-5">
<header class="d-flex justify-content-between align-items-center py-3 border-bottom">
<h1 class="h2">
<a href='{% url "core:index" %}' class="text-decoration-none nav-title">Twitch drops</a>
</h1>
<nav>
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href='{% url "api-1.0.0:openapi-view" %}'>API</a>
</li>
<li class="nav-item d-none d-sm-block">
<a class="nav-link" href="https://github.com/sponsors/TheLovinator1">Donate</a>
</li>
<li>
<a class="nav-link" href='{% url "core:add_discord_webhook" %}'>Webhooks</a>
</li>
{% if user.is_authenticated %}
<li class="nav-item">
<a class="nav-link" href='{% url "account_logout" %}'>Logout</a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link" href='{% provider_login_url "twitch" %}'>Login</a>
</li>
{% endif %}
</ul>
</nav>
</header>
{% include "partials/header.html" %}
{% block content %}
<p>Content goes here</p>
{% endblock content %}
</article>
<script src="{% static 'js/bootstrap.min.js' %}"></script>