Welcome to mirror list, hosted at ThFree Co, Russian Federation.

footer.html « partials « layouts - github.com/reuixiy/hugo-theme-meme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7c1e7603f5679875c6d5b8f5960e02cc502337b8 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{{ if and .Site.Params.enableFooter (not (and .IsHome (in (slice "poetry" "footage") .Site.Params.homeLayout))) }}
    <footer id="footer" class="footer">
        <div class="footer-inner">
            {{- if .Site.Params.displayCopyrightSymbol -}}
                {{- .Scratch.Set "siteInfoCopyright" "©&nbsp;" -}}
            {{- else -}}
                {{- .Scratch.Set "siteInfoCopyright" "" -}}
            {{- end -}}
            {{- $siteInfoCopyright := .Scratch.Get "siteInfoCopyright" -}}

            {{- if .Site.Params.displaySiteCreatedYear -}}
                {{- .Scratch.Set "siteInfoCreatedYear" (printf `%s–%s` (dateFormat "2006" (time .Site.Params.siteCreatedTime)) (now.Format "2006")) -}}
            {{- else -}}
                {{- .Scratch.Set "siteInfoCreatedYear" (now.Format "2006") -}}
            {{- end -}}
            {{- $siteInfoCreatedYear := .Scratch.Get "siteInfoCreatedYear" -}}

            {{- with .Site.Params.iconBetweenYearAndAuthor -}}
                {{- $.Scratch.Set "siteInfoIcon" (printf `&nbsp;%s&nbsp;` (replace (index $.Site.Data.SVG .) "icon" "icon footer-icon")) -}}
            {{- else -}}
                {{- $.Scratch.Set "siteInfoIcon" "&nbsp;" -}}
            {{- end -}}
            {{- $siteInfoIcon := .Scratch.Get "siteInfoIcon" -}}

            <div class="site-info">{{ printf `%s%s%s%s` $siteInfoCopyright $siteInfoCreatedYear $siteInfoIcon .Site.Author.name | safeHTML }}</div>

            {{- if .Site.Params.displayPoweredBy }}
                <div class="powered-by">{{ printf `Powered by [Hugo](https://github.com/gohugoio/hugo) | Theme is [MemE](https://github.com/reuixiy/hugo-theme-meme)` | markdownify | safeHTML }}</div>
            {{- end }}

            {{- if .Site.Params.displaySiteCopyright }}
                <div class="site-copyright">{{ .Site.Copyright | markdownify | safeHTML }}</div>
            {{- end }}

            {{- with .Site.Params.customFooter }}
                <div class="custom-footer">{{ . | markdownify | safeHTML }}</div>
            {{- end }}

            {{- if and .Site.Params.displayBusuanziSiteUVAndPV (eq hugo.Environment "production") }}
                <div class="busuanzi-site-uv-and-pv">
                    <span id="busuanzi_container_site_uv">
                        {{- with .Site.Params.busuanziSiteUVText -}}
                            {{- $.Scratch.Set "busuanziSiteUVText" (printf `%s&nbsp;` .) -}}
                        {{- else -}}
                            {{- $.Scratch.Set "busuanziSiteUVText" "" -}}
                        {{- end -}}
                        {{- $busuanziSiteUVText := .Scratch.Get "busuanziSiteUVText" -}}
                        {{- with .Site.Params.busuanziSiteUVIcon -}}
                            {{- $busuanziSiteUVIcon := replace (index $.Site.Data.SVG $.Site.Params.busuanziSiteUVIcon) "icon" "icon busuanzi-site-uv" -}}
                            {{- $.Scratch.Set "busuanziSiteUVIcon" (printf `%s&nbsp;` $busuanziSiteUVIcon) -}}
                        {{- else -}}
                            {{- $.Scratch.Set "busuanziSiteUVIcon" "" -}}
                        {{- end -}}
                        {{- $busuanziSiteUVIcon := .Scratch.Get "busuanziSiteUVIcon" -}}
                        {{- printf `%s%s%s` $busuanziSiteUVText $busuanziSiteUVIcon `<span id="busuanzi_value_site_uv"></span>` | safeHTML -}}
                    </span>
                    {{- print "&nbsp;|&nbsp;" | safeHTML -}}
                    <span id="busuanzi_container_site_pv">
                        {{- with .Site.Params.busuanziSitePVText -}}
                            {{- $.Scratch.Set "busuanziSitePVText" (printf `%s&nbsp;` .) -}}
                        {{- else -}}
                            {{- $.Scratch.Set "busuanziSitePVText" "" -}}
                        {{- end -}}
                        {{- $busuanziSitePVText := .Scratch.Get "busuanziSitePVText" -}}
                        {{- with .Site.Params.busuanziSitePVIcon -}}
                            {{- $busuanziSitePVIcon := replace (index $.Site.Data.SVG $.Site.Params.busuanziSitePVIcon) "icon" "icon busuanzi-site-pv" -}}
                            {{- $.Scratch.Set "busuanziSitePVIcon" (printf `%s&nbsp;` $busuanziSitePVIcon) -}}
                        {{- else -}}
                            {{- $.Scratch.Set "busuanziSitePVIcon" "" -}}
                        {{- end -}}
                        {{- $busuanziSitePVIcon := .Scratch.Get "busuanziSitePVIcon" -}}
                        {{- printf `%s%s%s` $busuanziSitePVText $busuanziSitePVIcon `<span id="busuanzi_value_site_pv"></span>` | safeHTML -}}
                    </span>
                </div>
            {{- end }}

            {{ partial "custom/footer.html" . }}
        </div>
    </footer>
{{ end }}