porcellis.com

ref: master

layouts/single.html


 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{{ define "main" }}
{{ $nums := partialCached "dispatch-numbers.html" . "dispatch-numbers" }}
<main>
  <div class="page-content">
    {{ partial "post-header.html" . }}

    <article>
      {{ partial "translations.html" . }}

      <div class="post-body">
        {{ .Content }}
      </div>
    </article>

    {{ if or .NextInSection .PrevInSection }}
    <nav class="dispatch-nav" aria-label="{{ i18n "dispatchNav" }}">
      {{ with .PrevInSection }}
      <a href="{{ .RelPermalink }}">
        <span class="dispatch-nav__no">← #{{ printf "%03d" (index $nums .TranslationKey | default 0) }}</span>
        <span>{{ .Title }}</span>
      </a>
      {{ else }}
      <span></span>
      {{ end }}

      {{ with .NextInSection }}
      <a href="{{ .RelPermalink }}">
        <span>{{ .Title }}</span>
        <span class="dispatch-nav__no">#{{ printf "%03d" (index $nums .TranslationKey | default 0) }} →</span>
      </a>
      {{ else }}
      <span></span>
      {{ end }}
    </nav>
    {{ end }}

    <div class="article-footer">
      <div class="divisor"></div>

      <p class="article-footer__label">{{ i18n "aboutMe" }}</p>

      {{ partial "bio.html" . }}

      <div class="divisor"></div>

      {{ partial "footer.html" . }}

      {{ partial "colophon.html" . }}
    </div>
  </div>
</main>
{{ end }}