blob: 9a125b76aa723c98bdb1cfab5684c0ce8d5a059d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{{ range .social }}
{{ $link := .link }}
{{ $scheme := (urls.Parse $link).Scheme }}
{{ $target := "" }}
{{ if not $scheme }}
{{ $link = .link | relLangURL }}
{{ else if in (slice "http" "https") $scheme }}
{{ $target = "target=\"_blank\" rel=\"noopener\"" }}
{{ end }}
<a
href="{{ $link | safeURL }}"
{{ $target | safeHTMLAttr }}
class="mx-1"
aria-label="{{ .label }}"
>
<i class="{{ .icon_class }}"></i>
</a>
{{ end }}
|