From fb1f7c4983aa6d1fdb89f57efaf61895706e3f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Thu, 4 Jul 2024 03:23:39 +0200 Subject: [PATCH] Improve (?) the HTML --- core/templates/index.html | 121 +++++++++++++++++++++++--------------- static/css/style.css | 5 ++ 2 files changed, 78 insertions(+), 48 deletions(-) diff --git a/core/templates/index.html b/core/templates/index.html index 58cb9af..0cd2198 100644 --- a/core/templates/index.html +++ b/core/templates/index.html @@ -1,62 +1,87 @@ {% extends "base.html" %} {% block content %}
- {% for game in games %} -
-
-
- {{ game.display_name }} -
-
+
+
+
+
-

- {{ game.display_name }} -

+
Games
+
- {% for campaign in game.campaigns %} -
-

{{ campaign.name }}

-

Ends in: {{ campaign.end_at|timeuntil }}

- {% if campaign.description != campaign.name %} - {% if campaign.description|length|get_digit:"-1" > 100 %} -

- -

-
-
{{ campaign.description }}
-
-
- {% else %} -

{{ campaign.description }}

- {% endif %} - {% endif %} - {% for drop in campaign.drops %} -
- {{ drop.name }} drop image + +
+ {% for game in games %} +
+
+
+ {{ game.display_name }} - {{ drop.name }}
- {% endfor %} +
+
+

+ {{ game.display_name }} +

+ {% for campaign in game.campaigns %} + {% if not forloop.first %}
{% endif %} +
+

{{ campaign.name }}

+

Ends in: {{ campaign.end_at|timeuntil }}

+ {% if campaign.description != campaign.name %} + {% if campaign.description|length|get_digit:"-1" > 100 %} +

+ +

+
+
{{ campaign.description }}
+
+
+ {% else %} +

{{ campaign.description }}

+ {% endif %} + {% endif %} +
+ {% for drop in campaign.drops %} +
+ {{ drop.name }} drop image + {{ drop.name }} +
+ {% endfor %} +
+
+ {% endfor %} +
+
+
{% endfor %}
- {% endfor %} +
{% endblock content %} diff --git a/static/css/style.css b/static/css/style.css index bb2ece4..1272f88 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -55,3 +55,8 @@ a:hover { background-color: #181818; border-color: #444444; } + +/* Table of games to the left */ +.toc { + top: 1rem; +}