From c747cd1fd86e2d1554aff9db1b600cc8a115c10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 10 Feb 2024 09:50:53 +0100 Subject: [PATCH] Reformat --- games/static/base.css | 32 +++++ games/templates/add_edition.html | 4 +- games/templates/add_game.html | 4 +- games/templates/add_purchase.html | 4 +- games/templates/add_session.html | 4 +- games/templates/base.html | 156 ++++++++++++------------ games/templates/list_sessions.html | 68 ++++++----- games/templates/registration/login.html | 28 +++-- games/templates/stats.html | 18 +-- games/templates/view_game.html | 28 ++--- 10 files changed, 192 insertions(+), 154 deletions(-) diff --git a/games/static/base.css b/games/static/base.css index 7a9bd46..e8342a9 100644 --- a/games/static/base.css +++ b/games/static/base.css @@ -910,6 +910,18 @@ select { height: 1.5rem; } +.h-24 { + height: 6rem; +} + +.h-screen { + height: 100vh; +} + +.min-h-24 { + min-height: 6rem; +} + .min-h-screen { min-height: 100vh; } @@ -946,6 +958,10 @@ select { max-width: 20rem; } +.flex-1 { + flex: 1 1 0%; +} + @keyframes spin { to { transform: rotate(360deg); @@ -1082,6 +1098,22 @@ select { padding-top: 0.25rem; } +.pt-8 { + padding-top: 2rem; +} + +.pb-4 { + padding-bottom: 1rem; +} + +.pb-8 { + padding-bottom: 2rem; +} + +.pb-16 { + padding-bottom: 4rem; +} + .text-center { text-align: center; } diff --git a/games/templates/add_edition.html b/games/templates/add_edition.html index 219c595..ae05699 100644 --- a/games/templates/add_edition.html +++ b/games/templates/add_edition.html @@ -18,8 +18,8 @@ + name="submit_and_redirect" + value="Submit & Create Purchase" /> diff --git a/games/templates/add_game.html b/games/templates/add_game.html index 7954a5d..8a70f4c 100644 --- a/games/templates/add_game.html +++ b/games/templates/add_game.html @@ -18,8 +18,8 @@ + name="submit_and_redirect" + value="Submit & Create Edition" /> diff --git a/games/templates/add_purchase.html b/games/templates/add_purchase.html index cab7f60..93dbabb 100644 --- a/games/templates/add_purchase.html +++ b/games/templates/add_purchase.html @@ -18,8 +18,8 @@ + name="submit_and_redirect" + value="Submit & Create Session" /> diff --git a/games/templates/add_session.html b/games/templates/add_session.html index de21487..e78f03b 100644 --- a/games/templates/add_session.html +++ b/games/templates/add_session.html @@ -19,8 +19,8 @@
+ data-target="{{ field.name }}" + data-type="toggle">Toggle text
diff --git a/games/templates/base.html b/games/templates/base.html index 7ba30ae..03935a1 100644 --- a/games/templates/base.html +++ b/games/templates/base.html @@ -18,21 +18,21 @@ loading indicator -
- +
+ {% block content %} + No content here. + {% endblock content %}
- - {% block content %} - No content here. - {% endblock content %} -
- {% load version %} - {% version %} ({% version_date %}) - {% block scripts %} - {% endblock scripts %} - - + {% load version %} + {% version %} ({% version_date %}) + + {% block scripts %} + {% endblock scripts %} + + diff --git a/games/templates/list_sessions.html b/games/templates/list_sessions.html index 70de2ae..fb36355 100644 --- a/games/templates/list_sessions.html +++ b/games/templates/list_sessions.html @@ -4,32 +4,33 @@ {{ title }} {% endblock title %} {% block content %} - {% if dataset_count >= 1 %} - {% url 'list_sessions_start_session_from_session' last.id as start_session_url %} -
- - {% include 'components/button_start.html' with text=last.purchase title="Start session of last played game" only %} - -
- {% endif %} - {% if dataset_count != 0 %} - - - - - - - - - - - {% for session in dataset %} +
+ {% if dataset_count >= 1 %} + {% url 'list_sessions_start_session_from_session' last.id as start_session_url %} + + {% endif %} + {% if dataset_count != 0 %} +
NameDuration
+ + + + + + + + + + {% for session in dataset %} {% partialdef session-row inline=True %} {% endpartialdef %} - {% endfor %} - -
NameDuration
@@ -43,7 +44,7 @@
- {% else %} -
No sessions found.
- {% endif %} + {% endfor %} + + + {% else %} +
No sessions found.
+ {% endif %} + {% endblock content %} diff --git a/games/templates/registration/login.html b/games/templates/registration/login.html index 9fb368f..8df4f0d 100644 --- a/games/templates/registration/login.html +++ b/games/templates/registration/login.html @@ -5,17 +5,19 @@ Login {% endblock title %} {% block content %} -

Please log in to continue

-
- - {% csrf_token %} - {{ form.as_table }} - - - - - -
- -
+
+

Please log in to continue

+
+ + {% csrf_token %} + {{ form.as_table }} + + + + + +
+ +
+
{% endblock content %} diff --git a/games/templates/stats.html b/games/templates/stats.html index 290a92e..0be97dd 100644 --- a/games/templates/stats.html +++ b/games/templates/stats.html @@ -9,9 +9,9 @@