{{ partial "head" . }}
<body>
  <div id="wrap">
    <!-- Header -->
    {{ partial "header" . }}
    <!-- is page a category or tag page? -->
    {{- $selection := false -}}
    {{- if (isset .Data "Singular") -}}
      {{- $selection = true -}}
    {{- end -}}
    <div class="container archive">
      <!-- Page Title -->
      {{- if $selection }}
      <h1>{{ (printf "Everything from %s \"%s\"" (.Data.Singular | humanize) .Title) | markdownify }}</h1>
      {{- else }}
      <h1>{{ .Title }}</h1>
      {{- end }}
      {{ if .Site.Params.Social.CommentsProvider }}
        <p><a href="{{ .Site.Params.Social.CommentsProvider }}">Subscribe</a> to my Blog via Diaspora, Mastodon, Friendica or GNU Social. Never miss a article! Reshare, like and discuss it!</p>
      {{ end }}
      <div class="metadata-page">
        <div class="row vertical-align">
          <div class="col-xs-3 col-md-2 text-right">
            <em>Type:</em>
          </div>
          <div class="col-xs-9 col-md-10">
            <a class="label label-success {{if not $selection}}active{{end}}" href="/blog">All</a>
            {{- range $name, $taxonomy := .Site.Taxonomies.categories }}
              {{- if in (slice "english" "deutsch") $name }}{{ continue }}{{ end }}
              <a class="label label-success {{if eq $name $.Title}}active{{end}}" href="{{ "/categories/" | relLangURL }}{{ $name | urlize }}">
                {{- humanize $name -}}
              </a>
            {{- end }}
          </div>
        </div>
        <div class="row vertical-align">
          <div class="col-xs-3 col-md-2 text-right">
            <em>Language:</em>
          </div>
          <div class="col-xs-9 col-md-10">
            <a class="label label-success {{if not $selection}}active{{end}}" href="/blog">All</a>
            {{- range $name, $taxonomy := .Site.Taxonomies.categories }}
              {{- if not (in (slice "english" "deutsch") $name) }}{{ continue }}{{ end }}
              <a class="label label-success {{if eq $name $.Title}}active{{end}}" href="{{ "/categories/" | relLangURL }}{{ $name | urlize }}">
                {{- humanize $name -}}
              </a>
            {{- end }}
          </div>
        </div>
        <div class="row">
          <div class="col-xs-3 col-md-2 text-right">
            <em>Tag:</em>
          </div>
          <div class="col-xs-9 col-md-10">
            <a class="label label-success {{if not $selection}}active{{end}}" href="/blog">All</a>
            {{ $tags := site.GetPage "/tags" }}
            {{ range sort $tags.Pages "Title" "asc"}}
              <a href="{{ .RelPermalink }}" class="label label-success {{if eq .LinkTitle $.Title}}active{{end}}">{{ .LinkTitle }}</a>
            {{ end }}
          </div>
        </div>
        <div class="row vertical-align">
          <div class="col-xs-3 col-md-2 text-right">
            <em>RSS Feed:</em>
          </div>
          <div class="col-xs-9 col-md-10">
            {{ if $selection }}
              {{- with .OutputFormats.Get "RSS" -}}
                <span class="article-rss"><a class="label label-rss" href="{{ .Permalink }}" title="RSS Feed"><i class="fa fa-rss" aria-hidden="true"></i> Subscribe to »{{ $.Title }}«</a></span>
              {{- end -}}
            {{ else }}
              <span class="article-rss"><a class="label label-rss" href="/blog/index.xml" title="RSS Feed"><i class="fa fa-rss" aria-hidden="true"></i>  Subscribe to all posts</a></span>
            {{ end }}
          </div>
        </div>
      </div>

      <div class="panel panel-default panel-overview">
        <div class="blogpost">
          {{ range .Paginator.Pages.ByPublishDate.Reverse }}
            <div class="blog-summary">
              <h2>
                {{ partial "blog/pre-headline.html" . -}}
                <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
              </h2>
              <div class="metadata-summary">
                {{- partial "blog/verb.html" . }}
                on {{ .Date.Format "2 January 2006" }} - Tagged with {{ range $i, $tag := .Params.tags }}{{ if $i }}, {{ end }}<a href="/tags/{{ lower $tag }}">{{ $tag }}</a>{{ end }}
                </div>
              {{ .Summary }} <a class="learn-more" href="{{ .RelPermalink }}"></a>
            </div>
          {{ end }}
          <div id="pagination">{{ template "_internal/pagination.html" . }}</div>
        </div>
      </div>
    </div>
  </div>
  <!-- Footer -->
  {{ partial "footer" . }}

  <!-- JS -->
  {{ partial "js" . }}

  <!-- Matomo -->
  {{ partial "matomo" . }}

</body>
</html>
