fr
/
web
forked from kittv/web
1
0
Fork 0

Výpis položek v navigaci pomocí makra

search
Emil Miler 4 years ago
parent e0aae8ade4
commit a36cd008bf

@ -1,3 +1,4 @@
{% import "macros.html" as macro %}
<!DOCTYPE html>
<html lang="cs">
<head>
@ -16,22 +17,10 @@
<a href="{{ config.base_url }}" class="logo"><img src="{{ get_url(path="logo.svg") }}" alt="Logo KITTV"></a>
<section>
<nav class="secondary">
{% if config.extra.nav_secondary %}
<ul>
{% for item in config.extra.nav_secondary %}
<li><a href="{{ item.path }}">{{ item.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{{ macro::nav_list_items(items=config.extra.nav_secondary) }}
</nav>
<nav class="primary">
{% if config.extra.nav_primary %}
<ul>
{% for item in config.extra.nav_primary %}
<li><a href="{{ item.path }}">{{ item.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{{ macro::nav_list_items(items=config.extra.nav_primary) }}
</nav>
</section>
</div>

@ -0,0 +1,9 @@
{% macro nav_list_items(items) %}
{% if items %}
<ul>
{% for item in items %}
<li><a href="{{ item.path }}">{{ item.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endmacro list_items %}
Loading…
Cancel
Save