You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.5 KiB
HTML
60 lines
1.5 KiB
HTML
{% 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 %}
|
|
|
|
{% macro breadcrumbs(page) %}
|
|
<div class="breadcrumbs">
|
|
<div class="wrap">
|
|
<a href="{{ config.base_url }}" class="home"><img src="{{ get_url(path="home.svg") }}" alt="Home"></a>
|
|
<ul>
|
|
{% for ancestor in page.ancestors %}
|
|
{% if loop.first %}{% continue %}{% endif %}
|
|
{% set section = get_section(path=ancestor) %}
|
|
<li><a href="{{ section.permalink }}">{{ section.title }}</a></li>
|
|
{% endfor %}
|
|
<li><a href="{{ page.permalink }}">{{ page.title }}</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endmacro breadcrumbs %}
|
|
|
|
{% macro list_posts(section) %}
|
|
{% for post in section.pages %}
|
|
<a href="
|
|
{% if post.extra.link %}
|
|
{{ post.extra.link }}
|
|
{% else %}
|
|
{{ post.permalink }}
|
|
{% endif %}
|
|
">
|
|
<article
|
|
{% if post.extra.color %}
|
|
style="border-color: {{ post.extra.color }}"
|
|
{% endif %}
|
|
>
|
|
<div class="title">
|
|
{% if post.extra.logo %}
|
|
<img src="{{ post.permalink ~ "../" ~ post.extra.logo }}" alt="{{ post.title }}">
|
|
{% else %}
|
|
{{ post.title }}
|
|
{% endif %}
|
|
</div>
|
|
{% if post.summary %}
|
|
{{ post.summary | safe }}
|
|
{% else %}
|
|
{{ post.content | safe }}
|
|
{% endif %}
|
|
{% if post.date %}
|
|
<div class="date">{{ post.date | date(format="%d.%m.%Y")}}</div>
|
|
{% endif %}
|
|
</article>
|
|
</a>
|
|
{% endfor %}
|
|
{% endmacro list_posts %}
|