<!doctype html>
<html
  dir="{{ .Site.Language.LanguageDirection | default "ltr" }}"
  lang="{{- site.Language.Lang -}}"
  data-theme="{{- .Site.Params.displayMode -}}"
  {{ if eq .Site.Params.displayMode "dark" }}
    class="html theme--dark"
  {{ else }}
    class="html theme--light"
  {{ end }}
>
  {{- partial "head.html" . -}}
  <body class="body">
    <div class="wrapper">
      <aside
        {{ if (and (or (eq .Site.Params.hidesidebar true) (eq .Params.hidesidebar true)) (not .IsHome)) }}
          class="wrapper__sidebar wrapper__sidebar--hidden"
        {{ else }}
          class="wrapper__sidebar"
        {{ end }}
      >
        {{- partial "sidebar.html" . -}}
      </aside>
      <main
        {{ if (and (or (eq .Site.Params.hidesidebar true) (eq .Params.hidesidebar true)) (not .IsHome)) }}
          class="wrapper__main wrapper__main--fullscreen"
        {{ else }}
          class="wrapper__main"
        {{ end }}
      >
        <header class="header">{{ partial "navbar.html" . }}</header>
        {{- block "main" . }}{{- end }}
      </main>
    </div>

    {{- partial "footer.html" (dict "context" . "footerClassModifier" "base") -}}

    {{- if (eq .Site.Params.simpleAnalytics.enable true) -}}
      {{- partial "analytics/simpleanalytics.html" . -}}
    {{- end -}}
  </body>
</html>
