<!DOCTYPE html>
<html lang='{{ .Site.Language.Lang }}'>
  <head>
    <meta charset="utf-8">
    <title>{{ .Site.Title }} | {{ .Page.Title }}</title>

    <!-- Include our own css last -->
    {{ $options := dict "targetPath" "custom.css" "outputStyle" "compressed" }}
    {{ $style := resources.Get "/sass/custom.css" | resources.ToCSS $options | resources.Fingerprint }}
    <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}"/>

    <meta property="og:type" content="website"/>
    <meta property="og:site_name" content="{{ .Site.Title }}"/>
    <meta property="og:title" content="{{ .Title }}"/>
    <meta property="og:url" content="{{ .Permalink | absURL }}"/>
    {{ $logoFile := printf "images/ogp/cosin_icon_%s.png" (string .Site.Data.cosin.date_year) }}
    {{ $logo := "" }}
    {{ with resources.Get $logoFile }}
      {{ $logo = . }}
    {{ else }}
      {{ $logo = resources.Get "images/ogp/cosin_icon_generic.png" }}
    {{ end }}
    <meta property="og:image" content="{{ $logo | absURL }}"/>
    <meta property="og:image:type" content="{{ $logo.MediaType }}"/>
    <meta property="og:image:width" content="{{ $logo.Width }}"/>
    <meta property="og:image:height" content="{{ $logo.Height }}"/>
    <meta property="og:image:alt" content="CoSin Icon {{ string .Site.Data.cosin.date_year }}"/>

  </head>

  <body>
    {{ block "header" . }} {{ partial "site-header.html" . }} {{ end }}
    {{ block "menu" . }} {{ partial "site-menu.html" . }} {{ end }}

    <div id="content">
      {{ if eq .Site.Language.Lang "de" }}
        {{ partial "site-sidebar.de.html" . }}
      {{ else if eq .Site.Language.Lang "fr" }}
        {{ partial "site-sidebar.fr.html" . }}
      {{ else if eq .Site.Language.Lang "it" }}
        {{ partial "site-sidebar.it.html" . }}
      {{ else if eq .Site.Language.Lang "en" }}
        {{ partial "site-sidebar.en.html" . }}
      {{ end }}
      {{ block "main" . }} {{ end }}
      <div id="clear"></div>
    </div>

    {{ block "footer" . }} {{ partial "site-footer.html" . }} {{ end }}
  </body>
</html>