Change header link text to a small pound sign

master
Will Faught 3 years ago
parent 45a5aac061
commit 7f8fff96fb

@ -7,7 +7,7 @@
{{ if .Scratch.Get "paige_show_full_pages" }}
{{ .Content }}
{{ else }}
{{ .Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` `${1}<a class="paigeheaderlink" href="#${2}"><i class="bi bi-link-45deg small"></i></a>${3}` | safeHTML }}
{{ .Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` `${1}<a class="small paigeheaderlink" href="#${2}">#</a>${3}` | safeHTML }}
{{ end }}
</article>
</div>

@ -19,6 +19,6 @@
.paigeheaderlink {
display: none;
margin-left: 0.25rem;
margin-left: 0.3rem;
}
</style>

@ -4,5 +4,5 @@
{{ $class = "display-1" }}
{{ end }}
{{ $title := .Title | markdownify }}
<h1 class="{{ $class }} fw-bold text-center">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a class="paigeheaderlink" href="{{ .RelPermalink }}"><i class="bi bi-link-45deg small"><span class="visually-hidden"></span></i></a>{{ end }}</h1>
<h1 class="{{ $class }} fw-bold text-center">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a class="small paigeheaderlink" href="{{ .RelPermalink }}">#</a>{{ end }}</h1>
{{ end }}

Loading…
Cancel
Save