[fix] ionic.io/ionicons - add back missing class="ionicon"

Seems to me svg2jinja added the class in the past .. but no longer in new builds
/ this patch adds the class back by using addAttributesToSVGElement [1].

To test this patch use:

    $ ./manage themes.simple
    $ cat searx/templates/simple/icons.html

and check `class="ionicon"` is in the outer `<svg ..>` tags.

[1] https://svgo.dev/docs/plugins/add-attributes-to-svg-elements/
[2] https://ionic.io/ionicons

Closes: https://github.com/searxng/searxng/issues/3383
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2024-04-21 20:16:08 +02:00 committed by Markus Heiser
parent 42b58eb448
commit d593055888
2 changed files with 21 additions and 21 deletions

View file

@ -218,7 +218,7 @@ module.exports = function (grunt) {
name: "addAttributesToSVGElement",
params: {
attributes: [
{ "aria-hidden": "true" }
{ "class": "ionicon", "aria-hidden": "true" }
]
}
}