Change header link hover to not affect layout

master
Will Faught 3 years ago
parent a87d43d405
commit 5e856a5b6b

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

@ -24,5 +24,6 @@
.paige-header-link { .paige-header-link {
display: none; display: none;
margin-left: 0.3rem; margin-left: 0.3rem;
position: absolute;
} }
</style> </style>

@ -4,5 +4,5 @@
{{ $class = "display-1" }} {{ $class = "display-1" }}
{{ end }} {{ end }}
{{ $title := .Title | markdownify }} {{ $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="paige-header-link small" href="{{ .RelPermalink }}">#</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="paige-header-link" href="{{ .RelPermalink }}">#</a>{{ end }}</h1>
{{ end }} {{ end }}

Loading…
Cancel
Save