LoveIt/layouts/partials/plugin/link.html

9 lines
No EOL
436 B
HTML

{{- $rel := "" -}}
<a href="{{ .href }}"{{ 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>