summaryrefslogtreecommitdiff
path: root/layouts/_default/single.html
blob: 0ac881c93e46b391a8ed3d7436e490f44ecf3e6b (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{{ define "main" }}
    <article>
    {{ .Page.Content }}

    {{- if not (in .Params.category "pages") }}
        {{- if not (eq .Page.Type "special") }}
            {{ $pubdate := .PublishDate.Format "2006-01-02" }}
            {{ $lastmod := .Lastmod.Format "2006-01-02" }}

            {{ $file := .File.LogicalName }}
            {{ $path := .File.Path }}
            {{ $lastmodhash := .GitInfo.Hash }}

            <div class="publish-date">
                {{ if eq $pubdate $lastmod }}
                    Published: <time datetime="{{ $pubdate }}">
                      <a href="{{$.Site.Params.repoUrl}}/commit/{{$lastmodhash}}">{{ $lastmod }}</a>
                      </time>
                {{ else }}
                    Originally published: 
                    <time datetime="{{ $pubdate }}">{{ $pubdate }}</time>;
                    updated: <time datetime="{{ $lastmod }}">
                      <a href="{{$.Site.Params.repoUrl}}/commit/{{$lastmodhash}}">{{ $lastmod }}</a>
                    </time>
                {{ end }}

                {{ partial "button-15" (dict "button" . "file" "email-me.png" "alt" "Email me" "href" "/me/contact/") }}

        {{- end }}
    {{- end }}
    </article>

    {{ if .Page.Params.hasnavsection }}
        {{ with .NextInSection }}
            &larr; <a href="{{ .RelPermalink }}">{{ or .Page.Params.shortname .Page.Name }}</a>
       {{ end }}
       <br>
       {{ with .PrevInSection }}
             <a href="{{ .RelPermalink }}">{{ or .Page.Params.shortname .Page.Name }}</a> &rarr;
      {{ end }}
    {{ end }}
{{- if .Params.primary_menu  }}
{{ partial "single/bottom_nav.html" (dict "menuID" .Page.Params.primary_menu "page" .) }}
{{- end }}
{{- end }}