Remove theme choice: move searx/templates/simple to searx/templates

This commit is contained in:
Alexandre Flament 2022-05-08 10:11:00 +02:00
parent 641e39b0df
commit 31bb938126
44 changed files with 69 additions and 89 deletions

View file

@ -1,4 +1,4 @@
{% extends "simple/base.html" %}
{% extends "base.html" %}
{% block content %}
<div class="center">
<h1>{{ _('Page not found') }}</h1>

View file

@ -28,7 +28,7 @@
<link rel="icon" href="{{ url_for('static', filename='img/favicon.svg') }}" type="image/svg+xml">
</head>
<body class="{{ endpoint }}_endpoint" >
<main id="main_{{ self._TemplateReference__context.name|replace("simple/", "")|replace(".html", "") }}" class="{{body_class}}">
<main id="main_{{ self._TemplateReference__context.name|replace(".html", "") }}" class="{{body_class}}">
{% if errors %}
<div class="dialog-error" role="alert">
<a href="#" class="close" aria-label="close" title="close">×</a>
@ -41,7 +41,7 @@
{% endif %}
<nav id="links_on_top">
{%- from 'simple/icons.html' import icon_big -%}
{%- from 'icons.html' import icon_big -%}
{%- block linkto_about -%}
<a href="{{ url_for('info', pagename='about') }}" class="link_on_top_about">{{ icon_big('information-circle-outline') }}<span>{{ _('About') }}</span></a>
{%- endblock -%}

View file

