{{ define "main" }}
<div class="container article-wrap">
  <article>
    <header class="article-header">
      <h1 class="article-title">{{ .Title }}</h1>
      {{ if not .Date.IsZero -}}
      <p class="article-meta">
        {{ i18n "postedOn" }} <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date | time.Format ":date_long" }}</time>
      </p>
      {{- end }}
    </header>
    {{ if .TableOfContents -}}
    <details class="toc toc-inline">
      <summary>{{ i18n "toc" }}</summary>
      {{ .TableOfContents }}
    </details>
    {{- end }}
    <div class="article-body">
      {{ .Content }}
    </div>
  </article>
  {{ if .TableOfContents -}}
  <aside class="toc-sidebar" aria-label="{{ i18n "toc" }}">
    <div class="toc">
      <p class="toc-sidebar-title">{{ i18n "toc" }}</p>
      {{ .TableOfContents }}
    </div>
  </aside>
  {{- end }}
</div>
{{ end }}
