{{ $class := .Get 0 | default (.Get "class") }} {{ $name := .Get "name" }} {{ $url := .Get "url" }} {{ if not $class }} {{ errorf "paige/icon: invalid class" }} {{ end }} {{ with $url -}} {{- if hasPrefix . "mailto:" -}} {{- else -}} {{- end -}} {{- end -}} {{ with $name }}{{ . }}{{ end }} {{- if $url -}} {{- end }}