Store HTML in /templates/partials/
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load socialaccount %}
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" data-bs-theme="dark">
|
<html lang="en" data-bs-theme="dark">
|
||||||
<head>
|
<head>
|
||||||
@ -15,46 +14,10 @@
|
|||||||
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% for message in messages %}
|
{% include "partials/alerts.html" %}
|
||||||
<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 %}
|
|
||||||
<article class="container mt-5">
|
<article class="container mt-5">
|
||||||
<header class="d-flex justify-content-between align-items-center py-3 border-bottom">
|
{% include "partials/header.html" %}
|
||||||
<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>
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p>Content goes here</p>
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
</article>
|
</article>
|
||||||
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
||||||
|
@ -32,7 +32,8 @@
|
|||||||
href="#collapseDescription{{ campaign.drop_id }}"
|
href="#collapseDescription{{ campaign.drop_id }}"
|
||||||
role="button"
|
role="button"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-controls="collapseDescription{{ campaign.drop_id }}">Show Description</a>
|
aria-controls="collapseDescription{{ campaign.drop_id }}"
|
||||||
|
aria-label="Show Description">Show Description</a>
|
||||||
</p>
|
</p>
|
||||||
<div class="collapse" id="collapseDescription{{ campaign.drop_id }}">
|
<div class="collapse" id="collapseDescription{{ campaign.drop_id }}">
|
||||||
<div class="card card-body">{{ campaign.description }}</div>
|
<div class="card card-body">{{ campaign.description }}</div>
|
||||||
|
10
core/templates/partials/alerts.html
Normal file
10
core/templates/partials/alerts.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{% 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 %}
|
28
core/templates/partials/header.html
Normal file
28
core/templates/partials/header.html
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{% load socialaccount %}
|
||||||
|
<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>
|
Reference in New Issue
Block a user