13 lines
626 B
HTML
13 lines
626 B
HTML
{{ .Page.Scratch.Add "urls" (slice .Destination) }}
|
||
{{ $t := .Text }}
|
||
{{- if and (strings.HasPrefix .Destination "{") (.Destination | strings.Count "}") -}}
|
||
{{- range first 1 (split .Destination "}") -}}
|
||
{{- range $frmt := (split (substr . 1) ",") -}}
|
||
{{- if eq $frmt "sc" -}}
|
||
<span class="smallcaps">{{- $t -}}</span>
|
||
{{- end -}}
|
||
{{- end -}}
|
||
{{- end -}}
|
||
{{- else -}}
|
||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}><span class="sup">www⁄</span><i>{{ .Text | safeHTML }}</i></a>
|
||
{{ end }}
|