diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2025-05-09 12:08:44 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2025-05-09 12:40:34 +0200 |
| commit | 409ede153097ff8e0d4cce028b611a790e44b166 (patch) | |
| tree | a55c317dc53212f82f9b673858e8e7b8351fa649 /client/simple | |
| parent | 1326ec7429526ad538a7c64f89d499dd09ddee27 (diff) | |
[fix] simple client: jinja_svg_catalog addClassesToSVGElement
Starting with ionicons-8.0.8 the SVG already contains a class attribute and
instaed of using SVGO plugin ``addAttributesToSVGElement`` we habve to use
``addClassesToSVGElement`` to add out ``__jinja_class_placeholder__``.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'client/simple')
| -rw-r--r-- | client/simple/tools/jinja_svg_catalog.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/simple/tools/jinja_svg_catalog.js b/client/simple/tools/jinja_svg_catalog.js index 0adffa5af..e3e8f1216 100644 --- a/client/simple/tools/jinja_svg_catalog.js +++ b/client/simple/tools/jinja_svg_catalog.js @@ -51,11 +51,13 @@ function jinja_svg_catalog(dest, macros, items) { (item) => { /** @type {import("svgo").Config} */ + // JSON.stringify & JSON.parse are used to create a deep copy of the + // item.svgo_opts object const svgo_opts = JSON.parse(JSON.stringify(item.svgo_opts)); svgo_opts.plugins.push({ - name: "addAttributesToSVGElement", + name: "addClassesToSVGElement", params: { - attributes: [{ "class": __jinja_class_placeholder__, }] + classNames: [__jinja_class_placeholder__] }} ); |