{% extends "page.html" %}
{% block title %} {{ super() }} {% endblock %}
{% block metadesc %} {{ super() }} {% endblock %}


{% 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 %}
<section class="cards">
  {% for article in articles if article[page.card_selector_key] == selector_value %}
  <article class="card">
    <header class="article-header">
      <h3><a href="{{ article.url }}" title="{{ article.title }}">{{ article.title }}</a></h3>
    </header>
    <div class="article-body">
      {% if article.titelbild %}
      <a href="{{ article.url }}" title="{{ article.title }}"><img alt='Titelbild zu "{{ article.title }}"'
          src="{{ article.titelbild }}" /></a>
      {% endif %}

      {% if article.summary %}
      <p>{{ article.summary }}</p>
      {% endif %}

    </div>
  </article>
  {% endfor %}
</section>
{% endblock content_body %}

{% block content_footer %}
{% endblock content_footer %}