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

minimal-footer-about.html « partials « layouts - github.com/reuixiy/hugo-theme-meme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 91e20e8351221412d59f60983e367a3747cffa13 (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
{{ if and .Site.Params.enableAboutPageMinimalFooter (eq .Section "about") }}
    <footer class="minimal-footer-about">
        {{ with .Site.Menus.socials }}
            <div class="about-socials">
                {{ $length := sub (len .) 1 }}
                {{ range $index, $value := . }}
                    {{- $linkType := (string .Pre) -}}
                    {{- $iconName := (string .Post) -}}
                    {{- $icon := (index $.Site.Data.SVG $iconName) -}}
                    <a href="{{ .URL }}"{{ if eq $linkType "external" }} target="_blank" rel="external noopener"{{ end }}>{{ replace $icon "icon" (printf `icon %s` .Identifier) | safeHTML }}{{ .Name }}</a>
                    {{- if lt $index $length -}}
                        {{- print " " -}}
                    {{- end -}}
                {{ end }}
            </div>
        {{ end }}
        {{ with .Site.Menus.links }}
            <div class="about-links">
                {{ $length := sub (len .) 1 }}
                {{ range $index, $value := . }}
                    {{- $linkType := (string .Pre) -}}
                    {{- $iconName := (string .Post) -}}
                    {{- $icon := (index $.Site.Data.SVG $iconName) -}}
                    <a href="{{ .URL }}"{{ if eq $linkType "external" }} target="_blank" rel="external noopener"{{ end }}>{{ replace $icon "icon" (printf `icon %s` .Identifier) | safeHTML }}{{ .Name }}</a>
                    {{- if lt $index $length -}}
                        {{- print " " -}}
                    {{- end -}}
                {{ end }}
            </div>
        {{ end }}
    </footer>
{{ end }}