pedf
/
pomocskolam
Archived
1
0
Fork 0

Makro a shortcode pro generování navigace

form
Emil Miler 4 years ago
parent 3b35b1e4ee
commit 10b89de940

@ -0,0 +1,15 @@
{% macro nav(type) %}
{% if config.extra.nav %}
<nav>
<ul>
{% for item in config.extra.nav %}
{% if type == "short" %}
<li><a href="{{ item.path }}">{{ item.name }}</a></li>
{% elif type == "long" %}
<li><a href="{{ item.path }}">{{ item.desc }}</a></li>
{% endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
{% endmacro nav %}

@ -0,0 +1,2 @@
{% import "macros.html" as macros %}
{{ macros::nav(type=type) }}