{{ partial "head" . }}
  <body>
    <div id="wrap">

      <!-- Header -->
      {{ partial "header" . }}

      <div class="container {{ replace (.LinkTitle | lower) " " "_" }}"> <!-- add link title add class -->
          <h1>{{ .Title | markdownify }}</h1>
        {{ if ne .Params.page true }}
          <div class="metadata-page">
            <div class="row vertical-align">
              <div class="col-xs-3 col-md-2 text-right">
                <em>Date:</em>
              </div>
              <div class="col-xs-9 col-md-10">
                {{ .Date.Format "2 January 2006" }}
              </div>
            </div>
            <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">
                {{- range .Params.categories }}
                {{- if in (slice "english" "deutsch") . }}{{ continue }}{{ end }}
                  <a class="label label-success" href="/categories/{{ lower . }}">{{ title . }}</a>
                {{- end }}
              </div>
            </div>
            <div class="row vertical-align">
              <div class="col-xs-3 col-md-2 text-right">
                <em>Tags:</em>
              </div>
              <div class="col-xs-9 col-md-10">
                {{- range .Params.tags }}
                  <a class="label label-success" href="/tags/{{ lower . }}">{{ title . }}</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">
                <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</a></span>
              </div>
            </div>
          </div>
        {{ end }}
        <div class="panel panel-default">
          <div class="panel-body">
            <div class="blogpost">
              {{- partial "blog/headerimage" . }}
              {{- partial "blog/links" . }}
              {{ .Content }}
              <!-- only show related posts if param is true, or if it's not a page -->
              {{ if or (eq .Params.related true) (ne .Params.page true) }}
              <hr>
              <div class="related-posts">
                <h5>Related Posts</h5>
                {{ range first 3 ( where ( where .Site.Pages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags ) "Permalink" "!=" .Permalink ) }}
                  <div class="row">
                    <div class="col-sm-4 col-md-4 col-lg-4">
                      <h6 style="text-align: right">
                        {{ .Date.Format "2 January 2006" }}
                      </h6>
                    </div>
                    <div class="col-sm-8 col-md-8 col-lg-8">
                      <h6 style="text-align: left">
                        <strong><a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a></strong>
                      </h6>
                    </div>
                  </div>
                {{ end }}
              </div>
              {{ end }}
              <!-- comments -->
              {{ partial "comments" . }}
            </div>
          </div>
        {{ partial "social" . }}
        </div>
      </div>
    </div>

    <!-- Footer -->
    {{ partial "footer" . }}

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

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

  </body>
</html>
