Prevent header links from wrapping

master
Will Faught 1 year ago
parent 604f8882f6
commit 9a8fd3afa6

@ -1,6 +1,6 @@
{{ $page := . }}
{{ $content := $page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` (printf `${1} <a aria-label="%s" class="paige-header-link" href="#${2}"></a>${3}` (i18n "paige_aria_section_link")) }}
{{ $content := $page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` (printf `${1}<a aria-label="%s" class="paige-header-link" href="#${2}"></a>${3}` (i18n "paige_aria_section_link")) }}
{{ with $content }}
<div class="mw-100" id="paige-content">{{ . | safeHTML }}</div>

@ -19,6 +19,8 @@
.paige-header-link {
opacity: 0;
margin-left: 0.5rem;
position: absolute;
transition: color 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

Loading…
Cancel
Save