Remove header link text from reader view

This commit is contained in:
Will Faught
2024-06-04 18:43:02 -07:00
parent c25983194e
commit 4720cf1377
2 changed files with 5 additions and 1 deletions

View File

@@ -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>

View File

@@ -22,6 +22,10 @@
transition: color 0.15s ease-in-out, opacity 0.15s ease-in-out;
}
.paige-header-link::after {
content: "#";
}
.paige-quote .blockquote-footer {
margin-top: 0;
}