{{ define "main" }}
  <div class="page">
    <header class="page-header">
      <h1>{{ .Title }}</h1>
    </header>

    {{ with .Content }}<div class="prose">{{ . }}</div>{{ end }}

    {{ $pages := .RegularPages }}
    {{ if $pages }}
      {{ if eq .Section "aktuelles" }}
        <div class="post-grid">
          {{ range $pages }}
            {{ partial "post-card.html" . }}
          {{ end }}
        </div>
      {{ else }}
        <ul class="page-list">
          {{ range $pages.ByTitle }}
            <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
          {{ end }}
        </ul>
      {{ end }}
    {{ end }}
  </div>
{{ end }}
