templates

This commit is contained in:
masnn committed 2020-04-03 18:52:20 +08:00
1 parent d5b1f623f8
commit 7fa4a58abe
112 files changed
+5726

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
{% macro render_item(icon_name, page_name, label=none) %}
<li class="menu__item" id="menu-item-{{ page_name }}">
{% set target_url = reverse_url(page_name, **kwargs) %}
<a href="{{ target_url }}" class="menu__link{% if handler.request.path_qs == target_url %} active{% endif %}">
{% if icon_name %}
<span class="icon icon-{{ icon_name }}"></span>
{% endif %}
{% if label %}
{{ _(label) }}
{% else %}
{{ _(page_name) }}
{% endif %}
</a>
</li>
{% endmacro %}