diff --git a/css/modules/_footnotes.scss b/css/modules/_footnotes.scss index 8284658..2bd344b 100644 --- a/css/modules/_footnotes.scss +++ b/css/modules/_footnotes.scss @@ -1,21 +1,22 @@ @page { @footnote { float: bottom; - + footnote-policy: auto; } } .pagedjs_footnote_content{ - padding-top: calc(var(--baseline)*1); + padding-top: calc(var(--baseline)*1); } .inline-note { float: footnote; - font-size: 9px; - line-height: calc(var(--baseline)*0.9); + footnote-policy: auto; + font-size: var(--fs-small); + line-height: calc(var(--baseline)*0.8); padding-left: var(--indent); position: relative; - font-weight: 100; + font-weight: 600; &::marker{ display: none; @@ -29,11 +30,22 @@ &::before{ content: attr(data-counter-note) "."; position: absolute; - // left: calc(var(--indent)*-1); left: 0px; } } -[data-footnote-call]{ - font-size: 9px; +.inline-note::after{ + font-family: var(--font); + font-size: var(--fs-small); + line-height: 0; + position: relative; + top: -3px; + font-variant-position: normal!important; + } + +blockquote .inline-note{ + font-variant-position: normal!important; +} + + diff --git a/css/modules/_layout.scss b/css/modules/_layout.scss index 278356f..4304e1c 100644 --- a/css/modules/_layout.scss +++ b/css/modules/_layout.scss @@ -1,19 +1,21 @@ @media print { @page { - size: 134mm 205mm; + size: 176mm 240mm; // size: 150mm 220mm; - margin-top: 67px; - margin-bottom: 10mm; - margin-left: 10mm; - margin-right: 10mm; + margin-top: 36px; + margin-bottom: 20mm; + bleed: 6mm; marks: crop; } @page:left { - margin-left: 12mm; - margin-right: 32mm; - @top-left { + margin-left: 18mm; + margin-right: 26mm; + @bottom-left { content: counter(page); + font-family: var(--font-title); + font-weight: 500; + font-size: var(--fs-num); } // @top-right { // content: "Höchstpersönlichkeit"; @@ -22,15 +24,28 @@ // } } @page:right { - margin-left: 32mm; - margin-right: 12mm; - @top-right { + margin-left: 26mm; + margin-right: 18mm; + @bottom-right { content: counter(page); + font-family: var(--font-title); + font-weight: 500; + font-size: var(--fs-num); } - @top-left { + @right-top { content: "Höchstpersönlichkeit"; - font-variant-caps: small-caps; - letter-spacing: 0.05em; + font-family: var(--font-title); + font-weight: normal; + // background-color: red; + transform-origin: top left; + height: calc(var(--baseline)*2); + word-spacing: nowrap; + width: 52ch; + transform: rotate(90deg); + text-align: left; + position: relative; + left: 14mm; + padding-left: 5px; } } diff --git a/css/modules/_text.scss b/css/modules/_text.scss index 0fd8176..0695543 100644 --- a/css/modules/_text.scss +++ b/css/modules/_text.scss @@ -26,40 +26,8 @@ p, li{ word-spacing: -0.004em; } - + -ol[type="1"]{ - list-style-type: none; - position: relative; - break-after: avoid; - - position: absolute; - left: calc(var(--indent)*-3); - &::before{ - content: attr(start); - font-family: var(--font-sans); - // font-weight: 200; - font-size: 0.6rem; - color: #999; - display: block; - padding: 0px 2px; - border: 1px solid #efefef; - - min-width: 1.5ch; - display: flex; - justify-content: center; - } - - - -} - -.pagedjs_left_page{ - ol[type="1"] { - left: inherit; - right: calc(var(--indent)*-3); - } -} p + p, ol[type="1"] + p{ @@ -69,40 +37,70 @@ ol[type="1"] + p{ blockquote{ - padding-left: var(--indent); - margin-top: calc(var(--baseline)*1); - margin-bottom: calc(var(--baseline)*1); + font-family: var(--font-serif); + padding-left: calc(var(--indent)*1); + padding-right: calc(var(--indent)*1); + // font-size: var(--fs-small); + margin-top: calc(var(--baseline)*0.5); + margin-bottom: calc(var(--baseline)*0.5); + font-size: 12px; + color: #343434; - p{ - font-style: italic; - em{ - font-style: normal; - } - } - - - u{ - font-variant: small-caps; - text-decoration: none; - } } -blockquote + ol + p{ text-indent: 0px; } +.these + ol + p, +blockquote + ol + p{ + text-indent: 0px; +} .these{ - &::before{ - content: "---" - } + // color: red; + // font-family: var(--font-title); + margin-bottom: calc(var(--baseline)*1); + border-left: 4px solid #efefef; + box-decoration-break: clone; + padding-left: calc(var(--indent)*0.5); +} + + +ol[type="1"]{ + list-style-type: none; + position: relative; + break-after: avoid; + + position: absolute; + left: 0px; + + display: flex; + gap: 0.25ch; + &::after{ - content: "---"; - } - &::before, &::after{ - display: flex; - // width: 3ch; - justify-content: center; + content: attr(start); + // font-family: var(--font-title); + // font-weight: 500; + font-size: var(--fs-small); + color: #999; + + // display: block; + // height: var(--baseline); + + // padding-right: 1ch; + // border-right: 1px solid #efefef; } -} \ No newline at end of file + li::before{ + font-size: var(--fs-small); + content: "¶"; + color: #d7d7d7; + position: relative; + top: -1px; + } + + + +} + + diff --git a/css/modules/_titles-counters.scss b/css/modules/_titles-counters.scss deleted file mode 100644 index efd6adc..0000000 --- a/css/modules/_titles-counters.scss +++ /dev/null @@ -1,50 +0,0 @@ -#section__content{ - - counter-reset: h1; - - h1{ - counter-increment: h1 1; - counter-reset: h2; - } - - h1::before{ - content: counter(h1, upper-alpha); - - } - - h2{ - counter-increment: h2 1; - counter-reset: h3; - } - - h2::before{ - content: counter(h2, upper-roman); - } - - h3{ - counter-increment: h3 1; - counter-reset: h4; - } - - h3::before{ - content: counter(h3); - } - - h4{ - counter-increment: h4 1; - counter-reset: h5; - } - - h4::before{ - content: counter(h4, lower-alpha) ". "; - } - - h5{ - counter-increment: h5 1; - counter-reset: h6; - } - - h5::before{ - content: counter(h5, lower-alpha) counter(h5, lower-alpha) ". "; - } - } \ No newline at end of file diff --git a/css/modules/_titles.scss b/css/modules/_titles.scss index b26db1e..3d8fa16 100644 --- a/css/modules/_titles.scss +++ b/css/modules/_titles.scss @@ -1,10 +1,24 @@ #section__content{ + margin-left: 28mm; + + h1, h2, h3 { + &::before{ + content: attr(data-counter); + } + } + + h4, h5, h6{ + &::before{ + content: attr(data-counter) ". "; + } + } - h1, h2, h3 { + h1, h2, h3 , h4{ break-inside: avoid; break-after: avoid; + text-wrap: balance; /* hack for avoiding break-after */ margin-bottom: calc(var(--baseline)*-3); @@ -12,6 +26,20 @@ content: ''; display: block; height: calc(var(--baseline)*3); + } + } + + h5, h6 { + break-inside: avoid; + break-after: avoid; + text-wrap: balance; + + /* hack for avoiding break-after */ + margin-bottom: calc(var(--baseline)*-2); + &::after{ + content: ''; + display: block; + height: calc(var(--baseline)*2); // background-color: rgba(255, 255, 0, 0.595); } } @@ -26,99 +54,135 @@ text-indent: 0; } - h1{ - font-family: var(--font-title); - font-weight: normal; - font-size: 1.5rem; - line-height: calc(var(--baseline)*1.4); - text-align: center; - position: relative; - margin-top: calc(var(--baseline)*3 - 3px); - padding-bottom: calc(var(--baseline)*1); - padding-left: 1ch; - padding-right: 1ch; - &::before{ - display: block; - font-size: 1rem; - - } - } + - h1:first-of-type{ - margin-top: 3px!important; - } h2{ font-family: var(--font-title); - font-weight: normal; - font-size: 1.3rem; + font-size: 1.1rem; + font-weight: 500; + text-transform: uppercase; line-height: calc(var(--baseline)*1.2); - - text-align: right; - padding-left: 3ch; position: relative; - margin-top: calc(var(--baseline)*1 + 9px); + margin-top: calc(var(--baseline)*1 + 6px); padding-bottom: calc(var(--baseline)*1); + padding-right: 2ch; + padding-left: calc(var(--indent)*2); &::before{ position: absolute; left: 0; + // display: block; + // font-size: var(--fs-num); + // padding-left: var(--indent); } } + + h3{ - font-family: var(--font-sans); - font-weight: normal; + font-family: var(--font-title); + font-weight: 500; font-size: 1rem; line-height: calc(var(--baseline)*1); - text-align: right; - padding-left: 3ch; + // padding-left: var(--indent); + padding-right: calc(var(--indent)*2); position: relative; - margin-top: calc(var(--baseline)*1 + 9px); - padding-bottom: calc(var(--baseline)*1); + margin-top: calc(var(--baseline)*1 + 4px); + padding-bottom: calc(var(--baseline)*0.75); + padding-left: calc(var(--indent)*2); &::before{ - // font-family: 'Helixotrope 4'; - // font-size: var(--font-size); - // font-weight: bold; + position: absolute; left: 0; } } h4{ - font-family: var(--font-sans); - font-weight: normal; + font-family: var(--font-title); + font-weight: 500; + font-size: 0.9rem; + line-height: calc(var(--baseline)*1); + padding-right: calc(var(--indent)*2); + position: relative; + margin-top: calc(var(--baseline)*1 + 4px); + padding-bottom: calc(var(--baseline)*0.75); + text-decoration: underline 1px #cfcfcf; + text-underline-offset: 3px; + + padding-left: calc(var(--indent)*2); + &::before{ + + // position: absolute; + // left: 0; + } + } + + + h5{ + font-family: var(--font-title); + font-weight: 500; font-size: 0.8rem; line-height: calc(var(--baseline)*1); - - text-align: right; - padding-left: 3ch; + padding-left: calc(var(--indent)*2); + // padding-right: calc(var(--indent)*2); position: relative; - margin-top: calc(var(--baseline)*0.5); - margin-bottom: calc(var(--baseline)*0.5); + margin-top: calc(var(--baseline)*1 + 4px); + padding-bottom: calc(var(--baseline)*0.25); + } + + h6{ + font-family: var(--font-title); font-weight: 500; - + font-size: 0.8rem; + margin-top: calc(var(--baseline)*0.5); + padding-bottom: calc(var(--baseline)*0.25); + color: #666; } - h5{ - font-family: var(--font-sans); - font-weight: normal; - font-size: 0.7rem; - line-height: calc(var(--baseline)*1); - position: relative; - margin-top: calc(var(--baseline)*0.75); - margin-bottom: calc(var(--baseline)*0.25); - - } - } [data-id="section__content"][data-split-from] > :first-child { margin-top: 0; -} \ No newline at end of file +} + + h1{ + font-family: var(--font-title); + font-size: 1.6rem; + font-weight: 500; + text-transform: uppercase; + line-height: calc(var(--baseline)*1.6); + // text-align: center; + position: relative; + margin-top: calc(var(--baseline)*2 - 3px); + padding-bottom: calc(var(--baseline)*1); + padding-left: calc(var(--indent)*2); + padding-right: 1ch; + + + &::before{ + // font-size: var(--fs-num); + // width: 2ch; + // height: 2ch; + // border: 1px solid currentColor; + // border-radius: 50%; + // display: flex; + // align-items: center; + // justify-content: center; + position: absolute; + left: 0; + width: calc(var(--indent)*2 - 0.5ch); + // border-bottom: 2px solid #cfcfcf; + // top: 3px; + } + } + + section h1:first-of-type{ + margin-top: 3px!important; + } \ No newline at end of file diff --git a/css/modules/_var.scss b/css/modules/_var.scss index 3b7e71a..18aac84 100644 --- a/css/modules/_var.scss +++ b/css/modules/_var.scss @@ -1,8 +1,11 @@ :root{ - --font: 'Edgar', sans-serif; - --font-title: "Heliotrope 3 Caps", sans-serif; - --font-sans: "Heliotrope 4", sans-serif; - --font-size: 12px; + --font: 'Akkurat Std', sans-serif; + --font-serif: 'Edgar', sans-serif; + --font-title: 'Allium Rounded', sans-serif; + --font-sans: 'Allium Rounded', sans-serif; + --font-size: 11px; + --fs-small: 8.5px; + --fs-num: 14px; --baseline: 16px; --indent: 26px; diff --git a/css/style.css b/css/style.css index f500709..78bb725 100644 --- a/css/style.css +++ b/css/style.css @@ -1,9 +1,12 @@ @charset "UTF-8"; :root { - --font: "Edgar", sans-serif; - --font-title: "Heliotrope 3 Caps", sans-serif; - --font-sans: "Heliotrope 4", sans-serif; - --font-size: 12px; + --font: "Akkurat Std", sans-serif; + --font-serif: "Edgar", sans-serif; + --font-title: "Allium Rounded", sans-serif; + --font-sans: "Allium Rounded", sans-serif; + --font-size: 11px; + --fs-small: 8.5px; + --fs-num: 14px; --baseline: 16px; --indent: 26px; } @@ -30,31 +33,44 @@ body { @media print { @page { - size: 134mm 205mm; - margin-top: 67px; - margin-bottom: 10mm; - margin-left: 10mm; - margin-right: 10mm; + size: 176mm 240mm; + margin-top: 36px; + margin-bottom: 20mm; bleed: 6mm; marks: crop; } @page :left { - margin-left: 12mm; - margin-right: 32mm; - @top-left { + margin-left: 18mm; + margin-right: 26mm; + @bottom-left { content: counter(page); + font-family: var(--font-title); + font-weight: 500; + font-size: var(--fs-num); } } @page :right { - margin-left: 32mm; - margin-right: 12mm; - @top-right { + margin-left: 26mm; + margin-right: 18mm; + @bottom-right { content: counter(page); + font-family: var(--font-title); + font-weight: 500; + font-size: var(--fs-num); } - @top-left { + @right-top { content: "Höchstpersönlichkeit"; - font-variant-caps: small-caps; - letter-spacing: 0.05em; + font-family: var(--font-title); + font-weight: normal; + transform-origin: top left; + height: calc(var(--baseline) * 2); + word-spacing: nowrap; + width: 52ch; + transform: rotate(90deg); + text-align: left; + position: relative; + left: 14mm; + padding-left: 5px; } } @page :first { @@ -192,120 +208,94 @@ p, li { word-spacing: -0.004em; } -ol[type="1"] { - list-style-type: none; - position: relative; - -moz-column-break-after: avoid; - break-after: avoid; - position: absolute; - left: calc(var(--indent) * -3); -} -ol[type="1"]::before { - content: attr(start); - font-family: var(--font-sans); - font-size: 0.6rem; - color: #999; - display: block; - padding: 0px 2px; - border: 1px solid #efefef; - min-width: 1.5ch; - display: flex; - justify-content: center; -} - -.pagedjs_left_page ol[type="1"] { - left: inherit; - right: calc(var(--indent) * -3); -} - p + p, ol[type="1"] + p { text-indent: calc(var(--indent) * 0.5); } blockquote { - padding-left: var(--indent); - margin-top: calc(var(--baseline) * 1); - margin-bottom: calc(var(--baseline) * 1); -} -blockquote p { - font-style: italic; -} -blockquote p em { - font-style: normal; -} -blockquote u { - font-variant: small-caps; - text-decoration: none; + font-family: var(--font-serif); + padding-left: calc(var(--indent) * 1); + padding-right: calc(var(--indent) * 1); + margin-top: calc(var(--baseline) * 0.5); + margin-bottom: calc(var(--baseline) * 0.5); + font-size: 12px; + color: #343434; } +.these + ol + p, blockquote + ol + p { text-indent: 0px; } -.these::before { - content: "---"; +.these { + margin-bottom: calc(var(--baseline) * 1); + border-left: 4px solid #efefef; + -webkit-box-decoration-break: clone; + box-decoration-break: clone; + padding-left: calc(var(--indent) * 0.5); } -.these::after { - content: "---"; -} -.these::before, .these::after { + +ol[type="1"] { + list-style-type: none; + position: relative; + -moz-column-break-after: avoid; + break-after: avoid; + position: absolute; + left: 0px; display: flex; - justify-content: center; + gap: 0.25ch; +} +ol[type="1"]::after { + content: attr(start); + font-size: var(--fs-small); + color: #999; +} +ol[type="1"] li::before { + font-size: var(--fs-small); + content: "¶"; + color: #d7d7d7; + position: relative; + top: -1px; } #section__content { - counter-reset: h1; + margin-left: 28mm; } -#section__content h1 { - counter-increment: h1 1; - counter-reset: h2; +#section__content h1::before, #section__content h2::before, #section__content h3::before { + content: attr(data-counter); } -#section__content h1::before { - content: counter(h1, upper-alpha); +#section__content h4::before, #section__content h5::before, #section__content h6::before { + content: attr(data-counter) ". "; } -#section__content h2 { - counter-increment: h2 1; - counter-reset: h3; -} -#section__content h2::before { - content: counter(h2, upper-roman); -} -#section__content h3 { - counter-increment: h3 1; - counter-reset: h4; -} -#section__content h3::before { - content: counter(h3); -} -#section__content h4 { - counter-increment: h4 1; - counter-reset: h5; -} -#section__content h4::before { - content: counter(h4, lower-alpha) ". "; -} -#section__content h5 { - counter-increment: h5 1; - counter-reset: h6; -} -#section__content h5::before { - content: counter(h5, lower-alpha) counter(h5, lower-alpha) ". "; -} - -#section__content h1, #section__content h2, #section__content h3 { +#section__content h1, #section__content h2, #section__content h3, #section__content h4 { -moz-column-break-inside: avoid; break-inside: avoid; -moz-column-break-after: avoid; break-after: avoid; + text-wrap: balance; /* hack for avoiding break-after */ margin-bottom: calc(var(--baseline) * -3); } -#section__content h1::after, #section__content h2::after, #section__content h3::after { +#section__content h1::after, #section__content h2::after, #section__content h3::after, #section__content h4::after { content: ""; display: block; height: calc(var(--baseline) * 3); } +#section__content h5, #section__content h6 { + -moz-column-break-inside: avoid; + break-inside: avoid; + -moz-column-break-after: avoid; + break-after: avoid; + text-wrap: balance; + /* hack for avoiding break-after */ + margin-bottom: calc(var(--baseline) * -2); +} +#section__content h5::after, #section__content h6::after { + content: ""; + display: block; + height: calc(var(--baseline) * 2); +} #section__content h1 + ol + p, #section__content h2 + ol + p, #section__content h3 + ol + p, @@ -314,84 +304,100 @@ blockquote + ol + p { #section__content h6 + ol + p { text-indent: 0; } -#section__content h1 { - font-family: var(--font-title); - font-weight: normal; - font-size: 1.5rem; - line-height: calc(var(--baseline) * 1.4); - text-align: center; - position: relative; - margin-top: calc(var(--baseline) * 3 - 3px); - padding-bottom: calc(var(--baseline) * 1); - padding-left: 1ch; - padding-right: 1ch; -} -#section__content h1::before { - display: block; - font-size: 1rem; -} -#section__content h1:first-of-type { - margin-top: 3px !important; -} #section__content h2 { font-family: var(--font-title); - font-weight: normal; - font-size: 1.3rem; + font-size: 1.1rem; + font-weight: 500; + text-transform: uppercase; line-height: calc(var(--baseline) * 1.2); - text-align: right; - padding-left: 3ch; position: relative; - margin-top: calc(var(--baseline) * 1 + 9px); + margin-top: calc(var(--baseline) * 1 + 6px); padding-bottom: calc(var(--baseline) * 1); + padding-right: 2ch; + padding-left: calc(var(--indent) * 2); } #section__content h2::before { position: absolute; left: 0; } #section__content h3 { - font-family: var(--font-sans); - font-weight: normal; + font-family: var(--font-title); + font-weight: 500; font-size: 1rem; line-height: calc(var(--baseline) * 1); - text-align: right; - padding-left: 3ch; + padding-right: calc(var(--indent) * 2); position: relative; - margin-top: calc(var(--baseline) * 1 + 9px); - padding-bottom: calc(var(--baseline) * 1); + margin-top: calc(var(--baseline) * 1 + 4px); + padding-bottom: calc(var(--baseline) * 0.75); + padding-left: calc(var(--indent) * 2); } #section__content h3::before { position: absolute; left: 0; } #section__content h4 { - font-family: var(--font-sans); - font-weight: normal; - font-size: 0.8rem; - line-height: calc(var(--baseline) * 1); - text-align: right; - padding-left: 3ch; - position: relative; - margin-top: calc(var(--baseline) * 0.5); - margin-bottom: calc(var(--baseline) * 0.5); + font-family: var(--font-title); font-weight: 500; + font-size: 0.9rem; + line-height: calc(var(--baseline) * 1); + padding-right: calc(var(--indent) * 2); + position: relative; + margin-top: calc(var(--baseline) * 1 + 4px); + padding-bottom: calc(var(--baseline) * 0.75); + -webkit-text-decoration: underline 1px #cfcfcf; + text-decoration: underline 1px #cfcfcf; + text-underline-offset: 3px; + padding-left: calc(var(--indent) * 2); } #section__content h5 { - font-family: var(--font-sans); - font-weight: normal; - font-size: 0.7rem; + font-family: var(--font-title); + font-weight: 500; + font-size: 0.8rem; line-height: calc(var(--baseline) * 1); + padding-left: calc(var(--indent) * 2); position: relative; - margin-top: calc(var(--baseline) * 0.75); - margin-bottom: calc(var(--baseline) * 0.25); + margin-top: calc(var(--baseline) * 1 + 4px); + padding-bottom: calc(var(--baseline) * 0.25); +} +#section__content h6 { + font-family: var(--font-title); + font-weight: 500; + font-size: 0.8rem; + margin-top: calc(var(--baseline) * 0.5); + padding-bottom: calc(var(--baseline) * 0.25); + color: #666; } [data-id=section__content][data-split-from] > :first-child { margin-top: 0; } +h1 { + font-family: var(--font-title); + font-size: 1.6rem; + font-weight: 500; + text-transform: uppercase; + line-height: calc(var(--baseline) * 1.6); + position: relative; + margin-top: calc(var(--baseline) * 2 - 3px); + padding-bottom: calc(var(--baseline) * 1); + padding-left: calc(var(--indent) * 2); + padding-right: 1ch; +} +h1::before { + position: absolute; + left: 0; + width: calc(var(--indent) * 2 - 0.5ch); +} + +section h1:first-of-type { + margin-top: 3px !important; +} + @page { @footnote { float: bottom; + footnote-policy: auto; } } .pagedjs_footnote_content { @@ -400,11 +406,12 @@ blockquote + ol + p { .inline-note { float: footnote; - font-size: 9px; - line-height: calc(var(--baseline) * 0.9); + footnote-policy: auto; + font-size: var(--fs-small); + line-height: calc(var(--baseline) * 0.8); padding-left: var(--indent); position: relative; - font-weight: 100; + font-weight: 600; } .inline-note::marker { display: none; @@ -417,8 +424,17 @@ blockquote + ol + p { left: 0px; } -[data-footnote-call] { - font-size: 9px; +.inline-note::after { + font-family: var(--font); + font-size: var(--fs-small); + line-height: 0; + position: relative; + top: -3px; + font-variant-position: normal !important; +} + +blockquote .inline-note { + font-variant-position: normal !important; } #section__list-of-abbr { diff --git a/css/style.css.map b/css/style.css.map index fc0a9af..1cd0617 100644 --- a/css/style.css.map +++ b/css/style.css.map @@ -1 +1 @@ -{"version":3,"sources":["style.css","modules/_var.scss","modules/_init.scss","modules/_layout.scss","modules/_text.scss","modules/_titles-counters.scss","modules/_titles.scss","modules/_footnotes.scss","modules/_list-of-abbr.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACAhB;EACI,2BAAA;EACA,6CAAA;EACA,uCAAA;EACA,iBAAA;EACA,gBAAA;EAEA,cAAA;ADCJ;;AERA;EACI,SAAA;EACA,UAAA;EACA,sBAAA;AFWJ;;AETA;EACI,mBAAA;AFYJ;;AETA;EACI,mCAAA,EAAA,wBAAA;EACA,kCAAA,EAAA,kBAAA;EAEA,kCAAA,EAAA,6CAAA;EACA,+BAAA,EAAA,mDAAA;EAEA,wBAAA;EACA,2BAAA;EACA,4BAAA;AFUJ;;AG5BA;EACI;IACI,iBAAA;IAEA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ANgSR;AM/RQ;EACI,WAAA;EACA,cAAA;EACA,iCAAA;ANiSZ;AM3RI;;;;;;EAMI,cAAA;AN6RR;AM1RI;EACI,8BAAA;EACA,mBAAA;EACA,iBAAA;EACA,wCAAA;EACA,kBAAA;EACA,kBAAA;EACA,2CAAA;EACA,yCAAA;EACA,iBAAA;EACA,kBAAA;AN4RR;AM3RQ;EACI,cAAA;EACA,eAAA;AN6RZ;AMxRI;EACI,0BAAA;AN0RR;AMpRI;EACI,8BAAA;EACA,mBAAA;EACA,iBAAA;EACA,wCAAA;EAEA,iBAAA;EACA,iBAAA;EACA,kBAAA;EACA,2CAAA;EACA,yCAAA;ANqRR;AMpRQ;EACI,kBAAA;EACA,OAAA;ANsRZ;AMlRI;EACI,6BAAA;EACA,mBAAA;EACA,eAAA;EACA,sCAAA;EAEA,iBAAA;EACA,iBAAA;EACA,kBAAA;EACA,2CAAA;EACA,yCAAA;ANmRR;AMlRQ;EAII,kBAAA;EACA,OAAA;ANiRZ;AM7QI;EACI,6BAAA;EACA,mBAAA;EACA,iBAAA;EACA,sCAAA;EAEA,iBAAA;EACA,iBAAA;EACA,kBAAA;EACC,uCAAA;EACD,0CAAA;EACA,gBAAA;AN8QR;AMzQI;EACI,6BAAA;EACA,mBAAA;EACA,iBAAA;EACA,sCAAA;EACA,kBAAA;EACA,wCAAA;EACA,2CAAA;AN2QR;;AMnQA;EACQ,aAAA;ANsQR;;AOhYA;EACI;IACE,aAAA;EPmYJ;AACF;AO/XE;EACA,sCAAA;APiYF;;AO9XA;EACE,eAAA;EACA,cAAA;EACA,wCAAA;EACA,2BAAA;EACA,kBAAA;EACA,gBAAA;APiYF;AO/XE;EACE,aAAA;EACA,WAAA;APiYJ;;AO1XA;EACI,oCAAA;EACA,kBAAA;EAEA,SAAA;AP4XJ;;AOxXA;EACM,cAAA;AP2XN;;AQhaA;EACI,aAAA;EACA,UAAA;ARmaJ","file":"style.css"} \ No newline at end of file +{"version":3,"sources":["style.css","modules/_var.scss","modules/_init.scss","modules/_layout.scss","modules/_text.scss","modules/_titles.scss","modules/_footnotes.scss","modules/_list-of-abbr.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACAhB;EACI,iCAAA;EACA,iCAAA;EACA,0CAAA;EACA,yCAAA;EACA,iBAAA;EACA,iBAAA;EACA,cAAA;EACA,gBAAA;EAEA,cAAA;ADCJ;;AEXA;EACI,SAAA;EACA,UAAA;EACA,sBAAA;AFcJ;;AEZA;EACI,mBAAA;AFeJ;;AEZA;EACI,mCAAA,EAAA,wBAAA;EACA,kCAAA,EAAA,kBAAA;EAEA,kCAAA,EAAA,6CAAA;EACA,+BAAA,EAAA,mDAAA;EAEA,wBAAA;EACA,2BAAA;EACA,4BAAA;AFaJ;;AG/BA;EACI;IACI,iBAAA;IAEA,gBAAA;IACA,mBAAA;IAEA,UAAA;IACA,WAAA;EHgCN;EG9BE;IACI,iBAAA;IACA,kBAAA;IACA;MACI,sBAAA;MACA,8BAAA;MACA,gBAAA;MACA,wBAAA;IHgCR;EACF;EGzBE;IACI,iBAAA;IACA,kBAAA;IACA;MACI,sBAAA;MACA,8BAAA;MACA,gBAAA;MACC,wBAAA;IH2BT;IGzBI;MACI,+BAAA;MACA,8BAAA;MACA,mBAAA;MAEA,0BAAA;MACA,iCAAA;MACA,oBAAA;MACA,WAAA;MACA,wBAAA;MACA,gBAAA;MACA,kBAAA;MACA,UAAA;MACA,iBAAA;IH0BR;EACF;EGvBE;IACI;MAAmB,aAAA;IH0BvB;IGzBI;MAAY,aAAA;IH4BhB;IG3BI;MAAc,aAAA;IH8BlB;IG7BI;MAAa,aAAA;IHgCjB;IG/BI;MAAoB,aAAA;IHkCxB;IGjCI;MAAY,aAAA;IHoChB;IGnCI;MAAe,aAAA;IHsCnB;IGrCI;MAAe,aAAA;IHwCnB;IGvCI;MAAa,aAAA;IH0CjB;IGzCI;MAAgB,aAAA;IH4CpB;IG3CI;MAAgB,aAAA;IH8CpB;IG7CI;MAAsB,aAAA;IHgD1B;IG/C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AAA;ALyNT;;AKjNA;EACQ,aAAA;ALoNR;;AKjNG;EACK,8BAAA;EACA,iBAAA;EACA,gBAAA;EACA,yBAAA;EACA,wCAAA;EAEA,kBAAA;EACA,2CAAA;EACA,yCAAA;EACA,qCAAA;EACA,kBAAA;ALmNR;AKhNQ;EASK,kBAAA;EACA,OAAA;EACA,sCAAA;AL0Mb;;AKpMI;EACI,0BAAA;ALuMR;;AMjYA;EACI;IACE,aAAA;IACA,qBAAA;ENoYJ;AACF;AMjYE;EACI,sCAAA;ANmYN;;AMhYA;EACE,eAAA;EACA,qBAAA;EACA,0BAAA;EACA,wCAAA;EACA,2BAAA;EACA,kBAAA;EACA,gBAAA;ANmYF;AMjYE;EACE,aAAA;EACA,WAAA;ANmYJ;;AM5XA;EACI,oCAAA;EACA,kBAAA;EACA,SAAA;AN+XJ;;AM3XA;EACE,wBAAA;EACA,0BAAA;EACA,cAAA;EACA,kBAAA;EACA,SAAA;EACA,wCAAA;AN8XF;;AM1XA;EACI,wCAAA;AN6XJ;;AO5aA;EACI,aAAA;EACA,UAAA;AP+aJ","file":"style.css"} \ No newline at end of file diff --git a/css/style.scss b/css/style.scss index d81f558..59fbe83 100644 --- a/css/style.scss +++ b/css/style.scss @@ -3,7 +3,6 @@ @import 'modules/init'; @import 'modules/layout'; @import 'modules/text'; -@import 'modules/titles-counters'; @import 'modules/titles'; @import 'modules/footnotes'; @import 'modules/list-of-abbr'; \ No newline at end of file diff --git a/csspageweaver/manifest.json b/csspageweaver/manifest.json index 7aa95e6..5bd177d 100644 --- a/csspageweaver/manifest.json +++ b/csspageweaver/manifest.json @@ -1,5 +1,5 @@ { - "plugins": ["baseline","grid","marginBox","imposition","spread","previewPage","reloadInPlace","fullPage","inlineNotes"], + "plugins": ["baseline","grid","marginBox","imposition","spread","previewPage","reloadInPlace","inlineNotes"], "pluginsParameters":{}, "css": [ "css/style.css" @@ -11,8 +11,7 @@ } }, "hook": [ - "/js/custom-handler-example-1.js", - "/js/custom-handler-example-2.js" + "/js/counters.js" ] } diff --git a/index.html b/index.html index fafa53c..888a588 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,11 @@ - + + + + + @@ -3596,6 +3600,7 @@ Bürgerlichen Gesetzbuch
+

These 4. Das 19. Jahrhundert wurde zur Wiege der noch heute geltenden Voraussetzung einer Höchstpersönlichkeit der Verfügung von Todes wegen, zunächst vermittelt über das gemeine Recht, @@ -3662,6 +3667,7 @@ Auflage beschlossen hatte, bestimmte er mit § 2151 BGB und damit in gewisser Spannung zum Prinzip des Vonselbsterwerbs eine Ausnahme von der Selbständigkeit und Bestimmtheit der Verfügung auch für das Vermächtnis.

+
@@ -7972,6 +7978,7 @@ Geschichte.

id="vom-umlesen-der-höchstpersönlichkeit-im-deutschen-bürgerlichen-gesetzbuch"> Vom Umlesen der Höchstpersönlichkeit im deutschen Bürgerlichen Gesetzbuch +
@@ -8034,6 +8041,7 @@ auseinanderzulegen und neu zu begründen. Je nach gefundener Begründung gelangte man so zu dessen Begründet‑ oder teilweisen Unbegründetheit. Am Ausschluss einer gewillkürten Stellvertretung wollte man jedoch nach allen Ansichten festhalten.

+
@@ -11355,6 +11363,7 @@ schweizerische Weg und deutsche Rechtsimplantate
+

These 16. Der Schweizer Gesetzgeber schloss sich nicht der gesetzgeberischen Konzeption des deutschen Bürgerlichen Gesetzbuchs an. Anders als der deutsche Gesetzgeber, bestimmte der @@ -11432,6 +11441,7 @@ eingefügten Rechtsimplantate abzustossen. Versucht wird dies mit wiederum neuen Rechtsimplantaten, aus dem deutschen Recht. Die gesetzgeberische Konzeption hat man damit weit hinter sich gelassen. Für die Praxis bedeutet dies eine erhebliche Rechtsunsicherheit.

+
@@ -13172,6 +13182,7 @@ role="doc-noteref">1552

überweisen. Mit der vorliegenden Rechtsgeschichte ist ihr hoffentlich der Grund bereitet.

Zusammenfassung in Thesen

+
@@ -13416,6 +13427,7 @@ eingefügten Rechtsimplantate abzustossen. Versucht wird dies mit wiederum neuen Rechtsimplantaten, aus dem deutschen Recht. Die gesetzgeberische Konzeption hat man damit weit hinter sich gelassen. Für die Praxis bedeutet dies eine erhebliche Rechtsunsicherheit.

+

Quellen- und Literaturverzeichnis

Adomeit, Klaus, Heteronome diff --git a/js/counters.js b/js/counters.js new file mode 100644 index 0000000..967125e --- /dev/null +++ b/js/counters.js @@ -0,0 +1,94 @@ +import { Handler } from '/csspageweaver/lib/paged.esm.js'; + +export default class counters extends Handler { + constructor(chunker, polisher, caller) { + super(chunker, polisher, caller); + } + + // Convertir en upper-alpha (A, B, C...) + toUpperAlpha(num) { + return String.fromCharCode(64 + num); + } + + // Convertir en lower-alpha (a, b, c...) + toLowerAlpha(num) { + return String.fromCharCode(96 + num); + } + + // Convertir en upper-roman (I, II, III...) + toUpperRoman(num) { + const romanNumerals = [ + ['M', 1000], ['CM', 900], ['D', 500], ['CD', 400], + ['C', 100], ['XC', 90], ['L', 50], ['XL', 40], + ['X', 10], ['IX', 9], ['V', 5], ['IV', 4], ['I', 1] + ]; + let result = ''; + for (const [letter, value] of romanNumerals) { + while (num >= value) { + result += letter; + num -= value; + } + } + return result; + } + + beforeParsed(content) { + const sectionContent = content.querySelector('#section__content'); + if (!sectionContent) return; + + // Compteurs + let h1Count = 0; + let h2Count = 0; + let h3Count = 0; + let h4Count = 0; + let h5Count = 0; + let h6Count = 0; + + // Parcourir tous les éléments dans l'ordre du document + const allElements = sectionContent.querySelectorAll('h1, h2, h3, h4, h5, h6'); + + allElements.forEach(el => { + const tagName = el.tagName.toLowerCase(); + + switch (tagName) { + case 'h1': + h1Count++; + h2Count = 0; // reset h2 + el.setAttribute('data-counter', this.toUpperAlpha(h1Count)); + break; + + case 'h2': + h2Count++; + h3Count = 0; // reset h3 + el.setAttribute('data-counter', this.toUpperRoman(h2Count)); + break; + + case 'h3': + h3Count++; + h4Count = 0; // reset h4 + el.setAttribute('data-counter', h3Count.toString()); + break; + + case 'h4': + h4Count++; + h5Count = 0; // reset h5 + el.setAttribute('data-counter', this.toLowerAlpha(h4Count)); + break; + + case 'h5': + h5Count++; + h6Count = 0; // reset h6 + const letter = this.toLowerAlpha(h5Count); + el.setAttribute('data-counter', letter + letter); + break; + + case 'h6': + h6Count++; + el.setAttribute('data-counter', '(' + h6Count + ')'); + break; + } + }); + } +} + + diff --git a/js/custom-handler-example-1.js b/js/custom-handler-example-1.js deleted file mode 100644 index 2b01603..0000000 --- a/js/custom-handler-example-1.js +++ /dev/null @@ -1,21 +0,0 @@ -import { Handler } from '/csspageweaver/lib/paged.esm.js'; - -export default class myCustomHandler1 extends Handler { - constructor(chunker, polisher, caller) { - super(chunker, polisher, caller); - } - - beforeParsed(content){ - // let h2 = content.querySelectorAll('h2'); - // h2.forEach( h2 => { - // h2.insertAdjacentHTML("afterbegin", '🍄'); - // }); - } - - afterParsed(parsed) { - console.info("%c [CSS Page Weaver] Example custom handler 1 with afterParsed hook (see js/custom-handler-example-1.js", 'color: green;'); - } - -} - - diff --git a/js/custom-handler-example-2.js b/js/custom-handler-example-2.js deleted file mode 100644 index 5111051..0000000 --- a/js/custom-handler-example-2.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Handler } from '/csspageweaver/lib/paged.esm.js'; - - -export default class myCustomHandler2 extends Handler { - constructor(chunker, polisher, caller) { - super(chunker, polisher, caller); - } - - - afterPageLayout(pageElement, page, breakToken) { - if(pageElement.id == "page-1"){ - console.info("%c [CSS Page Weaver] Example custom handler 2 with afterPageLayout hook (see js/custom-handler-example-2.js", 'color: green;') - } - } -} - diff --git a/js/sectionedFootnotes.js b/js/sectionedFootnotes.js new file mode 100644 index 0000000..53faae0 --- /dev/null +++ b/js/sectionedFootnotes.js @@ -0,0 +1,124 @@ +import { Handler } from '/csspageweaver/lib/paged.esm.js'; + +export default class SectionedFootnotes extends Handler { + constructor(chunker, polisher, caller) { + super(chunker, polisher, caller); + } + + beforeParsed(content){ + + const sectionContent = content.querySelector('#section__content'); + const footnotesSection = content.querySelector('#footnotes'); + + if (!sectionContent || !footnotesSection) { + console.warn("Section content ou footnotes non trouvé"); + return; + } + + const originalOl = footnotesSection.querySelector('ol'); + if (!originalOl) { + console.warn("Liste de footnotes non trouvée"); + return; + } + + const allH1s = sectionContent.querySelectorAll('h1'); + + const noteToPartMap = new Map(); + + allH1s.forEach((h1, partIndex) => { + // Trouver le prochain h1 ou la fin de la section + const nextH1 = allH1s[partIndex + 1]; + + // Récupérer tous les éléments entre ce h1 et le suivant + let current = h1.nextElementSibling; + while (current && current !== nextH1) { + // Chercher les footnote-ref dans cet élément + const refs = current.querySelectorAll('.footnote-ref'); + refs.forEach(ref => { + const href = ref.getAttribute('href'); + if (href && href.startsWith('#fn')) { + const noteNum = href.replace('#fn', ''); + noteToPartMap.set(noteNum, partIndex); + } + }); + if (current.classList && current.classList.contains('footnote-ref')) { + const href = current.getAttribute('href'); + if (href && href.startsWith('#fn')) { + const noteNum = href.replace('#fn', ''); + noteToPartMap.set(noteNum, partIndex); + } + } + current = current.nextElementSibling; + } + }); + + const notesByPart = new Map(); + const allNotes = originalOl.querySelectorAll('li[id^="fn"]'); + + allNotes.forEach(note => { + const noteId = note.getAttribute('id'); + const noteNum = noteId.replace('fn', ''); + const partIndex = noteToPartMap.get(noteNum); + + if (partIndex !== undefined) { + if (!notesByPart.has(partIndex)) { + notesByPart.set(partIndex, []); + } + notesByPart.get(partIndex).push({ + num: parseInt(noteNum), + element: note + }); + } + }); + + const sortedParts = Array.from(notesByPart.keys()).sort((a, b) => a - b); + + // Vider la section footnotes (garder le hr s'il existe) + const hr = footnotesSection.querySelector('hr'); + footnotesSection.innerHTML = ''; + if (hr) { + footnotesSection.appendChild(hr); + } + + // Add title section + const mainTitle = document.createElement('h1'); + mainTitle.textContent = 'Notizen'; + footnotesSection.appendChild(mainTitle); + + sortedParts.forEach(partIndex => { + const h1 = allH1s[partIndex]; + const notes = notesByPart.get(partIndex); + + notes.sort((a, b) => a.num - b.num); + + if (notes.length > 0) { + // Upper-alpha counter + const titlePart = document.createElement('h2'); + titlePart.className = 'title-part'; + const letter = String.fromCharCode(65 + partIndex); // 65 = 'A' + titlePart.setAttribute('data-part-number', letter); + titlePart.textContent = h1.textContent.trim(); + footnotesSection.appendChild(titlePart); + + // New ol with new start + const newOl = document.createElement('ol'); + const firstNoteNum = notes[0].num; + newOl.setAttribute('start', firstNoteNum); + + notes.forEach(noteData => { + newOl.appendChild(noteData.element.cloneNode(true)); + }); + + footnotesSection.appendChild(newOl); + } + }); + + sectionContent.parentNode.insertBefore(footnotesSection, sectionContent.nextSibling); + + } + + + +} + + diff --git a/lua/add-style-as-class.lua b/lua/add-style-as-class.lua deleted file mode 100644 index c277278..0000000 --- a/lua/add-style-as-class.lua +++ /dev/null @@ -1,11 +0,0 @@ -function Span(el) - local cs = el.attributes['custom-style'] - if cs then - local class = cs - :lower() - :gsub("%s+", "-") - :gsub("[^a-z0-9%-]", "") - el.classes:insert("style-" .. class) - end - return el -end diff --git a/lua/blockquote.lua b/lua/blockquote.lua deleted file mode 100644 index ce8c43a..0000000 --- a/lua/blockquote.lua +++ /dev/null @@ -1,6 +0,0 @@ -function Para(el) - if el.style then - io.stderr:write("STYLE: " .. el.style .. "\n") - end - return el -end \ No newline at end of file