aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/base.html.jinja97
-rw-r--r--src/hydrilla/proxy/web_ui/templates/hkt_mitm_it_base.html.jinja116
-rw-r--r--src/hydrilla/proxy/web_ui/templates/import.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/index.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/landing.html.jinja49
-rw-r--r--src/hydrilla/proxy/web_ui/templates/prompts/auto_install_error.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/prompts/package_suggestion.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja2
16 files changed, 184 insertions, 104 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/base.html.jinja b/src/hydrilla/proxy/web_ui/templates/base.html.jinja
index e4760bf..f89b39a 100644
--- a/src/hydrilla/proxy/web_ui/templates/base.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/base.html.jinja
@@ -17,11 +17,9 @@ 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 of this
code in a proprietary work, I am not going to enforce this in court.
--#}
+#}
<!DOCTYPE html>
-{% set settings = get_settings() %}
-
{% macro button_row(buttons_data, common_fields={}) %}
<div class="flex-row">
{% for classes, text, extra_fields in buttons_data %}
@@ -223,96 +221,13 @@ code in a proprietary work, I am not going to enforce this in court.
.hide {
display: none !important;
}
-
- ul#nav {
- -moz-user-select: none;
- user-select: none;
- display: flex;
- justify-content: stretch;
- white-space: nowrap;
- background-color: #e0e0e0;
- margin: 0;
- padding: 0;
- border-bottom: 2px solid #444;
- overflow-x: scroll;
- }
-
- li.nav-entry, li.nav-separator {
- list-style-type: none;
- }
-
- li.nav-entry {
- background-color: #70af70;
- font-size: 115%;
- cursor: pointer;
- text-align: center;
- flex: 1 1 0;
- }
-
- li.nav-separator {
- flex: 0 0 2px;
- background-color: inherit;
- }
-
- li.big-separator {
- flex: 4 0 2px;
- }
-
- li.nav-entry:hover {
- box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
- }
-
- ul#nav > li.nav-active {
- background-color: #65A065;
- color: #222;
- box-shadow: none;
- cursor: default;
- }
-
- ul#nav > li > :only-child {
- display: block;
- padding: 10px;
- }
- {% endblock %}
+ {% endblock style %}
</style>
- {% endblock %}
+ {% endblock head %}
</head>
<body>
- {% set active_endpoint = get_current_endpoint() %}
- {%
- set navigation_bar = [
- ('home', _('web_ui.base.nav.home'), false),
- ('rules.rules', _('web_ui.base.nav.rules'), false),
- ('items.packages', _('web_ui.base.nav.packages'), false),
- ('items.libraries', _('web_ui.base.nav.libraries'), true),
- ('repos.repos', _('web_ui.base.nav.repos'), false),
- ('import.items_import', _('web_ui.base.nav.import'), false)
- ]
- %}
- <ul id="nav">
- {%
- for endpoint, label, advanced_user_only in navigation_bar
- if not advanced_user_only or settings.advanced_user
- %}
- {% if not loop.first %}
- {% set sep_classes = ['nav-separator'] %}
- {% if loop.last %}
- {% do sep_classes.append('big-separator') %}
- {% endif %}
- <li class="{{ sep_classes|join(' ') }}"></li>
- {% endif %}
-
- {% if endpoint == active_endpoint %}
- <li class="nav-entry nav-active"><div>{{ label }}</div></li>
- {% else %}
- <li class="nav-entry">
- <a href="{{ url_for(endpoint) }}" draggable="false">
- {{ label }}
- </a>
- </li>
- {% endif %}
- {% endfor %}
- </ul>
- <div id="main">{% block main required %}{% endblock %}</div>
+ {% block body %}
+ <div id="main">{% block main required %}{% endblock %}</div>
+ {% endblock body %}
</body>
</html>
diff --git a/src/hydrilla/proxy/web_ui/templates/hkt_mitm_it_base.html.jinja b/src/hydrilla/proxy/web_ui/templates/hkt_mitm_it_base.html.jinja
new file mode 100644
index 0000000..6a6de99
--- /dev/null
+++ b/src/hydrilla/proxy/web_ui/templates/hkt_mitm_it_base.html.jinja
@@ -0,0 +1,116 @@
+{#
+SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0
+
+Proxy web UI base page template of htk.mitm.it meta-site.
+
+This file is part of Hydrilla&Haketilo.
+
+Copyright (C) 2022 Wojtek Kosior
+
+Dual licensed under
+* GNU General Public License v3.0 or later and
+* Creative Commons Attribution Share Alike 4.0 International.
+
+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 of this
+code in a proprietary work, I am not going to enforce this in court.
+#}
+{% extends "base.html.jinja" %}
+
+{% set settings = get_settings() %}
+
+{% block style %}
+ {{ super() }}
+ ul#nav {
+ -moz-user-select: none;
+ user-select: none;
+ display: flex;
+ justify-content: stretch;
+ white-space: nowrap;
+ background-color: #e0e0e0;
+ margin: 0;
+ padding: 0;
+ border-bottom: 2px solid #444;
+ overflow-x: scroll;
+ }
+
+ li.nav-entry, li.nav-separator {
+ list-style-type: none;
+ }
+
+ li.nav-entry {
+ background-color: #70af70;
+ font-size: 115%;
+ cursor: pointer;
+ text-align: center;
+ flex: 1 1 0;
+ }
+
+ li.nav-separator {
+ flex: 0 0 2px;
+ background-color: inherit;
+ }
+
+ li.big-separator {
+ flex: 4 0 2px;
+ }
+
+ li.nav-entry:hover {
+ box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
+ }
+
+ ul#nav > li.nav-active {
+ background-color: #65A065;
+ color: #222;
+ box-shadow: none;
+ cursor: default;
+ }
+
+ ul#nav > li > :only-child {
+ display: block;
+ padding: 10px;
+ }
+{% endblock style %}
+
+{% block body %}
+ {% set active_endpoint = get_current_endpoint() %}
+ {%
+ set navigation_bar = [
+ ('home.home', _('web_ui.base.nav.home'), false),
+ ('rules.rules', _('web_ui.base.nav.rules'), false),
+ ('items.packages', _('web_ui.base.nav.packages'), false),
+ ('items.libraries', _('web_ui.base.nav.libraries'), true),
+ ('repos.repos', _('web_ui.base.nav.repos'), false),
+ ('import.items_import', _('web_ui.base.nav.import'), false)
+ ]
+ %}
+ <ul id="nav">
+ {%
+ for endpoint, label, advanced_user_only in navigation_bar
+ if not advanced_user_only or settings.advanced_user
+ %}
+ {% if not loop.first %}
+ {% set sep_classes = ['nav-separator'] %}
+ {% if loop.last %}
+ {% do sep_classes.append('big-separator') %}
+ {% endif %}
+ <li class="{{ sep_classes|join(' ') }}"></li>
+ {% endif %}
+
+ {% if endpoint == active_endpoint %}
+ <li class="nav-entry nav-active"><div>{{ label }}</div></li>
+ {% else %}
+ <li class="nav-entry">
+ <a href="{{ url_for(endpoint) }}" draggable="false">
+ {{ label }}
+ </a>
+ </li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+
+ {{ super() }}
+{% endblock body %}
diff --git a/src/hydrilla/proxy/web_ui/templates/import.html.jinja b/src/hydrilla/proxy/web_ui/templates/import.html.jinja
index 7636b77..6ec9947 100644
--- a/src/hydrilla/proxy/web_ui/templates/import.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/import.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %} {{ _('web_ui.import.title') }} {% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
index e42f5e9..010c2ed 100644
--- a/src/hydrilla/proxy/web_ui/templates/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %} {{ _('web_ui.home.title') }} {% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja
index e517f3b..ccfa6b9 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% macro version_with_repo(info) -%}
{{ info.info.version_string }}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja
index 0a72b64..0996b8b 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %} {{ _('web_ui.libraries.title') }} {% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja
index bc6b5bb..b79d594 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %} {{ _('web_ui.packages.title') }} {% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/landing.html.jinja b/src/hydrilla/proxy/web_ui/templates/landing.html.jinja
new file mode 100644
index 0000000..6314cfd
--- /dev/null
+++ b/src/hydrilla/proxy/web_ui/templates/landing.html.jinja
@@ -0,0 +1,49 @@
+{#
+SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0
+
+Proxy web UI landing page.
+
+This file is part of Hydrilla&Haketilo.
+
+Copyright (C) 2022 Wojtek Kosior
+
+Dual licensed under
+* GNU General Public License v3.0 or later and
+* Creative Commons Attribution Share Alike 4.0 International.
+
+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 of this
+code in a proprietary work, I am not going to enforce this in court.
+#}
+{% extends "base.html.jinja" %}
+
+{% block title %} {{ _('web_ui.landing.title') }} {% endblock %}
+
+{% block main %}
+ <h3>
+ {{ _('web_ui.landing.heading.haketilo_is_running') }}
+ </h3>
+
+ <p>
+ {{ _('web_ui.landing.web_ui.landing.what_to_do_1') }}
+ </p>
+
+ {{ label(_('web_ui.landing.host_label')) }}
+
+ <p>
+ {{ listen_host }}
+ </p>
+
+ {{ label(_('web_ui.landing.port_label')) }}
+
+ <p>
+ {{ listen_port }}
+ </p>
+
+ <p class="has-colored-links">
+ {{ _('web_ui.landing.html.what_to_do_2')|safe }}
+ </p>
+{% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/prompts/auto_install_error.html.jinja b/src/hydrilla/proxy/web_ui/templates/prompts/auto_install_error.html.jinja
index f4f600c..a17e61d 100644
--- a/src/hydrilla/proxy/web_ui/templates/prompts/auto_install_error.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/prompts/auto_install_error.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %}
{{ _('web_ui.prompts.auto_install_error.title') }}
diff --git a/src/hydrilla/proxy/web_ui/templates/prompts/package_suggestion.html.jinja b/src/hydrilla/proxy/web_ui/templates/prompts/package_suggestion.html.jinja
index ba06ae9..2df38b3 100644
--- a/src/hydrilla/proxy/web_ui/templates/prompts/package_suggestion.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/prompts/package_suggestion.html.jinja
@@ -19,7 +19,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %}
{{ _('web_ui.prompts.package_suggestion.title') }}
diff --git a/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja
index f635444..106af53 100644
--- a/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %} {{ _('web_ui.repos.add.title') }} {% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja
index e670b59..4f09ae6 100644
--- a/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %}{{ _('web_ui.repos.title') }}{% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja
index 04075c4..c4b7a9a 100644
--- a/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %} {{ _('web_ui.repos.single.title') }} {% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja b/src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja
index 430c5ca..6d21ccd 100644
--- a/src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %} {{ _('web_ui.rules.add.title') }} {% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja
index 799eaba..57cc8ad 100644
--- a/src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %}{{ _('web_ui.rules.title') }}{% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja b/src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja
index 9bf2c75..95e8009 100644
--- a/src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/rules/show_single.html.jinja
@@ -18,7 +18,7 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
-{% extends "base.html.jinja" %}
+{% extends "hkt_mitm_it_base.html.jinja" %}
{% block title %} {{ _('web_ui.rules.single.title') }} {% endblock %}