Commit graph

252 commits

Author SHA1 Message Date
Monty 6d03fa002f [build] /static 2022-02-26 10:07:07 +01:00
Monty b850178d26 Search filters changes
Better search filters view on mobile.
2022-02-26 10:05:23 +01:00
Markus Heiser 96ac99b1f6 [build] /static 2022-02-21 22:16:24 +01:00
Markus Heiser bded1ee280 [fix] genius: add player an avoid exceptional programming
Add player:

- The players are just playing 30sec from the title.  Some of the player will be
  blocked because of a cross-origin request and some players will link to apple
  when you press the play button.

Avoid exceptions and (and BTW improve results)

-  ERROR   searx.engines.genius          : list index out of range

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-21 22:12:07 +01:00
Alexandre Flament 1832ec742a [build] /static 2022-02-20 22:58:51 +01:00
Alexandre Flament 56e34947a6 [mod] infinite_scroll as preference
* oscar theme: code from searx/plugins/infinite_scroll.py
* simple theme: new implementation

Co-authored-by: Markus Heiser <markus.heiser@darmarIT.de>
2022-02-20 22:58:51 +01:00
Markus Heiser efd81f9266 [build] /static 2022-02-19 15:13:09 +01:00
Markus Heiser 16d05ca285 [mod] simple theme: define a '.show-content-button'
With LESS function '.show-content-button' all the *Show-Media* links becomes
bottons.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-19 15:12:50 +01:00
Markus Heiser fa3cd7a696 [build] /static 2022-02-18 22:46:51 +01:00
Markus Heiser 05c105b837 [fix] bandcamp: fix itemtype (album|track) and exceptions
BTW: polish implementation and show tracklist for albums

Closes: https://github.com/searxng/searxng/issues/883
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 22:44:43 +01:00
Markus Heiser 761885682d [build] /static 2022-02-18 19:00:51 +01:00
Markus Heiser 8acf540f0e [mod] simple theme: set height of embedded content (iframe)
This commit sets appropriate height of the (embedded) player from:

