💄 Add extend URL display style.

This commit is contained in:
凡梦星尘
2022-06-19 14:53:12 +08:00
parent 00c93d2fb7
commit f155ded3e0
6 changed files with 13 additions and 21 deletions

View File

@@ -0,0 +1,7 @@
{{- $extURL := .Page.Site.Params.exturl.enable }}
<a href="{{ .Destination | safeURL }}" title="{{ .Text }}" {{ if strings.HasPrefix .Destination "http" }}rel="noopener external nofollow noreferrer" target="_blank"{{ end }} {{ if $extURL }}class=" exturl"{{ end }}>
{{ .Text | safeHTML }}
{{- if and $extURL .Page.Site.Params.exturl.icon }}
<i class="fa fa-external-link-alt"></i>
{{- end }}
</a>