Page margins

This commit is contained in:
Simon Martens
2025-05-20 11:01:12 +02:00
parent 9bd1d0c810
commit e1f2b14dc8
4 changed files with 35 additions and 29 deletions

View File

@@ -32,7 +32,7 @@
function alignSidenotes() {
const text = document.querySelector(".text");
if (!text) return;
const notes = text.querySelectorAll(".note-sidenote-meta,.note-hand");
const notes = text.querySelectorAll(".note-sidenote-meta,.note-hand,.page");
// Only do margin notes if wide enough and not printing
// if (window.innerWidth < 900 || window.matchMedia("print").matches) return;
@@ -46,7 +46,8 @@
const noteId = note.id;
if (!noteId) return;
const anchor = text.querySelector(
`.sidenote[aria-describedby="${noteId}"], .hand[aria-describedby="${noteId}"]`,
`.sidenote[aria-describedby="${noteId}"], .hand[aria-describedby="${noteId}"],
.eanchor-page[aria-describedby="${noteId}"]`,
);
if (!anchor) return;