Výpis položek v navigaci pomocí makra

remotes/1726908188925722499/search
Emil Miler 4 years ago
parent e0aae8ade4
commit a36cd008bf

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