footer.html 3.0 KB
Newer Older
D
Dillon 已提交
1
{{- $modify_date := .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
D
Dillon 已提交
2
<div class="post-footer" id="post-footer">
D
Dillon 已提交
3
    <div class="post-info">
D
Dillon 已提交
4 5
        <div class="post-info-line">
            <div class="post-info-mod">
D
Dillon 已提交
6 7
                <span>
                    {{- printf (T "lastMod") $modify_date -}}
D
Dillon 已提交
8 9 10 11 12 13
                    {{- with .GitInfo -}}
                        {{- $gitHash := .Hash -}}
                        &nbsp;<a class="git-hash" {{ with $.Site.Params.gitRepo }}href="{{ printf `%s/commit/%s` . $gitHash }}" target="_blank"{{ else }}href="javascript:void(0);"{{ end }} title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ $gitHash }}: {{ .Subject }}">
                            <i class="fas fa-hashtag fa-fw"></i>{{- .AbbreviatedHash -}}
                        </a>
                    {{- end -}}
D
Dillon 已提交
14
                </span>
D
Dillon 已提交
15 16
            </div>
            <div class="post-info-license">
D
Dillon 已提交
17 18 19 20 21
                {{- if .Params.license -}}
                    <span>
                        {{- printf (T "license") .Params.license | safeHTML -}}
                    </span>
                {{- end -}}
D
Dillon 已提交
22 23 24 25
            </div>
        </div>
        <div class="post-info-line">
            <div class="post-info-md">
26
                {{- if ne .Site.Params.page.linkToMarkdown false | and (ne .Params.linkToMarkdown false)  -}}
D
Dillon 已提交
27 28
                    {{- with .OutputFormats.Get "markdown" -}}
                        <span>
29
                            <a class="link-to-markdown" href="{{ .RelPermalink }}" target="_blank">
30
                                {{- T "seeMarkdown" -}}
D
Dillon 已提交
31 32 33 34
                            </a>
                        </span>
                    {{- end -}}
                {{- end -}}
D
Dillon 已提交
35 36
            </div>
            <div class="post-info-share">
D
Dillon 已提交
37 38 39
                <span>
                    {{- partial "plugin/share.html" . -}}
                </span>
D
Dillon 已提交
40
            </div>
D
Dillon 已提交
41 42 43
        </div>
    </div>

44
    <div class="post-info-more">
D
Dillon 已提交
45
        <section>
D
Dillon 已提交
46 47
            {{- with .Params.tags -}}
                {{- range . -}}
D
Dillon 已提交
48 49 50 51 52
                    <span>
                        <a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
                            <i class="fas fa-tag fa-fw"></i>{{ . }}
                        </a>
                    </span>&nbsp;
D
Dillon 已提交
53 54
                {{- end -}}
            {{- end -}}
D
Dillon 已提交
55 56
        </section>
        <section>
57
            <span><a href="javascript:window.history.back();">{{ T "back" }}</a></span>&nbsp;|&nbsp;<span><a href="{{  `/` | relLangURL  }}">{{ T "home" }}</a></span>
D
Dillon 已提交
58 59 60 61
        </section>
    </div>

    <div class="post-nav">
D
Dillon 已提交
62
        {{- if .PrevInSection -}}
63
            <a href="{{ .PrevInSection.RelPermalink }}" class="prev" rel="prev" title="{{ .PrevInSection.Title }}"><i class="fas fa-angle-left fa-fw"></i>{{ .PrevInSection.Title }}</a>
D
Dillon 已提交
64
        {{- end -}}
D
Dillon 已提交
65
        {{ if .NextInSection }}
66
            <a href="{{ .NextInSection.RelPermalink }}" class="next" rel="next" title="{{ .NextInSection.Title }}">{{ .NextInSection.Title }}<i class="fas fa-angle-right fa-fw"></i></a>
D
Dillon 已提交
67
        {{- end -}}
D
Dillon 已提交
68
    </div>
D
Dillon 已提交
69
</div>