From fb7d9ea4a7a627547c94e1bac3f54878d63ecffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Tue, 2 Jul 2024 05:55:43 +0200 Subject: [PATCH] Use Bootstrap from disk instead of CDN --- core/templates/base.html | 5 +- core/templates/index.html | 72 +++++++++++-------------- static/css/style.css | 50 ++++++++--------- static/{css => js}/bootstrap.min.js | 0 static/{css => js}/bootstrap.min.js.map | 0 5 files changed, 58 insertions(+), 69 deletions(-) rename static/{css => js}/bootstrap.min.js (100%) rename static/{css => js}/bootstrap.min.js.map (100%) diff --git a/core/templates/base.html b/core/templates/base.html index 18c7187..137c9f8 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -28,14 +28,14 @@

- Twitch drops + Twitch drops

{% block content %} +

Content goes here

{% endblock content %}
diff --git a/core/templates/index.html b/core/templates/index.html index 0a43fdf..1668f98 100644 --- a/core/templates/index.html +++ b/core/templates/index.html @@ -9,8 +9,8 @@ {{ game.display_name }}
@@ -21,47 +21,39 @@
-
- {% if discord_settings %} -
-
- {% csrf_token %} - - -
- Notify when new drop are found -
-
- Notify when the drop is live -
-
+
+
+ {% if discord_settings %} +
+
Available on iOS: {{ game_data.ios_available|yesno:"Yes,No" }}
+
+ {% else %} + + {% endif %} +
+
+
+ {% for drop_benefit in game_data.drop_benefits %} +
+ {{ drop_benefit.name }} + {# Only show the entitlement limit if it's not None or above 1 #} + {% if drop_benefit.entitlement_limit > 1 %} + {{ drop_benefit.entitlement_limit }} + limit per account + + {% endif %} + {{ drop_benefit.name }}
- {% else %} - - {% endif %} + {% endfor %}
-
{% endfor %} diff --git a/static/css/style.css b/static/css/style.css index a0f2b3c..bb2ece4 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,8 +1,10 @@ +/* Make background color darker and text white */ body { background-color: #0c0c0c; color: #ffffff; } +/* Make links white */ a { color: #ffffff; } @@ -19,43 +21,37 @@ a:hover { color: #e91e63; } +/* Make the logo text pink */ +.nav-title { + color: #e91e63; +} + +/* Top half of the card */ .card { background-color: #111111; - border: 1px solid #111111; + border: 1px solid #000000; } -.card-title a { - color: #ffffff; -} -.card-title a:hover { - color: #e91e63; -} - -.alert { - background-color: #333333; - border-color: #444444; -} - -.list-group-item { +/* Bottom half of the card */ +.card-bottom { background-color: #141414; - border: 1px solid #141414; -} - -.list-group-item a { - color: #ffffff; -} - -.list-group-item a:hover { - color: #e91e63; + border-top: 1px solid #000000; } .btn-primary { - background-color: #06172e; - border-color: #000c1d; + background-color: #e91e63; + border-color: #111111; } .btn-primary:hover { - background-color: #040e1d; - border-color: #000c1d; + background-color: #af1548; + border-color: #111111; +} + +/* Django alerts */ +/* https://docs.djangoproject.com/en/5.0/ref/contrib/messages/ */ +.alert { + background-color: #181818; + border-color: #444444; } diff --git a/static/css/bootstrap.min.js b/static/js/bootstrap.min.js similarity index 100% rename from static/css/bootstrap.min.js rename to static/js/bootstrap.min.js diff --git a/static/css/bootstrap.min.js.map b/static/js/bootstrap.min.js.map similarity index 100% rename from static/css/bootstrap.min.js.map rename to static/js/bootstrap.min.js.map