Skip to content

Commit

Permalink
[fix] ionic.io/ionicons - add back missing class="ionicon"
Browse files Browse the repository at this point in the history
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: #3383
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
  • Loading branch information
return42 committed Apr 27, 2024
1 parent 42b58eb commit d593055
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion searx/static/themes/simple/gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ module.exports = function (grunt) {
name: "addAttributesToSVGElement",
params: {
attributes: [
{ "aria-hidden": "true" }
{ "class": "ionicon", "aria-hidden": "true" }
]
}
}
Expand Down

0 comments on commit d593055

Please sign in to comment.