- soundcloud
- mixcloud
- deezer

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 19:00:51 +01:00
Markus Heiser f5e8cfade2 [fix] simple theme: support browsers which do not have aspect-ratio
Suggested-by: @dalf https://github.com/searxng/searxng/pull/882#discussion_r805187303
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 19:00:02 +01:00
Markus Heiser 98cab4cf75 [mod] result_templates/default.html replace embedded HTML by data_src audio_src
Embedded HTML breaks SearXNG architecture.  To modularize, HTML is generated in
the templates (oscar & simple) and result parameter 'embedded' is replaced by
'data_src' (and 'audio_src'), an URL for embedded content (<iframe>).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-13 14:20:47 +01:00
Markus Heiser 46e131fdad [mod] result_templates/videos.html: replace embedded HTML by data_src
Embedded HTML breaks SearXNG architecture.  To modularize, HTML is generated in
the templates (oscar & simple) and result parameter 'embedded' is replaced by
'data_src', an URL for embedded content (<iframe>).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-13 14:20:47 +01:00
Alexandre Flament bf987bb608
Merge pull request #848 from not-my-profile/help-route
Introduce `/help` route
2022-02-05 08:52:19 +01:00
dependabot[bot] 6eee2d8771
Bump sharp from 0.29.3 to 0.30.0 in /searx/static/themes/simple
Bumps [sharp](https://github.com/lovell/sharp) from 0.29.3 to 0.30.0.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/main/docs/changelog.md)
- [Commits](https://github.com/lovell/sharp/compare/v0.29.3...v0.30.0)

---
updated-dependencies:
- dependency-name: sharp
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-04 07:10:14 +00:00
Martin Fischer 0f7bcd17b2 [build] /static 2022-02-01 06:29:19 +01:00
Martin Fischer 5012d06e72 [simple] allow .tabs to be used for help pages 2022-02-01 06:28:26 +01:00
Martin Fischer e931590312 [build] /static 2022-02-01 06:22:44 +01:00
Martin Fischer b6200563ba [simple] improve margin of #linkto_preferences
Co-authored-by: Paul Braeuning <paul@paulgo.io>
2022-02-01 06:22:29 +01:00
Martin Fischer 79dbbd4d99 [build] /static 2022-01-30 17:29:21 +01:00
Martin Fischer 6f0ec7e58f [simple] introduce page_with_header.html template
Previously the preferences & stats templates contained the markup:

<a href="{{ url_for('index') }}"><h1><span>SearXNG</span></h1></a>

There are many things wrong with this:

1. the markup was duplicated

2. the CSS needed to be changed whenever a new page wanted to use this
   header (since the CSS used page-specific selectors)

3. h1 should be reserved for the actual page title
   (e.g. Preferences or Engine stats)

4. the image was set via CSS which also set:

       span { visibility: hidden; }

   which however removes the alternative text from the accessibility
   tree (meaning screen readers will ignore it).

This commit fixes all these problems.
2022-01-30 17:29:21 +01:00
Alexandre Flament 068155df88 [build] /static 2022-01-29 14:44:05 +01:00
Alexandre Flament dc4caa5a39 [fix] simple theme: /preferences: cookies table is LTR
close #827
2022-01-29 14:42:12 +01:00
Monty 91ca5d1613 Changed preferences icon to settings icon in gruntfile 2022-01-22 17:14:19 +01:00
mrpaulblack 6c1a64d4b3 [build] /static 2022-01-17 22:35:22 +01:00
mrpaulblack 7a0f5e6b19 [simple theme] dynamic border radius in CSS 2022-01-17 22:35:02 +01:00
Alexandre Flament 468619abcb [build] /static 2022-01-16 18:52:46 +01:00
Alexandre Flament d000288ad0 [enh] simple theme: RTL support
* mirror all inline SVGs so that direction SVGs display correctly on RTL
* set the bold list element in info box to RTL so the colon gets displayed on the right side
* set correct .ltr function for the left border on the search button in #q
* move text to the right in autocomplete
* move search form in lign with result article on RTL
* add the correct padding for img thumbnails in categories like music on RTL
* apply RTL to result table for map results
* align text in tables part of /preferences on RTL
* move burger menu on index page to the left on RTL
* fix positioning of drop down arrow on select boxes on RTL
* align result URL on the right (written LTR)
* align vim hotkeys help on the left since it is not translated
* image detail:
  * labels (author, format, URL, etc...) are written on the right,
    values are on the left.
  * URL are written LTR and overflow on the right
2022-01-16 18:51:11 +01:00
Alexandre Flament 2084d7b1ed [mod] simple theme: change stylelint configuration
* disable declaration-empty-line-before
  https://stylelint.io/user-guide/rules/list/declaration-empty-line-before/
  this change allows to mix CSS declarations and LESS mixins without empty lines:

  #something {
    display: flex;
    .ltr-left(60rem); // no mandatory empty line before this one
  }

* disable no-invalid-position-at-import-rule
  https://stylelint.io/user-guide/rules/list/no-invalid-position-at-import-rule/

  this change allows to declare some mixins and then import another .less file:
  for example:

  .ltr-left(@offset) {
    left: @offset;
  }
  @import "style.less";
2022-01-16 18:50:19 +01:00
Markus Heiser 580815a9a5 [fix] stop less grunt runner on missing files
The less grunt runner silently ignore missing files and continue with the build[1]::

    Running "less:production" (less) task
    >> Destination css/searxng.min.css not written because no source files were found.
    >> 1 stylesheet created.
    >> 1 sourcemap created.

Add filter function that calls grunt.fail() if the scr file does not exists.

[1] https://github.com/searxng/searxng/pull/750#discussion_r784357031
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-14 13:16:24 +01:00
Markus Heiser 3457408285 [build] /static 2022-01-10 17:42:13 +01:00
Markus Heiser 85159ad307 [fix] autocomple.js: register li.onmousedown instead li.onclick
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 17:30:57 +01:00
Markus Heiser c956ed6c43 [build] /static 2022-01-07 08:36:32 +01:00
Markus Heiser d8db85638e make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 08:35:14 +01:00
Martin Fischer 4ac6b5d32d [build] /static 2022-01-05 11:03:44 +01:00
Martin Fischer a12cb6a807 [simple] improve styling of subcategory table headers in preferences 2022-01-05 11:03:44 +01:00
Alexandre Flament 458b7fb72d
Merge pull request #610 from return42/img-load-error
[fix] simple theme: hide the image if img load fails
2022-01-02 22:34:15 +01:00
Markus Heiser efbcaaab3b [build] /static 2021-12-31 09:14:38 +01:00
Markus Heiser 391e4b57c9 make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-31 09:12:22 +01:00
Markus Heiser f087d01e24 [build] /static 2021-12-29 14:33:54 +01:00
Markus Heiser f75199b1ec [fix] simple theme: hide the image if img load fails
Add event listener to query selector::

    '#urls img.image'

From the user point of view, I think it is better to hide the image:
img_load_error.svg is helplful in the image category because it still allows to
select the image. IMO, in the news category, the fact there is a missing image
won't help to choose the links. From a developer point of view, the place holder
is signal that may be the engine needs to be updated (at least give a look). The
browser console should show the same information too, but it requires some
additional steps. [1]

[1] https://github.com/searxng/searxng/pull/610#issuecomment-997640132

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-29 14:30:16 +01:00
mrpaulblack c6b76aa429 [build] /static 2021-12-18 21:25:22 +01:00
mrpaulblack 414f1039d2 [fix] theme: build img_load_error.svg as svg 2021-12-18 21:24:59 +01:00
Markus Heiser 84836a5000 [build] /static 2021-12-15 14:47:43 +01:00
Markus Heiser c020b90056 [mod] simple theme: remove vendor prefix of width: max-content
Remove no longer needed workarounds like `width: 1000px;`
and vendor prefix of max-content [1].

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/max-content#browser_compatibility

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 14:43:15 +01:00
Markus Heiser 459f33a18e [mod] simple-theme: remove vendor CSS
flexbox
  Browser support for flexbox is excellent, and the majority of browsers do not
  need a prefix at this point. Safari was the last of the major browsers to
  remove prefixes, with the release of Safari 9 in 2015. [1]

user-select:
  Vendor prefix of user-select is not needed, see 'Browser compatibility' [2].

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Backwards_Compatibility_of_Flexbox#status_in_browsers
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/user-select#browser_compatibility

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 14:43:15 +01:00
Markus Heiser 715f578cda [build] /static 2021-12-15 10:45:25 +01:00
Markus Heiser c416464949 [fix] lazy loading of <img> tags
Images should include dimension attributes.  Without `width` and `height`
specified, image dimensions are 0×0 pixels at first.  ...  In this case the
browser determines that all of them are visible to the user and decides to load
everything [1].

In CSS the `width` is set to a value and the `height` is unsed to scale the image
proportional in both dimensions.

[1] https://web.dev/browser-level-image-lazy-loading/#images-should-include-dimension-attributes
[2] https://caniuse.com/loading-lazy-attr

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 10:39:55 +01:00