social.html 1022 Bytes
Newer Older
1
<ul class="social no-text-decoration">
Kaushal Modi's avatar
Kaushal Modi committed
2 3 4
    {{ range .Param "social" }}
        <li>
            <a href="{{ .link }}" title="{{ .name }}">
Kaushal Modi's avatar
Kaushal Modi committed
5 6 7 8
                <!-- Example value of Params.social with "svg" key in site config.toml:
                     [[Params.social]]
                     name = "Mastodon"
                     link = "https://mastodon.technology/@kaushalmodi"
9
                     svg = "mastodon"      # map key in site.Data.svg, other value: mastodon-alt
Kaushal Modi's avatar
Kaushal Modi committed
10
                -->
11
                {{ with .svg }}
12
                    {{ with (index site.Data.svg . ) }}
13 14
                        {{ . | safeHTML }}
                    {{ end }}
Kaushal Modi's avatar
Kaushal Modi committed
15
                {{ else }}
16 17 18 19
                    {{ $family := .family | default "fab" }}
                    {{ $size := .size | default "2x" }}
                    {{ $icon := .icon | default (.name | lower) }}
                    <i class="{{ $family }} fa-{{ $size }} fa-{{ $icon }}"></i>
Kaushal Modi's avatar
Kaushal Modi committed
20
                {{ end }}
Kaushal Modi's avatar
Kaushal Modi committed
21 22 23 24
            </a>
        </li>
    {{ end }}
</ul>