@ -1,4 +1,4 @@
{% from 'simple/icons.html' import icon_big %}
{% from 'icons.html' import icon_big %}
{%- set category_icons = {
'general': 'search-outline',
'images': 'image-outline',

View file

@ -0,0 +1,8 @@
{% extends "base.html" %}
{% from 'icons.html' import icon_big %}
{% block content %}
<div class="index">
<div class="title"><h1>SearXNG</h1></div>
{% include 'simple_search.html' %}
</div>
{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends 'simple/page_with_header.html' %}
{% extends 'page_with_header.html' %}
{% block title %}{{ active_page.title }} - {% endblock %}
{% block linkto_about %}{% endblock %}
{% block linkto_donate %}{% endblock %}

View file

@ -1,4 +1,4 @@
{% from 'simple/icons.html' import icon_small %}
{% from 'icons.html' import icon_small %}
<!-- Draw favicon -->
{% macro draw_favicon(favicon) -%}

View file

@ -1,4 +1,4 @@
{% from 'simple/icons.html' import icon %}
{% from 'icons.html' import icon %}
<div class="alert alert-info fade in" role="alert">
<strong class="lead">{{ icon('info-sign') }} {{ _('Information!') }}</strong>
{{ _('currently, there are no cookies defined.') }}

View file

@ -1,4 +1,4 @@
{% from 'simple/icons.html' import icon_big %}
{% from 'icons.html' import icon_big %}
{% if unresponsive_engines %}
<div class="dialog-error" role="alert">
{{ icon_big('warning') }}

View file

@ -1,5 +1,5 @@
{% set body_class = "page_with_header" %}
{% extends "simple/base.html" %}
{% extends "base.html" %}
{% block header %}
<a href="{{ url_for('index') }}"><img class="logo" src="{{ url_for('static', filename='img/searxng.png') }}" alt="SearXNG"></a>
{% endblock %}

View file

@ -1,7 +1,7 @@
{% from 'simple/macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %}
{% from 'simple/icons.html' import icon_big %}
{% from 'macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %}
{% from 'icons.html' import icon_big %}
{% extends "simple/page_with_header.html" %}
{% extends "page_with_header.html" %}
{%- macro plugin_preferences(section) -%}
{%- for plugin in plugins -%}
@ -107,7 +107,7 @@
<fieldset>
<legend>{{ _('Default categories') }}</legend>
{% set display_tooltip = false %}
{% include 'simple/categories.html' %}
{% include 'categories.html' %}
</fieldset>
{% endif %}
{% if 'language' not in locked_preferences %}
@ -191,17 +191,6 @@
</fieldset>
{% endif %}
{% if 'theme' not in locked_preferences %}
<fieldset>
<legend id="pref_theme">{{ _('Theme') }}</legend>
<p class="value">
<select name="theme" aria-labelledby="pref_theme">
{%- for name in themes -%}
<option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
{%- endfor -%}
</select>
</p>
<div class="description">{{ _('Change SearXNG layout') }}</div>
</fieldset>
<fieldset>
<legend id="pref_simple_style">{{ _('Theme style') }}</legend>
<p class="value">
@ -409,7 +398,7 @@
{% endfor %}
</table>
{% else %}
{% include 'simple/messages/no_cookies.html' %}
{% include 'messages/no_cookies.html' %}
{% endif %}
<h4>{{ _('Search URL of the currently saved preferences') }} :</h4>
<div class="selectable_url">

View file

@ -1,4 +1,4 @@
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
{% from 'macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
{{ result_header(result, favicons, image_proxify) -}}
{{- result_sub_header(result) -}}

View file

@ -1,4 +1,4 @@
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
{% from 'macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
{{ result_header(result, favicons, image_proxify) -}}
{{- result_sub_header(result) -}}

View file

@ -1,5 +1,5 @@
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
{% from 'simple/icons.html' import icon_small %}
{% from 'macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
{% from 'icons.html' import icon_small %}
{{ result_header(result, favicons, image_proxify) -}}
{{- result_sub_header(result) -}}

View file

@ -0,0 +1,14 @@
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl with context %}
{{ result_header(result, favicons, image_proxify) -}}
{{- result_sub_header(result) -}}
{% if result.price %}<div class="result_price">{{ result.price }}</div></br>{% endif %}
{% if result.shipping %}<div class="result_shipping">{{ result.shipping }}</div></br>{% endif %}
{% if result.source_country %}<div class="result_source_country">{{ result.source_country }}</div></br>{% endif %}
{%- if result.content %}
<p class="content">
{{ result.content }}
</p>
{% endif -%}
{{- result_sub_footer(result, proxify) -}}
{{- result_footer(result) }}

View file

@ -1,4 +1,4 @@
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_link with context %}
{% from 'macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_link with context %}
{{ result_header(result, favicons, image_proxify) -}}
{{- result_sub_header(result) -}}

View file

@ -1,4 +1,4 @@
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
{% from 'macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}
{{ result_header(result, favicons, image_proxify) }}
{{ result_sub_header(result) }}

View file

@ -1,5 +1,5 @@
{% extends "simple/base.html" %}
{% from 'simple/icons.html' import icon, icon_big, icon_small %}
{% extends "base.html" %}
{% from 'icons.html' import icon, icon_big, icon_small %}
{% macro engine_data_form(engine_data) -%}
{% for engine_name, kv_data in engine_data.items() %}
{% for k, v in kv_data.items() %}
@ -10,7 +10,7 @@
{% block title %}{% if query_in_title %}{{- q|e }} - {% endif %}{% endblock %}
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}&amp;pageno={{ pageno }}&amp;time_range={{ time_range }}&amp;language={{ current_language }}&amp;safesearch={{ safesearch }}&amp;format=rss">{% endblock %}
{% block content %}
{% include 'simple/search.html' %}
{% include 'search.html' %}
{% if results and results|map(attribute='template')|unique|list|count == 1 %}
{% set only_template = 'only_template_' + results[0]['template']|default('default')|replace('.html', '') %}
@ -58,7 +58,7 @@
{% if infoboxes %}
<div id="infoboxes">
{% for infobox in infoboxes -%}
{% include 'simple/infobox.html' %}
{% include 'infobox.html' %}
{%- endfor %}
</div>
{% endif %}
@ -145,7 +145,7 @@
{% if result.close_group and not only_template %}</div>{% endif %}
{% endfor %}
{% if not results and not answers %}
{% include 'simple/messages/no_results.html' %}
{% include 'messages/no_results.html' %}
{% endif %}
</div>
<div id="backToTop">

View file

@ -2,7 +2,7 @@
<div id="search_header">
<a id="search_logo" href="{{ url_for('index') }}" tabindex="0" title="{{ _('Display the front page') }}">
<span hidden>SearXNG</span>
{% include 'simple/searxng-wordmark.min.svg' without context %}
{% include 'searxng-wordmark.min.svg' without context %}
</a>
<div id="search_view">
<div class="search_box">
@ -12,12 +12,12 @@
</div>
</div>
{% set display_tooltip = true %}
{% include 'simple/categories.html' %}
{% include 'categories.html' %}
</div>
<div class="search_filters">
{% include 'simple/filters/languages.html' %}
{% include 'simple/filters/time_range.html' %}
{% include 'simple/filters/safesearch.html' %}
{% include 'filters/languages.html' %}
{% include 'filters/time_range.html' %}
{% include 'filters/safesearch.html' %}
</div>
<input type="hidden" name="theme" value="{{ theme }}" >
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}

View file

Before

Width:  |  Height:  |  Size: 711 B

After

Width:  |  Height:  |  Size: 711 B

Before After
Before After

View file

@ -1,8 +0,0 @@
{% extends "simple/base.html" %}
{% from 'simple/icons.html' import icon_big %}
{% block content %}
<div class="index">
<div class="title"><h1>SearXNG</h1></div>
{% include 'simple/simple_search.html' %}
</div>
{% endblock %}

View file

@ -1,7 +1,7 @@
{% from 'simple/icons.html' import icon_big %}
{% from 'simple/new_issue.html' import new_issue with context %}
{% from 'icons.html' import icon_big %}
{% from 'new_issue.html' import new_issue with context %}
{% extends "simple/page_with_header.html" %}
{% extends "page_with_header.html" %}
{%- macro th_sort(column_order, column_name) -%}
{% if selected_engine_name %}