diff options
author | Alexandre Flament <alex@al-f.net> | 2022-02-05 08:52:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-05 08:52:19 +0100 |
commit | bf987bb608cd3a2aea7990fb8de197a3ebd2907d (patch) | |
tree | 3067f730ebcbbce3d8e55f9e4c54f09376a7ff66 /searx/templates | |
parent | 24e2acf88e2bf98b89b934bb4ec6098888ca06a5 (diff) | |
parent | 91527fbd6b4c155d63447dd27fb9f423ff4bfff6 (diff) | |
download | searxng-bf987bb608cd3a2aea7990fb8de197a3ebd2907d.tar.gz searxng-bf987bb608cd3a2aea7990fb8de197a3ebd2907d.zip |
Merge pull request #848 from not-my-profile/help-route
Introduce `/help` route
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/oscar/about.html | 6 | ||||
-rw-r--r-- | searx/templates/oscar/help.html | 12 | ||||
-rw-r--r-- | searx/templates/oscar/navbar.html | 2 | ||||
-rw-r--r-- | searx/templates/simple/about.html | 5 | ||||
-rw-r--r-- | searx/templates/simple/base.html | 2 | ||||
-rw-r--r-- | searx/templates/simple/help.html | 12 |
6 files changed, 26 insertions, 13 deletions
diff --git a/searx/templates/oscar/about.html b/searx/templates/oscar/about.html deleted file mode 100644 index a644761b6..000000000 --- a/searx/templates/oscar/about.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "oscar/base.html" %} -{% block title %}{{ _('about') }} - {% endblock %} -{% block content %} -{{ help.about | safe }} -{% include "__common__/aboutextend.html" ignore missing %} -{% endblock %} diff --git a/searx/templates/oscar/help.html b/searx/templates/oscar/help.html new file mode 100644 index 000000000..bf311fb4a --- /dev/null +++ b/searx/templates/oscar/help.html @@ -0,0 +1,12 @@ +{% extends "oscar/base.html" %} +{% block title %}{{ page.title }} - {% endblock %} +{% block content %} +<ul class="nav nav-tabs"> +{% for name, page in all_pages %} + <li {% if name == page_filename %}class="active"{% endif %}> + <a href="{{name}}">{{page.title}}</a> + </li> +{% endfor %} +</ul> +{{ page.content | safe }} +{% endblock %} diff --git a/searx/templates/oscar/navbar.html b/searx/templates/oscar/navbar.html index 0eeb207a0..b1d344c11 100644 --- a/searx/templates/oscar/navbar.html +++ b/searx/templates/oscar/navbar.html @@ -3,7 +3,7 @@ <a href="{{ url_for('index') }}">{{ instance_name }}</a>{{- "" -}} </span>{{- "" -}} <span class="{% if rtl %}pull-left{% else %}pull-right{% endif %}">{{- "" -}} - <a href="{{ url_for('about') }}">{{ _('about') }}</a>{{- "" -}} + <a href="{{ url_for('help_page', pagename='about') }}">{{ _('about') }}</a>{{- "" -}} <a href="{{ url_for('preferences') }}">{{ _('preferences') }}</a>{{- "" -}} </span>{{- "" -}} </div> diff --git a/searx/templates/simple/about.html b/searx/templates/simple/about.html deleted file mode 100644 index f6a0a96a9..000000000 --- a/searx/templates/simple/about.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends 'simple/page_with_header.html' %} -{% block content %} -{{ help.about | safe }} -{% include "__common__/aboutextend.html" ignore missing %} -{% endblock %} diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index 33b7a2cbe..ffd648171 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -58,7 +58,7 @@ </main> <footer> <p> - {{ _('Powered by') }} <a href="{{ url_for('about') }}">searxng</a> - {{ searx_version }} — {{ _('a privacy-respecting, hackable metasearch engine') }}<br/> + {{ _('Powered by') }} <a href="{{ url_for('help_page', pagename='about') }}">searxng</a> - {{ searx_version }} — {{ _('a privacy-respecting, hackable metasearch engine') }}<br/> <a href="{{ searx_git_url }}">{{ _('Source code') }}</a> | <a href="{{ get_setting('brand.issue_url') }}">{{ _('Issue tracker') }}</a> | <a href="{{ url_for('stats') }}">{{ _('Engine stats') }}</a> | diff --git a/searx/templates/simple/help.html b/searx/templates/simple/help.html new file mode 100644 index 000000000..5f571ae01 --- /dev/null +++ b/searx/templates/simple/help.html @@ -0,0 +1,12 @@ +{% extends 'simple/page_with_header.html' %} +{% block title %}{{ page.title }} - {% endblock %} +{% block content %} +<ul class="tabs"> +{% for name, page in all_pages %} + <li> + <a href="{{name}}" {% if name == page_filename %}class="active"{% endif %}>{{page.title}}</a> + </li> +{% endfor %} +</ul> +{{ page.content | safe }} +{% endblock %} |