setup
This commit is contained in:
19
themes/hugo-theme-monochrome/layouts/shortcodes/icon.html
Normal file
19
themes/hugo-theme-monochrome/layouts/shortcodes/icon.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- $icon_vendor := .Get "vendor" -}}
|
||||
{{- $icon_link := .Get "link" -}}
|
||||
{{- $icon_name := .Get "name" -}}
|
||||
|
||||
<div class="icon">
|
||||
{{ if $icon_link }}
|
||||
<a rel="noopener" target="_blank" href="{{ $icon_link }}" aria-label="{{ $icon_name }}">
|
||||
{{ else }}
|
||||
<div>
|
||||
{{ end }}
|
||||
{{ if eq $icon_vendor "feather" }}
|
||||
{{ partial "svg/feather.html" $icon_name }}
|
||||
{{ end }}
|
||||
{{ if $icon_link }}
|
||||
</a>
|
||||
{{ else }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user