From 189dd0155df60c98b5d7de73b873c8ad444ff931 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 4 Feb 2025 15:59:02 +0100 Subject: [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 --- searx/templates/simple/icons.html | 73 ++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 28 deletions(-) (limited to 'searx/templates/simple/icons.html') diff --git a/searx/templates/simple/icons.html b/searx/templates/simple/icons.html index 6cbec3ee9..c6022de09 100644 --- a/searx/templates/simple/icons.html +++ b/searx/templates/simple/icons.html @@ -1,38 +1,55 @@ -{# 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':'', - 'information-circle-outline':'', +{# +Catalog of SVG symbols that can be inserted into the HTML output of a Jinja +template. This file from: + client/simple/tools/icon_catalog.edge.html +#} + +{%- +set catalog = { + 'alert' : '', + 'appstore' : '', + 'book' : '', + 'close' : '', + 'download' : '', + 'ellipsis-vertical' : '', + 'file-tray-full' : '', + 'film' : '', + 'globe' : '', + 'heart' : '', + 'image' : '', + 'layers' : '', + 'leecher' : '', + 'location' : '', + 'magnet' : '', + 'musical-notes' : '', + 'navigate-down' : '', + 'navigate-left' : '', + 'navigate-right' : '', + 'navigate-up' : '', + 'people' : '', + 'play' : '', + 'radio' : '', + 'save' : '', + 'school' : '', + 'search' : '', + 'seeder' : '', + 'settings' : '', + 'tv' : '', + 'information-circle' : '', + 'newspaper' : '', } -%} + {% macro icon(action, alt) -%} - {{ icons[action] | replace("ionicon", "ion-icon") | safe }} + {{ catalog[action] | replace("__jinja_class_placeholder__", "ion-icon") | safe }} {%- endmacro %} -{% macro icon_small(action) -%} - {{ icons[action] | replace("ionicon", "ion-icon-small") | safe }} +{% macro icon_small(action, alt) -%} + {{ catalog[action] | replace("__jinja_class_placeholder__", "ion-icon-small") | safe }} {%- endmacro %} {% macro icon_big(action, alt) -%} - {{ icons[action] | replace("ionicon", "ion-icon-big") | safe }} -{%- endmacro %} + {{ catalog[action] | replace("__jinja_class_placeholder__", "ion-icon-big") | safe }} +{%- endmacro %} \ No newline at end of file -- cgit v1.2.3