summaryrefslogtreecommitdiffhomepage
path: root/web/layouts/single.html
blob: 33721448a0ea692505d75a940e9a2ef161053d87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{{ define "main" }}
{{ if eq .Section "docs" }}
<div class="docs{{ with .TableOfContents }} has-toc{{ end }}">
  {{ partial "docs-nav.html" . }}
  <article>
    <div class="docs-head">
      {{ $docs := "/docs/" | relURL }}
      <p class="kicker"><a href="{{ $docs }}">~/docs</a> / {{ .File.ContentBaseName }}</p>
      <h1>{{ .Title }}</h1>
      {{ with .Description }}<p class="lede">{{ . }}</p>{{ end }}
    </div>
    {{ .Content }}
  </article>
  {{ with .TableOfContents }}
  <aside class="toc">
    <div class="group">
      <h2>On this page</h2>
      {{ . }}
    </div>
  </aside>
  {{ end }}
</div>
{{ else }}
<article>
  <h1>{{ .Title }}</h1>
  {{ .Content }}
</article>
{{ end }}
{{ end }}