Commit graph

3346 commits

Author SHA1 Message Date
mrpaulblack
f3aff26086 [simple theme] rework select; add safesearch to search and replace / with › in article url
* rework selection UI in pref (fix based on: 78643e9f43)
* 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-21 21:38:00 +01:00
Alexandre Flament
02cccdf876
Merge pull request #533 from return42/fix-532
[fix] google images: @href index 0 not found
2021-11-21 21:26:20 +01:00
Markus Heiser
d51298177a
Merge pull request #528 from return42/brand
[brand] initial - folder src/brand for searxng-wordmark
2021-11-21 11:46:24 +01:00
Markus Heiser
5b28c9109f [fix] google images: @href index 0 not found
Sometimes there is no href in the `<a ..>` tag of a *link_node* [1].

[1] https://github.com/searxng/searxng/issues/532

Reported-by: @TheEssem
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-21 09:55:59 +01:00
Markus Heiser
4330d7cf5d [mod] gruntfile.js - define grunt.template _brand & _templates
[1] https://gruntjs.com/api/grunt.template

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-20 10:49:21 +01:00
Markus Heiser
c68c53acd8 [brand] initial - folder src/brand for searxng-wordmark
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-20 10:14:55 +01:00
Alexandre Flament
d7eb373371 [fix] npm engine: don't ignore the first result
"from" parameter start at 0
2021-11-20 08:22:48 +01:00
Alexandre Flament
bc0cf9e83e
Merge pull request #521 from dalf/simple-theme-style-pref
Simple theme: allow the user to choose auto, light, dark style
2021-11-19 17:14:35 +01:00
mrpaulblack
cf9d161d26 [build] /static 2021-11-19 16:56:07 +01:00
Alexandre Flament
ec5a82fccd [enh] simple theme: add "simple-style" preferences 2021-11-19 16:45:50 +01:00
Markus Heiser
86090e13d3 [mod] enable reddit - to have at least one in category social-media
Since digg no longer works, we do nat have a active engine in the social-media
category.  Enable reddit by default to have at least one engine back in this
category.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-19 15:06:42 +01:00
Markus Heiser
4c82ac7670 [drop] engine digg - https://digg.com/api is no longer available
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-19 15:00:22 +01:00
Markus Heiser
4c2df9358a [fix] enigne library genesis - remove 'enable_http: true'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-19 13:25:08 +01:00
Alexandre Flament
f6bfc8f461
Merge pull request #509 from mrpaulblack/library-of-genesis-category
[engines] move library of genesis from general to files category
2021-11-19 12:45:56 +01:00
Alexandre Flament
55737a219b
Merge pull request #518 from dalf/fix-simple-image-detail
[fix] simple theme: fix image detail layout on mobile
2021-11-19 11:19:44 +01:00
Alexandre Flament
ef2556770b [build] /static 2021-11-19 10:45:12 +01:00
Alexandre Flament
48d2dcbb20 [fix] simple theme: adjust image detail height
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 10:43:01 +01:00
Alexandre Flament
0400b8ca5d [fix] simple theme: fix layout image detail on mobile
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-19 10:32:42 +01:00
dependabot[bot]
958c7d7280
Bump ionicons from 5.5.4 to 6.0.0 in /searx/static/themes/simple
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-19 07:09:16 +00:00
Markus Heiser
15758f1ac2 [fix] eslint - option configFile changed to overrideConfigFile
https://github.com/sindresorhus/grunt-eslint/pull/171

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-17 20:17:47 +01:00
dependabot[bot]
d06135e48f Bump grunt-eslint from 23.0.0 to 24.0.0 in /searx/static/themes/simple
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-17 20:17:45 +01:00
Tom
e1d60051ca
[fix] Qwant search query string
Search string: "!qwant time"
Resulting request URL: https://api.qwant.com/v3/search/web?q=q=time&count=10&offset=0&device=desktop&safesearch=1&locale=en_US
Notice the double "q="

