Commit graph

79 commits

Author SHA1 Message Date
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
Martin Fischer
5012d06e72 [simple] allow .tabs to be used for help pages 2022-02-01 06:28:26 +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
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
dc4caa5a39 [fix] simple theme: /preferences: cookies table is LTR
close #827
2022-01-29 14:42:12 +01:00
mrpaulblack
7a0f5e6b19 [simple theme] dynamic border radius in CSS 2022-01-17 22:35:02 +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
Martin Fischer
a12cb6a807 [simple] improve styling of subcategory table headers in preferences 2022-01-05 11:03:44 +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
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
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>
2021-12-05 14:22:55 +01:00
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>
2021-11-29 20:47:37 +01:00
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>
2021-11-23 20:02:39 +01:00
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>
2021-11-23 20:02:39 +01:00
Markus Heiser
f57a9f425d [simple template] format default string 'italic'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-23 15:28:08 +01:00
mrpaulblack
6a367b59ce [simple theme] add animations.less for keyframe animations 2021-11-23 12:35:37 +01:00
Alexandre Flament
e612b81f41 [fix] simple theme: fix modal dialog 2021-11-23 12:35:37 +01:00
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
ec5a82fccd [enh] simple theme: add "simple-style" preferences 2021-11-19 16:45:50 +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
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
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
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
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
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
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
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
Markus Heiser
7ecd0583fe [simple theme] add .rounded-corners to selectable_url
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-04 00:05:04 +01:00
MrPaulBlack
e05bcd4311 [simple theme] result layout suggestions 2021-11-04 00:04:57 +01:00
Markus Heiser
4887c25e7f [simple theme] simplify and justify #answers & #corrections
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-03 23:59:50 +01:00
Markus Heiser
ca971bd5e5 [simple theme] CSS remove box-shadow effects
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-03 23:51:07 +01:00
Alexandre Flament
7179af32f2 [mod] simple theme: dark mode: various fixes 2021-11-03 09:25:33 +01:00
Alexandre Flament
2dcd9a68d6 [mod] simple theme: adjust button colors in dark version.
buttons:
* previous & next in the result page
* save, restore, & back in the preferences
* back to top

<select> input in Chrom* browsers:
* fix the white text with a white background issue
2021-11-03 09:25:33 +01:00
Markus Heiser
7996619691 [theme] simple - improve rendering of the "Answers" box
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-02 13:59:26 +01:00
Alexandre Flament
540042d0ca [mod] simple theme: infobox: center the image 2021-10-30 22:33:36 +02:00
Alexandre Flament
60d595ea52 [mod] simple theme: use :root instead of html to define CSS variables
This allows to use the CSS variables in inline svg.
2021-10-30 22:33:36 +02:00
Alexandre Flament
d0a3164514 [fix] simple theme: /preferences: dark theme version for select widgets
It is not possible to use CSS variable in a SVG when this is in a background.
This commit adds two .svg files, less converts them into data URL.
The two files are indentical except the fill color.
2021-10-30 22:33:34 +02:00
Alexandre Flament
67b0b68b40 [fix] simple theme: /preferences: dark theme version for the response time bar charts 2021-10-30 18:03:37 +02:00
Alexandre Flament
9f0b47f525 [fix] simple theme: cookie table doesn't overflow the expected width 2021-10-30 18:03:37 +02:00
Alexandre Flament
0650e73b12 [mod] simple theme: SearXNG logo 2021-10-29 20:24:04 +02:00
MrPaulBlack
9ddcd62464 [simple theme] selection ui with border
* remove vim arrow
* add 1rem padding to results
* add 0.2rem left border to vim selected article
* set column gap to 1.2rem and make search bar in line with results
* put 10px border-radius selected article
* result article: 0.125rem margin on tablet and esktop; 1rem margin on phone
2021-10-29 19:27:38 +02:00
Alexandre Flament
e2d312f6ae [mod] simple theme: adjust margins
* index page: margin top is 24% of the view port.
  avoid to scroll a small screen,
  center the content in the middle of the screen

* link to preferences at the same height same the input fields

* increase the category tab heighs

* increase the margin bottom of the query field

* in the results, change the h3 margin top and bottom to 0.4rem (6px)

* move the back to top button slightly on the right when the results are only images
2021-10-28 20:53:52 +02:00
Alexandre Flament
fd374d6322 [enh] simple theme: image detail
When an image is selected, the detail with the full size image is displayed
on the right side of the screen (or full screen on tablet and phone).

When Javascript is disabled, the thumbnail is a linked to the full size image,
as it was before.

When the image proxy is enabled, the full size image is also proxied,
in consequence this commit increases the bandwidth usage of instances.

The detail can be closed by the close button or the Esc key.
It is possible to go to the next and previous images using the j and k keys
or the button on the top right of the screen.
2021-10-28 08:28:21 +02:00
MrPaulBlack
1723726361 [simple theme] make url clickable and cleanup result article header
* url in article head is clickable
* url is bigger now 0.96em font
* url is now left floating on tablet and phone
* there is a 8px top and bottom margin on h3 result heading
2021-10-27 06:17:37 +00:00
MrPaulBlack
bcc313bcf8 [simple theme] add logo to search form on result page
* rework search form as grid layout
* remove various paddings and margins
* add logo and link to index to search form
* make categories bigger on phone
2021-10-27 05:47:25 +00:00