summaryrefslogtreecommitdiff
path: root/client/simple/theme_icons.js
diff options
context:
space:
mode:
authorIvan Gabaldon <igabaldon@inetol.net>2025-06-28 10:19:15 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2025-07-03 17:35:05 +0200
commit95172213f69c8fe85a0af69dd2654c7a77327968 (patch)
treec5ce5d7f75f2be026100023ce52f227c8f521bbf /client/simple/theme_icons.js
parenta947d5b3cff32104ee009113226feab45439dbdd (diff)
[mod] theme/simple: fmt/lint minor pass
*Safe* changes, no behaviour changes. - Initial ES5 to ES2015+ conversion. - Plenty of styling diff changes.
Diffstat (limited to 'client/simple/theme_icons.js')
-rw-r--r--client/simple/theme_icons.js71
1 files changed, 37 insertions, 34 deletions
diff --git a/client/simple/theme_icons.js b/client/simple/theme_icons.js
index b7d695cc8..d65e1aa2a 100644
--- a/client/simple/theme_icons.js
+++ b/client/simple/theme_icons.js
@@ -2,8 +2,8 @@
* Generate icons.html for the jinja templates of the simple theme.
*/
-import { argv } from "node:process";
import { dirname, resolve } from "node:path";
+import { argv } from "node:process";
import { jinja_svg_sets } from "./tools/jinja_svg_catalog.js";
const HERE = dirname(argv[1]) + "/";
@@ -11,62 +11,65 @@ const dest = resolve(HERE, "../../searx/templates/simple/icons.html");
/** @type import("./tools/jinja_svg_catalog.js").JinjaMacro[] */
const searxng_jinja_macros = [
- { name: "icon", class: "sxng-icon-set" },
+ { name: "icon", class: "sxng-icon-set" },
{ name: "icon_small", class: "sxng-icon-set-small" },
- { name: "icon_big", class: "sxng-icon-set-big" },
+ { name: "icon_big", class: "sxng-icon-set-big" }
];
-
-const sxng_icon_opts ={
+const sxng_icon_opts = {
multipass: true,
plugins: [
{ name: "removeTitle" },
{ name: "removeXMLNS" },
- { name: "addAttributesToSVGElement",
+ {
+ name: "addAttributesToSVGElement",
params: {
attributes: [
{
- "aria-hidden": "true",
- }]}}]
+ "aria-hidden": "true"
+ }
+ ]
+ }
+ }
+ ]
};
-
/** @type import("./tools/jinja_svg_catalog.js").IconSet */
const simple_icons = [
{
base: resolve(HERE, "node_modules/ionicons/dist/svg"),
set: {
- "alert": "alert-outline.svg",
- "appstore": "apps-outline.svg",
- "book": "book-outline.svg",
- "close": "close-outline.svg",
- "download": "download-outline.svg",
+ alert: "alert-outline.svg",
+ appstore: "apps-outline.svg",
+ book: "book-outline.svg",
+ close: "close-outline.svg",
+ download: "download-outline.svg",
"ellipsis-vertical": "ellipsis-vertical-outline.svg",
"file-tray-full": "file-tray-full-outline.svg",
- "film": "film-outline.svg",
- "globe": "globe-outline.svg",
- "heart": "heart-outline.svg",
- "image": "image-outline.svg",
- "layers": "layers-outline.svg",
- "leecher": "arrow-down.svg",
- "location": "location-outline.svg",
- "magnet": "magnet-outline.svg",
+ film: "film-outline.svg",
+ globe: "globe-outline.svg",
+ heart: "heart-outline.svg",
+ image: "image-outline.svg",
+ layers: "layers-outline.svg",
+ leecher: "arrow-down.svg",
+ location: "location-outline.svg",
+ magnet: "magnet-outline.svg",
"musical-notes": "musical-notes-outline.svg",
"navigate-down": "chevron-down-outline.svg",
"navigate-left": "chevron-back-outline.svg",
"navigate-right": "chevron-forward-outline.svg",
"navigate-up": "chevron-up-outline.svg",
- "people": "people-outline.svg",
- "play": "play-outline.svg",
- "radio": "radio-outline.svg",
- "save": "save-outline.svg",
- "school": "school-outline.svg",
- "search": "search-outline.svg",
- "seeder": "swap-vertical.svg",
- "settings": "settings-outline.svg",
- "tv": "tv-outline.svg",
+ people: "people-outline.svg",
+ play: "play-outline.svg",
+ radio: "radio-outline.svg",
+ save: "save-outline.svg",
+ school: "school-outline.svg",
+ search: "search-outline.svg",
+ seeder: "swap-vertical.svg",
+ settings: "settings-outline.svg",
+ tv: "tv-outline.svg"
},
- svgo_opts: sxng_icon_opts,
+ svgo_opts: sxng_icon_opts
},
// some of the ionicons are not suitable for a dark theme, we fixed the svg
// manually in src/svg/ionicons
@@ -75,9 +78,9 @@ const simple_icons = [
base: resolve(HERE, "src/svg/ionicons"),
set: {
"information-circle": "information-circle-outline.svg",
- "newspaper": "newspaper-outline.svg",
+ newspaper: "newspaper-outline.svg"
},
- svgo_opts: sxng_icon_opts,
+ svgo_opts: sxng_icon_opts
}
];