nomilo/templates/macros.html

12 lines
402 B
HTML

{% macro nav_link(content, href, current_page, content='', safe_content='', section=False, current_sections=False, props='') %}
<a
href="{{ href }}"
{{ props }}
{% if current_page == href %}
aria-current="page"
{% elif section and section in current_sections %}
aria-current="location"
{% endif %}
>{{ content }}{{ safe_content | safe }}</a>
{% endmacro nav_link %}