summaryrefslogtreecommitdiff
path: root/searx/static
AgeCommit message (Collapse)Author
2021-11-30[build] /staticMarkus Heiser
2021-11-30[mod] simple theme, JS: introduce window.searxng.theme namespaceMarkus Heiser
In window.searxng.theme the theme data can be passed through to JS implementations. Initial the window.searxng.theme namespace starts with a value for `img_load_error`:: // image that is displayed if load of <img src='...'> failed img_load_error: 'img/img_load_error.svg' The searx/static/themes/__common__/js/image_layout.js is patched to uses the value, if the theme defines a value for img_load_error in this namespace. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29[simple] ImageLayout.watch: `img_load_error.svg` if img load failsMarkus Heiser
Show default image `img/img_load_error.svg` when image can't be loaded. ---- Some words about class ImageLayout: The https://github.com/searxng/searxng/blob/master/searx/static/themes/simple/js/searxng.js is build by a grunt task .. https://github.com/searxng/searxng/blob/d0e21a01b4e14df905f25445a3f6bcbec481671c/searx/static/themes/simple/gruntfile.js#L91-L93 The `/__common__/js/*.js` concats also https://github.com/searxng/searxng/blob/master/searx/static/themes/__common__/js/image_layout.js where a modified copy of the of the "Google-image-layout" (`ImageLayout`) is implemented [1][2][3]. [1] https://ptgamr.github.io/2014-09-12-google-image-layout/ [2] https://ptgamr.github.io/google-image-layout/src/google-image-layout.js [3] https://github.com/ptgamr/google-image-layout/tree/master ---- Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29[build] /staticMarkus Heiser
2021-11-29[fix] simple theme: set img background color to wallpaper's colorMarkus Heiser
The *background color* of an transparent image is the color of the color of wallpaper on which all images are shown on. Set variable `--color-result-image-background` and `--color-base-background` to the same value. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29[build] /staticMarkus Heiser
2021-11-29[enh] add SVG favicon href="favicon.svg" type="image/svg+xml"Markus Heiser
Add link:: <link rel="icon" href="favicon.png" sizes="any"> <link rel="icon" href="favicon.svg" type="image/svg+xml"> Modern browsers should request:: INFO werkzeug : 127.0.0.1 - - [28/Nov/2021 17:03:07] "GET /static/themes/simple/img/favicon.svg HTTP/1.1" 200 - [1] https://github.com/audreyfeldroy/favicon-cheat-sheet#svg-file [2] https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29[build] /staticMarkus Heiser
2021-11-29[mod] themes/simple/img/searxng.svg -> src/brand/searxng.svgMarkus Heiser
* move `searx/static/themes/simple/img/searxng.svg` to `src/brand/searxng.svg` * README.rst can use it without a reference to a theme. * the simple theme can create `searx/static/themes/simple/img/searxng.png` using the svg2png task Suggested-by: @dalf https://github.com/searxng/searxng/pull/561#issuecomment-981747902 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-28[build] /staticMarkus Heiser
2021-11-28[mod] simple theme: use sharp instead of convert to create .png from .svgAlexandre Flament
define a custom grunt task, since grunt-sharp is too old (it can't be installed). in gruntfile.js, the image tasks are moved at the end the build chain. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-28[mod] gruntfile: do some polish (no functional change)Markus Heiser
- remove unused 'path' constant - fix indentation - Put all image tasks at the end, where it is easy to list which image is processed. Suggested -by: @dalf https://github.com/searxng/searxng/pull/541#discussion_r756247157 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-26[build] /staticmrpaulblack
2021-11-26[oscar theme] center search on index and use logo with ponthimrpaulblack
2021-11-26[fix] oscar theme: use SearXNG logo and wordmarkMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-23[build] /staticMarkus Heiser
2021-11-23[simple theme] remove '-webkit-border-radius' propertyMarkus Heiser
[1] https://github.com/searxng/searxng/pull/537#issuecomment-976582675 Suggested-by: @dalf [1] Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-23[simple theme] remove '-moz-border-radius' propertyMarkus Heiser
Support for the prefixed version (-moz-border-radius) was removed in Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) [1]. [1] https://developer.mozilla.org/pt-BR/docs/Web/CSS/border-radius Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-23[build] /staticMarkus Heiser
2021-11-23[simple template] format default string 'italic'Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-23[build] /staticMarkus Heiser
2021-11-23[simple theme] add animations.less for keyframe animationsmrpaulblack
2021-11-23[fix] simple theme: fix modal dialogAlexandre Flament
2021-11-21[build] /staticmrpaulblack
2021-11-21[simple theme] rework select; add safesearch to search and replace / with ↵mrpaulblack
› in article url * rework selection UI in pref (fix based on: https://github.com/twelsby/searx/commit/78643e9f43a103c523f112e9f3ce26a5c7bb3a0f) * moved search filters underneath categories * cut params from url and replace / with › * make h3 and url in article bigger * add safe search select to search filter (this will not override settings and only be valid while on result page in a session) * make search form button not overlap each other when js is disabled * 1rem padding around preview image and thumbnail in default article template
2021-11-20[mod] gruntfile.js - define grunt.template _brand & _templatesMarkus Heiser
[1] https://gruntjs.com/api/grunt.template Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-20[brand] initial - folder src/brand for searxng-wordmarkMarkus Heiser
Folder src/brand is intended to place logo, wordmark and more in. This commit moves the origin (source) of searxng-wordmark.svg from the simple theme into this folder About the new created src/ folder: On the long term we can move all the files from static/themes/<name>/src/* into a src/themes/<name>/* folder. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-19[build] /staticmrpaulblack
2021-11-19[enh] simple theme: add "simple-style" preferencesAlexandre Flament
2021-11-19Merge pull request #518 from dalf/fix-simple-image-detailAlexandre Flament
[fix] simple theme: fix image detail layout on mobile
2021-11-19[build] /staticAlexandre Flament
2021-11-19[fix] simple theme: adjust image detail heightAlexandre Flament
when on the top of the page, the image is just below the search fields. this commit slightly aligh the top of the image detail with the bottom of the search fields.
2021-11-19[fix] simple theme: fix layout image detail on mobileAlexandre Flament
the width of #main_results #results.image-detail-open.only_template_images was set to 59.25rem. On mobile, the images overflowed on right side of the viewport, which creates a horizontal scroll. This commit set the value to min(98%, 59.25rem) whatever the max-width is.
2021-11-19Bump ionicons from 5.5.4 to 6.0.0 in /searx/static/themes/simpledependabot[bot]
Bumps [ionicons](https://github.com/ionic-team/ionicons) from 5.5.4 to 6.0.0. - [Release notes](https://github.com/ionic-team/ionicons/releases) - [Commits](https://github.com/ionic-team/ionicons/compare/v5.5.4...v6.0.0) --- updated-dependencies: - dependency-name: ionicons dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
2021-11-17[fix] eslint - option configFile changed to overrideConfigFileMarkus Heiser
https://github.com/sindresorhus/grunt-eslint/pull/171 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-17Bump grunt-eslint from 23.0.0 to 24.0.0 in /searx/static/themes/simpledependabot[bot]
Bumps [grunt-eslint](https://github.com/sindresorhus/grunt-eslint) from 23.0.0 to 24.0.0. - [Release notes](https://github.com/sindresorhus/grunt-eslint/releases) - [Commits](https://github.com/sindresorhus/grunt-eslint/compare/v23.0.0...v24.0.0) --- updated-dependencies: - dependency-name: grunt-eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15[build] /staticMarkus Heiser
2021-11-15[fix] Optimize SVG for WEB usage / CSP 'style-src self'Markus Heiser
- Replace grunt-contrib-htmlmin by grunt-image [1]. - Activate svgo's [2] convertStyleToAttrs to make the HTML inline SVGs compoliant to the CSP policy [3]:: Content-Security-Policy: style-src self; [1] https://www.npmjs.com/package/grunt-image [2] https://github.com/svg/svgo [3] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src Closes: https://github.com/searxng/searxng/issues/502 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13[build] /staticMarkus Heiser
2021-11-13[theme] add border radius to engine token inputMrPaulBlack
2021-11-13[fix] simple theme: /preferences: add tokens fieldAlexandre Flament
include changes to display input text field in the preferences
2021-11-13[fix] delete trailing whitespaceMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13[build] /staticMrPaulBlack
2021-11-13[simple theme] update to ion icons 5 and drop webfontMrPaulBlack
* 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
2021-11-13[build] /staticMarkus Heiser
2021-11-13[simple theme] SearXNG wordmark (plain SVG)Markus Heiser
Remove XML namespaces from Incscape [1]:: xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" [1] https://wiki.inkscape.org/wiki/PlainSVG Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13[simple theme] replace old searx logo by searxng-wordmark.min.svgMarkus Heiser
Suggested-by: @dalf https://github.com/searxng/searxng/pull/473#issuecomment-962476683 Suggested-by: @MrPaulBlack https://github.com/searxng/searxng/pull/473#issuecomment-962579826 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13[simple theme] create favicon.png from src/svg/searxng-wordmark.svgMarkus Heiser
new bash function convert_if_newer() / usage:: convert_if_newer <origfile> <outfile> [<options>, ...] convert_if_newer "path/to/origin.svg" "path/to/converted.png" -transparent white -resize 64x64 Run's ImageMagik' convert comand to generate <outfile> from <origfile>, if <origfile> is newer than <outfile>. The command line is to convert is:: convert <origfile> [<options>, ...] <outfile> PNG 'searx/static/themes/simple/img/favicon.png' has been created by:: $ make themes.simple CONVERT searx/static/themes/simple/src/svg/searxng-wordmark.svg -transparent white -resize 64x64 searx/static/themes/simple/img/favicon.png ... Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13[enh] minify searxng-wordmark.svg (HTMLMinifier)Markus Heiser
Command:: ./node_modules/.bin/html-minifier \ --remove-comments \ --collapse-whitespace \ src/svg/searxng-wordmark.svg \ -o ../../../templates/__common__/searxng-wordmark.min.svg - html-minifier: https://github.com/kangax/html-minifier - onilne: https://kangax.github.io/html-minifier - grunt: https://www.npmjs.com/package/grunt-contrib-htmlmin - grunt-contrib-htmlmin: https://github.com/gruntjs/grunt-contrib-htmlmin - npm: https://www.npmjs.com/package/html-minifier To test, rebuild your node environment:: make node.env Alternatives: - pretty-data: https://github.com/vkiryukhin/pretty-data - grunt: https://www.npmjs.com/package/grunt-xmlmin - grunt-xmlming: https://github.com/dtrunk90/grunt-xmlmin - npm: https://www.npmjs.com/package/grunt-xmlmin - minify-xml: https://github.com/kristian/minify-xml - no grunt package available - npm: https://www.npmjs.com/package/minify-xml src/svg/searxng-wordmark.svg': '../../../templates/__common__/searxng-wordmark.min.svg' Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13[simple theme] SearXNG wordmark (SVG)Markus Heiser
Related-to: - https://github.com/searxng/searxng/pull/430#issuecomment-951967239 - https://github.com/searxng/searxng/pull/378 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>