diff options
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/simple/categories.html | 20 | ||||
-rw-r--r-- | searx/templates/simple/icons.html | 36 | ||||
-rw-r--r-- | searx/templates/simple/index.html | 4 | ||||
-rw-r--r-- | searx/templates/simple/macros.html | 11 | ||||
-rw-r--r-- | searx/templates/simple/messages/no_results.html | 22 | ||||
-rw-r--r-- | searx/templates/simple/preferences.html | 9 | ||||
-rw-r--r-- | searx/templates/simple/result_templates/images.html | 4 | ||||
-rw-r--r-- | searx/templates/simple/result_templates/map.html | 5 | ||||
-rw-r--r-- | searx/templates/simple/result_templates/torrent.html | 10 | ||||
-rw-r--r-- | searx/templates/simple/results.html | 23 | ||||
-rw-r--r-- | searx/templates/simple/search.html | 4 | ||||
-rw-r--r-- | searx/templates/simple/simple_search.html | 4 | ||||
-rw-r--r-- | searx/templates/simple/stats.html | 4 |
13 files changed, 104 insertions, 52 deletions
diff --git a/searx/templates/simple/categories.html b/searx/templates/simple/categories.html index 0c121eaed..71fdca90a 100644 --- a/searx/templates/simple/categories.html +++ b/searx/templates/simple/categories.html @@ -1,7 +1,25 @@ +{% from 'simple/icons.html' import icon_big %} +{%- set category_icons = { + 'general': 'search-outline', + 'images': 'image-outline', + 'videos': 'play-outline', + 'news': 'newspaper-outline', + 'map': 'location-outline', + 'music': 'musical-notes-outline', + 'it': 'layers-outline', + 'science': 'school-outline', + 'files': 'file-tray-full-outline', + 'social media': 'people-outline', +} -%} <div id="categories" class="search_categories">{{- '' -}} <div id="categories_container"> {%- for category in categories -%} - <div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/><label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">{{ _(category) }}</label></div> + <div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/> + <label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips"> + {{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}} + <div class="category_name">{{- _(category) -}}</div> + </label> + </div> {%- endfor -%} {%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%} </div>{{- '' -}} diff --git a/searx/templates/simple/icons.html b/searx/templates/simple/icons.html new file mode 100644 index 000000000..ffd5041ca --- /dev/null +++ b/searx/templates/simple/icons.html @@ -0,0 +1,36 @@ +{# this file was generated by searx/static/themes/simple/gruntfile.js #} +{%- set icons = { + 'warning':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M256 80c-8.66 0-16.58 7.36-16 16l8 216a8 8 0 008 8h0a8 8 0 008-8l8-216c.58-8.64-7.34-16-16-16z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><circle cx="256" cy="416" r="16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', + 'close':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>', + 'chevron-up-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M112 328l144-144 144 144"/></svg>', + 'chevron-right':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M184 112l144 144-144 144"/></svg>', + 'chevron-left':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M328 112L184 256l144 144"/></svg>', + 'menu-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M80 160h352M80 256h352M80 352h352"/></svg>', + 'ellipsis-vertical-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><circle cx="256" cy="256" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><circle cx="256" cy="416" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><circle cx="256" cy="96" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/></svg>', + 'magnet-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M421.83 293.82A144 144 0 00218.18 90.17M353.94 225.94a48 48 0 00-67.88-67.88" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M192 464v-48M90.18 421.82l33.94-33.94M48 320h48"/><path d="M286.06 158.06L172.92 271.19a32 32 0 01-45.25 0L105 248.57a32 32 0 010-45.26L218.18 90.17M421.83 293.82L308.69 407a32 32 0 01-45.26 0l-22.62-22.63a32 32 0 010-45.26l113.13-113.17M139.6 169.98l67.88 67.89M275.36 305.75l67.89 67.88" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>', + 'globe-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M256 48C141.13 48 48 141.13 48 256s93.13 208 208 208 208-93.13 208-208S370.87 48 256 48z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path d="M256 48c-58.07 0-112.67 93.13-112.67 208S197.93 464 256 464s112.67-93.13 112.67-208S314.07 48 256 48z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path d="M117.33 117.33c38.24 27.15 86.38 43.34 138.67 43.34s100.43-16.19 138.67-43.34M394.67 394.67c-38.24-27.15-86.38-43.34-138.67-43.34s-100.43 16.19-138.67 43.34" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M256 48v416M464 256H48"/></svg>', + 'search-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M338.29 338.29L448 448"/></svg>', + 'image-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><rect x="48" y="80" width="416" height="352" rx="48" ry="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><circle cx="336" cy="176" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path d="M304 335.79l-90.66-90.49a32 32 0 00-43.87-1.3L48 352M224 432l123.34-123.34a32 32 0 0143.11-2L464 368" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', + 'play-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M112 111v290c0 17.44 17 28.52 31 20.16l247.9-148.37c12.12-7.25 12.12-26.33 0-33.58L143 90.84c-14-8.36-31 2.72-31 20.16z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/></svg>', + 'newspaper-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M368 415.86V72a24.07 24.07 0 00-24-24H72a24.07 24.07 0 00-24 24v352a40.12 40.12 0 0040 40h328" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path d="M416 464h0a48 48 0 01-48-48V128h72a24 24 0 0124 24v264a48 48 0 01-48 48z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M240 128h64M240 192h64M112 256h192M112 320h192M112 384h192"/><path d="M176 208h-64a16 16 0 01-16-16v-64a16 16 0 0116-16h64a16 16 0 0116 16v64a16 16 0 01-16 16z"/></svg>', + 'location-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M256 48c-79.5 0-144 61.39-144 137 0 87 96 224.87 131.25 272.49a15.77 15.77 0 0025.5 0C304 409.89 400 272.07 400 185c0-75.61-64.5-137-144-137z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><circle cx="256" cy="192" r="48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', + 'musical-notes-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M192 218v-6c0-14.84 10-27 24.24-30.59l174.59-46.68A20 20 0 01416 154v22" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M416 295.94v80c0 13.91-8.93 25.59-22 30l-22 8c-25.9 8.72-52-10.42-52-38h0a33.37 33.37 0 0123-32l51-18.15c13.07-4.4 22-15.94 22-29.85V58a10 10 0 00-12.6-9.61L204 102a16.48 16.48 0 00-12 16v226c0 13.91-8.93 25.6-22 30l-52 18c-13.88 4.68-22 17.22-22 32h0c0 27.58 26.52 46.55 52 38l22-8c13.07-4.4 22-16.08 22-30v-80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', + 'layers-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09zM160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', + 'school-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M32 192L256 64l224 128-224 128L32 192z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 240v128l144 80 144-80V240M480 368V192M256 320v128"/></svg>', + 'file-tray-full-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M384 80H128c-26 0-43 14-48 40L48 272v112a48.14 48.14 0 0048 48h320a48.14 48.14 0 0048-48V272l-32-152c-5-27-23-40-48-40z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M48 272h144M320 272h144M192 272a64 64 0 00128 0M144 144h224M128 208h256"/></svg>', + 'people-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M336 304c-65.17 0-127.84 32.37-143.54 95.41-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path d="M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M206 306c-18.05-8.27-37.93-11.45-59-11.45-52 0-102.1 25.85-114.65 76.2-1.65 6.66 2.53 13.25 9.37 13.25H154" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/></svg>', + +} +-%} + +{% macro icon(action, alt) -%} + {{ icons[action] | replace("ionicon", "ion-icon") | safe }} +{%- endmacro %} + +{% macro icon_small(action) -%} + {{ icons[action] | replace("ionicon", "ion-icon-small") | safe }} +{%- endmacro %} + +{% macro icon_big(action, alt) -%} + {{ icons[action] | replace("ionicon", "ion-icon-big") | safe }} +{%- endmacro %} diff --git a/searx/templates/simple/index.html b/searx/templates/simple/index.html index 8a017694e..1e4ea0c48 100644 --- a/searx/templates/simple/index.html +++ b/searx/templates/simple/index.html @@ -1,10 +1,10 @@ {% extends "simple/base.html" %} -{% from 'simple/macros.html' import icon %} +{% from 'simple/icons.html' import icon_big %} {% block meta %} <link rel="preload" href="{{ url_for('static', filename='img/searxng.png') }}" as="image" /> {% endblock %} {% block content %} -<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav> +<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon_big('menu-outline') }}</a></nav> <div class="index"> <div class="title"><h1>SearXNG</h1></div> {% include 'simple/simple_search.html' %} diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html index 92c6c9ef2..26aa71891 100644 --- a/searx/templates/simple/macros.html +++ b/searx/templates/simple/macros.html @@ -1,12 +1,3 @@ -<!-- Draw glyphicon icon from bootstrap-theme --> -{% macro icon(action, alt) -%} - <span title="{{ alt }}" class="ion-icon-big ion-{{ action }}"></span> -{%- endmacro %} - -{% macro icon_small(action) -%} - <span class="ion-icon ion-{{ action }}"></span> -{%- endmacro %} - <!-- Draw favicon --> {% macro draw_favicon(favicon) -%} <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='themes/simple/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" /> @@ -43,7 +34,7 @@ {%- macro result_sub_footer(result, proxify) -%} <div class="engines"> {% for engine in result.engines %}<span>{{ engine }}</span>{% endfor %} - {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "cache_link") }}‎ {% if proxify and proxify_results %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %} + {{ result_link("https://web.archive.org/web/" + result.url, icon_small('ellipsis-vertical-outline') + _('cached'), "cache_link") }}‎ {% if proxify and proxify_results %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %} </div>{{- '' -}} <div class="break"></div>{{- '' -}} {%- endmacro -%} diff --git a/searx/templates/simple/messages/no_results.html b/searx/templates/simple/messages/no_results.html index a3ab97758..b98f834e6 100644 --- a/searx/templates/simple/messages/no_results.html +++ b/searx/templates/simple/messages/no_results.html @@ -1,17 +1,19 @@ -{% from 'simple/macros.html' import icon %} +{% from 'simple/icons.html' import icon_big %} {% if unresponsive_engines %} <div class="dialog-error" role="alert"> - <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p> - {% for engine_name, error_type in unresponsive_engines %} - <p>{{- '' -}} - {{- engine_name }} ( + {{ icon_big('warning') }} + <div> + <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p> + {% for engine_name, error_type in unresponsive_engines %} + <p>{{- '' -}} + {{- engine_name }} ( <a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}"> - {{- error_type -}} + {{- error_type -}} </a> ){{- '' -}} - </p> - {%- endfor %} - - <p><small>{{ _('Please, try again later or find another SearXNG instance.') }} (<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>) </small></p> + </p> + {%- endfor %} + <p><small>{{ _('Please, try again later or find another SearXNG instance.') }} (<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>) </small></p> + </div> </div> {% else %} <div class="dialog-error" role="alert"> diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index 90d01d2b6..267dd6e14 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -1,4 +1,5 @@ -{% from 'simple/macros.html' import icon, tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %} +{% from 'simple/macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %} +{% from 'simple/icons.html' import icon_big %} {% extends "simple/base.html" %} @@ -25,7 +26,7 @@ <p class="engine-description"></p> <p><a href="{{about.website}}" rel="noreferrer">{{about.website}}</a></p> {%- if about.wikidata_id -%}<p><a href="https://www.wikidata.org/wiki/{{about.wikidata_id}}" rel="noreferrer">wikidata.org/wiki/{{about.wikidata_id}}</a></p>{%- endif -%} - {%- if search_engine.enable_http %}<p>{{ icon('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}</p>{% endif -%} + {%- if search_engine.enable_http %}<p>{{ icon_big('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}</p>{% endif -%} {%- if reliabilities.get(search_engine.name, {}).errors or reliabilities.get(search_engine.name, {}).checker -%} <a href="{{ url_for('stats', engine=search_engine.name|e) }}" title="{{ _('View error logs and submit a bug report') }}"> {{ _('View error logs and submit a bug report') }} @@ -74,7 +75,7 @@ <td class="{{ label }} column-reliability">{{- "" -}} <a href="{{ url_for('stats', engine=engine_name|e) }}">{{- "" -}} <span aria-labelledby="{{engine_name}}_reliability"> - {{ icon('warning', 'The engine is not reliabled') }} {{ r -}} + {{ icon_big('warning', 'The engine is not reliabled') }} {{ r -}} </span>{{- "" -}} </a>{{- "" -}} <div class="engine-tooltip" role="tooltip" id="{{engine_name}}_reliability"> @@ -263,7 +264,7 @@ {% set engine_id = 'engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_') %} <tr> <td class="engine_checkbox">{{ checkbox_onoff(engine_id, (search_engine.name, categ) in disabled_engines) }}</td> - <th class="name" data-engine-name="{{ search_engine.name }}">{% if search_engine.enable_http %}{{ icon('warning', 'No HTTPS') }}{% endif %} {{ search_engine.name }} {{ engine_about(search_engine) }}</th> + <th class="name" data-engine-name="{{ search_engine.name }}">{% if search_engine.enable_http %}{{ icon_big('warning', 'No HTTPS') }}{% endif %} {{ search_engine.name }} {{ engine_about(search_engine) }}</th> <td class="shortcut">{{ shortcuts[search_engine.name] }}</td> <td>{{ checkbox(engine_id + '_supported_languages', supports[search_engine.name]['supports_selected_language'], true, true) }}</td> <td>{{ checkbox(engine_id + '_safesearch', supports[search_engine.name]['safesearch'], true, true) }}</td> diff --git a/searx/templates/simple/result_templates/images.html b/searx/templates/simple/result_templates/images.html index f905cd6d7..82cfcdde5 100644 --- a/searx/templates/simple/result_templates/images.html +++ b/searx/templates/simple/result_templates/images.html @@ -5,8 +5,8 @@ </a>{{- "" -}} <div class="detail">{{- "" -}} <a class="result-detail-close" href="#">{{ icon('close') }}</a>{{- "" -}} - <a class="result-detail-previous" href="#">{{ icon_small('chevron-left') }}</a>{{- "" -}} - <a class="result-detail-next" href="#">{{ icon_small('chevron-right') }}</a>{{- "" -}} + <a class="result-detail-previous" href="#">{{ icon('chevron-left') }}</a>{{- "" -}} + <a class="result-detail-next" href="#">{{ icon('chevron-right') }}</a>{{- "" -}} <a class="result-images-source" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}"> {%- if result.thumbnail_src -%} <img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}"> diff --git a/searx/templates/simple/result_templates/map.html b/searx/templates/simple/result_templates/map.html index 244483a1d..3492d5d5f 100644 --- a/searx/templates/simple/result_templates/map.html +++ b/searx/templates/simple/result_templates/map.html @@ -1,4 +1,5 @@ -{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, icon with context %} +{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl with context %} +{% from 'simple/icons.html' import icon_small %} {{ result_header(result, favicons, image_proxify) -}} {{- result_sub_header(result) -}} @@ -39,7 +40,7 @@ </table> {%- if (result.latitude and result.longitude) or result.boundingbox -%} - <small> <a class="btn-collapse collapsed searxng_init_map hide_if_nojs" data-target="#result-map-{{ index }}" data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %}>{{ icon( 'globe') }} {{ _('show map') }}</a></small> + <small> <a class="btn-collapse collapsed searxng_init_map hide_if_nojs" data-target="#result-map-{{ index }}" data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %}>{{ icon_small( 'globe-outline') }} {{ _('show map') }}</a></small> {%- endif -%} {{- result_sub_footer(result, proxify) -}} diff --git a/searx/templates/simple/result_templates/torrent.html b/searx/templates/simple/result_templates/torrent.html index ffb51588b..ecca0fdec 100644 --- a/searx/templates/simple/result_templates/torrent.html +++ b/searx/templates/simple/result_templates/torrent.html @@ -3,12 +3,12 @@ {{ result_header(result, favicons, image_proxify) -}} {{- result_sub_header(result) -}} -{% if result.magnetlink %}<p class="altlink"> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</p>{% endif %} -{% if result.torrentfile %}<p class="altlink"> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %} +{% if result.magnetlink %}<p class="altlink"> • {{ result_link(result.magnetlink, icon_big('magnet-outline') + _('magnet link'), "magnetlink") }}</p>{% endif %} +{% if result.torrentfile %}<p class="altlink"> • {{ result_link(result.torrentfile, icon_big('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %} -{% if result.seed is defined %}<p class="stat"> • {{ icon('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> • {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %} +{% if result.seed is defined %}<p class="stat"> • {{ icon_big('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> • {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %} -{%- if result.filesize %}<p class="stat">{{ icon('floppy-disk') }} {{ _('Filesize') }}<span class="badge"> +{%- if result.filesize %}<p class="stat">{{ icon_big('floppy-disk') }} {{ _('Filesize') }}<span class="badge"> {%- if result.filesize < 1024 %}{{ result.filesize }} {{ _('Bytes') }} {%- elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} {{ _('kiB') }} {%- elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }} @@ -17,7 +17,7 @@ </span></p> {%- endif -%} -{%- if result.files %}<p class="stat">{{ icon('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%} +{%- if result.files %}<p class="stat">{{ icon_big('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%} {%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%} {{- result_sub_footer(result, proxify) -}} diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html index 59874dab3..59de1ee0d 100644 --- a/searx/templates/simple/results.html +++ b/searx/templates/simple/results.html @@ -1,5 +1,5 @@ {% extends "simple/base.html" %} -{% from 'simple/macros.html' import icon, icon_small %} +{% from 'simple/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 method == 'GET' %}{{- 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 }}&categories={{ selected_categories|join(",") | replace(' ','+') }}&pageno={{ pageno }}&time_range={{ time_range }}&language={{ current_language }}&safesearch={{ safesearch }}&format=rss">{% endblock %} {% block content %} -<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav> +<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon_big('menu-outline') }}</a></nav> {% include 'simple/search.html' %} {% if results and results|map(attribute='template')|unique|list|count == 1 %} @@ -42,14 +42,17 @@ {% if unresponsive_engines and results|length >= 1 %} <div class="dialog-error" role="alert"> - <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p> - {%- for engine_name, error_type in unresponsive_engines -%} - <p>{{- engine_name }} ( - <a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}"> + {{ icon_big('warning') }} + <div> + <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p> + {%- for engine_name, error_type in unresponsive_engines -%} + <p>{{- engine_name }} ( + <a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}"> {{- error_type -}} - </a> ){{- '' -}} - </p> - {% endfor %} + </a> ){{- '' -}} + </p> + {% endfor %} + </div> </div> {% endif %} @@ -141,7 +144,7 @@ {% endif %} </div> <div id="backToTop"> - <a href="#">{{ icon_small('chevron-up') }}</a> + <a href="#">{{ icon_small('chevron-up-outline') }}</a> </div> {% if paging %} <nav id="pagination"> diff --git a/searx/templates/simple/search.html b/searx/templates/simple/search.html index 1f410ad96..c231d7b35 100644 --- a/searx/templates/simple/search.html +++ b/searx/templates/simple/search.html @@ -6,8 +6,8 @@ <div id="search_wrapper"> <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('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('search') }}</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 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' %} diff --git a/searx/templates/simple/simple_search.html b/searx/templates/simple/simple_search.html index 3d0e11834..8612ceca6 100644 --- a/searx/templates/simple/simple_search.html +++ b/searx/templates/simple/simple_search.html @@ -2,8 +2,8 @@ <div id="search_wrapper"> <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('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('search') }}</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 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> </form> diff --git a/searx/templates/simple/stats.html b/searx/templates/simple/stats.html index c023cfdd2..1e905790a 100644 --- a/searx/templates/simple/stats.html +++ b/searx/templates/simple/stats.html @@ -1,4 +1,4 @@ -{% from 'simple/macros.html' import icon %} +{% from 'simple/icons.html' import icon_big %} {% from '__common__/new_issue.html' import new_issue with context %} {% extends "simple/base.html" %} @@ -7,7 +7,7 @@ {% if selected_engine_name %} {{ column_name }} {% elif column_order==sort_order %} - {{ column_name }} {{ icon('arrow-dropdown') }} + {{ column_name }} {{ icon_big('arrow-dropdown') }} {% else %} <a href="{{ url_for('stats', sort=column_order) }}">{{ column_name }}</a> {% endif %} |