From 2a622842c38f1f9df2aee6af28bf9932d05a2ef0 Mon Sep 17 00:00:00 2001
From: Wojtek Kosior
Date: Fri, 28 Oct 2022 19:22:38 +0200
Subject: [proxy] add an index page to the documentation
---
src/hydrilla/proxy/self_doc/doc_index.html.jinja | 59 ++++++++++++++++++++++
.../proxy/web_ui/templates/index.html.jinja | 6 +++
2 files changed, 65 insertions(+)
create mode 100644 src/hydrilla/proxy/self_doc/doc_index.html.jinja
(limited to 'src/hydrilla/proxy')
diff --git a/src/hydrilla/proxy/self_doc/doc_index.html.jinja b/src/hydrilla/proxy/self_doc/doc_index.html.jinja
new file mode 100644
index 0000000..03f2231
--- /dev/null
+++ b/src/hydrilla/proxy/self_doc/doc_index.html.jinja
@@ -0,0 +1,59 @@
+{#
+SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0
+
+Documentation pages index.
+
+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 "doc_base.html.jinja" %}
+
+{% block title %} Documentation index {% endblock %}
+
+{% block main %}
+ {{ big_heading('Haketilo embedded documentation') }}
+
+ {% call section() %}
+ {% call paragraph() %}
+ This is the embedded documentation of Haketilo proxy.
+ It contains some basic information aimed to help new users understand how
+ the tool works.
+ {% endcall %}
+
+ {% call unordered_list() %}
+ {% call list_entry() %}
+ {{ doc_page_link('Advanced UI features', 'advanced_ui_features') }}
+ {% endcall %}
+ {% call list_entry() %}
+ {{ doc_page_link('Packages', 'packages') }}
+ {% endcall %}
+ {% call list_entry() %}
+ {{ doc_page_link('Policy selection', 'policy_selection') }}
+ {% endcall %}
+ {% call list_entry() %}
+ {{ doc_page_link('Popup', 'popup') }}
+ {% endcall %}
+ {% call list_entry() %}
+ {{ doc_page_link('Repositories', 'repositories') }}
+ {% endcall %}
+ {% call list_entry() %}
+ {{ doc_page_link('Script blocking', 'script_blocking') }}
+ {% endcall %}
+ {% call list_entry() %}
+ {{ doc_page_link('URL patterns', 'url_patterns') }}
+ {% endcall %}
+ {% endcall %}
+ {% endcall %}
+{% endblock main %}
diff --git a/src/hydrilla/proxy/web_ui/templates/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
index 25649ff..1e498a3 100644
--- a/src/hydrilla/proxy/web_ui/templates/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
@@ -49,6 +49,12 @@ code in a proprietary work, I am not going to enforce this in court.
{{ _('web_ui.home.html.haketilo_is_blah_blah')|safe }}
+
+ {% set fmt = _('web_ui.home.html.see_haketilo_doc_{url}') %}
+ {% set doc_url = url_for('home.home_doc', page='doc_index') %}
+ {{ fmt.format(url=doc_url|e)|safe }}
+
+
{% if request.url.startswith('http://') %}
--
cgit v1.2.3