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

File diff suppressed because one or more lines are too long

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;

View File

@@ -90,15 +90,19 @@
@apply font-serif relative;
}
.text .count {
@apply hidden lg:block print:block min-w-[4ch] max-w-[10ch] shrink grow-0 relative;
}
.text .fulltext {
@apply max-w-[80ch] mr-8;
@apply max-w-[80ch] mr-8 grow;
}
.text .notes {
@apply relative max-w-[80ch] pr-4;
}
.text .page,
.text .eanchor-page,
.text .line,
.text .aq,
.text .ul,
@@ -177,23 +181,6 @@
@apply hidden;
}
.text .page {
@apply font-sans text-sm text-slate-600 absolute -left-[2rem] w-[1rem] mt-[0.4rem] leading-[1.2];
}
.text .eanchor-page::before {
content: "|";
@apply text-slate-600 font-sans text-sm relative bottom-[0.15rem] pr-[1ch];
}
/* .text .page + br { */
/* @apply hidden; */
/* } */
.text .page::before {
content: "";
}
.text .page.index-1 {
@apply hidden;
}
@@ -314,4 +301,13 @@
.text .note-hand.margin-note {
@apply -mt-1;
}
.text .page {
@apply font-sans text-sm text-slate-600;
}
.text .eanchor-page-inside::before {
content: "|";
@apply text-slate-600 font-sans text-sm relative bottom-[0.15rem] pr-[1ch];
}
}