Tweak theme

This commit is contained in:
Dave Gallant
2024-04-07 21:46:55 -04:00
parent 2475d2d67e
commit 8d898eb69a
117 changed files with 5 additions and 9 deletions

View File

@@ -0,0 +1,4 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
{{- .Text | safeHTML -}}
<a href="#{{ .Anchor | safeURL }}" class="post-heading__anchor" aria-hidden="true">#</a>
</h{{ .Level }}>

View File

@@ -0,0 +1,13 @@
{{- $isExternal := strings.HasPrefix .Destination "http" -}}
<a
href="{{ .Destination | safeURL }}"
{{ with .Title }}
title="{{ . }}"
{{ end }}
{{ if $isExternal }}
class="link--external" target="_blank" rel="noreferrer"
{{ end }}
>
{{- .Text | safeHTML -}}
</a>
{{- /* Trimm trailing whitespace */ -}}