{{ range $links := . }}
- {{ range $name, $url := $links }}
+ {{ range $type, $data := $links }}
+ {{ $href := $data }}
+ {{ $icon := $type }}
+ {{ $text := i18n (printf "link.%s" $type) }}
+ {{ $target := "_blank" }}
+ {{ $title := "" }}
+ {{ if reflect.IsMap $data }}
+ {{ with $data.href }}{{ $href = . }}{{ end }}
+ {{ with $data.icon }}{{ $icon = . }}{{ end }}
+ {{ with $data.text }}{{ $text = . }}{{ end }}
+ {{ with $data.target }}{{ $target = . }}{{ end }}
+ {{ with $data.title }}{{ $title = . }}{{ end }}
+ {{ end }}
- {{ partial "icon.html" $name }}{{ i18n (printf "link.%s" $name) }}
-
+ {{- end -}}
+ {{ $text | emojify }}
+
{{ end }}
{{ end }}