keylighter/templates/macros.twig
2020-04-11 21:55:18 +02:00

10 lines
428 B
Twig
Executable File

{% macro menu_entry(url, title, icon, current) %}
<li class="nav-item {% if current %}active{% endif %}">
<a class="nav-link" href="{{ url }}"><i class="fa-fw {{ icon }}"></i> {{ title }}</a>
</li>
{% endmacro %}
{% macro document_link(document) %}
<i class="fa-fw {{ fa(document.metadata.icon ?? 'document', document.metadata.iconType ?? 'regular') }}"></i>
{{ document.metadata.title }}
{% endmacro %}