You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
610 B
HTML
22 lines
610 B
HTML
{{ $class := .Get 0 | default (.Get "class") }}
|
|
{{ $title := .Get "title" }}
|
|
{{ $url := .Get "url" }}
|
|
|
|
{{ $target := partial "paige/target.html" (dict "page" .Page "url" $url) }}
|
|
|
|
{{ if not $class }}
|
|
{{ errorf "layouts/shortcodes/paige/icon.html: no class" }}
|
|
{{ end }}
|
|
|
|
<span class="paige-icon">
|
|
{{ with $url }}
|
|
<a href="{{ . }}" {{ with $target }} target="{{ . }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }}>
|
|
{{ end }}
|
|
|
|
<i class="{{ $class }}">{{ with $title }}<span class="visually-hidden">{{ . }}</span>{{ end }}</i>
|
|
|
|
{{ if $url }}
|
|
</a>
|
|
{{ end }}
|
|
</span>
|