<!DOCTYPE html>
<html lang="{{ site.LanguageCode }}">
  {{ partial "head.html" . }}

  <body>
    {{ block "body" . }}
    {{ block "header" . }}{{ end }}
    <main class="{{ .Type }} {{ .Kind }}{{ if gt (len .Pages) 0 }} list{{ end }}">
      {{ block "main" . }}{{ end }}
    </main>
    {{ partial "development/page_info.html" . }}
    {{ block "footer" . }}{{ end }}
    {{ end }}
  </body>

  <style>
    @font-face {
      font-family: "Museo_Slab";
      src: url("{{ `/fonts/Museo_Slab_500.woff2` | relURL }}") format("woff2"),
           url("{{ `/fonts/Museo_Slab_500.woff` | relURL }}") format("woff");
      font-weight: normal;
      font-style: normal;
    }
  </style>
  <link rel="stylesheet" as="style" href="{{ `/styles/root.css` | relURL }}">
  {{- if not hugo.IsProduction -}}
    <link rel="stylesheet" as="style" href="{{ `/styles/development.css` | relURL }}">
  {{- end -}}

  {{- $includedCSS := slice -}}
  {{- if not .FirstSection.IsHome -}}
    {{- range .FirstSection.Resources.Match "*.css" -}}
      {{- if not (in $includedCSS .Permalink) -}}
        {{- $includedCSS = $includedCSS | append .Permalink -}}
        <link rel="stylesheet" as="style" href="{{ .RelPermalink }}">
      {{- end -}}
    {{- end -}}
  {{- end -}}

  {{- range .Resources.Match "*.css" -}}
    {{- if not (in $includedCSS .Permalink) -}}
      {{- $includedCSS = $includedCSS | append .Permalink -}}
      <link rel="stylesheet" as="style" href="{{ .RelPermalink }}">
    {{- end -}}
  {{- end -}}

  {{ block "styles" . }}{{ end }}

  {{ block "scripts" . }}{{ end }}

  <script src="{{ `scripts/site.js` | relURL }}"></script>
</html>