Resulting request URL after fix: https://api.qwant.com/v3/search/web?q=time&count=10&offset=0&device=desktop&safesearch=1&locale=en_US
2021-11-17 18:13:54 +01:00
mrpaulblack
af79cce7cf [engines] move library of genesis from general to files category 2021-11-17 00:57:13 +01:00
Markus Heiser
3c05530518 [build] /static 2021-11-15 14:54:32 +01:00
Markus Heiser
b07884c958 [fix] Optimize SVG for WEB usage / CSP 'style-src self'
- 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-15 14:51:55 +01:00
Markus Heiser
5721617de4 [build] /static 2021-11-13 17:13:09 +01:00
MrPaulBlack
c79bba60a9 [theme] add border radius to engine token input 2021-11-13 17:12:28 +01:00
Alexandre Flament
dfbbc3b471 [fix] simple theme: /preferences: add tokens field
include changes to display input text field in the preferences
2021-11-13 17:12:28 +01:00
Markus Heiser
b369ff4425 [fix] delete trailing whitespace
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 15:51:08 +01:00
Markus Heiser
a364e54859 [fix] delete trailing whitespace
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 15:40:00 +01:00
Markus Heiser
6debda2404 [mod] settings.yml - polish up comments about plugins
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 15:40:00 +01:00
Markus Heiser
de7f8b757b
Merge pull request #499 from dalf/fix-autocompletion-startpage
[fix] startpage autocompletion
2021-11-13 13:54:27 +01:00
Alexandre Flament
3c3599c9e6 [fix] startpage autocompletion 2021-11-13 13:26:47 +01:00
MrPaulBlack
29e092b931 [build] /static 2021-11-13 10:42:35 +01:00
MrPaulBlack
566dfe3330 [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
2021-11-13 10:42:07 +01:00
Markus Heiser
9bf53ab974 [build] /static 2021-11-13 09:06:33 +01:00
Markus Heiser
04ab012e03 [simple theme] SearXNG wordmark (plain SVG)
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 09:05:20 +01:00
Markus Heiser
ee67a65180 [simple theme] replace old searx logo by searxng-wordmark.min.svg
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 09:05:20 +01:00
Markus Heiser
3a981257de [simple theme] create favicon.png from src/svg/searxng-wordmark.svg
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 09:05:20 +01:00
Markus Heiser
bf52353a5c [enh] minify searxng-wordmark.svg (HTMLMinifier)
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 09:05:20 +01:00
Markus Heiser
edb081638b [simple theme] SearXNG wordmark (SVG)
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>
2021-11-13 09:05:20 +01:00
MrPaulBlack
303cea3437 [build] /static 2021-11-13 00:52:34 +01:00
MrPaulBlack
1becb5e138 [simple theme] minor css fixes
* remove hover effect from vim help modal
* remove bold font weight from active item in prefenreces tab bar
* remove margin from answer box to unify with rest of result page
2021-11-13 00:51:26 +01:00
MrPaulBlack
9badec0260 [build] /static 2021-11-11 22:28:09 +01:00
MrPaulBlack
a80b5dc110 [fix] scaling of result page on small screens by @ZetaTom
* thanks to https://github.com/ZetaTom for the fix!
* set the width of the input#q element to 100% of the 1fr space of the grid layout
* change the viewport meta tag to th recommended value (see: https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag#viewport_basics)
* add a new @ultra-small-phone width of 20rem; when a device is smaller than that the search logo does not get displayed on the result page anymore
2021-11-11 22:26:26 +01:00
Alexandre Flament
67ab4d4165 [build] /static 2021-11-06 21:14:12 +01:00
Alexandre Flament
ddc2346a06 [enh] simple theme: mobile layout: allow access to the preferences
when there is no query, reduce the width of the query field,
to display the preference button on the right.
2021-11-06 21:13:41 +01:00
Alexandre Flament
558e0c3241 [build] /static 2021-11-05 12:45:15 +01:00
Alexandre Flament
c00e54d61b [fix] simple theme: image detail: click on the URL to the HTML page works
Before this commit, the default click event on an image result is prevented,
this include clicks inside the detail.

This commit makes sure the click happends outside the detail to prevent the default event.
2021-11-05 12:42:44 +01:00
Alexandre Flament
4d051c43f3 [fix] simple theme: various about the hotkeys help
* dark mode: #555 border (same as infoboxes and other borders)
* remove a call to console.log
* center the dialog without using the style attribute.
2021-11-05 12:42:44 +01:00