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 | 105 ------- 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 | 1 - .../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(+), 868 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 01c2ce025..000000000 --- a/searx/static/themes/simple/fonts/ion.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - -Created by FontForge 20190801 at Mon Jun 21 10:06:22 2021 - By alexandre - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/searx/static/themes/simple/fonts/ion.ttf b/searx/static/themes/simple/fonts/ion.ttf deleted file mode 100644 index 78264a5717dd56fafb5fa7d0901235f8b5ae30e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3936 zcmds4`)^y-9Y5du_Urn2?@iOx@uRUr+}O_bD`}H93n3fR9%Vq`mx`Fgd5k2soTMp5 z9iGGln@Y(vDs2;*Itd2qP}g=sVoXB;ZPNsZhcq?>Osc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va#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>_1TAt3kf2EV2k`&?+4uLX5locW z1mIr|a9deiO#pllI~9`@0MPk2`#*lx2zWLUIfO*+^nC0`B3DR@zX_=dHGsij!CDU? zWEdcPkUVKCvwPy`{c+*r^{{(<+CQ}0!YJ%0x>dr5p-B$__^w2e08CB81ZmQ4FmaSs z2!NGi1<%&Tc@y(!_&$*K2i+&avQK)U!eAjcGDtNNmEi{^p{R2SNyym-d|V5|Sx$b! zjRNax33kg%u+I!hRAik1Jf%{jJ3_uE2UeC#bJuN#efiVtq#C3C9L z`W;HGQj%s(G(K)V0Z&9u&86FGm#&RSY#~9~tkD$R9VHj^($9<^8c#A_TSS#h=T<B`Wcji@cU zC(-9UB9d4~o{Ldl9A@^dxD?6pn4s#ts}g~WQKdK3a9`({g|M6^ozRkjt)dEx zT_Io3u*%D|D>EWP6ay*rZ7tI_8(XqF*_*1vgj~nN__sP?l{(WSzXx$a=*{L%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7 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 1a1defdb8..000000000 --- a/searx/static/themes/simple/src/fonts/magnet.svg +++ /dev/null @@ -1 +0,0 @@ -image/svg+xmlAlexandre Flament diff --git a/searx/static/themes/simple/src/generated/ion.less b/searx/static/themes/simple/src/generated/ion.less deleted file mode 100644 index 67158206f..000000000 --- a/searx/static/themes/simple/src/generated/ion.less +++ /dev/null @@ -1,181 +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 { - &:before { - 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/src/less/search.less b/searx/static/themes/simple/src/less/search.less index b4818ba5d..99aa02a34 100644 --- a/searx/static/themes/simple/src/less/search.less +++ b/searx/static/themes/simple/src/less/search.less @@ -16,6 +16,40 @@ "spacer categories"; } +.category { + display: inline-block; + position: relative; + margin-right: 1rem; + padding: 0; + + input { + display: none; + } + + label { + svg { + padding-right: 0.2rem; + } + + cursor: pointer; + padding: 0.2rem 0; + display: inline-flex; + text-transform: capitalize; + font-size: 0.9em; + border-bottom: 2px solid transparent; + .disable-user-select; + + div.category_name { + margin: auto 0; + } + } + + input[type="checkbox"]:checked + label { + color: var(--color-categories-item-selected-font); + border-bottom: 2px solid var(--color-categories-item-border-selected); + } +} + #search_logo { grid-area: logo; display: flex; @@ -79,7 +113,7 @@ border-collapse: separate; box-sizing: border-box; margin: 0; - padding: 8px; + padding: 10px; background: none repeat scroll 0 0 var(--color-search-background); border: 1px solid var(--color-search-border); border-radius: 0; @@ -156,7 +190,6 @@ #categories { width: 100%; - margin: 0; text-align: left; overflow-x: scroll; overflow-y: hidden; @@ -188,7 +221,7 @@ } .search_box { - // hack, should bew 100% ? + // hack, should be 100% ? width: 99%; margin: 0.1em; padding: 0 0.1em 0 0; @@ -219,9 +252,15 @@ .category { display: block; width: 100%; + margin: 0; label { - padding: 10px !important; + padding: 0.8rem !important; + margin: 0 !important; + + svg { + display: none; + } } } } @@ -239,7 +278,6 @@ } #categories { - margin: 0 10px 0 0; .disable-user-select; &::-webkit-scrollbar { @@ -248,33 +286,6 @@ } } -.category { - display: inline-block; - position: relative; - margin: 0 3px; - padding: 0; - - input { - display: none; - } - - label { - cursor: pointer; - padding: 0.3rem 0.75rem 0.5rem 0.75rem; - margin: 0; - display: block; - text-transform: capitalize; - font-size: 0.9em; - border-bottom: 2px solid transparent; - .disable-user-select; - } - - input[type="checkbox"]:checked + label { - color: var(--color-categories-item-selected-font); - border-bottom: 2px solid var(--color-categories-item-border-selected); - } -} - #categories_container { position: relative; } diff --git a/searx/static/themes/simple/src/less/style.less b/searx/static/themes/simple/src/less/style.less index b93317fa3..a26c57db1 100644 --- a/searx/static/themes/simple/src/less/style.less +++ b/searx/static/themes/simple/src/less/style.less @@ -10,7 +10,6 @@ @import "../../__common__/less/stats.less"; @import "../../__common__/less/result_templates.less"; @import (inline) "../../node_modules/normalize.css/normalize.css"; -@import "../generated/ion.less"; @import "definitions.less"; @import "mixins.less"; @import "code.less"; @@ -28,10 +27,23 @@ @import "search.less"; // ion-icon -.ion-icon-big { - .ion-icon; +.ion-icon { + display: inline-block; + vertical-align: bottom; + line-height: 1; + text-decoration: inherit; +} - font-size: 149%; +.ion-icon-small { + width: 1rem; + height: 1rem; + .ion-icon; +} + +.ion-icon-big { + width: 1.5rem; + height: 1.5rem; + .ion-icon; } // Main LESS-Code @@ -530,7 +542,7 @@ article[data-vim-selected].category-social { #linkto_preferences { position: absolute; right: 10px; - top: 2rem; + top: 2.2rem; padding: 0; border: 0; display: block; diff --git a/searx/static/themes/simple/src/less/toolkit.less b/searx/static/themes/simple/src/less/toolkit.less index f11275576..195cd9af4 100644 --- a/searx/static/themes/simple/src/less/toolkit.less +++ b/searx/static/themes/simple/src/less/toolkit.less @@ -121,20 +121,13 @@ div.selectable_url { // dialog .dialog() { position: relative; - padding: 1em 1em 1em 2.7em; + display: flex; + padding: 1rem; margin: 0 0 1em 0; border: 1px solid var(--color-toolkit-dialog-border); text-align: left; .rounded-corners; - &::before { - position: absolute; - top: 0.5em; - left: 0.5em; - font-family: "ion"; // stylelint-disable font-family-no-missing-generic-family-keyword - font-size: 1.5em; - } - .close { float: right; position: relative; @@ -177,7 +170,6 @@ div.selectable_url { color: var(--color-error); background: var(--color-error-background); border-color: var(--color-error); - .ion-error(); } .dialog-warning { @@ -186,7 +178,6 @@ div.selectable_url { color: var(--color-warning); background: var(--color-warning-background); border-color: var(--color-warning); - .ion-warning(); } .dialog-modal { 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', +} -%}
{{- '' -}}
{%- 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 %}