searxng/utils/lib_sxng_vite.sh
Markus Heiser 189dd0155d [web-client] simple theme: refactor jinja_svg_catalog and cleanup icon names
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 12:27:41 +01:00

43 lines
861 B
Bash

#!/usr/bin/env bash
# SPDX-License-Identifier: AGPL-3.0-or-later
vite.help(){
cat <<EOF
vite.: .. to be done ..
simple.:
build: build static files of the simple theme
dev: start development server
EOF
}
VITE_SIMPLE_THEME="${REPO_ROOT}/client/simple"
VITE_SIMPLE_DIST="${REPO_ROOT}/searx/static/themes/simple"
vite.simple.dev() {
( set -e
build_msg SIMPLE "start server for FE development of: ${VITE_SIMPLE_THEME}"
pushd "${VITE_SIMPLE_THEME}"
npm install
npm exec -- vite
popd &> /dev/null
)
}
vite.simple.build() {
# build static files of the simple theme
( set -e
build_msg SIMPLE "run build of theme from: ${VITE_SIMPLE_THEME}"
pushd "${VITE_SIMPLE_THEME}"
npm install
npm run fix
npm run icons.html
npm run build
)
}