<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">

{{ partial "head.html" . }}

<body hx-boost="true" lang="{{ .Site.Language.Lang }}">
  {{ partial "nav.html" . }}

  <header class="blog-single">
    <div class="container">
      <div class="row">
        <div class="col s12 m9 l9">
          <h2><a href="{{ "blog/"  | relLangURL }}">Blog</a></h2>
          <h3 class="title">{{ .Title }}</h3>
        </div>
      </div>
    </div>
  </header>

  <div id="page-content">
    <div class="container">
        <div class="row">
            <div class="col s12 m9 l9 articlecontent">
                {{ if isset .Params "images"}}
                {{ if (fileExists (printf "assets/%s" (index .Params.images 0))) -}}
                {{ $mainimage := resources.Get (index .Params.images 0) }}
                    <p class="text-center"><img class="img-fluid" src="{{ $mainimage.RelPermalink }}" width="400"></p>
                {{ end }}
                {{ end }}

                <div style="text-align: justify; margin-bottom: 16px;">
                    {{ .Content }}
                </div>

                <small>{{ i18n "publishdate"}} : {{.PublishDate.Format "2006-01-02"}}</small> | <small>{{ i18n "lastchange"}} : {{.Lastmod.Format "2006-01-02"}}</small>

                {{ partial "partials/widgets/cattags.html" . }}
            </div>
            
            {{ partial "partials/widgets/sidebar.html" . }}
        </div>
    </div>
  </div>
  <!-- /#content -->
  {{ partial "footer.html" . }}
</body>
</html>
