1
0
mirror of https://github.com/avitex/avitex.github.io synced 2024-09-28 02:39:57 +00:00
1bit.pw/templates/macros.html

16 lines
377 B
HTML
Raw Normal View History

2018-08-22 13:30:07 +00:00
{% macro link(url) %}
{%- if url is starting_with("/") or url is starting_with("./") -%}
{{ get_url(path=url) }}
{%- else -%}
{{ url }}
{%- endif -%}
{% endmacro link %}
{% macro is_active_nav(url, curr_url) %}
{%- if url == get_url(path="/") -%}
{{ url == curr_url }}
{%- else -%}
{{ curr_url is starting_with(url) }}
{%- endif -%}
2020-04-11 17:22:25 +00:00
{% endmacro is_active_nav %}