From 474e2b5bff477e6779990ae745524ed4c6b4ccef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Thu, 4 Jul 2024 05:36:30 +0200 Subject: [PATCH] Add /games page and add checkboxes for subscribing to games --- .vscode/settings.json | 1 + core/templates/games.html | 29 +++++++++++++++++++++++++++++ core/templates/index.html | 13 ++++++++++++- core/templates/partials/header.html | 3 +++ core/urls.py | 5 +++++ core/views.py | 8 ++++++++ pyproject.toml | 1 + static/css/style.css | 13 +++++++++++++ 8 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 core/templates/games.html diff --git a/.vscode/settings.json b/.vscode/settings.json index 11d6358..46c826d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,7 @@ "allauth", "appendonly", "asgiref", + "forloop", "logdir", "memlock", "networkidle", diff --git a/core/templates/games.html b/core/templates/games.html new file mode 100644 index 0000000..d01d075 --- /dev/null +++ b/core/templates/games.html @@ -0,0 +1,29 @@ +{% extends "base.html" %} +{% block content %} +
+
+ {% for game in games %} +
+
+ {{ game.display_name }} +
+
{{ game.display_name }}
+
+
+ + +
+
+ + +
+
+
+
+
+ {% endfor %} +
+
+{% endblock content %} diff --git a/core/templates/index.html b/core/templates/index.html index 0cd2198..6405562 100644 --- a/core/templates/index.html +++ b/core/templates/index.html @@ -18,7 +18,6 @@ -
{% for game in games %}
@@ -36,6 +35,18 @@

{{ game.display_name }}

+
+
+ + +
+
+ + +
+
{% for campaign in game.campaigns %} {% if not forloop.first %}
{% endif %}
diff --git a/core/templates/partials/header.html b/core/templates/partials/header.html index 9ac39bf..a88f857 100644 --- a/core/templates/partials/header.html +++ b/core/templates/partials/header.html @@ -5,6 +5,9 @@