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

footer.html « partials « layouts - github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ad257ad3469c8ea45f8051afbb26faaf667badea (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
{{- if ne .Site.Params.footer.enable false -}}
    <footer class="footer">
        <div class="footer-container">
            {{- /* Custom Content */ -}}
            {{- with .Site.Params.footer.custom -}}
                <div class="footer-line">
                    {{- safeHTML . -}}
                </div>
            {{- end -}}

            {{- /* Hugo and uBlogger */ -}}
            {{- if ne .Site.Params.footer.hugo false -}}
                <div class="footer-line">
                    {{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %v">Hugo</a>` hugo.Version -}}
                    {{- $theme := .Scratch.Get "version" | printf `<a href="https://ublogger.netlify.app/?utm_source=%v&utm_medium=footer&utm_campaign=config&utm_term=%v" target="_blank" title="uBlogger %v">uBlogger</a>` $.Site.BaseURL (.Scratch.Get "version") -}}
                    {{- dict "Hugo" $hugo "Theme" $theme | T "poweredBySome" | safeHTML }}
                </div>
            {{- end -}}

            <div class="footer-line">
                {{- /* Copyright year */ -}}
                {{- if ne .Site.Params.footer.copyright false -}}
                    <i class="svg-icon icon-copyright"></i>
                    {{- with .Site.Params.footer.since -}}
                        <span>
                            {{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}}
                        </span>
                    {{- else -}}
                        <span>{{ now.Year }}</span>
                    {{- end -}}
                {{- end -}}

                {{- /* Author */ -}}
                {{- $authorName := .Site.Author.name | default " " -}}
                {{- if ne $authorName " " -}}
                {{ $author := index .Site.Data.authors $authorName }}
                {{- $authorLink := $author.link | default .Site.Home.RelPermalink -}}
                    <span class="author">&nbsp;<a href="{{ $authorLink }}" target="_blank">{{ $author.nickname }}</a></span>
                {{- end -}}

                {{- /* License */ -}}
                {{- with .Site.Params.footer.license -}}
                    &nbsp;|&nbsp;<span class="license">{{ . | safeHTML }}</span>
                {{- end -}}

                {{- /* ICP */ -}}
                {{- with .Site.Params.footer.icp -}}
                    <span class="icp-splitter">&nbsp;|&nbsp;</span><br class="icp-br"/>
                    <span class="icp">{{ . | safeHTML }}</span>
                {{- end -}}
            </div>
        </div>
    </footer>
{{- end -}}