aboutsummaryrefslogtreecommitdiff
path: root/layouts/docs/single.html
blob: 64a74e4d673890a88b53b6f26795a70af47881f8 (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
{{ define "main" }}
{{ $wrappedTable := printf "<div class='table-wrapper'> ${1} </div>" }}
<div>
  <h1 style="text-align: center;" class="title">{{ .Title }}</h1>
  <!--p style="text-align: center;">{{ .Summary }}</p-->
  {{ .Content | replaceRE "(<table>(?:.|\n)+?</table>)" $wrappedTable | safeHTML }}

  <!-- For some reason prevpage shows next and vice versa -->
  <div class="page-nav">
    <span>
      {{ if .NextInSection }}
        <a href="{{ .NextInSection.Permalink }}">Previous: {{ .NextInSection.Title }}</a>
      {{ end }}
    </span>

    <span>
      {{ if .PrevInSection }}
        <a href="{{ .PrevInSection.Permalink }}">Next: {{ .PrevInSection.Title }}</a>
      {{ end }}
    </span>
  </div>

</div>
{{ end }}