32 lines
1.1 KiB
HTML
32 lines
1.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content_all %}
|
|
|
|
{% block content_header %}
|
|
{{ super() }}
|
|
{% endblock content_header %}
|
|
|
|
{% block content_body %}
|
|
{% set selector_value = page.card_selector_value if page.card_selector_value is defined else page.title %}
|
|
<div class="cards">
|
|
{% set article_list = [] %}
|
|
{% for article in articles if article[page.card_selector_key] == selector_value %}{% do article_list.append(article) %}{% endfor %}
|
|
{% for article in article_list | sort(attribute="order") %}
|
|
<article class="card">
|
|
<header class="card-header">
|
|
<h3><a href="{{ SITEURL }}/{{ article.save_as }}" title="{{ article.title }}">{{ article.title }}</a></h3>
|
|
</header>
|
|
<div class="card-body">
|
|
{% from 'includes/macros.html' import ci %}
|
|
{% if article.featured_image %}
|
|
{% set i = article.featured_image[0] %}
|
|
{{ ci(i.pic, i.link | default("/" + article.save_as), i.alt | default("Titelbild von " + article.title), i.title | default(article.title), i.credit, i.credit_link) }}
|
|
{% endif %}
|
|
</div>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock content_body %}
|
|
|
|
{% endblock content_all %}
|