diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-11-13 12:19:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-13 12:19:08 +0100 |
| commit | 7a9dda51d2f532089396e97a890e1727c1e872d1 (patch) | |
| tree | 311aa6e2ea2054d51e29bad48981eb1c69e1957d /searx/templates/simple/categories.html | |
| parent | 8877512e20edf86221b1de66808e2ab284770844 (diff) | |
| parent | 29e092b9310c961bf730d41e43e77af4c9c50563 (diff) | |
Merge pull request #488 from MrPaulBlack/category-icons
[simple theme] add icons to category and drop webfont
Diffstat (limited to 'searx/templates/simple/categories.html')
| -rw-r--r-- | searx/templates/simple/categories.html | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/searx/templates/simple/categories.html b/searx/templates/simple/categories.html index 0c121eaed..71fdca90a 100644 --- a/searx/templates/simple/categories.html +++ b/searx/templates/simple/categories.html @@ -1,7 +1,25 @@ +{% 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', +} -%} <div id="categories" class="search_categories">{{- '' -}} <div id="categories_container"> {%- for category in categories -%} - <div class="category"><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">{{ _(category) }}</label></div> + <div class="category"><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') -}} + <div class="category_name">{{- _(category) -}}</div> + </label> + </div> {%- endfor -%} {%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%} </div>{{- '' -}} |