2021-11-13 10:42:07 +01:00
|
|
|
{% 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',
|
2021-11-13 15:08:54 +01:00
|
|
|
} -%}
|
2021-10-26 23:11:51 +02:00
|
|
|
<div id="categories" class="search_categories">{{- '' -}}
|
2017-02-12 15:06:01 +01:00
|
|
|
<div id="categories_container">
|
2023-09-09 16:49:14 +02:00
|
|
|
{%- if not search_on_category_select or not display_tooltip -%}
|
2024-08-23 01:29:44 +02:00
|
|
|
{%- for category in categories -%}
|
2023-09-09 16:49:14 +02:00
|
|
|
<div class="category category_checkbox">{{- '' -}}
|
2024-09-11 03:44:30 +02:00
|
|
|
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}>
|
2023-09-09 16:49:14 +02:00
|
|
|
<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 -%}
|
|
|
|
{%- else -%}
|
2024-08-23 01:29:44 +02:00
|
|
|
{%- for category in categories -%}{{- '\n' -}}
|
2023-09-27 17:46:27 +02:00
|
|
|
<button type="submit" name="category_{{ category }}" class="category category_button {% if category in selected_categories %}selected{% endif %}">
|
2023-09-09 16:49:14 +02:00
|
|
|
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
|
|
|
<div class="category_name">{{- _(category) -}}</div>{{- '' -}}
|
|
|
|
</button>{{- '' -}}
|
|
|
|
{%- endfor -%}
|
|
|
|
{{- '\n' -}}
|
|
|
|
{%- endif -%}
|
2017-02-12 15:06:01 +01:00
|
|
|
</div>{{- '' -}}
|
|
|
|
</div>
|