From 34322d829a660d05f627200c31714e259ad5111c Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Sat, 4 Nov 2023 21:48:46 +0900 Subject: [PATCH] Have a Go Back hyperlink in the base template --- python/web/src/static/themes/modern/style.css | 21 +++++++++++++++++++ python/web/src/templates/admin.html | 2 -- python/web/src/templates/base.html | 5 +++++ python/web/src/templates/deviceinfo.html | 2 -- python/web/src/templates/diskinfo.html | 2 -- python/web/src/templates/drives.html | 2 -- python/web/src/templates/logs.html | 2 -- python/web/src/templates/manpage.html | 2 -- 8 files changed, 26 insertions(+), 12 deletions(-) diff --git a/python/web/src/static/themes/modern/style.css b/python/web/src/static/themes/modern/style.css index cd296c7660..71cba8145f 100644 --- a/python/web/src/static/themes/modern/style.css +++ b/python/web/src/static/themes/modern/style.css @@ -969,6 +969,27 @@ section#manual a p { margin: 0; } +/* + ------------------------------------------------------------------------------ + Base > Section: Back + ------------------------------------------------------------------------------ + */ + section#back { + margin: 2rem 0 1rem; +} + +section#back a { + margin: auto; + display: block; + padding: 0.25rem 0 0.25rem 2rem; + background: url("icons/chevrons-left.svg") no-repeat left center; + font-weight: bold; +} + +section#back a p { + margin: 0; +} + /* ------------------------------------------------------------------------------ Admin > Section: Services diff --git a/python/web/src/templates/admin.html b/python/web/src/templates/admin.html index d3c9d343c5..8c6b39cd83 100644 --- a/python/web/src/templates/admin.html +++ b/python/web/src/templates/admin.html @@ -189,6 +189,4 @@ -

{{ _("Go to Home") }}

- {% endblock content %} diff --git a/python/web/src/templates/base.html b/python/web/src/templates/base.html index 4ebdfd6a32..ade6fb5a5e 100644 --- a/python/web/src/templates/base.html +++ b/python/web/src/templates/base.html @@ -105,6 +105,11 @@

{{ content_class }} {% block content %}{% endblock content %} + {% if self._TemplateReference__context.name != "index.html" %} +
+

{{ _("Go Back") }}

+
+ {% endif %}