Commit graph

185 commits

Author SHA1 Message Date
Yaksh Bariya 9f5268b4a7 [enh] add keybindings for copying URLs
'y': for in Vim-mode (yank)
'c': for SearXNG-mode (copy)

This should help keyboard heavy users
2024-04-08 09:07:45 +02:00
Bnyro db1f9b31c9 [feat] images: show resolution inside the image and fix image details overflow
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 16:22:37 +01:00
Bnyro e76ab1a4b3 [refactor] images: add resolution, image format and filesize fields
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 16:22:37 +01:00
Bnyro 938391b050 [feat] templates: add package result template
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 14:56:57 +01:00
allixx c85f706601 [fix] wrong engines padding 2024-01-31 17:22:03 +01:00
allixx 30dcaf1db6 [fix] equalize cached/proxied links left margin 2024-01-31 17:22:03 +01:00
allixx 1e03094dee [fix] justify engines/cached/proxied vertically 2024-01-31 17:22:03 +01:00
Bnyro a5decfb838 [feat] preferences: button to copy input to restore preferences hash 2024-01-29 18:09:22 +01:00
Jinyuan Huang f6d797ef43 [fix] fix a display problem in the image detail preview. 2023-12-28 19:15:04 +01:00
ahmad-alkadri 07e846e91a Prevent default browser behavior on click event 2023-12-28 18:59:14 +01:00
Markus Heiser ee2675c999 [update] make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-27 14:43:43 +01:00
obfuscated-loop 355d2dc678 [fix] Remove anchor tag outline in image results 2023-11-23 07:30:56 +01:00
Jinyuan Huang 903449e0b5 [fix] Images cannot be clicked anymore #3006
URL in sidedbar only exists in HTTP POST requests.  On HTTP GET requests the
selector ``#search_url button#copy_url`` results in a ``null`` type and a
``.style.display`` raises::

   Uncaught TypeError: d.querySelector(...) is null

As a result, the initialization of the event handler is no longer carried out.

Closes: https://github.com/searxng/searxng/issues/3003
Suggested-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-14 13:28:50 +01:00
Jinyuan Huang 8adc7b0433 add a "copy" button to the "search-url" sidebar 2023-11-10 13:28:04 +00:00
Bnyro df2e41c150 [fix] search.js: crash on homepage when setting form listeners 2023-10-13 12:56:29 +02:00
Jinyuan Huang 98366bcf90 [fix] settings icon invisble on mobile devices 2023-09-25 17:45:21 +02:00
Bnyro 8b0b6731fc [fix] search.less: start page search view on mobile devices 2023-09-22 17:54:55 +02:00
ormai a76c8e4101 Improve the layout of the search page on mobile 2023-09-19 20:15:51 +02:00
Emilien Devos 33e722f83b better error message when no results found 2023-09-19 11:10:48 +02:00
Jinyuan Huang 2ec77ef813 [mod] reformatted keyBindingLayouts in JS client (default, vim) 2023-09-19 08:06:06 +02:00
Bnyro a55e0ac553 [feat] search on category select without JS
Co-authored-by: Alexandre Flament <alex@al-f.net>
2023-09-18 21:29:11 +02:00
Jinyuan Huang 92d0c378e0 [fix] keyboard navigation / simple theme (UI)
- avoid loop select
- fix select next item in mixed result lists

Replaces: https://github.com/searxng/searxng/pull/2789
Closes: https://github.com/searxng/searxng/issues/2751
Closes: https://github.com/searxng/searxng/issues/2788
2023-09-16 13:45:43 +02:00
Jinyuan Huang 0984b00b7e [mod] UI smooth scroll added / CSS scroll-behavior
This PR improves the UX by making auto-scroll more smoother.  The css is changed
so all the auto-scroll will be smoother but User-scroll will not be influenced.

  The scroll-behavior CSS property sets the behavior for a scrolling box when
  scrolling is triggered by the navigation or CSSOM scrolling APIs.[1]

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior
2023-09-14 16:26:10 +02:00
Markus Heiser a987672340 [mod] improve handling of the hotkeys
- KeyboardEvent: keyCode property is depricated, replaced by key property [2]

- the check for ifDetailOpened is not necessary, because the hotkeys are not
  only applicable to image-results, by example:

   `!goi !go !scc hello`

- Key bindings like h for help are to be used in general (not only in vim-mode)

[1] https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
[2] https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-12 20:30:50 +02:00
Jinyuan Huang e6b160da62 [feature] key bindings: left & right arrow are always on 2023-09-12 20:30:50 +02:00
Markus Heiser 935aed7ca4 [feature] dark theme for code highlighter in the result list
Closes: https://github.com/searxng/searxng/issues/1354

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-11 12:27:56 +02:00
Markus Heiser 15a3dbf7a0 [fix] preferences - layout of the "special queries" tab
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-09 00:39:51 +02:00
Bnyro 13d801b75d [feat] results: show source of suggested answer 2023-08-18 19:07:14 +02:00
Markus Heiser c348427f07 [update] make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-08-11 10:54:50 +02:00
Kiru de5c1cedca fix "#backToTop" button always being clickable
`pointer-events` never gets set to "none" when the button is hidden,
allowing you to click the button. And your mouse further changes it's
cursor to the pointer style.
2023-07-19 15:06:09 +02:00
Markus Heiser 2149e88bdd [mod] template preferences: split into elements (no functional change)
HINT: this patch has no functional change / it is the preparation for following
      changes and bugfixes

