update to 2023.11.14
This commit is contained in:
parent
31d9ed9e25
commit
616ecc09be
10 changed files with 80 additions and 15 deletions
|
@ -17,7 +17,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng.min.css') }}" type="text/css" media="screen" />
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng.min.css') }}" type="text/css" media="screen" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if get_setting('server.limiter') %}
|
{% if get_setting('server.limiter') or get_setting('server.public_instance') %}
|
||||||
<link rel="stylesheet" href="{{ url_for('client_token', token=link_token) }}" type="text/css" />
|
<link rel="stylesheet" href="{{ url_for('client_token', token=link_token) }}" type="text/css" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block styles %}{% endblock %}
|
{% block styles %}{% endblock %}
|
||||||
|
|
|
@ -13,14 +13,25 @@
|
||||||
} -%}
|
} -%}
|
||||||
<div id="categories" class="search_categories">{{- '' -}}
|
<div id="categories" class="search_categories">{{- '' -}}
|
||||||
<div id="categories_container">
|
<div id="categories_container">
|
||||||
{%- for category in categories -%}
|
{%- if not search_on_category_select or not display_tooltip -%}
|
||||||
<div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/>
|
{%- for category in categories_as_tabs -%}
|
||||||
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
|
<div class="category category_checkbox">{{- '' -}}
|
||||||
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/>
|
||||||
<div class="category_name">{{- _(category) -}}</div>
|
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
|
||||||
</label>
|
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
||||||
</div>
|
<div class="category_name">{{- _(category) -}}</div>
|
||||||
{%- endfor -%}
|
</label>
|
||||||
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
|
</div>
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
|
||||||
|
{%- else -%}
|
||||||
|
{%- for category in categories_as_tabs -%}{{- '\n' -}}
|
||||||
|
<button type="submit" name="category_{{ category }}" class="category category_button {% if category in selected_categories %}selected{% endif %}">
|
||||||
|
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
||||||
|
<div class="category_name">{{- _(category) -}}</div>{{- '' -}}
|
||||||
|
</button>{{- '' -}}
|
||||||
|
{%- endfor -%}
|
||||||
|
{{- '\n' -}}
|
||||||
|
{%- endif -%}
|
||||||
</div>{{- '' -}}
|
</div>{{- '' -}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<div id="engines_msg">
|
<div id="engines_msg">
|
||||||
|
{% if not results and not answers %}
|
||||||
|
<details class="sidebar-collapsable" open>
|
||||||
|
{% else %}
|
||||||
<details class="sidebar-collapsable">
|
<details class="sidebar-collapsable">
|
||||||
|
{% endif %}
|
||||||
<summary class="title" id="engines_msg-title">{{ _('Messages from the search engines') }}</summary>
|
<summary class="title" id="engines_msg-title">{{ _('Messages from the search engines') }}</summary>
|
||||||
<div class="dialog-error" role="alert">
|
<div class="dialog-error" role="alert">
|
||||||
{{ icon_big('warning') }}
|
{{ icon_big('warning') }}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<div id="search_url" role="complementary" aria-labelledby="search_url-title">
|
<div id="search_url" role="complementary" aria-labelledby="search_url-title">
|
||||||
<details class="sidebar-collapsable">
|
<details class="sidebar-collapsable">
|
||||||
<summary class="title" id="search_url-title">{{ _('Search URL') }}</summary>
|
<summary class="title" id="search_url-title">{{ _('Search URL') }}</summary>
|
||||||
|
<button id="copy_url" type="submit" data-copied-text="{{ _('Copied') }}">{{ _('Copy') }}</button>
|
||||||
<div class="selectable_url">
|
<div class="selectable_url">
|
||||||
<pre>{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&language={{ current_language }}&time_range={{ time_range }}&safesearch={{ safesearch }}
|
<pre>{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&language={{ current_language }}&time_range={{ time_range }}&safesearch={{ safesearch }}
|
||||||
{%- if pageno > 1 -%}
|
{%- if pageno > 1 -%}
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
{% from 'beetroot/icons.html' import icon_big %}
|
{% from 'beetroot/icons.html' import icon_big %}
|
||||||
<div class="dialog-error" role="alert">
|
<div class="dialog-error-block" role="alert">
|
||||||
<p><strong>{{ _('Sorry!') }}</strong></p>
|
<p><strong>{{ _('Sorry!') }}</strong></p>
|
||||||
<p>{{ _("we didn't find any results. Please use another query or search in more categories.") }}</p>
|
<p>{{ _("No results were found. You can try to:") }}</p>
|
||||||
|
<ul>
|
||||||
|
<li>{{ _("Refresh the page.") }}</li>
|
||||||
|
<li>{{ _("Search for another query or select another category (above).") }}</li>
|
||||||
|
<li>{{ _("Change the search engine used in the preferences:") }} <a href="/preferences">/preferences</a></li>
|
||||||
|
<li>{{ _("Switch to another instance:") }} <a href="https://searx.space">https://searx.space</a></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{%- macro engine_reliability(engine_name) -%}
|
{%- macro engine_reliability(engine_name) -%}
|
||||||
{%- set r = reliabilities.get(engine_name, {}).get('reliablity', None) -%}
|
{%- set r = reliabilities.get(engine_name, {}).get('reliability', None) -%}
|
||||||
{%- set checker_result = reliabilities.get(engine_name, {}).get('checker', []) -%}
|
{%- set checker_result = reliabilities.get(engine_name, {}).get('checker', []) -%}
|
||||||
{%- set errors = reliabilities.get(engine_name, {}).get('errors', []) -%}
|
{%- set errors = reliabilities.get(engine_name, {}).get('errors', []) -%}
|
||||||
{%- if r != None -%}
|
{%- if r != None -%}
|
||||||
|
@ -197,6 +197,10 @@
|
||||||
{%- if 'infinite_scroll' not in locked_preferences -%}
|
{%- if 'infinite_scroll' not in locked_preferences -%}
|
||||||
{%- include 'beetroot/preferences/infinite_scroll.html' -%}
|
{%- include 'beetroot/preferences/infinite_scroll.html' -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
{%- if 'search_on_category_select' not in locked_preferences -%}
|
||||||
|
{%- include 'beetroot/preferences/search_on_category_select.html' -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- include 'beetroot/preferences/hotkeys.html' -%}
|
||||||
{{- plugin_preferences('ui') -}}
|
{{- plugin_preferences('ui') -}}
|
||||||
{{- tab_footer() -}}
|
{{- tab_footer() -}}
|
||||||
|
|
||||||
|
|
23
beetroot_template/preferences/hotkeys.html
Normal file
23
beetroot_template/preferences/hotkeys.html
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<fieldset>{{- '' -}}
|
||||||
|
<legend id="pref_hotkeys">{{- _('Hotkeys') -}}</legend>{{- '' -}}
|
||||||
|
<div class="value">{{- '' -}}
|
||||||
|
<select name="hotkeys" aria-labelledby="pref_hotkeys">{{- '' -}}
|
||||||
|
<option value="default"
|
||||||
|
{%- if hotkeys == 'default' %} selected="selected"
|
||||||
|
{%- endif -%}>
|
||||||
|
SearXNG{{- '' -}}
|
||||||
|
</option>{{- '' -}}
|
||||||
|
<option value="vim"
|
||||||
|
{%- if hotkeys == 'vim' %} selected="selected"
|
||||||
|
{%- endif -%}>
|
||||||
|
{{- _('Vim-like') -}}
|
||||||
|
</option>{{- '' -}}
|
||||||
|
</select>{{- '' -}}
|
||||||
|
</div>{{- '' -}}
|
||||||
|
<div class="description">
|
||||||
|
{{- _(
|
||||||
|
'Navigate search results with hotkeys (JavaScript required). '
|
||||||
|
'Press "h" key on main or result page to get help.'
|
||||||
|
) -}}
|
||||||
|
</div>{{- '' -}}
|
||||||
|
</fieldset>{{- '' -}}
|
16
beetroot_template/preferences/search_on_category_select.html
Normal file
16
beetroot_template/preferences/search_on_category_select.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<fieldset>{{- '' -}}
|
||||||
|
<legend>{{ _('Search on category select') }}</legend>{{- '' -}}
|
||||||
|
<p class="value">{{- '' -}}
|
||||||
|
<input type="checkbox" {{- ' ' -}}
|
||||||
|
name="search_on_category_select" {{- ' ' -}}
|
||||||
|
aria-labelledby="pref_search_on_category_select" {{- ' ' -}}
|
||||||
|
class="checkbox-onoff" {{- ' ' -}}
|
||||||
|
{%- if preferences.get_value('search_on_category_select') -%}
|
||||||
|
checked
|
||||||
|
{%- endif -%}{{- ' ' -}}
|
||||||
|
/>{{- '' -}}
|
||||||
|
</p>{{- '' -}}
|
||||||
|
<div class="description">
|
||||||
|
{{- _('Perform search immediately if a category selected. Disable to select multiple categories') -}}
|
||||||
|
</div>{{- '' -}}
|
||||||
|
</fieldset>{{- '' -}}
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="search_box">
|
<div class="search_box">
|
||||||
<input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" autocapitalize="none" spellcheck="false" autocorrect="off" dir="auto" value="{{ q or '' }}">
|
<input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" autocapitalize="none" spellcheck="false" autocorrect="off" dir="auto" value="{{ q or '' }}">
|
||||||
<button id="clear_search" type="reset" aria-label="{{ _('clear') }}" class="hide_if_nojs"><span>{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button>
|
<button id="clear_search" type="reset" aria-label="{{ _('clear') }}" class="hide_if_nojs"><span>{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button>
|
||||||
<button id="send_search" type="submit" aria-label="{{ _('search') }}"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
|
<button id="send_search" type="submit" {%- if search_on_category_select -%}name="category_{{ selected_categories[0]|replace(' ', '_') }}"{%- endif -%} aria-label="{{ _('search') }}"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% set display_tooltip = true %}
|
{% set display_tooltip = true %}
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
</div>
|
</div>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</td>
|
</td>
|
||||||
<td class="engine-reliability"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }}</td>
|
<td class="engine-reliability"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliability') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue