From c5a562004aa7743812670458dbaf606b6d4a2bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Thu, 4 Jul 2024 03:04:49 +0200 Subject: [PATCH] Store HTML in /templates/partials/ --- core/templates/base.html | 41 ++--------------------------- core/templates/index.html | 3 ++- core/templates/partials/alerts.html | 10 +++++++ core/templates/partials/header.html | 28 ++++++++++++++++++++ 4 files changed, 42 insertions(+), 40 deletions(-) create mode 100644 core/templates/partials/alerts.html create mode 100644 core/templates/partials/header.html diff --git a/core/templates/base.html b/core/templates/base.html index 137c9f8..21afa7a 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,5 +1,4 @@ {% load static %} -{% load socialaccount %} @@ -15,46 +14,10 @@ - {% for message in messages %} - - {% endfor %} + {% include "partials/alerts.html" %}
-
-

- Twitch drops -

- -
+ {% include "partials/header.html" %} {% block content %} -

Content goes here

{% endblock content %}
diff --git a/core/templates/index.html b/core/templates/index.html index 445f5b4..58cb9af 100644 --- a/core/templates/index.html +++ b/core/templates/index.html @@ -32,7 +32,8 @@ href="#collapseDescription{{ campaign.drop_id }}" role="button" aria-expanded="false" - aria-controls="collapseDescription{{ campaign.drop_id }}">Show Description + aria-controls="collapseDescription{{ campaign.drop_id }}" + aria-label="Show Description">Show Description

{{ campaign.description }}
diff --git a/core/templates/partials/alerts.html b/core/templates/partials/alerts.html new file mode 100644 index 0000000..6e3d405 --- /dev/null +++ b/core/templates/partials/alerts.html @@ -0,0 +1,10 @@ +{% for message in messages %} + +{% endfor %} diff --git a/core/templates/partials/header.html b/core/templates/partials/header.html new file mode 100644 index 0000000..9ac39bf --- /dev/null +++ b/core/templates/partials/header.html @@ -0,0 +1,28 @@ +{% load socialaccount %} +
+

+ Twitch drops +

+ +