diff options
author | Alexandre Flament <alex@al-f.net> | 2021-06-16 13:28:08 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2021-06-16 14:30:09 +0200 |
commit | 7137d2893f33e9158e8563a21d9586119d175269 (patch) | |
tree | e204cc396e73525bbe490bb4f3315198ef317245 /searx | |
parent | e3ebfd41d7379384186fd74a7db430247eef8c84 (diff) | |
download | searxng-7137d2893f33e9158e8563a21d9586119d175269.tar.gz searxng-7137d2893f33e9158e8563a21d9586119d175269.zip |
[mod] simple theme: remove src/less/ion.less
This file is generated by webfont.
* It is now generated as searx/static/themes/simple/ion.less
* It is generated before the .less compilation.
* .gitignore includes this file
Add two new package depedencies: fontforge ttfautohint
See utils/searx.sh
Diffstat (limited to 'searx')
-rw-r--r-- | searx/static/themes/simple/.gitignore | 1 | ||||
-rw-r--r-- | searx/static/themes/simple/gruntfile.js | 64 | ||||
-rw-r--r-- | searx/static/themes/simple/src/less/ion.less | 181 | ||||
-rw-r--r-- | searx/static/themes/simple/src/less/style.less | 2 |
4 files changed, 34 insertions, 214 deletions
diff --git a/searx/static/themes/simple/.gitignore b/searx/static/themes/simple/.gitignore index 07e6e472c..2c1954c3c 100644 --- a/searx/static/themes/simple/.gitignore +++ b/searx/static/themes/simple/.gitignore @@ -1 +1,2 @@ /node_modules +ion.less diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 271e21b26..1dea80bd4 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -88,35 +88,6 @@ module.exports = function(grunt) { } } }, - less: { - development: { - options: { - paths: ["less"], - banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' - }, - files: { - "css/searx.css": "src/less/style.less", - "css/searx-rtl.css": "src/less/style-rtl.less" - } - }, - production: { - options: { - paths: ["less"], - plugins: [ - new (require('less-plugin-clean-css'))() - ], - sourceMap: true, - sourceMapURL: (name) => { const s = name.split('/'); return s[s.length - 1] + '.map';}, - outputSourceFiles: false, - sourceMapRootpath: '../', - banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' - }, - files: { - "css/searx.min.css": "src/less/style.less", - "css/searx-rtl.min.css": "src/less/style-rtl.less" - } - }, - }, webfont: { icons: { // src: 'node_modules/ionicons-npm/src/*.svg', @@ -146,7 +117,7 @@ module.exports = function(grunt) { 'node_modules/ionicons-npm/src/android-close.svg', ], dest: 'fonts', - destLess: 'less', + destLess: '.', options: { font: 'ion', hashes : true, @@ -180,7 +151,36 @@ module.exports = function(grunt) { } } } - } + }, + less: { + development: { + options: { + paths: ["less"], + banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' + }, + files: { + "css/searx.css": "src/less/style.less", + "css/searx-rtl.css": "src/less/style-rtl.less" + } + }, + production: { + options: { + paths: ["less"], + plugins: [ + new (require('less-plugin-clean-css'))() + ], + sourceMap: true, + sourceMapURL: (name) => { const s = name.split('/'); return s[s.length - 1] + '.map';}, + outputSourceFiles: false, + sourceMapRootpath: '../', + banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' + }, + files: { + "css/searx.min.css": "src/less/style.less", + "css/searx-rtl.min.css": "src/less/style-rtl.less" + } + }, + }, }); grunt.loadNpmTasks('grunt-contrib-watch'); @@ -194,5 +194,5 @@ module.exports = function(grunt) { grunt.registerTask('test', ['jshint']); - grunt.registerTask('default', ['jshint', 'copy', 'concat', 'uglify', 'less:development', 'less:production']); + grunt.registerTask('default', ['jshint', 'copy', 'concat', 'uglify', 'webfont', 'less:development', 'less:production']); }; diff --git a/searx/static/themes/simple/src/less/ion.less b/searx/static/themes/simple/src/less/ion.less deleted file mode 100644 index c9e715591..000000000 --- a/searx/static/themes/simple/src/less/ion.less +++ /dev/null @@ -1,181 +0,0 @@ -// Generated by grunt-webfont - - -@font-face { - font-family:"ion"; - src:url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51"); - src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"), - url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"), - url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"), - url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"), - url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg"); - font-weight:normal; - font-style:normal; -} - -.ion-icon { - &:before { - font-family:"ion"; - } - display:inline-block; - vertical-align:middle; - 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/style.less b/searx/static/themes/simple/src/less/style.less index 61c0a93de..82fcb00ed 100644 --- a/searx/static/themes/simple/src/less/style.less +++ b/searx/static/themes/simple/src/less/style.less @@ -22,7 +22,7 @@ @import "autocomplete.less"; // ion-icon -@import "ion.less"; +@import "../../ion.less"; .ion-icon-big { .ion-icon; |