From 566dfe33307e33e4cb54dc6eae17fb373a09684e Mon Sep 17 00:00:00 2001 From: MrPaulBlack Date: Sat, 13 Nov 2021 10:42:07 +0100 Subject: [PATCH 1/2] [simple theme] update to ion icons 5 and drop webfont * update from ionicons-npm to ionicons ver.5 * drop the webfont built by grunt for icons * built icons.html template for inlining icons with jinja2 into html * update icon to use mostly the outline version * add icons to categories and do not display them on mobile to save space * remove all legacy ion icon font files from simple theme * icons.html is added in this commit since make statc.build.restore requires git to know the file already * cleanup error-dialog --- searx/static/themes/simple/fonts/ion.css | 139 --------- searx/static/themes/simple/fonts/ion.html | 268 ------------------ searx/static/themes/simple/fonts/ion.svg | Bin 12611 -> 0 bytes searx/static/themes/simple/fonts/ion.ttf | Bin 3936 -> 0 bytes searx/static/themes/simple/fonts/ion.woff | Bin 4856 -> 0 bytes searx/static/themes/simple/fonts/ion.woff2 | Bin 2040 -> 0 bytes searx/static/themes/simple/gruntfile.js | 153 +++++----- searx/static/themes/simple/package.json | 14 +- .../static/themes/simple/src/fonts/magnet.svg | Bin 1159 -> 0 bytes .../themes/simple/src/generated/ion.less | 181 ------------ .../static/themes/simple/src/less/search.less | 75 ++--- .../static/themes/simple/src/less/style.less | 22 +- .../themes/simple/src/less/toolkit.less | 13 +- searx/templates/simple/categories.html | 20 +- searx/templates/simple/icons.html | 36 +++ searx/templates/simple/index.html | 4 +- searx/templates/simple/macros.html | 11 +- .../templates/simple/messages/no_results.html | 22 +- searx/templates/simple/preferences.html | 9 +- .../simple/result_templates/images.html | 4 +- .../simple/result_templates/map.html | 5 +- .../simple/result_templates/torrent.html | 10 +- searx/templates/simple/results.html | 23 +- searx/templates/simple/search.html | 4 +- searx/templates/simple/simple_search.html | 4 +- searx/templates/simple/stats.html | 4 +- utils/lib_static.sh | 1 + 27 files changed, 260 insertions(+), 762 deletions(-) delete mode 100644 searx/static/themes/simple/fonts/ion.css delete mode 100644 searx/static/themes/simple/fonts/ion.html delete mode 100644 searx/static/themes/simple/fonts/ion.svg delete mode 100644 searx/static/themes/simple/fonts/ion.ttf delete mode 100644 searx/static/themes/simple/fonts/ion.woff delete mode 100644 searx/static/themes/simple/fonts/ion.woff2 delete mode 100644 searx/static/themes/simple/src/fonts/magnet.svg delete mode 100644 searx/static/themes/simple/src/generated/ion.less create mode 100644 searx/templates/simple/icons.html diff --git a/searx/static/themes/simple/fonts/ion.css b/searx/static/themes/simple/fonts/ion.css deleted file mode 100644 index 100524941..000000000 --- a/searx/static/themes/simple/fonts/ion.css +++ /dev/null @@ -1,139 +0,0 @@ -/* Generated by grunt-webfont */ - - - -@font-face { - font-family:"ion"; - src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45"); - src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45#iefix") format("embedded-opentype"), - url("../fonts/ion.woff2?31a1b735188db616a2142d17947e8a45") format("woff2"), - url("../fonts/ion.woff?31a1b735188db616a2142d17947e8a45") format("woff"), - url("../fonts/ion.ttf?31a1b735188db616a2142d17947e8a45") format("truetype"), - url("../fonts/ion.svg?31a1b735188db616a2142d17947e8a45#ion") format("svg"); - font-weight:normal; - font-style:normal; -} - -.ion-icon { - - font-family:"ion"; - - display:inline-block; - line-height:1; - font-weight:normal; - font-style:normal; - speak:none; - text-decoration:inherit; - text-transform:none; - text-rendering:auto; - -webkit-font-smoothing:antialiased; - -moz-osx-font-smoothing:grayscale; -} - - -/* Icons */ - - -.ion-navicon-round:before { - content:"\f101"; -} - - -.ion-search:before { - content:"\f102"; -} - - -.ion-play:before { - content:"\f103"; -} - - -.ion-link:before { - content:"\f104"; -} - - -.ion-chevron-up:before { - content:"\f105"; -} - - -.ion-chevron-left:before { - content:"\f106"; -} - - -.ion-chevron-right:before { - content:"\f107"; -} - - -.ion-arrow-down-a:before { - content:"\f108"; -} - - -.ion-arrow-up-a:before { - content:"\f109"; -} - - -.ion-arrow-swap:before { - content:"\f10a"; -} - - -.ion-arrow-dropdown:before { - content:"\f10b"; -} - - -.ion-globe:before { - content:"\f10c"; -} - - -.ion-time:before { - content:"\f10d"; -} - - -.ion-location:before { - content:"\f10e"; -} - - -.ion-warning:before { - content:"\f10f"; -} - - -.ion-error:before { - content:"\f110"; -} - - -.ion-film-outline:before { - content:"\f111"; -} - - -.ion-music-note:before { - content:"\f112"; -} - - -.ion-more-vertical:before { - content:"\f113"; -} - - -.ion-magnet:before { - content:"\f114"; -} - - -.ion-close:before { - content:"\f115"; -} diff --git a/searx/static/themes/simple/fonts/ion.html b/searx/static/themes/simple/fonts/ion.html deleted file mode 100644 index 0a7b49c60..000000000 --- a/searx/static/themes/simple/fonts/ion.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - ion - - - -

