mirror of https://github.com/searxng/searxng
[simple theme] rework select; add safesearch to search and replace / with › in article url
* rework selection UI in pref (fix based on: 78643e9f43
)
* moved search filters underneath categories
* cut params from url and replace / with ›
* make h3 and url in article bigger
* add safe search select to search filter (this will not override settings and only be valid while on result page in a session)
* make search form button not overlap each other when js is disabled
* 1rem padding around preview image and thumbnail in default article template
pull/510/head
parent
02cccdf876
commit
f3aff26086
@ -1,4 +1,4 @@
|
||||
<select class="language" id="language" name="language" tabindex="2">{{- '' -}}
|
||||
<select class="language" id="language" name="language" tabindex="1">{{- '' -}}
|
||||
<option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
|
||||
{%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
|
||||
<option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>
|
@ -0,0 +1,5 @@
|
||||
<select name="safesearch" id="safesearch" class="safesearch" tabindex="3">
|
||||
<option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _("SafeSearch") + ": " + _('Strict') }}</option>
|
||||
<option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _("SafeSearch") + ": " + _('Moderate') }}</option>
|
||||
<option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _("SafeSearch") + ": " + _('None') }}</option>
|
||||
</select>
|
@ -1,4 +1,4 @@
|
||||
<select name="time_range" id="time_range" class="time_range" tabindex="3">{{- '' -}}
|
||||
<select name="time_range" id="time_range" class="time_range" tabindex="2">{{- '' -}}
|
||||
<option id="time-range-anytime" value="" {{ "selected" if time_range=="" or not time_range else ""}}>
|
||||
{{- _('Anytime') -}}
|
||||
</option>{{- '' -}}
|
@ -1,22 +1,22 @@
|
||||
<form id="search" method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
|
||||
<a id="search_logo" href="{{ url_for('index') }}">
|
||||
<span hidden>SearXNG</span>
|
||||
{% include '__common__/searxng-wordmark.min.svg' without context %}
|
||||
</a>
|
||||
<div id="search_wrapper">
|
||||
<div id="search_header">
|
||||
<a id="search_logo" href="{{ url_for('index') }}">
|
||||
<span hidden>SearXNG</span>
|
||||
{% include '__common__/searxng-wordmark.min.svg' without context %}
|
||||
</a>
|
||||
<div class="search_box">
|
||||
<input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
|
||||
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button>
|
||||
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
|
||||
</div>
|
||||
<div class="search_filters">
|
||||
{% include 'simple/languages.html' %}
|
||||
{% include 'simple/time-range.html' %}
|
||||
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button>
|
||||
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
|
||||
</div>
|
||||
{% set display_tooltip = true %}
|
||||
{% include 'simple/categories.html' %}
|
||||
</div>
|
||||
<div class="search_filters">
|
||||
{% include 'simple/filters/languages.html' %}
|
||||
{% include 'simple/filters/time_range.html' %}
|
||||
{% include 'simple/filters/safesearch.html' %}
|
||||
</div>
|
||||
{% set display_tooltip = true %}
|
||||
{% include 'simple/categories.html' %}
|
||||
<input type="hidden" name="safesearch" value="{{ safesearch }}" >
|
||||
<input type="hidden" name="theme" value="{{ theme }}" >
|
||||
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
|
||||
</form>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<form id="search" method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
|
||||
<div id="search_wrapper">
|
||||
<div id="search_header">
|
||||
<div class="search_box">
|
||||
<input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
|
||||
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button>
|
||||
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
|
||||
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button>
|
||||
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue