www/themes/LoveIt/layouts/partials/plugin/link.html

9 Zeilen
446 B
HTML

2020-05-28 14:55:57 +02:00
{{- $rel := "" -}}
<a href="{{ .href | safeURL }}"{{ with .title }} title="{{ . }}"{{ end }}{{ if (urls.Parse .href).Host | or .newtab }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .rel }} {{ . }}{{ end }}"{{ with .class }} class="{{ . }}"{{ end }}>
{{- with .icon -}}
{{- partial "plugin/icon.html" . -}}
{{- end -}}
{{- with .content -}}
{{- . | safeHTML -}}
{{- end -}}
</a>