sidenote ende

This commit is contained in:
Simon Martens
2025-05-19 18:00:10 +02:00
parent 60a881af27
commit 7acff110c9
4 changed files with 39 additions and 17 deletions

View File

@@ -90,16 +90,16 @@ func Parse(lib *xmlmodels.Library) func(s string) string {
elem.Token.Attributes["pos"] != "" { elem.Token.Attributes["pos"] != "" {
note := Note{Id: id} note := Note{Id: id}
note.Tokens.AppendDivElement(id, "note-sidenote-meta") note.Tokens.AppendDivElement(id, "note-sidenote-meta")
if elem.Token.Attributes["annotation"] != "" {
note.Tokens.AppendDivElement("", "sidenote-note")
note.Tokens.AppendText(elem.Token.Attributes["annotation"])
note.Tokens.AppendEndElement()
}
if elem.Token.Attributes["page"] != "" { if elem.Token.Attributes["page"] != "" {
note.Tokens.AppendDivElement("", "sidenote-page") note.Tokens.AppendDivElement("", "sidenote-page")
note.Tokens.AppendText(elem.Token.Attributes["page"]) note.Tokens.AppendText(elem.Token.Attributes["page"])
note.Tokens.AppendEndElement() note.Tokens.AppendEndElement()
} }
if elem.Token.Attributes["annotation"] != "" {
note.Tokens.AppendDivElement("", "sidenote-note")
note.Tokens.AppendText(elem.Token.Attributes["annotation"])
note.Tokens.AppendEndElement()
}
if elem.Token.Attributes["pos"] != "" { if elem.Token.Attributes["pos"] != "" {
note.Tokens.AppendDivElement("", "sidenote-pos") note.Tokens.AppendDivElement("", "sidenote-pos")
note.Tokens.AppendText(elem.Token.Attributes["pos"]) note.Tokens.AppendText(elem.Token.Attributes["pos"])
@@ -161,8 +161,10 @@ func Parse(lib *xmlmodels.Library) func(s string) string {
if !ps.LineBreak { if !ps.LineBreak {
ps.Tokens.AppendLink("#"+ps.PC, "eanchor-page") ps.Tokens.AppendLink("#"+ps.PC, "eanchor-page")
ps.Tokens.AppendEndElement() ps.Tokens.AppendEndElement()
ps.Tokens.AppendDivElement(ps.PC, "page", "page-inside")
} else {
ps.Tokens.AppendDivElement(ps.PC, "page", "page-outside")
} }
ps.Tokens.AppendDivElement(ps.PC, "page")
ps.Tokens.AppendText(ps.PC) ps.Tokens.AppendText(ps.PC)
ps.Tokens.AppendEndElement() ps.Tokens.AppendEndElement()
strings.TrimLeft(elem.Token.Data, " \t\n\r") strings.TrimLeft(elem.Token.Data, " \t\n\r")

View File

@@ -12,8 +12,7 @@ TODO
<subst><del>gelösche</del><insertion>hinz</insertion></subst> <subst><del>gelösche</del><insertion>hinz</insertion></subst>
<tl> text loss <tl> text loss
extent bei nr extent bei nr
Mouseover hand sidenote mouseover hand sidenote
NOTE ANDERS NOTE ANDERS
-Tab ist falsch -Tab ist falsch

File diff suppressed because one or more lines are too long

View File

@@ -183,7 +183,7 @@
.text .eanchor-page::before { .text .eanchor-page::before {
content: "|"; content: "|";
@apply text-slate-600 font-sans text-sm relative bottom-[0.1rem] pr-0.5; @apply text-slate-600 font-sans text-sm relative bottom-[0.15rem] pr-[1ch];
} }
/* .text .page + br { */ /* .text .page + br { */
@@ -231,20 +231,24 @@
} }
.text .insertion::before { .text .insertion::before {
@apply text-slate-700;
margin-right: -0.2em; margin-right: -0.2em;
content: "⌞"; content: "⌞";
} }
.text .insertion::after { .text .insertion::after {
@apply text-slate-700;
margin-left: -0.2em; margin-left: -0.2em;
content: "⌟"; content: "⌟";
} }
.text .nr::before { .text .nr::before {
@apply text-slate-700;
content: "⸰"; content: "⸰";
} }
.text .nr::after { .text .nr::after {
@apply text-slate-700;
content: "⸰"; content: "⸰";
} }
@@ -262,16 +266,24 @@
top: 55%; top: 55%;
} }
.text .note-note {
@apply inline text-sm text-gray-500 relative left-[0.1rem];
}
.text .sidenote { .text .sidenote {
@apply border-l-4 border-slate-200 pl-2 my-1; @apply border-l-4 border-slate-200 pl-2 my-1;
} }
.text .hand {
@apply inline text-blue-950 font-didone text-[0.9rem];
}
.text .sidenote-page::before { .text .sidenote-page::before {
content: "; S. "; content: "S. ";
}
.text .note-sidenote-meta.margin-note {
@apply mt-1;
}
.text .sidenote-page::after {
content: "; ";
} }
.text .note-sidenote-meta > div { .text .note-sidenote-meta > div {
@@ -282,15 +294,24 @@
@apply !hidden; @apply !hidden;
} }
.text .hand { .text .note-note {
@apply inline text-blue-950 font-didone text-[0.9rem]; @apply block;
} }
.text .margin-note { .text .margin-note {
@apply absolute w-[13rem] text-sm; @apply absolute w-[13rem] text-sm;
} }
.text div[class^="note-"],
.text div[class*=" note-"] {
@apply text-sm text-slate-800;
}
.text .note-hand { .text .note-hand {
@apply text-blue-950; @apply text-blue-950;
} }
.text .note-hand.margin-note {
@apply -mt-1;
}
} }