From 9dc0ffc5ef69ab90ba5358077aac6388c1edfd56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Thu, 25 Jul 2024 20:27:57 +0200 Subject: [PATCH] Styling: enhance the mobile view - Add some spacing that was previously removed on all pages - Include the JavaScript only if not on the login view - Change the menu to not use buttons, and use rtl so the menu is viewable on small screens. --- Makefile | 2 +- argos/server/static/styles.css | 8 +- argos/server/templates/base.html | 134 ++++++++++++++++-------------- argos/server/templates/index.html | 43 ++++++---- 4 files changed, 103 insertions(+), 84 deletions(-) diff --git a/Makefile b/Makefile index 562c18f..33d445a 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ ruff: venv ruff-format: venv venv/bin/ruff format . djlint: venv ## Format the templates - venv/bin/djlint --ignore=H030,H031,H006 --profile jinja --lint argos/server/templates/*html + venv/bin/djlint --ignore=H006 --profile jinja --lint argos/server/templates/*html pylint: venv ## Runs pylint on the code venv/bin/pylint argos mypy: venv diff --git a/argos/server/static/styles.css b/argos/server/static/styles.css index 769c0a9..6b03c9e 100644 --- a/argos/server/static/styles.css +++ b/argos/server/static/styles.css @@ -4,10 +4,6 @@ code { white-space: pre-wrap; } -body > header, -body > main { - padding: 0 !important; -} #title { margin-bottom: 0; } @@ -53,3 +49,7 @@ label[for="select-status"] { #refresh-delay { max-width: 120px; } +/* Remove chevron on menu */ +#nav-menu summary::after { + background-image: none !important; +} diff --git a/argos/server/templates/base.html b/argos/server/templates/base.html index 1d93963..4964031 100644 --- a/argos/server/templates/base.html +++ b/argos/server/templates/base.html @@ -3,6 +3,10 @@ Argos + + - {% endif %} + {%- endif %}
@@ -97,26 +103,28 @@ (sources)
API documentation: - Swagger + Swagger or - Redoc + Redoc - + {% if request.url.remove_query_params('msg') != url_for('login_view') %} + + {% endif %} diff --git a/argos/server/templates/index.html b/argos/server/templates/index.html index 1794899..455697d 100644 --- a/argos/server/templates/index.html +++ b/argos/server/templates/index.html @@ -1,11 +1,13 @@ {% extends "base.html" %} -{% block title %}

Dashboard

{% endblock title %} +{% block title %} +

Dashboard

+{% endblock title %} {% block content %}
-
-
+
+ ❔ +
{{ counts_dict['unknown'] }}
-
+
+ ✅ +
{{ counts_dict['ok'] }}
-
⚠️
+
+ ⚠️ +
{{ counts_dict['warning'] }}
-
+
+ ❌ +
{{ counts_dict['critical'] }}

- Domains