mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-06-17 19:43:30 +08:00
10 lines
652 B
HTML
10 lines
652 B
HTML
<a class="link" href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}" {{ end }}{{ if strings.HasPrefix
|
|
.Destination "http" }} target="_blank" rel="noopener" {{ end }}>{{ .Text | safeHTML }}</a>
|
|
{{ if strings.HasPrefix .Destination "http" }}
|
|
<span style="white-space: nowrap;"><svg width=".7em" height=".7em" viewBox="0 0 21 21"
|
|
xmlns="http://www.w3.org/2000/svg">
|
|
<path d="m13 3l3.293 3.293l-7 7l1.414 1.414l7-7L21 11V3z" fill="currentColor" />
|
|
<path d="M19 19H5V5h7l-2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-5l-2-2v7z"
|
|
fill="currentColor">
|
|
</svg></span>
|
|
{{ end }} |