summaryrefslogtreecommitdiff
path: root/client/simple/src
AgeCommit message (Collapse)Author
2025-12-19[upd] web-client (simple): Bump the minor groupdependabot[bot]
Bumps the minor group in /client/simple with 6 updates: | Package | From | To | | --- | --- | --- | | [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) | `2.3.8` | `2.3.10` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.0.1` | `25.0.3` | | [edge.js](https://github.com/edge-js/edge) | `6.3.0` | `6.4.0` | | [less](https://github.com/less/less.js) | `4.4.2` | `4.5.1` | | [sort-package-json](https://github.com/keithamus/sort-package-json) | `3.5.1` | `3.6.0` | | [vite-bundle-analyzer](https://github.com/nonzzz/vite-bundle-analyzer) | `1.3.1` | `1.3.2` | Updates `@biomejs/biome` from 2.3.8 to 2.3.10 - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.3.10/packages/@biomejs/biome) Updates `@types/node` from 25.0.1 to 25.0.3 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `edge.js` from 6.3.0 to 6.4.0 - [Release notes](https://github.com/edge-js/edge/releases) - [Changelog](https://github.com/edge-js/edge/blob/6.x/CHANGELOG.md) - [Commits](https://github.com/edge-js/edge/compare/v6.3.0...v6.4.0) Updates `less` from 4.4.2 to 4.5.1 - [Release notes](https://github.com/less/less.js/releases) - [Changelog](https://github.com/less/less.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/less/less.js/commits) Updates `sort-package-json` from 3.5.1 to 3.6.0 - [Release notes](https://github.com/keithamus/sort-package-json/releases) - [Commits](https://github.com/keithamus/sort-package-json/compare/v3.5.1...v3.6.0) Updates `vite-bundle-analyzer` from 1.3.1 to 1.3.2 - [Release notes](https://github.com/nonzzz/vite-bundle-analyzer/releases) - [Changelog](https://github.com/nonzzz/vite-bundle-analyzer/blob/master/CHANGELOG.md) - [Commits](https://github.com/nonzzz/vite-bundle-analyzer/compare/v1.3.1...v1.3.2) --- updated-dependencies: - dependency-name: "@biomejs/biome" dependency-version: 2.3.10 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor - dependency-name: "@types/node" dependency-version: 25.0.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor - dependency-name: edge.js dependency-version: 6.4.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: less dependency-version: 4.5.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: sort-package-json dependency-version: 3.6.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: vite-bundle-analyzer dependency-version: 1.3.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor ... Signed-off-by: dependabot[bot] <support@github.com>
2025-12-07[fix] themes: clear search input (#5540)Ivan Gabaldon
* [fix] themes: clear search input Closes https://github.com/searxng/searxng/issues/5539 * [fix] themes: rebuild static
2025-12-02[mod] client/simple: client plugins (#5406)Ivan Gabaldon
* [mod] client/simple: client plugins Defines a new interface for client side *"plugins"* that coexist with server side plugin system. Each plugin (e.g., `InfiniteScroll`) extends the base `ts Plugin`. Client side plugins are independent and lazy‑loaded via `router.ts` when their `load()` conditions are met. On each navigation request, all applicable plugins are instanced. Since these are client side plugins, we can only invoke them once DOM is fully loaded. E.g. `Calculator` will not render a new `answer` block until fully loaded and executed. For some plugins, we might want to handle its availability in `settings.yml` and toggle in UI, like we do for server side plugins. In that case, we extend `py Plugin` instancing only the information and then checking client side if [`settings.plugins`](https://github.com/inetol/searxng/blob/1ad832b1dc33f3f388da361ff2459b05dc86a164/client/simple/src/js/toolkit.ts#L134) array has the plugin id. * [mod] client/simple: rebuild static
2025-11-07[upd] web-client (simple): Bump the minor group in /client/simple with 4 ↵dependabot[bot]
updates (#5423) * [upd] web-client (simple): Bump the minor group Bumps the minor group in /client/simple with 4 updates: [ol](https://github.com/openlayers/openlayers), [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [sharp](https://github.com/lovell/sharp). Updates `ol` from 10.6.1 to 10.7.0 - [Release notes](https://github.com/openlayers/openlayers/releases) - [Commits](https://github.com/openlayers/openlayers/compare/v10.6.1...v10.7.0) Updates `@biomejs/biome` from 2.3.2 to 2.3.4 - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.3.4/packages/@biomejs/biome) Updates `@types/node` from 24.9.2 to 24.10.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `sharp` from 0.34.4 to 0.34.5 - [Release notes](https://github.com/lovell/sharp/releases) - [Commits](https://github.com/lovell/sharp/compare/v0.34.4...v0.34.5) --- updated-dependencies: - dependency-name: ol dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor - dependency-name: "@biomejs/biome" dependency-version: 2.3.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor - dependency-name: "@types/node" dependency-version: 24.10.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: sharp dependency-version: 0.34.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor ... Signed-off-by: dependabot[bot] <support@github.com> * [upd] web-client (simple): rebuild static --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ivan Gabaldon <igabaldon@inetol.net>
2025-10-25[fix] search bar: cursor jumps to beginning when clicking text fieldBnyro
Apparently, setting padding on an input field and then clicking that space created by the padding forces the seekbar cursor to jump to the beginning of the input field instead of the actual text position. By removing that padding, the search bar input automatically claims that height for itself and thus clicking on the blank space moves the cursor to the correct position. closes https://github.com/searxng/searxng/issues/5371
2025-10-24[fix] client/simple: insecure ctx clipboard copyIvan Gabaldon
Uses the deprecated [`execCommand()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) to copy content to clipboard if accessing the instance through HTTP, this method isn't going away soon. Closes https://github.com/searxng/searxng/issues/5359
2025-10-20[mod] typification of SearXNG: add new result type FileMarkus Heiser
This PR adds a new result type: File Python class: searx/result_types/file.py Jinja template: searx/templates/simple/result_templates/file.html CSS (less) client/simple/src/less/result_types/file.less Class 'File' (singular) replaces template 'files.html' (plural). The renaming was carried out because there is only one file (singular) in a result. Not to be confused with the category 'files' where in multiple results can exist. As mentioned in issue [1], the class '.category-files' was removed from the CSS and the stylesheet was adopted in result_types/file.less (there based on the templates and no longer based on the category). [1] https://github.com/searxng/searxng/issues/5198 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-10-17[feat] video results: display video length on video thumbnailBnyro
2025-10-10[feat] preferences hash: show applied settings in pref page when searching ↵Bnyro
with 'search url of the currently saved preferences' Previously, when using a search url copied from the cookies tab, clicking at the settings icon at the top right would show the browser preferences and not the preferences that were set and used with the search url. Please see https://github.com/searxng/searxng/issues/5227 for more information. To test: - change some preferences - copy the preferences search url in the settings' cookies tab - reset the preferences or clear cookies - paste the copied search url into the search bar to search for something - press the settings icon - you can now see/preview the actual settings that were used for the search - by pressing 'save', you can keep these preferences closes #5227
2025-09-25[fix] simple client: move code.less to result_types/code.lessMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-09-20[mod] typification of SearXNG: add new result type PaperMarkus Heiser
This patch adds a new result type: Paper - Python class: searx/result_types/paper.py - Jinja template: searx/templates/simple/result_templates/paper.html - CSS (less) client/simple/src/less/result_types/paper.less Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-09-01[mod] simple client: pygments.less - switched dark theme to monokaiMarkus Heiser
Compared to ``lightbulb`` theme we used in the past for the dark theme, the ``monokai`` has a better contrast [1]. BTW, the result list of SearXNG should not act as a code-checker: The border & color of class ``.err`` (used for syntax errors) has been removed / code snippets are often not well formed nor valid code and the rendering of such code fragments as errors obscures the view on the code snippet. [1] https://pygments.org/styles/ Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-08-21[feat] client/simple: move cursor to end of search input on mobileAmit Katyal
On mobile devices, when the search input is focused, move the cursor to the end of the existing text. This improves the user experience by making it easier to edit or append to the current query without manually moving the cursor first. Closes: https://github.com/searxng/searxng/issues/5112
2025-08-21[fix] move initial "JS is enabled?" (no-js) to client sideMarkus Heiser
To avoid an `unsafe-inline` in the CSP header, the JS code must be moved to the client side [1]. The `<script>` tag at the end of the HTML originates from the old implementation of the JS client. Since PR-5073 [2] was merged, the `type` is now `module`, and the tag must be moved to the beginning of the HTML. > We need to inline this "JS is enabled?" thing to prevent layout shifts and > temporary "no JS enabled" visuals as ESM scripts loads and evals everything > deferred from initial DOM render [3] That's true in theory, but in practice, this effect is unnoticeable because it's masked by another effect (which we can't avoid): If we load the page with a severely throttled connection, the HTML (result list) takes a long time to load. Then the CSS is loaded, which also takes longer. Until the CSS has loaded, there's no layout. A layout shift is therefore largely determined by the loading of the HTML and CSS itself. The running times of the ESM script can be neglected compared to the loading times of HTML & CSS. [1] https://github.com/searxng/searxng-docker/pull/424#issuecomment-3199494256 [2] https://github.com/searxng/searxng/pull/5073 [3] https://github.com/searxng/searxng-docker/pull/424#issuecomment-3199622504
2025-08-18[license] client/simple: SPDX-License-Identifier: AGPL-3.0-or-laterMarkus Heiser
SPDX short-form identifiers to communicate license information in a simple, efficient, portable and machine-readable manner [1] [1] https://spdx.dev/learn/handling-license-info/
2025-08-18[enh] theme/simple: custom routerIvan Gabaldon
Lay the foundation for loading scripts granularly depending on the endpoint it's on. Remove vendor specific prefixes as there are now managed by browserslist and LightningCSS. Enabled quite a few rules in Biome that don't come in recommended to better catch issues and improve consistency. Related: - https://github.com/searxng/searxng/pull/5073#discussion_r2256037965 - https://github.com/searxng/searxng/pull/5073#discussion_r2256057100
2025-08-18[fix] theme/simple: broken highlightResultIvan Gabaldon
From `mod-simple-strict`
2025-08-18[mod] theme/simple: migrate codebase to TypeScriptIvan Gabaldon
TypeScript is a superset of JavaScript, converting the entire theme to TypeScript allows us to receive much more feedback on possible issues made in package updates or our own typos, furthermore, it allows to transpile properly to lower specs. This PR couldn't be done in smaller commits, a lot of work needed to make everything *work properly*: - A browser baseline has been set that requires minimum **Chromium 93, Firefox 92 and Safari 15** (proper visuals/operation on older browser versions is not guaranteed) - LightningCSS now handles minification and prefix creation for CSS. - All hardcoded polyfills and support for previous browser baseline versions have been removed. - Convert codebase to TypeScript. - Convert IIFE to ESM, handling globals with IIFE is cumbersome, ESM is the standard for virtually any use of JS nowadays. - Vite now builds the theme without the need for `vite-plugin-static-copy`. - `searxng.ready` now accepts an array of conditions for the callback to be executed. - Replace `leaflet` with `ol` as there were some issues with proper Vite bundling. - Merged `head` with `main` script, as head was too small now. - Add `assertElement` to properly check the existence of critical DOM elements. - `searxng.on` renamed to `searxng.listen` with some handling improvements.
2025-07-16[fix] simple theme: display image detail view fullscreen on landscape phonesmrpaulblack
2025-07-03[mod] theme/simple: fmt/lint major passIvan Gabaldon
*Not so safe* changes, no behaviour changes. - More ES5 to ES2015+ conversion. - Make Biome not cry anymore applying remaining changes.
2025-07-03[mod] theme/simple: fmt/lint minor passIvan Gabaldon
*Safe* changes, no behaviour changes. - Initial ES5 to ES2015+ conversion. - Plenty of styling diff changes.
2025-06-22[fix] weather template: text overflow on small screen devicesBnyro
- this PR fixes that the columns of the weather table are overflowing on small screen devices - therefore we now display "..." at the end of too long words and cut them off - additionally I added some small gap between columns, otherwise it looks weird on small screens - closes https://github.com/searxng/searxng/issues/4887
2025-05-31[mod] weather results: add types, i18n/l10n, symbols & unit conversionsMarkus Heiser
The types necessary for weather information such as GeoLocation, DateTime, Temperature,Pressure, WindSpeed, RelativeHumidity, Compass (wind direction) and symbols for the weather have been implemented. There are unit conversions and translations for weather property labels. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-25[fix] search: autocomplete focus on results pageBnyro
This has been a regression introduced with the removal of the unmaintained autocomplete.js library. We should only focus the search bar on the main search page at `/` and not at the results page located at `/search`. I'm not sure if there's a better way to figure out if we're on the results page than checking if the id of the main element is `#main_results`, checking the path obviously isn't a better solution because it can differ depending on the instance / reverse proxy / .... - related to https://github.com/searxng/searxng/commit/32823ecb69b115a6726475d6421f0a1c0327fafa - closes https://github.com/searxng/searxng/issues/4846
2025-05-22[refactor] search.js: use custom auto completion implementationBnyro
The previously used library is unmaintained for 6 years now [1] and the solution had know issues [2][3] [1] https://github.com/searxng/searxng/pull/4284#discussion_r1954493434 [2] https://github.com/searxng/searxng/pull/4318#issuecomment-2731576657 [3] https://github.com/privau/searxng/issues/56
2025-04-06[fix] images cropped in Safari (webkit)Markus Heiser
- Closes: https://github.com/searxng/searxng/issues/4156 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-03[fix] client/simple: add missing "swiped-events" devDependencies (import)Markus Heiser
In commit 1a3543d4b in PR-4284 [1] the swiped-events [2] were forgotten to be migrated. In this patch, the event library is added to the ``devDependencies`` and imported by:: import "../../../node_modules/swiped-events/src/swiped-events.js [1] https://github.com/searxng/searxng/pull/4284 [2] https://www.npmjs.com/package/swiped-events Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Reported-by: https://github.com/searxng/searxng/pull/4198#issuecomment-2770734321
2025-03-27[fix] image deatils view: vertical overflow in results.image-detail-openMarkus Heiser
overflow-y: scroll If the information on the image exceeds the visible area in the detail view, there must be a way to access this information via scroll. max-height: -17rem versus 7rem There are new fields in the lower area, so the height of the image (top) must be reduced Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-15[mod] typification of SearXNG: add new result type KeyValueMarkus Heiser
This patch adds a new result type: KeyValue - Python class: searx/result_types/keyvalue.py - Jinja template: searx/templates/simple/result_templates/keyvalue.html - CSS (less) client/simple/src/less/result_types/keyvalue.less Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-15[web-client] simple theme: dynamic vertical heightbearz314
On mobile devices with browser chrome (UI) that recedes on scroll, 'vh' includes the height covered by chrome, which 'dvh' does not. By using 'dvh' the footer is immediately visible on the homepage without scrollbar on mobile devices.
2025-02-28[fix] simple template - video.html fix button icon to icon_smallMarkus Heiser
BTW: Rename the manufacturer-specific name ``ion-icon`` of the icon set in SerXNG to ``sxng-icon-set`` --> The icon set can be assembled together as desired in the FE and should therefore not have a manufacturer-specific name in the style and template definitions. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28[web-client] simple theme: move SVGs to client/simple/src and deploy to ↵Markus Heiser
static by plg_svg2svg Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28[web-client] simple theme: refactor jinja_svg_catalog and cleanup icon namesMarkus Heiser
This patch implements the template generation of the template: searx/templates/simple/icons.html by the way the icon set (the icon names) has been normalized: film-outline --> film magnet-outline --> magnet .. warning --> alert Some missing (categorie) icons had been added. Some of the ionicons are not suitable for a dark theme, we fixed the svg manually in src/svg/ionicons: - https://github.com/searxng/searxng/pull/4284#issuecomment-2680550342 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28[web-client] simple theme: move src/brand to client/simple/srcMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28[web-client] simple theme: stylelint-prettier LESS source filesMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28[web-client] simple theme: move sources to client/simple/srcMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28[web-client] simple theme: build & development env based on vite.Markus Heiser
Vite is a build tool, it consists of two major parts [1]: - A dev server that provides rich feature enhancements over native ES modules, for example extremely fast Hot Module Replacement (HMR). - A build command that bundles your code with Rollup, pre-configured to output highly optimized static assets for production. [1] https://vite.dev/guide/ Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>