From d5930558882dffa22eda3bdd95a24e8c430b66c3 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 21 Apr 2024 20:16:08 +0200 Subject: [PATCH] [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 `` 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 --- searx/static/themes/simple/gruntfile.js | 2 +- searx/templates/simple/icons.html | 40 ++++++++++++------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 630cac212..9410a674b 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -218,7 +218,7 @@ module.exports = function (grunt) { name: "addAttributesToSVGElement", params: { attributes: [ - { "aria-hidden": "true" } + { "class": "ionicon", "aria-hidden": "true" } ] } } diff --git a/searx/templates/simple/icons.html b/searx/templates/simple/icons.html index 7ff4dfc16..6cbec3ee9 100644 --- a/searx/templates/simple/icons.html +++ b/searx/templates/simple/icons.html @@ -1,25 +1,25 @@ {# this file was generated by searx/static/themes/simple/gruntfile.js #} {%- set icons = { - 'warning':'', - 'close':'', - 'chevron-up-outline':'', - 'chevron-right':'', - 'chevron-left':'', - 'menu-outline':'', - 'ellipsis-vertical-outline':'', - 'magnet-outline':'', - 'globe-outline':'', - 'search-outline':'', - 'image-outline':'', - 'play-outline':'', - 'newspaper-outline':'', - 'location-outline':'', - 'musical-notes-outline':'', - 'layers-outline':'', - 'school-outline':'', - 'file-tray-full-outline':'', - 'people-outline':'', - 'heart-outline':'', + 'warning':'', + 'close':'', + 'chevron-up-outline':'', + 'chevron-right':'', + 'chevron-left':'', + 'menu-outline':'', + 'ellipsis-vertical-outline':'', + 'magnet-outline':'', + 'globe-outline':'', + 'search-outline':'', + 'image-outline':'', + 'play-outline':'', + 'newspaper-outline':'', + 'location-outline':'', + 'musical-notes-outline':'', + 'layers-outline':'', + 'school-outline':'', + 'file-tray-full-outline':'', + 'people-outline':'', + 'heart-outline':'', 'information-circle-outline':'', }