Commit Graph

99 Commits (9b3efa6d8ab46a3db62f42624d7e9f4b55fdd0ef)

Author SHA1 Message Date
Alexandre Flament 9b3efa6d8a theme: remove __common__ 2 years ago
Markus Heiser 2bcd610eeb [fix] add missing result.length and result.author to simple theme
Closes: https://github.com/searxng/searxng/issues/1027
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
mrpaulblack 169f8d9988 [simple theme] add netloc to image result articles 2 years ago
Monty c09ce4d0f2 Fix answer box bug
Fix bug of too long words.
2 years ago
Monty 47dcf876ff [simple theme] refactor search form
* update search input form params; inspiried by whoogle
* remove autofocus from result page input form (JS impl. as well as input param)
-> autofocus on landing page still works only on desktop and tablet with JS impl.
* update landing page margins on mobile
* rework border and radius for search form to 0.8rem and outline
* remove positioning from autocomplete JS lib and use CSS impl.
* match search box and autocomplete width
* rework search form to a google like design on mobile
* fix settings icon display withg RTL on mobile on result page when search input is empty
2 years ago
Alexandre Flament 84340f56ec simple theme: JS version: the reset button clear the text
The <input type="reset"> introduced in the PR 894, restores the default value.
It works in the index page, but it doesn't work in the /search page:
the reset button restore the initial query.

This PR:
* fix the JS version: the reset button clear the text
* keep the clear button in the / page
* hide the clear button in the /search page
2 years ago
mrpaulblack 3620d006a4 [fix] naming of id for prefs in css 2 years ago
mrpaulblack 6a8e168e25 [simple theme] use default font and font-size in info page 2 years ago
Markus Heiser 3633dc5611 [simple] add CSS for /info pages
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Alexandre FLAMENT 8ffbaa086a [simple] switch to the tablet layout at 79.75em
The previous value was 80em (1280px).
Some desktop screens have this resolution,
and tablet layout takes too much space in this configuration

This PR switch to the table layout for screen width strictly below 1280px.

Close https://github.com/searxng/searxng/issues/874
2 years ago
Alexandre Flament 3d9e48b84e [simple] checkboxes can get the focusable
Do note that checkboxes in the engine tab are displayed reversed.
See: 3408d061aa/searx/templates/simple/preferences.html (L313)
A checkbox for an engine is checked when the engine is disabled.
2 years ago
Alexandre Flament 56bb1443c4 [fix] simple: display "Click on the magnifier..." only the mouse over the categories 2 years ago
Alexandre Flament e435806505 [fix] simple: detect touch screen using media query
related to https://github.com/searxng/searxng/issues/928
2 years ago
mrpaulblack 21e3c40516 [simple theme] replace Image_layout.js with flexbox CS impl.
* drop image_layout.js from simple theme
* move image_layout.js to oscar theme and delete common js dir (since its empty now)
* align top position of image detail modal with bottom position of search header
* use flexbox to display images; row height can be set via @results-image-row-height in defenitions.less
* display span title underneath each image with a max width of 12rem
* increase margin and padding around image article on desktop and tablet
* make article height smaller on phone layout (height of 6rem) to display more content on current view
* remove content from result, if the title and content matches
* use a group that cotains the flex image article, if images are mixed with other categories
* fix pylint issues in webapp.py
* use the default.html result template in unit tests (thanks @return42)
2 years ago
Monty b850178d26 Search filters changes
Better search filters view on mobile.
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
Martin Fischer 5012d06e72 [simple] allow .tabs to be used for help pages 2 years ago
Martin Fischer b6200563ba [simple] improve margin of #linkto_preferences
Co-authored-by: Paul Braeuning <paul@paulgo.io>
2 years ago
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.
2 years ago
Alexandre Flament dc4caa5a39 [fix] simple theme: /preferences: cookies table is LTR
close #827
2 years ago
mrpaulblack 7a0f5e6b19 [simple theme] dynamic border radius in CSS 2 years ago
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
2 years ago
Martin Fischer a12cb6a807 [simple] improve styling of subcategory table headers in preferences 3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
Markus Heiser 5f902bbb0f [fix] simple theme: remove width 45% from language and time filters
All three filters (`language`, `time_range` and `safesearch`) are rendered in
one line.  A size of 45% for `language` and `time_range` left only 10% for the
`safesearch` filter.  Solution: drop with from `language` and `time_range`.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser fb5c1ed310 [fix] simple theme: set img background color to wallpaper's color
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>
3 years ago
Markus Heiser 28a597e43e [simple theme] remove '-webkit-border-radius' property
[1] https://github.com/searxng/searxng/pull/537#issuecomment-976582675

Suggested-by: @dalf [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser 8935b1d8a2 [simple theme] remove '-moz-border-radius' property
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>
3 years ago
Markus Heiser f57a9f425d [simple template] format default string 'italic'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
mrpaulblack 6a367b59ce [simple theme] add animations.less for keyframe animations 3 years ago
Alexandre Flament e612b81f41 [fix] simple theme: fix modal dialog 3 years ago
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
3 years ago
Alexandre Flament ec5a82fccd [enh] simple theme: add "simple-style" preferences 3 years ago
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.
3 years ago
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.
3 years ago
MrPaulBlack c79bba60a9 [theme] add border radius to engine token input 3 years ago
Alexandre Flament dfbbc3b471 [fix] simple theme: /preferences: add tokens field
include changes to display input text field in the preferences
3 years ago
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
3 years ago
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>
3 years ago
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
3 years ago
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
3 years ago