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

social.html « partials « layouts - github.com/Mitrichius/hugo-theme-anubis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 15b56b3cdd17d3c71fcc6e80bb32f89d2d1a343b (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
<ul class="social-icons">

{{ range $.Site.Params.Social }}
    {{ if and (isset $.Site.Data.social.social_icons .id) (isset . "url") }}
        <li>
            <a {{ printf "href=%q" .url | safeHTMLAttr }} title="{{ humanize .id }}" rel="me">
            {{ partial "font-awesome.html" (dict "iconName" .id "custom" false) }}
            </a>
        </li>
    {{ else if and (isset $.Site.Data.social.social_icons .id) (isset . "name") }}
        {{ $url := index $.Site.Data.social.social_icons .id }}
        {{ $ref := printf $url .name }}
        <li>
            <a {{ printf "href=%q" $ref | safeHTMLAttr }} title="{{ humanize .id }}" rel="me">
            {{ partial "font-awesome.html" (dict "iconName" .id "custom" false) }}
            </a>
        </li>
    {{ else if (isset . "url") }}
        <li>
            <a href="{{ printf .url }}" title="{{ humanize .id }}" rel="me">
                {{ partial "font-awesome.html" (dict "iconName" .id "custom" true) }}
            </a>
        </li>
    {{ end }}
{{ end }}

{{ if .Site.Params.rssAsSocialIcon }}
    {{ $url := "/index.xml" | relLangURL }}
    <li>
        <a {{ printf "href=%q" $url | safeHTMLAttr }} title="RSS" rel="me">
        {{ partial "font-awesome.html" (dict "iconName" "rss" "custom" false) }}
        </a>
    </li>
{{ end }}

</ul>