[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 <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
30ee34d3ea
commit
189dd0155d
@@ -1,15 +1,19 @@
|
||||
{% from 'simple/icons.html' import icon_big %}
|
||||
{%- set category_icons = {
|
||||
'general': 'search-outline',
|
||||
'images': 'image-outline',
|
||||
'videos': 'play-outline',
|
||||
'news': 'newspaper-outline',
|
||||
'map': 'location-outline',
|
||||
'music': 'musical-notes-outline',
|
||||
'it': 'layers-outline',
|
||||
'science': 'school-outline',
|
||||
'files': 'file-tray-full-outline',
|
||||
'social media': 'people-outline',
|
||||
'apps': 'appstore',
|
||||
'dictionaries': 'book',
|
||||
'files': 'file-tray-full',
|
||||
'general': 'search',
|
||||
'images': 'image',
|
||||
'it': 'layers',
|
||||
'map': 'location',
|
||||
'music': 'musical-notes',
|
||||
'news': 'newspaper',
|
||||
'radio': 'radio',
|
||||
'science': 'school',
|
||||
'social media': 'people',
|
||||
'TV': 'tv',
|
||||
'videos': 'play',
|
||||
} -%}
|
||||
<div id="categories" class="search_categories">{{- '' -}}
|
||||
<div id="categories_container">
|
||||
@@ -18,7 +22,7 @@
|
||||
<div class="category category_checkbox">{{- '' -}}
|
||||
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}>
|
||||
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
|
||||
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
||||
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe') -}}
|
||||
<div class="category_name">{{- _(category) -}}</div>
|
||||
</label>
|
||||
</div>
|
||||
@@ -27,7 +31,7 @@
|
||||
{%- else -%}
|
||||
{%- for category in categories -%}{{- '\n' -}}
|
||||
<button type="submit" name="category_{{ category }}" class="category category_button {% if category in selected_categories %}selected{% endif %}">
|
||||
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
||||
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe') -}}
|
||||
<div class="category_name">{{- _(category) -}}</div>{{- '' -}}
|
||||
</button>{{- '' -}}
|
||||
{%- endfor -%}
|
||||
|
||||
Reference in New Issue
Block a user