From 1864fc0aaf7d6dba2e730cf74a5e154df4e6d18d Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 23 Aug 2022 11:16:33 +0200 Subject: add navigation bar to web UI --- .../proxy/web_ui/templates/base.html.jinja | 127 +++++++++++++++------ .../templates/packages__load_from_disk.html.jinja | 8 +- .../proxy/web_ui/templates/root.html.jinja | 6 +- 3 files changed, 99 insertions(+), 42 deletions(-) (limited to 'src/hydrilla/proxy/web_ui/templates') diff --git a/src/hydrilla/proxy/web_ui/templates/base.html.jinja b/src/hydrilla/proxy/web_ui/templates/base.html.jinja index c7a0c15..eb9680f 100644 --- a/src/hydrilla/proxy/web_ui/templates/base.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/base.html.jinja @@ -18,47 +18,104 @@ You can choose to use either of these licenses or both. I, Wojtek Kosior, thereby promise not to sue for violation of this file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. -#} +-#} - {% block head %} - {% block title required %}{% endblock %} - Haketilo proxy - - {% endblock %} + {%- endblock %} + {%- set active_endpoint = get_current_endpoint() %} + {%- + set navigation_bar = [ + ('home', _('web_ui.base.nav.home')), + ('packages.packages', _('web_ui.base.nav.packages')), + ('repos.repos', _('web_ui.base.nav.repos')), + ('packages.load_from_disk', _('web_ui.base.nav.load')) + ] + -%} +
{% block main required %}{% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/packages__load_from_disk.html.jinja b/src/hydrilla/proxy/web_ui/templates/packages__load_from_disk.html.jinja index 33a99f4..0eb5149 100644 --- a/src/hydrilla/proxy/web_ui/templates/packages__load_from_disk.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/packages__load_from_disk.html.jinja @@ -19,13 +19,13 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. #} -{% extends "base.html.jinja" %} +{%- extends "base.html.jinja" %} {% block title %} {{ _('web_ui.packages.load_from_disk.title') }} {% endblock %} {% block main %}
@@ -33,7 +33,7 @@ in a proprietary work, I am not going to enforce this in court. required="">
- +
-{% endblock %} +{%- endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/root.html.jinja b/src/hydrilla/proxy/web_ui/templates/root.html.jinja index f1e3500..62c2b45 100644 --- a/src/hydrilla/proxy/web_ui/templates/root.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/root.html.jinja @@ -19,8 +19,8 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. #} -{% extends "base.html.jinja" %} -{% block title %}Home{% endblock %} +{%- extends "base.html.jinja" %} +{% block title %} {{ _('web_ui.home.title') }} {% endblock %} {% block main %} - load packages from disk + {{ _('web_ui.home.welcome_to_haketilo') }} {% endblock %} -- cgit v1.2.3