Over the years, the preferences template became an unmanageable beast.  To make
the source code more readable the monolith is splitted into elements.  The
splitting into elements also has the advantage that a new template can make use
of them.

The reversed checkbox is a quirk that is only used in the prefereces and must be
eliminated in the long term.  For this the macro 'checkbox_onoff_reversed' was
added to the preferences.html template.  The 'checkbox' macro is also a quirk of
the preferences.html we don't want to use in other templates (it is an
input-checkbox in a HTML form that was misused for status display).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-06-02 19:05:43 +02:00
mrpaulblack f087959b02 [mod] simple theme: build design for details (collapsables)
* set border top and bottom on sidebar collasables
* inrease peading on summary so its easier to click on mobile
* remove margins and add flex wrapper to normalize elements in sidebar
2023-05-28 12:19:32 +02:00
Markus Heiser b7e315563d [mod] simple theme: collaps/expand elements in the sidebar
Make elements in the sidebar collapse able.  Except infoboxes all elements in
the sidebar are collapsed by default.

By folding out the sidebar elements, the UI looks less cluttered.  Especially on
small devices like smartphones, where the sidebar is above the results list, the
UX should be improved [1].

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-05-28 12:19:32 +02:00
Markus Heiser 4080eca3dd [build] /static 2023-04-21 13:38:29 +02:00
Markus Heiser abf574dc0c [mod] Ignore autocomplete_min on queries that include '!' (!bang)
Closes: https://github.com/searxng/searxng/issues/1566
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-04-15 18:54:47 +02:00
Markus Heiser b3d8d305d2 [build] /static 2023-04-15 08:21:02 +02:00
Markus Heiser 962b4c719f [mod] Update input when selecting by TAB
When the user press [TAB] the input form should be filled with the highlighted
item from the autocomplete list, but not release a search / with other words:
what we now have by pressing once on [ENTER] should be mapped to the [TAB] key
and pressing [ENTER] once should release a search query. [1]

[1] https://github.com/searxng/searxng/issues/778#issuecomment-1016593816

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-04-10 16:26:41 +02:00
rinagorsha e9fb9f2705 [mod] Update input when selecting autocomplete prediction with keyboard
- Update input when selecting autocomplete prediction with keyboard
- Search immediately by pressing enter key
- Search immediately by clicking on an autocomplete suggestion

Related:
- https://github.com/searxng/searxng/issues/778
2023-04-10 14:36:05 +02:00
Markus Heiser f117f969d8 [mod] in the preference page, show !bang of subgrouping categories
The names of the subgrouping categories in the preference page are translated,
to use this categories the user needs to know by which !bang the category can be
selected.  Related to "Make 'non tab category' bangs discoverable" in [#690].

Related:

- [#690] https://github.com/searxng/searxng/issues/690
- https://github.com/searxng/searxng/issues/1604
- https://github.com/searxng/searxng/pull/1545

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-04-08 11:10:14 +02:00
mrpaulblack 8ead23347f [fix] use input elements for pagination requests
* use html input elements instead of buttons for the pagination forms at the bottom of the result page
* move the less section that hides the pagination number widget on mobile to the mobile section
* clean up the less code for styling the numbers of the pagination widget
* fix: add the margin for box results (like in news category) to the bottom of the result to have a margin between pagination widget and article result
2023-01-23 22:56:55 +01:00
llmII d2b2300ee1 Feature: Pagination Widget with list of numbers.
Adds to the navigation widget, preserving forward/backward nav, and
inserting a list of clickable page numbers between them.

Phone sized devices continue without this widget as deterministic
display under small screen sizes has not been solved.

The widget is agnostic to the actual amount of pages there are that one
can navigate to and as such shows all plausible, albeit not necessarilly
valid, possibilities.

This widget does not interfere with infinite scroll in any fashion.
2023-01-23 21:22:06 +01:00
llmII 33d97fd01a Fix #2083
This changes the Suggestions to be a single column, not a wrapping row,
changing the input to be incapable of overflowing into visually adjacent
elements.
2023-01-08 10:44:58 -06:00
ahmad-alkadri db70c262c3 Add flex-wrap to the list of engines 2023-01-07 11:53:05 +01:00
Markus Heiser e9a7a6aea6 [build] /static 2023-01-06 08:35:52 +01:00
Alexandre FLAMENT 5ba831d6a8 Add paper.html result template 2022-09-23 20:45:58 +02:00
Alexandre FLAMENT 4a72a6b9fc Theme: fix autocompletion with the POST method
With the POST method, autocomplete.js does not URL encode the values.
For example "1+1" is sent as "1+1" which is read as "1 1" since space are URL encoded with a plus.

There is no clean way to fix the bug since autocomplete.js seems abandoned.

The commit monkey patches the ajax function of autocomplete.js

Related to #1695
2022-08-27 06:48:30 +00:00
Markus Heiser b08a779f2e make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-19 10:00:50 +02:00
Alexandre Flament eb489c45ea Submit GH bug: ask the user to do some checks before submitting a new issue 2022-07-08 09:04:57 +02:00
Markus Heiser f8222eb2cd [fix] style.less: move <dl> from infobox.attributes to .attributes class
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-04 19:06:45 +02:00
Alexandre Flament e3e5d2bd22 Theme: all top right icons have labels including "Preferences" 2022-07-02 10:04:35 +02:00