{{- define "main" -}}

<section class="section_secondary">
  {{ .Content }}
</section>

<h1>Kalender</h1>

<section>

  <ul class=posts_listing>
    {{ with .Site.GetPage "/calendar" }}
    {{ range first 5 (where .Pages "Section" "calendar") }}
      <li>
        <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
        <div id=date>
          <time>{{ .Date.Format (.Site.Params.dateform | default "January 2006") }}</time>
        </div>
        <p>{{ .Summary }}</p>

      <div>
        <a href="{{ .RelPermalink }}">Read More…</a>
      </div>
    </li>
    {{ end }}
    {{ end }}
  </ul>
</section>

<h1>Nyheder</h1>

<section>
  <ul class=posts_listing>
    {{ with .Site.GetPage "/posts" }}
    {{ range first 5 (where .Pages "Section" "posts") }}
      <li>
        <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
        <div id=date>
          <time>{{ .Date.Format (.Site.Params.dateform | default "January 2006") }}</time>
        </div>
        <p>{{ .Summary }}</p>

      <div>
        <a href="{{ .RelPermalink }}">Read More…</a>
      </div>
    </li>
    {{ end }}
    {{ end }}
  </ul>
</section>

{{- end -}}