ion

- -
- -
ion-navicon-round
- -
ion-search
- -
ion-play
- -
ion-link
- -
ion-chevron-up
- -
ion-chevron-left
- -
ion-chevron-right
- -
ion-arrow-down-a
- -
ion-arrow-up-a
- -
ion-arrow-swap
- -
ion-arrow-dropdown
- -
ion-globe
- -
ion-time
- -
ion-location
- -
ion-warning
- -
ion-error
- -
ion-film-outline
- -
ion-music-note
- -
ion-more-vertical
- -
ion-magnet
- -
ion-close
- -
- - - -

Usage

-
<i class="ion-icon ion-name"></i>
- - - - - - - diff --git a/searx/static/themes/simple/fonts/ion.svg b/searx/static/themes/simple/fonts/ion.svg deleted file mode 100644 index 01c2ce025dd995ea608fde2495fff03982ebc5bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12611 zcmc(mYmXbrb%wvsujnv9kRa%ux^(qLk=B5By+({EF%UaJK5{vfI53A4NQ&CkulMtw z>S|I$VO9Yg1YU8vtLt*=ocCO-{Q5UPKW(e?`fz;Q@7^qY;}+HNwA?)`xBK1t&0@D- z{N}s6*MIlJe|-O^|M}zZs^j^6^~XQ|_TT>X`)X0&-~V^~{{H@lKmAbs=YRda@{Pa0 z|J}bYs>SAX`ta)h{?n&V&8OJx5AW}Pe^`FlJg$!Sbi7wb2Hi86_szrUVNq#~y1ol8 z_`0iue^q^dST9fOhw9V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pZ8wEo0X|CDnRjrf_Tx^q^2&fm_NgzL zfzDX$jMQ($jO!n|)uuE*w}-O*w)S1X9uLtS^fOqWVsq@r&5m+MPoPn#(FJI@0fRAWB>>J(Nya6HHC;x4xCQC zHHnzs$5M0#-##wHRK~fKlci+IDAAdXjqvtErELf#?3&8XLvy=re}`HTa&_n&V$|D# zc|h|WSb)r99azM7!gC#10{wM#61Km;+c4q&vAzy0I){0^9hheaaW2|)0WuGFV39@G zk2uiaYSsiF)etoG7V9J(Rv&T9lDllZ?ddXtkkKVS? zhD|oa23Zl^1mD8gRCQ%-s#>3~M9g$HvOj{k@HU4Ai-Ts?guqT8j=*}ItzNa6g_R+D zE(?k0HndvnUHoUUPUVfQ%ckOzAs!cuh-xmALJo40i`?WP zmAvF5KLsdAA<{_qtdx%}&Qw(%v@S!uOWuFot8wWad?!qVc(ea@MM%CS1w>oxZ_ zxKx>2^K2va#rcIbce!4#ZVb*=H&zDA&Ni}My9%yulxu27q+YFAV&eQ#_1=oGwzynT ztUr}&ShBoPuCFYv%!?IRtGnkGmzD>s>uYeM;#^)|U7Q(QsjgK#%hh^i@K~k3wm4H> ll9tQ!E0r~IW~sVbu{Q(%j;wEn_TIevaP={Zy7T|#e*oqWZ3qAW diff --git a/searx/static/themes/simple/fonts/ion.woff b/searx/static/themes/simple/fonts/ion.woff deleted file mode 100644 index 84dd558889db2f1782b1b281e248561d231568d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4856 zcmZWtWmFX0)}En<7Nn(1Bphl8LAn{5p0|4};QM&Qe%E|^%Ol&2_n;wHlDW2Bx+WJq0005vShO1)$mu<9=v~jg|!^C0$ zfM9I$0Fu*oM>}g<4F7|{(|>dZT%p&F7!hOVz;H$kIIydM8;-7CewZ343>UxvjMt6b z=W6YT$puuzaJ+v(tpj*z?P`b7K4SPR<_>MykgRum<>`f~TZ+-BF<`l00?_+q+rVw% zZ~)?~kty@qU)N3{H(|k0WKNCDU6<4DJsI7h@EE>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JU5 zj6{TIMRi-hzimP1g9@Te&ldhK%ZRO`^pwnCL#6KgXhaNaS>AG0AeAM~6`O(yaTSOK z`#Q(R*35C=PnaLvks3u-BbaGdAA6x4@nxCrH#3nB&A} zNMo9fOqO+QpS8rFX~J%LR{YkgycHH_4(ACjWlx3i=}e$l*Xe7jL)*ZYt)%$wS1E8UtATl4cSY=mjE1Y5-0KHrSmk3K8q%V8Apd4;hQVu-f7q z0O$h`1{UDSwr+|Z=!IeEk1iP8t?AKgSpO~+tL0`xOBlTB*#k11NP!B-O#{aV+LlhF zAsLxbo)hZ28nrwFhhmGty?V&b6jjcZuY>dE&a~vrWT!eF<@)lLMT0Tqe4q+TyAA;M83_sV`&m(NYLX|i}@?BWsh$jR2kw8W=k(n%HB^%jEB#Hbf zfC4FqHok9xzIYXvwMn=XgzV>&5&TcI$oA;uV9&O~X0N7^FxGc;o4ibOeL>DTT+ks7 z9+cG#jxxYLr6H^N9DSZhe|V}3)(^hXGQTX6i7VktW WzF9N6j=3%#=)y1w*0U!q2mk=Ke9rU$ diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index f10d00cf3..43f61c0d2 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -8,8 +8,8 @@ module.exports = function(grunt) { pkg: grunt.file.readJSON('package.json'), watch: { scripts: { - files: ['src/**'], - tasks: ['eslint', 'copy', 'concat', 'uglify', 'htmlmin', 'less:development', 'less:production'] + files: ['gruntfile.js', 'src/**'], + tasks: ['eslint', 'copy', 'concat', 'svg2jinja', 'uglify', 'htmlmin', 'less:development', 'less:production'] } }, eslint: { @@ -106,70 +106,6 @@ module.exports = function(grunt) { } } }, - webfont: { - icons: { - // src: 'node_modules/ionicons-npm/src/*.svg', - src: [ - 'node_modules/ionicons-npm/src/navicon-round.svg', - 'node_modules/ionicons-npm/src/search.svg', - 'node_modules/ionicons-npm/src/play.svg', - 'node_modules/ionicons-npm/src/link.svg', - 'node_modules/ionicons-npm/src/chevron-up.svg', - 'node_modules/ionicons-npm/src/chevron-left.svg', - 'node_modules/ionicons-npm/src/chevron-right.svg', - 'node_modules/ionicons-npm/src/arrow-down-a.svg', - 'node_modules/ionicons-npm/src/arrow-up-a.svg', - 'node_modules/ionicons-npm/src/arrow-swap.svg', - 'node_modules/ionicons-npm/src/telephone.svg', - 'node_modules/ionicons-npm/src/android-arrow-dropdown.svg', - 'node_modules/ionicons-npm/src/android-globe.svg', - 'node_modules/ionicons-npm/src/android-time.svg', - 'node_modules/ionicons-npm/src/location.svg', - 'node_modules/ionicons-npm/src/alert-circled.svg', - 'node_modules/ionicons-npm/src/android-alert.svg', - 'node_modules/ionicons-npm/src/ios-film-outline.svg', - 'node_modules/ionicons-npm/src/music-note.svg', - 'node_modules/ionicons-npm/src/ion-close-round.svg', - 'node_modules/ionicons-npm/src/android-more-vertical.svg', - 'src/fonts/magnet.svg', - 'node_modules/ionicons-npm/src/android-close.svg', - ], - dest: 'fonts', - destLess: 'src/generated', - options: { - font: 'ion', - hashes : true, - syntax: 'bem', - styles : 'font,icon', - types : 'eot,woff2,woff,ttf,svg', - order : 'eot,woff2,woff,ttf,svg', - stylesheets : ['css', 'less'], - relativeFontPath : '../fonts/', - autoHint : false, - normalize : false, - // ligatures : true, - optimize : true, - // fontHeight : 400, - rename : function(name) { - basename = path.basename(name); - if (basename === 'android-alert.svg') { - return 'error.svg'; - } - if (basename === 'alert-circled.svg') { - return 'warning.svg'; - } - if (basename === 'ion-close-round.svg') { - return 'close.svg'; - } - return basename.replace(/(ios|md|android)-/i, ''); - }, - templateOptions: { - baseClass: 'ion-icon', - classPrefix: 'ion-' - } - } - } - }, less: { development: { options: { @@ -197,6 +133,89 @@ module.exports = function(grunt) { } }, }, + svg2jinja: { + all: { + src: { + 'warning': 'node_modules/ionicons/dist/svg/alert-outline.svg', + 'close': 'node_modules/ionicons/dist/svg/close-outline.svg', + 'chevron-up-outline': 'node_modules/ionicons/dist/svg/chevron-up-outline.svg', + 'chevron-right': 'node_modules/ionicons/dist/svg/chevron-forward-outline.svg', + 'chevron-left': 'node_modules/ionicons/dist/svg/chevron-back-outline.svg', + 'menu-outline': 'node_modules/ionicons/dist/svg/menu-outline.svg', + 'ellipsis-vertical-outline': 'node_modules/ionicons/dist/svg/ellipsis-vertical-outline.svg', + 'magnet-outline': 'node_modules/ionicons/dist/svg/magnet-outline.svg', + 'globe-outline': 'node_modules/ionicons/dist/svg/globe-outline.svg', + 'search-outline': 'node_modules/ionicons/dist/svg/search-outline.svg', + 'image-outline': 'node_modules/ionicons/dist/svg/image-outline.svg', + 'play-outline': 'node_modules/ionicons/dist/svg/play-outline.svg', + 'newspaper-outline': 'node_modules/ionicons/dist/svg/newspaper-outline.svg', + 'location-outline': 'node_modules/ionicons/dist/svg/location-outline.svg', + 'musical-notes-outline': 'node_modules/ionicons/dist/svg/musical-notes-outline.svg', + 'layers-outline': 'node_modules/ionicons/dist/svg/layers-outline.svg', + 'school-outline': 'node_modules/ionicons/dist/svg/school-outline.svg', + 'file-tray-full-outline': 'node_modules/ionicons/dist/svg/file-tray-full-outline.svg', + 'people-outline': 'node_modules/ionicons/dist/svg/people-outline.svg', + }, + dest: '../../../templates/simple/icons.html', + }, + }, + }); + + + grunt.registerMultiTask('svg2jinja', 'Create Jinja2 macro', function() { + const ejs = require('ejs'), svgo = require('svgo'); + const icons = {} + for(const iconName in this.data.src) { + const svgFileName = this.data.src[iconName]; + try { + const svgContent = grunt.file.read(svgFileName, { encoding: 'utf8' }) + const svgoResult = svgo.optimize(svgContent, { + path: svgFileName, + multipass: true, + plugins: [ + { + name: "removeTitle", + }, + { + name: "removeXMLNS", + }, + { + name: "addAttributesToSVGElement", + params: { + attributes: [ + { "aria-hidden": "true" } + ] + } + } + ] + }); + icons[iconName] = svgoResult.data.replace("'", "\\'"); + } catch (err) { + grunt.log.error(err); + } + } + const template = `{# this file was generated by searx/static/themes/simple/gruntfile.js #} +{%- set icons = { +<% for (const iconName in icons) { %> '<%- iconName %>':'<%- icons[iconName] %>', +<% } %> +} +-%} + +{% 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 %} +`; + const result = ejs.render(template, { icons }); + grunt.file.write(this.data.dest, result, { encoding: 'utf8' }); + grunt.log.ok(this.data.dest + " created"); }); grunt.loadNpmTasks('grunt-contrib-watch'); @@ -207,7 +226,6 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-webfont'); grunt.loadNpmTasks('grunt-stylelint'); grunt.loadNpmTasks('grunt-eslint'); @@ -218,6 +236,7 @@ module.exports = function(grunt) { 'stylelint', 'copy', 'concat', + 'svg2jinja', 'uglify', 'htmlmin', 'less:development', diff --git a/searx/static/themes/simple/package.json b/searx/static/themes/simple/package.json index 4ef608db7..3676672bd 100644 --- a/searx/static/themes/simple/package.json +++ b/searx/static/themes/simple/package.json @@ -1,9 +1,9 @@ { "devDependencies": { - "grunt-cli": "^1.4.3", + "eslint": "^8.0.1", "grunt": "~1.4.1", - "grunt-contrib-copy": "^1.0.0", "grunt-contrib-concat": "~2.0.0", + "grunt-contrib-copy": "^1.0.0", "grunt-contrib-cssmin": "^4.0.0", "grunt-contrib-jshint": "~3.1.1", "grunt-contrib-less": "~3.0.0", @@ -11,15 +11,15 @@ "grunt-xmlmin": "~0.1.8", "grunt-contrib-htmlmin": "~3.1.0", "grunt-contrib-watch": "~1.1.0", - "grunt-stylelint": "^0.16.0", "grunt-eslint": "^23.0.0", - "grunt-webfont": "^1.7.2", - "ionicons-npm": "^2.0.1", - "eslint": "^8.0.1", + "grunt-stylelint": "^0.16.0", + "ionicons": "^5.5.4", "less": "^4.1.1", "less-plugin-clean-css": "^1.5.1", "stylelint": "^13.13.1", - "stylelint-config-standard": "^22.0.0" + "stylelint-config-standard": "^22.0.0", + "ejs": "^3.1.6", + "svgo": "^2.8.0" }, "dependencies": { "autocomplete-js": "2.7.1", diff --git a/searx/static/themes/simple/src/fonts/magnet.svg b/searx/static/themes/simple/src/fonts/magnet.svg deleted file mode 100644 index 1a1defdb8146738344e971cbc40c70af0ee10bea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1159 zcmZ`&$&Q^c5WMFrEan*Do$U#bCW=OrLoUf7X99jehUE$TmdV$r?6+l<$pxBrb#-;M z$=5?mPUA4Go2D*;&f49EvE6v1*NL_YwBwaN>I4F!pt4h^t=AI`5a--1Po!T~m*}L$dF-ABHcEFkrri z?d@O?qVLexW?J84Td@geSv&2$XBXtks&+SoigIcu+Szfqkorx`i)Vdov9o)t@^LVy zYHAiko`%Zp(@*4OlsSWpOM#p7#^ds5TiDGhc6YBOTZ~l%57-NA-Bq?DO%Z&RRHcH* zl&b7Gqe*s%Xeysw_IE&5yUZ^pyljwiojLWlS^;b#iQp(s>oXH4j)2No`+z8#aD5Px ziUbIqP##4@(@ckyb3qcS1$Ixl3^i2=;xMI&!V4u?>`=IMAW{{- '' -}}
{%- for category in categories -%} -
+
+ +
{%- endfor -%} {%- if display_tooltip %}
{{ _('Click on the magnifier to perform search') }}
{% endif -%}
{{- '' -}} 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':'', + 'close':'', + 'chevron-up-outline':'', + 'chevron-right':'', + 'chevron-left':'', + 'menu-outline':'', + 'ellipsis-vertical-outline':'', + 'magnet-outline':'', + 'globe-outline':'', + 'search-outline':'', + 'image-outline':'', + 'play-outline':'', + 'newspaper-outline':'', + 'location-outline':'', + 'musical-notes-outline':'', + 'layers-outline':'', + 'school-outline':'', + 'file-tray-full-outline':'', + 'people-outline':'', + +} +-%} + +{% 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 %} {% endblock %} {% block content %} - +

SearXNG

{% 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 @@ - -{% macro icon(action, alt) -%} - -{%- endmacro %} - -{% macro icon_small(action) -%} - -{%- endmacro %} - {% macro draw_favicon(favicon) -%} {{ favicon }} @@ -43,7 +34,7 @@ {%- macro result_sub_footer(result, proxify) -%}
{% for engine in result.engines %}{{ engine }}{% 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 %}
{{- '' -}}
{{- '' -}} {%- 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 %} {% else %}