LoveIt/layouts/partials/plugin/link.html

10 lines
423 B
HTML
Raw Normal View History

2020-02-21 16:42:35 +01:00
{{- $href := index . "href" -}}
<a href="{{ $href | safeURL }}"{{ with index . "title" }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix $href "http" }} target="_blank"{{ end }} rel="noopener noreffer{{ with index . `rel` }} {{ . }}{{ end }}">
{{- with index . "icon" -}}
{{- partial "plugin/icon.html" . -}}
{{- end -}}
{{- with index . "content" -}}
{{- . | safeHTML -}}
{{- end -}}
</a>