diff --git a/css/modules/_notes.scss b/css/modules/_followingNotes.scss similarity index 53% rename from css/modules/_notes.scss rename to css/modules/_followingNotes.scss index 49ac2e9..6ea7f26 100644 --- a/css/modules/_notes.scss +++ b/css/modules/_followingNotes.scss @@ -1,27 +1,9 @@ -.pagedjs_page_content{ - position: relative; -} - - -.container-note{ - padding-left: calc(var(--unit)*2); -} - -.page-with-h1 .before-h1, -.container-note-first{ - position: absolute; - top: 0; - left: 0; - -} - -.body-note{ - display: block; - - font-family: var(--font-sans); +.container-following-note{ + font-family: var(--font-sans); font-size: var(--fs-small); line-height: calc(var(--baseline)*0.75); - + position: relative; + margin-top: 2px; // margin-top: calc(var(--baseline)*0.25); hyphens: auto; @@ -30,21 +12,24 @@ hyphenate-limit-zone: 8%; word-spacing: -0.004em; text-align: justify; + // color: #999; } -.note_marker{ - font-weight: bold; +.body_note{ + // padding-left: calc(var(--indent)*1); + // position: relative; } +.following-note_marker::after{ + content: ". " +} - -.note_call{ - - font-family: var(--font-sans); +.following-note_call{ + font-family: var(--font-sans); font-size: var(--fs-small); - font-weight: normal; line-height: 1; position: relative; top: -4px; } + diff --git a/css/modules/_footnotes.scss b/css/modules/_footnotes.scss new file mode 100644 index 0000000..c11c056 --- /dev/null +++ b/css/modules/_footnotes.scss @@ -0,0 +1,54 @@ +// INUTILE + + +@page { + @footnote { + float: bottom; + footnote-policy: auto; + } + } + + .pagedjs_footnote_content{ + padding-top: calc(var(--baseline)*1); + } + +.inline-note { + float: footnote; + footnote-policy: auto; + font-size: var(--fs-small); + line-height: calc(var(--baseline)*0.8); + padding-left: var(--indent); + position: relative; + font-weight: 600; + + &::marker{ + display: none; + content: ""; + } + +} + + +[data-counter-note]{ +&::before{ + content: attr(data-counter-note) "."; + position: absolute; + left: 0px; + } +} + +.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 25c8279..6299012 100644 --- a/css/modules/_layout.scss +++ b/css/modules/_layout.scss @@ -1,23 +1,13 @@ $width: 176mm; $height: 240mm; -$top: 10mm; -$bottom: 19mm; -$inside: 20mm; -$outside: 14mm; +$top: 6mm; +$bottom: 20mm; +$inside: 12mm; +$outside: 6mm; $content-h: calc($height - $top - $bottom - 1mm); $content-w: calc($width - $inside - $outside); $gap: 4mm; $indent: 10mm; -$unit: calc($content-w/7); - -:root{ - // --content-w: #{$content-w}; - --unit: calc(#{$content-w}/7); - // --unit: 80px; - --margin-box: -13px; -} - - @media print { @@ -25,31 +15,30 @@ $unit: calc($content-w/7); size: $width $height; margin-top: $top; margin-bottom: $bottom; - bleed: 6mm; - marks: crop; + + // bleed: 6mm; + // marks: crop; } @page:left { margin-left: $outside; margin-right: $inside; + // background-image: url("/images/layout-2_3.png"); + // background-size: 100% 100%; + + @bottom-left { content: counter(page); font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: left; width: $indent; - position: relative; - top: var(--margin-box); } @bottom-center { content: "Höchstpersönlichkeit"; font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: left; - position: relative; - top: var(--margin-box); } } @@ -57,48 +46,31 @@ $unit: calc($content-w/7); margin-left: $inside; margin-right: $outside; - // background-image: url('/images/layout-1_2.png'); - // background-size: 100% 100%; - @bottom-left { content: string(chapterCount); font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: left; - width: calc(var(--unit)*3); - padding-left: calc(var(--unit)*2); - position: relative; - top: var(--margin-box); + width: $indent; } @bottom-center { content: string(chapter); font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: left; - position: relative; - top: var(--margin-box); - width: calc(var(--unit)*3.5); } @bottom-right { content: counter(page); font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: right; - position: relative; - top: var(--margin-box); } } - - - - @page chapter:first { + @page:first { @top-left-corner { content: none; } @top-left { content: none; } @top-center { content: none; } @@ -135,12 +107,54 @@ $unit: calc($content-w/7); @bottom-right-corner { content: none; } } + @page chapter { + margin-left: $outside; + margin-right: $outside; + @top-left-corner { content: none; } + @top-left { content: none; } + @top-center { content: none; } + @top-right { content: none; } + @top-right-corner { content: none; } + @left-top { content: none; } + @left-middle { content: none; } + @left-bottom { content: none; } + @right-top { content: none; } + @right-middle { content: none; } + @right-bottom { content: none; } + @bottom-left-corner { content: none; } + @bottom-left { content: none; } + @bottom-center { content: none; } + @bottom-right { content: none; } + @bottom-right-corner { content: none; } + } +} + + +#section__content{ + break-before: right; } +.page-break{ + break-before: page; +} +#section__content{ + columns: 2; + column-gap: $gap; + column-fill: auto; +} + + +// Title chapter + +#section__content h1{ + break-before: left; + break-after: page; + page: chapter; +} #section__content h1 .h1-count{ string-set: chapterCount content(text); } @@ -150,9 +164,3 @@ $unit: calc($content-w/7); } -.chapter{ - page: chapter; - break-before: page; -} - - diff --git a/css/modules/_num-paragraph.scss b/css/modules/_num-paragraph.scss index 532f0f3..ced281e 100644 --- a/css/modules/_num-paragraph.scss +++ b/css/modules/_num-paragraph.scss @@ -4,24 +4,30 @@ ol[type="1"]{ list-style-type: none; + position: relative; break-after: avoid; + width: $indent; position: absolute; - left: calc(var(--unit)*1); - display: block; - font-size: var(--fs-small); - opacity: 0.5; - // &::after{ - // content: attr(start)!important; - // display: block; - // font-size: var(--fs-small); - // opacity: 0.5; - // } + // display: flex; + // align-items: center; + // justify-content: center; + + &::after{ + content: attr(start); + display: block; + // position: absolute; + font-size: var(--fs-small); + opacity: 0.5; + } } -.intro ol[type="1"]{ - left: 0px; +ol[type="1"].ol-clone{ + break-before: column; + break-after: avoid; + top: 0; + left: calc($content-w/2 + $gap/2) } diff --git a/css/modules/_text.scss b/css/modules/_text.scss index aef723d..881e549 100644 --- a/css/modules/_text.scss +++ b/css/modules/_text.scss @@ -22,12 +22,8 @@ p{ text-align: justify; orphans: 2; widows: 2; - - position: relative; - top: -2px; - - - padding-left: calc(var(--unit)*2); + margin-left: $indent; + // padding-left: $indent*0.2; } p, li{ @@ -51,16 +47,19 @@ p, li{ blockquote{ - // font-family: var(--font-quote); - border-left: 0.5px solid black; - margin-left: calc(var(--unit)*2); - + font-family: var(--font-quote); } -blockquote p{ - padding-left: 2mm; -} +// blockquote u{ +// text-decoration: none; +// text-transform: uppercase; +// font-size: var(--fs-small); +// color: red; +// } +// u{ +// color: red; +// } ul{ @@ -69,65 +68,21 @@ ul{ - - -// ol, p, h4, h5, h6{ -// display: none; -// } - - -// THESE -------------------------------------------------- - - -.thesis{ - break-inside: avoid; -} -.thesis-title{ - width: 100%; - display: flex; - gap: 1ch; - - -} - - -.thesis-line{ - width: 100%; - height: 8px; - background-color: black; - position: relative; - top: 3px; -} -.thesis-title p{ - flex-shrink: 0; - text-transform: uppercase; +.p-these{ font-weight: 500; - font-size: 0.9em; - letter-spacing: 0.01rem; -} -.thesis p{ - display: block; -} - - -.thesis + .thesis{ - margin-top: calc(var(--baseline)*1); -} - - -// INTRO -------------------------------------------------- - - -.has-intro-1-paragraph .intro, -.has-intro .intro{ - break-after: right; -} -.intro{ - - p{ - font-size: var(--fs-intro); - padding-left: calc(var(--unit)*1); - line-height: 23px; - display: block; + margin-bottom: calc(var(--baseline)*0.5); + strong{ + text-transform: uppercase; + display: inline-block; + min-width: $indent*2; + font-weight: bold; + font-size: var(--fs-small); + letter-spacing: 0.05rem; } + } + +.p-these-last{ + margin-bottom: calc(var(--baseline)*1); +} + diff --git a/css/modules/_titles.scss b/css/modules/_titles.scss index c693bcd..a6ee217 100644 --- a/css/modules/_titles.scss +++ b/css/modules/_titles.scss @@ -1,30 +1,17 @@ #section__content{ + // margin-left: 28mm; + - - h1{ - .h1-count::after{ - content: "." - } - - .h1-count{ - margin-bottom: 1em; - } - - min-height: $content-h; - display: flex; - flex-direction: column; - justify-content: space-between; - - &[data-split-from]{ - color: red; - position: absolute; - } + + column-span: all; + height: $content-h; } + h2, h3, h4, h5, h6 { &::before{ content: attr(data-counter) ". "; @@ -80,7 +67,19 @@ font-size: 105px; line-height: 0.9; hyphens: auto; - hyphenate-limit-chars: 12 4 3; + hyphenate-limit-chars: 8 4 3; + + break-inside: avoid; + + + display: flex; + flex-direction: column; + justify-content: space-between; + text-align: center; + + text-wrap: balance; + + span{ @@ -97,67 +96,60 @@ font-size: 22px; font-weight: 200; text-transform: uppercase; - text-align: left; + text-align: center; line-height: calc(var(--baseline)*1.4); - margin-top: 6mm; - padding-bottom: 6mm; + margin-top: 4mm; + padding-bottom: calc(var(--baseline)*0.5); hyphens: auto; - margin-left: calc(var(--unit)*1); - padding-left: calc(var(--unit)*0.5); - position: relative; - max-width: calc(var(--unit)*5); - text-wrap: balance; - // background-color: red; + + // color: red; &::before{ display: block; - position: absolute; - left: 0; } + // &::after{ + // content: ''; + // display: block; + // width: 100%; + // border-bottom: 1px solid currentColor; + // position: relative; + // top: calc(var(--baseline)*-2.5); + // opacity: 0.2; + // } } h3{ - font-weight: 500; - font-size: var(--fs-medium); - line-height: 1.1; - padding-left: calc(var(--unit)*1); - margin-left: calc(var(--unit)*2); - padding-left: calc(var(--unit)*0.5); + font-weight: normal; + font-size: 16px; + line-height: calc(var(--baseline)*1); position: relative; - margin-top: 6mm; - padding-bottom: 6mm; - margin-right: 8mm; + margin-top: 4mm; + padding-bottom: 2mm; + padding-left: $indent*1.5; + text-align: left; &::before{ - display: block; - position: absolute; - left: 0; + display: block; + position: absolute; + left: $indent; } } h4{ - font-weight: normal; + font-weight: 500; font-size: 1em; - line-height: var(--baseline); + line-height: calc(var(--baseline)*0.75); position: relative; - margin-top: 6mm; - padding-bottom: 6mm; - margin-right: 20mm; - text-decoration: 0.5px underline; - text-underline-offset: 3px; - margin-left: calc(var(--unit)*2); - padding-left: calc(var(--unit)*0.5); - - + margin-top: calc(var(--baseline)*1); + padding-bottom: calc(var(--baseline)*0.5); + padding-left: $indent*1.5; &::before{ display: block; position: absolute; - left: 0; - // left: calc(var(--unit)*1); - text-decoration: none; + left: $indent; } } @@ -165,14 +157,13 @@ h5{ font-weight: normal; font-size: 1em; - line-height: calc(var(--baseline)*1); + line-height: calc(var(--baseline)*0.75); position: relative; - top: -2px; margin-top: calc(var(--baseline)*1); - margin-left: calc(var(--unit)*3); - padding-left: calc(var(--unit)*0.5); - + padding-bottom: calc(var(--baseline)*0.25); + padding-left: $indent; + text-indent: $indent; &::before{ display: block; position: absolute; @@ -183,17 +174,16 @@ h6{ font-weight: normal; font-size: 1em; - line-height: calc(var(--baseline)*1); + line-height: calc(var(--baseline)*0.75); + position: relative; margin-top: calc(var(--baseline)*1); - margin-left: calc(var(--unit)*2); - // padding-left: calc(var(--unit)*0.5); - // color: red; - position: relative; - top: -2px; + padding-left: $indent; + + text-indent: $indent; &::before{ - // display: block; - // position: absolute; - // left: 0; + display: block; + position: absolute; + left: 0; } } @@ -203,9 +193,7 @@ } -[data-id="section__content"] > .chapter h2:first-child, -[data-id="section__content"] > .chapter h3:first-child, -[data-id="section__content"] > .chapter h4:first-child { +[data-id="section__content"][data-split-from] > :first-child { margin-top: 0; } diff --git a/css/modules/_var.scss b/css/modules/_var.scss index 68a281f..0007669 100644 --- a/css/modules/_var.scss +++ b/css/modules/_var.scss @@ -4,12 +4,10 @@ --font-quote: 'Louize', sans-serif; --font-sans: 'Basis Grotesque Pro', sans-serif; --font-size: 12px; - --fs-medium: 15px; --fs-small: 9.8px; - --fs-intro: 16.5px; --baseline: 18px; --indent: 26px; - --fs-num: 11px; + --fs-num: 12px; } diff --git a/css/style.css b/css/style.css index 70b2136..3627f5f 100644 --- a/css/style.css +++ b/css/style.css @@ -5,12 +5,10 @@ --font-quote: 'Louize', sans-serif; --font-sans: 'Basis Grotesque Pro', sans-serif; --font-size: 12px; - --fs-medium: 15px; --fs-small: 9.8px; - --fs-intro: 16.5px; --baseline: 18px; --indent: 26px; - --fs-num: 11px; + --fs-num: 12px; } * { @@ -33,77 +31,53 @@ body { line-height: var(--baseline); } -:root { - --unit: calc(142mm/7); - --margin-box: -13px; -} - @media print { @page { size: 176mm 240mm; - margin-top: 10mm; - margin-bottom: 19mm; - bleed: 6mm; - marks: crop; + margin-top: 6mm; + margin-bottom: 20mm; } @page :left { - margin-left: 14mm; - margin-right: 20mm; + margin-left: 6mm; + margin-right: 12mm; @bottom-left { content: counter(page); font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: left; width: 10mm; - position: relative; - top: var(--margin-box); } @bottom-center { content: "Höchstpersönlichkeit"; font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: left; - position: relative; - top: var(--margin-box); } } @page :right { - margin-left: 20mm; - margin-right: 14mm; + margin-left: 12mm; + margin-right: 6mm; @bottom-left { content: string(chapterCount); font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: left; - width: calc(var(--unit) * 3); - padding-left: calc(var(--unit) * 2); - position: relative; - top: var(--margin-box); + width: 10mm; } @bottom-center { content: string(chapter); font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: left; - position: relative; - top: var(--margin-box); - width: calc(var(--unit) * 3.5); } @bottom-right { content: counter(page); font-family: var(--font-sans); font-size: var(--fs-num); - font-weight: 500; text-align: right; - position: relative; - top: var(--margin-box); } } - @page chapter:first { + @page :first { @top-left-corner { content: none; } @@ -203,7 +177,86 @@ body { content: none; } } + @page chapter { + margin-left: 6mm; + margin-right: 6mm; + @top-left-corner { + content: none; + } + @top-left { + content: none; + } + @top-center { + content: none; + } + @top-right { + content: none; + } + @top-right-corner { + content: none; + } + @left-top { + content: none; + } + @left-middle { + content: none; + } + @left-bottom { + content: none; + } + @right-top { + content: none; + } + @right-middle { + content: none; + } + @right-bottom { + content: none; + } + @bottom-left-corner { + content: none; + } + @bottom-left { + content: none; + } + @bottom-center { + content: none; + } + @bottom-right { + content: none; + } + @bottom-right-corner { + content: none; + } + } } +#section__content { + -moz-column-break-before: right; + break-before: right; +} + +.page-break { + -moz-column-break-before: page; + break-before: page; +} + +#section__content { + -moz-columns: 2; + columns: 2; + -moz-column-gap: 4mm; + column-gap: 4mm; + -moz-column-fill: auto; + column-fill: auto; +} + +#section__content h1 { + -moz-column-break-before: left; + break-before: left; + -moz-column-break-after: page; + break-after: page; + page: chapter; +} + #section__content h1 .h1-count { string-set: chapterCount content(text); } @@ -212,12 +265,6 @@ body { string-set: chapter content(text); } -.chapter { - page: chapter; - -moz-column-break-before: page; - break-before: page; -} - sup { line-height: 0; } @@ -240,9 +287,7 @@ p { text-align: justify; orphans: 2; widows: 2; - position: relative; - top: -2px; - padding-left: calc(var(--unit) * 2); + margin-left: 10mm; } p, li { @@ -260,64 +305,28 @@ p, li { } blockquote { - border-left: 0.5px solid black; - margin-left: calc(var(--unit) * 2); -} - -blockquote p { - padding-left: 2mm; + font-family: var(--font-quote); } ul { color: red; } -.thesis { - -moz-column-break-inside: avoid; - break-inside: avoid; -} - -.thesis-title { - width: 100%; - display: flex; - gap: 1ch; -} - -.thesis-line { - width: 100%; - height: 8px; - background-color: black; - position: relative; - top: 3px; -} - -.thesis-title p { - flex-shrink: 0; - text-transform: uppercase; +.p-these { font-weight: 500; - font-size: 0.9em; - letter-spacing: 0.01rem; + margin-bottom: calc(var(--baseline) * 0.5); +} +.p-these strong { + text-transform: uppercase; + display: inline-block; + min-width: 20mm; + font-weight: bold; + font-size: var(--fs-small); + letter-spacing: 0.05rem; } -.thesis p { - display: block; -} - -.thesis + .thesis { - margin-top: calc(var(--baseline) * 1); -} - -.has-intro-1-paragraph .intro, -.has-intro .intro { - -moz-column-break-after: right; - break-after: right; -} - -.intro p { - font-size: var(--fs-intro); - padding-left: calc(var(--unit) * 1); - line-height: 23px; - display: block; +.p-these-last { + margin-bottom: calc(var(--baseline) * 1); } [data-id=section__content] { @@ -326,34 +335,32 @@ ul { ol[type="1"] { list-style-type: none; + position: relative; -moz-column-break-after: avoid; break-after: avoid; + width: 10mm; position: absolute; - left: calc(var(--unit) * 1); +} +ol[type="1"]::after { + content: attr(start); display: block; font-size: var(--fs-small); opacity: 0.5; } -.intro ol[type="1"] { - left: 0px; +ol[type="1"].ol-clone { + -moz-column-break-before: column; + break-before: column; + -moz-column-break-after: avoid; + break-after: avoid; + top: 0; + left: 81mm; } -#section__content h1 .h1-count::after { - content: "."; -} -#section__content h1 .h1-count { - margin-bottom: 1em; -} #section__content h1 { - min-height: 210mm; - display: flex; - flex-direction: column; - justify-content: space-between; -} -#section__content h1[data-split-from] { - color: red; - position: absolute; + -moz-column-span: all; + column-span: all; + height: 213mm; } #section__content h2::before, #section__content h3::before, #section__content h4::before, #section__content h5::before, #section__content h6::before { content: attr(data-counter) ". "; @@ -399,7 +406,14 @@ ol[type="1"] { font-size: 105px; line-height: 0.9; hyphens: auto; - hyphenate-limit-chars: 12 4 3; + hyphenate-limit-chars: 8 4 3; + -moz-column-break-inside: avoid; + break-inside: avoid; + display: flex; + flex-direction: column; + justify-content: space-between; + text-align: center; + text-wrap: balance; } #section__content h1 span { display: block; @@ -408,68 +422,53 @@ ol[type="1"] { font-size: 22px; font-weight: 200; text-transform: uppercase; - text-align: left; + text-align: center; line-height: calc(var(--baseline) * 1.4); - margin-top: 6mm; - padding-bottom: 6mm; + margin-top: 4mm; + padding-bottom: calc(var(--baseline) * 0.5); hyphens: auto; - margin-left: calc(var(--unit) * 1); - padding-left: calc(var(--unit) * 0.5); - position: relative; - max-width: calc(var(--unit) * 5); - text-wrap: balance; } #section__content h2::before { display: block; - position: absolute; - left: 0; } #section__content h3 { - font-weight: 500; - font-size: var(--fs-medium); - line-height: 1.1; - padding-left: calc(var(--unit) * 1); - margin-left: calc(var(--unit) * 2); - padding-left: calc(var(--unit) * 0.5); + font-weight: normal; + font-size: 16px; + line-height: calc(var(--baseline) * 1); position: relative; - margin-top: 6mm; - padding-bottom: 6mm; - margin-right: 8mm; + margin-top: 4mm; + padding-bottom: 2mm; + padding-left: 15mm; + text-align: left; } #section__content h3::before { display: block; position: absolute; - left: 0; + left: 10mm; } #section__content h4 { - font-weight: normal; + font-weight: 500; font-size: 1em; - line-height: var(--baseline); + line-height: calc(var(--baseline) * 0.75); position: relative; - margin-top: 6mm; - padding-bottom: 6mm; - margin-right: 20mm; - -webkit-text-decoration: 0.5px underline; - text-decoration: 0.5px underline; - text-underline-offset: 3px; - margin-left: calc(var(--unit) * 2); - padding-left: calc(var(--unit) * 0.5); + margin-top: calc(var(--baseline) * 1); + padding-bottom: calc(var(--baseline) * 0.5); + padding-left: 15mm; } #section__content h4::before { display: block; position: absolute; - left: 0; - text-decoration: none; + left: 10mm; } #section__content h5 { font-weight: normal; font-size: 1em; - line-height: calc(var(--baseline) * 1); + line-height: calc(var(--baseline) * 0.75); position: relative; - top: -2px; margin-top: calc(var(--baseline) * 1); - margin-left: calc(var(--unit) * 3); - padding-left: calc(var(--unit) * 0.5); + padding-bottom: calc(var(--baseline) * 0.25); + padding-left: 10mm; + text-indent: 10mm; } #section__content h5::before { display: block; @@ -479,15 +478,19 @@ ol[type="1"] { #section__content h6 { font-weight: normal; font-size: 1em; - line-height: calc(var(--baseline) * 1); - margin-top: calc(var(--baseline) * 1); - margin-left: calc(var(--unit) * 2); + line-height: calc(var(--baseline) * 0.75); position: relative; - top: -2px; + margin-top: calc(var(--baseline) * 1); + padding-left: 10mm; + text-indent: 10mm; } -[data-id=section__content] > .chapter h2:first-child, -[data-id=section__content] > .chapter h3:first-child, -[data-id=section__content] > .chapter h4:first-child { +#section__content h6::before { + display: block; + position: absolute; + left: 0; +} + +[data-id=section__content][data-split-from] > :first-child { margin-top: 0; } @@ -496,26 +499,12 @@ ol[type="1"] { color: red; } -.pagedjs_page_content { - position: relative; -} - -.container-note { - padding-left: calc(var(--unit) * 2); -} - -.page-with-h1 .before-h1, -.container-note-first { - position: absolute; - top: 0; - left: 0; -} - -.body-note { - display: block; +.container-following-note { font-family: var(--font-sans); font-size: var(--fs-small); line-height: calc(var(--baseline) * 0.75); + position: relative; + margin-top: 2px; hyphens: auto; hyphenate-limit-chars: 7 3 4; hyphenate-limit-lines: 2; @@ -524,14 +513,13 @@ ol[type="1"] { text-align: justify; } -.note_marker { - font-weight: bold; +.following-note_marker::after { + content: ". "; } -.note_call { +.following-note_call { font-family: var(--font-sans); font-size: var(--fs-small); - font-weight: normal; line-height: 1; position: relative; top: -4px; diff --git a/css/style.css.map b/css/style.css.map index 3a733d2..5f685c9 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/_num-paragraph.scss","modules/_titles.scss","modules/_list-of-abbr.scss","modules/_notes.scss","modules/_toc.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACAhB;EACI,4BAAA;EACA,kCAAA;EACA,kCAAA;EACA,8CAAA;EACA,iBAAA;EACA,iBAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;EACA,cAAA;EACA,cAAA;ADEJ;;AEbA;EACI,SAAA;EACA,UAAA;EACA,sBAAA;AFgBJ;;AEdA;EACI,mBAAA;AFiBJ;;AEdA;EACI,mCAAA,EAAA,wBAAA;EACA,kCAAA,EAAA,kBAAA;EAEA,kCAAA,EAAA,6CAAA;EACA,+BAAA,EAAA,mDAAA;EAEA,wBAAA;EACA,2BAAA;EACA,4BAAA;AFeJ;;AGrBA;EAEI,qBAAA;EAEA,mBAAA;AHsBJ;;AGhBA;EACI;IACI,iBAAA;IACA,gBAvBF;IAwBE,mBAvBC;IAwBD,UAAA;IACA,WAAA;EHmBN;EGjBE;IACI,iBA1BE;IA2BF,kBA5BC;IA8BD;MACI,sBAAA;MACA,6BAAA;MACA,wBAAA;MACA,gBAAA;MACA,gBAAA;MACC,WA/BJ;MAgCK,kBAAA;MACD,sBAAA;IHkBT;IGhBM;MACE,+BAAA;MACA,6BAAA;MACA,wBAAA;MACC,gBAAA;MACD,gBAAA;MACC,kBAAA;MACA,sBAAA;IHkBT;EACF;EGfE;IACI,iBApDC;IAqDD,kBApDE;IAyDF;MACI,6BAAA;MACE,6BAAA;MACD,wBAAA;MAC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hSQ;EACI,cAAA;EACA,kBAAA;EACA,OAAA;ANkSZ;AM9RI;EACI,mBAAA;EACA,cAAA;EACA,sCAAA;EACA,qCAAA;EACJ,kCAAA;EAGK,kBAAA;EACA,SAAA;AN8RT;AMhRA;;;EAGQ,aAAA;ANkRR;;AOleA;EACI,aAAA;EACA,UAAA;APqeJ;;AQveA;EACI,kBAAA;AR0eJ;;AQteA;EACI,mCAAA;ARyeJ;;AQteA;;EAEI,kBAAA;EACA,MAAA;EACA,OAAA;ARyeJ;;AQreA;EACI,cAAA;EAEG,6BAAA;EACH,0BAAA;EACA,yCAAA;EAIA,aAAA;EACA,4BAAA;EACA,wBAAA;EACA,wBAAA;EACA,sBAAA;EACA,mBAAA;ARoeJ;;AQheA;EACI,iBAAA;ARmeJ;;AQ9dA;EAEC,6BAAA;EACG,0BAAA;EACA,mBAAA;EACA,cAAA;EACA,kBAAA;EACA,SAAA;ARgeJ;;AShhBA;EAEI,8BAAA;OAAA,kBAAA;EACA,6BAAA;OAAA,iBAAA;ATkhBJ;AS/gBI;EACI,qBAAA;EACA,YAAA;ATihBR;AS9gBI;EACO,qCAAA;EACH,0CAAA;EACA,iBAAA;EACA,gBAAA;ATghBR;AS7gBI;EACI,iBAAA;EACQ,uCAAA;EACR,0CAAA;AT+gBR;AS5gBI;EACI,gBAAA;AT8gBR;AS1gBK;EACG,iBAAA;AT4gBR;ASxgBM;EACE,iBAAA;AT0gBR;AStgBM;EACE,iBAAA;ATwgBR","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/_num-paragraph.scss","modules/_titles.scss","modules/_list-of-abbr.scss","modules/_followingNotes.scss","modules/_toc.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACAhB;EACI,4BAAA;EACA,kCAAA;EACA,kCAAA;EACA,8CAAA;EACA,iBAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,cAAA;ADEJ;;AEXA;EACI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AA,kBAAA;EACA,6BAAA;OAAA,iBAAA;AT+fJ;AS5fI;EACI,qBAAA;EACA,YAAA;AT8fR;AS3fI;EACO,qCAAA;EACH,0CAAA;EACA,iBAAA;EACA,gBAAA;AT6fR;AS1fI;EACI,iBAAA;EACQ,uCAAA;EACR,0CAAA;AT4fR;ASzfI;EACI,gBAAA;AT2fR;ASvfK;EACG,iBAAA;ATyfR;ASrfM;EACE,iBAAA;ATufR;ASnfM;EACE,iBAAA;ATqfR","file":"style.css"} \ No newline at end of file diff --git a/css/style.scss b/css/style.scss index 43dd27e..b58c8fc 100644 --- a/css/style.scss +++ b/css/style.scss @@ -6,7 +6,5 @@ @import 'modules/num-paragraph'; @import 'modules/titles'; @import 'modules/list-of-abbr'; -@import 'modules/notes'; - -// @import 'modules/followingNotes'; +@import 'modules/followingNotes'; @import 'modules/toc'; \ No newline at end of file diff --git a/csspageweaver/manifest.json b/csspageweaver/manifest.json index 5fb973f..0a6d450 100644 --- a/csspageweaver/manifest.json +++ b/csspageweaver/manifest.json @@ -1,10 +1,11 @@ { "plugins": [ "baseline", - "gridColumn", + "grid", "marginBox", "imposition","spread","previewPage","reloadInPlace", - "inlineNotes", + "inlineNotes", + "followingNotes", "tableOfContent" ], "pluginsParameters":{}, @@ -17,15 +18,20 @@ "containerNotes": "#footnotes", "newClass": "inline-note" }, + "followingNotes": { + "selector": ".inline-note", + "reset": ".chapter" + }, "tableOfContent": { "tocContainer": "#toc_container", "tocTitles": ["#section__content h1", "#section__content h2", "h3", "h4", "h5", "h6"] } }, "hook": [ - "/js/beforeAll.js", "/js/counters.js", - "/js/addPagesNotes.js" + "/js/these.js", + "/js/snapToBaseline.js", + "/js/numParagraph.js" ] } diff --git a/csspageweaver/plugins/gridColumn/.gitignore b/csspageweaver/plugins/followingNotes/.gitignore similarity index 100% rename from csspageweaver/plugins/gridColumn/.gitignore rename to csspageweaver/plugins/followingNotes/.gitignore diff --git a/csspageweaver/plugins/followingNotes/config.json b/csspageweaver/plugins/followingNotes/config.json new file mode 100644 index 0000000..bc66d35 --- /dev/null +++ b/csspageweaver/plugins/followingNotes/config.json @@ -0,0 +1,8 @@ +{ + "name": "FollowingNotes", + "description": "Create followingNotes with call & markers", + "author": ["Julie Blanc"], + "licence": "MIT", + "version": "1.0", + "hook": "followingNotes.js" +} diff --git a/csspageweaver/plugins/followingNotes/followingNotes.js b/csspageweaver/plugins/followingNotes/followingNotes.js new file mode 100644 index 0000000..0a9f45b --- /dev/null +++ b/csspageweaver/plugins/followingNotes/followingNotes.js @@ -0,0 +1,244 @@ +/** + * @name FollowingNotes + * @author Julie Blanc + * @see { @link https://gitlab.com/csspageweaver/plugins/followingNotes/ } + */ + +import { Handler } from '/csspageweaver/lib/paged.esm.js'; + +export default class followingNotes extends Handler { + + constructor(chunker, polisher, caller) { + super(chunker, polisher, caller); + this.parameters = cssPageWeaver.features.followingNotes.parameters; + this.notesClass = this.parameters?.selector || ".inline-note"; + this.newNotesClass = this.parameters?.newNotesClass || "following-note"; + this.reset = this.parameters?.reset; + this.align = this.parameters?.align; + this.followingNoteOverflow = new Set(); + } + + beforeParsed(content) { + + let newNotesClass = this.newNotesClass; + resetCounter(content, this.reset, this.notesClass); + createCallandMarker(content, this.notesClass, newNotesClass); + + + const containerMap = new Map(); + + let notes = content.querySelectorAll(this.notesClass); + notes.forEach(function (note) { + let paragraph = note.closest("p"); + if (!paragraph) return; + + // Remonter au niveau direct de #section__content (ignorer blockquote et autres conteneurs) + const sectionContent = note.closest('#section__content') || content; + let topLevel = paragraph; + while (topLevel.parentElement && topLevel.parentElement !== sectionContent) { + topLevel = topLevel.parentElement; + } + + // Find next boundary: heading or ol[type="1"], au niveau de #section__content + let boundary = null; + let sibling = topLevel.nextElementSibling; + while (sibling) { + if (sibling.matches('h1, h2, h3, h4, h5, h6, ol[type="1"]')) { + boundary = sibling; + break; + } + sibling = sibling.nextElementSibling; + } + + const mapKey = boundary || sectionContent; + + if (!containerMap.has(mapKey)) { + let container = document.createElement("div"); + container.classList.add("container-following-note"); + if (boundary) { + boundary.before(container); + } else { + sectionContent.appendChild(container); + } + containerMap.set(mapKey, container); + } + + containerMap.get(mapKey).appendChild(note); + }); + + + } + + + +} + + + + +/// FUNCTIONS ----------------------------------------------------- + + +// RESET COUNTER + +function resetCounter(content, reset, notesClass){ + + if(reset && reset != ""){ + const elements = content.querySelectorAll(reset + ", " + notesClass); + let resetEligible = false; + elements.forEach(element => { + if (element.matches(reset)) { + resetEligible = true; + } else if (resetEligible && element.matches(notesClass)) { + element.dataset.resetCounterFollowingNote = true; + resetEligible = false; + } + }); + } + +} + + +// CALL & MARKER +function createCallandMarker(content, notesClass, newNotesClass){ + + let notes = content.querySelectorAll(notesClass); + let resetNum = 0; + + notes.forEach(function (note, index) { + + if (note.dataset.resetCounterFollowingNote === "true") { + resetNum = index; + } + let num = index + 1 - resetNum; + + note.classList.add(newNotesClass); + note.dataset.counterNote = num; + + // call + let ref_note = document.createElement('span'); + ref_note.className = newNotesClass + "_call"; + ref_note.dataset.counterNote = num; + ref_note.innerHTML = num; + + // wrap preceding word + call in .wrapper__note-call + let wrapper = document.createElement('span'); + wrapper.className = 'wrapper__note-call'; + + let prevSibling = note.previousSibling; + if (prevSibling && prevSibling.nodeType === Node.TEXT_NODE) { + let text = prevSibling.textContent; + let m = text.match(/^([\s\S]*\s)(\S+\s*)$/); + if (m) { + let before = m[1]; + let extracted = m[2]; + + // Si le dernier mot extrait est uniquement », prendre aussi le mot d'avant + if (/^»\s*$/.test(extracted)) { + let m2 = before.trimEnd().match(/^([\s\S]*\s|)(\S+)$/); + if (m2) { + let spaceBetween = before.slice(m2[1].length + m2[2].length); + before = m2[1]; + extracted = m2[2] + spaceBetween + extracted; + } + } + + prevSibling.textContent = before; + wrapper.appendChild(document.createTextNode(extracted)); + } else { + prevSibling.textContent = ''; + wrapper.appendChild(document.createTextNode(text)); + } + } + + wrapper.appendChild(ref_note); + note.after(wrapper); + + // marker + content note wrapped in body_note + let marker_note = document.createElement('span'); + marker_note.className = newNotesClass + "_marker"; + //marker_note.innerHTML = num + ". "; + marker_note.innerHTML = num; + + let body_note = document.createElement('div'); + body_note.className = 'body_note'; + while (note.firstChild) { + body_note.appendChild(note.firstChild); + } + body_note.prepend(marker_note); + note.appendChild(body_note); + + }); + + } + + + + +// MARGINS + +function marginNoteTop(elem) { + let marginTop = parseInt(window.getComputedStyle(elem).marginTop, 10) + return marginTop; +} + +function marginNoteBottom(elem) { + let marginBottom = parseInt(window.getComputedStyle(elem).marginBottom, 10) + return marginBottom; +} + +function biggestMargin(a, b) { + let margin; + let marginBottom = marginNoteBottom(a); + let marginTop = marginNoteTop(b); + if (marginBottom > marginTop) { + margin = marginBottom; + } else { + margin = marginTop; + } + return margin; +} + + + +function checkOverflownote(notesClass, pageElement, maxHeight, arrayOverflow, container) { + let notes = pageElement.querySelectorAll(notesClass); + + let notesHeightAll = []; + + for (let n = 0; n < notes.length; ++n) { + + // Add height of the notes to array notesHeightAll + let noteHeight = notes[n].offsetHeight; + notesHeightAll.push(noteHeight); + // Add margins of the notes to array notesHeightAll + if (n >= 1) { + let margins = biggestMargin(notes[n - 1], notes[n]); + notesHeightAll.push(margins); + } + } + + // If notes on page + if (notesHeightAll.length > 0) { + + // Calculate if all notes fit on the page; + let reducer = (accumulator, currentValue) => accumulator + currentValue; + let allHeight = notesHeightAll.reduce(reducer); + let paddingTop = getComputedStyle(container).paddingTop; + let paddingContainer = parseInt(paddingTop); + + let totalHeight = allHeight + paddingContainer; + + if (totalHeight > maxHeight) { + + let lastNote = notes[notes.length - 1]; + arrayOverflow.add(lastNote); + lastNote.remove(); + + checkOverflownote(notesClass, pageElement, maxHeight, arrayOverflow, container); + + } + + + } +} diff --git a/csspageweaver/plugins/grid/.gitignore b/csspageweaver/plugins/grid/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/csspageweaver/plugins/grid/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/csspageweaver/plugins/gridColumn/README.md b/csspageweaver/plugins/grid/README.md similarity index 100% rename from csspageweaver/plugins/gridColumn/README.md rename to csspageweaver/plugins/grid/README.md diff --git a/csspageweaver/plugins/grid/config.json b/csspageweaver/plugins/grid/config.json new file mode 100644 index 0000000..07871e3 --- /dev/null +++ b/csspageweaver/plugins/grid/config.json @@ -0,0 +1,14 @@ +{ + "name": "Grid", + "description": "", + "version": "1.0", + "ui": { + "title": "Squared grid", + "description": "This Toogle a squared grid", + "template": "template.html", + "toggle": true + }, + "stylesheet": "grid.css", + "script": "grid-ui.js", + "hook": "grid-hook.js" +} \ No newline at end of file diff --git a/csspageweaver/plugins/grid/grid-hook.js b/csspageweaver/plugins/grid/grid-hook.js new file mode 100644 index 0000000..5618bd5 --- /dev/null +++ b/csspageweaver/plugins/grid/grid-hook.js @@ -0,0 +1,17 @@ +/** + * @name Grid + * @author Julie Blanc + * @see { @link https://gitlab.com/csspageweaver/plugins/grid/ } + */ + +import { Handler } from '/csspageweaver/lib/paged.esm.js'; + +export default class GridPage extends Handler { + constructor(chunker, polisher, caller) { + super(chunker, polisher, caller); + } + + + + +} diff --git a/csspageweaver/plugins/grid/grid-ui.js b/csspageweaver/plugins/grid/grid-ui.js new file mode 100644 index 0000000..a9687ed --- /dev/null +++ b/csspageweaver/plugins/grid/grid-ui.js @@ -0,0 +1,115 @@ +/** + * @name Grid + * @author Julie Blanc + * @see { @link https://gitlab.com/csspageweaver/plugins/grid/ } + */ + + +export default function gridEvents(){ + let body = cssPageWeaver.ui.body; + let fileTitle = cssPageWeaver.docTitle; + let parameters = cssPageWeaver.features.grid.parameters || {}; + let isParametersSet = Object.keys(parameters).length > 0; + + let grid = {}; + + // valeur par défaut + grid.default = { + toggle: 'no-grid', + spacing: 56, + steps: 5, + positionX: 28, + positionY: 0 + }; + + grid.toggle = {}; + grid.toggle.input = cssPageWeaver.ui.grid.toggleInput; + grid.toggle.label = cssPageWeaver.ui.grid.toggleLabel; + + grid.spacing = {}; + grid.spacing.value = parameters.spacing || grid.default.spacing; + grid.spacing.input = document.querySelector('#spacing-grid'); + + grid.steps = {}; + grid.steps.value = parameters.steps || grid.default.steps; + grid.steps.input = document.querySelector('#steps-grid'); + + grid.positionX = {}; + grid.positionX.value = parameters.positionX || grid.default.positionX; + grid.positionX.input = document.querySelector('#position-x-grid'); + + grid.positionY = {}; + grid.positionY.value = parameters.positionY || grid.default.positionY; + grid.positionY.input = document.querySelector('#position-y-grid'); + + /* Récupération de la session précédente */ + grid.toggle.value = localStorage.getItem('gridToggle_' + fileTitle) || grid.default.toggle; + grid.spacing.value = localStorage.getItem('gridSpacing_' + fileTitle) || grid.spacing.value; + grid.steps.value = localStorage.getItem('gridSteps_' + fileTitle) || grid.steps.value; + grid.positionX.value = localStorage.getItem('gridPositionX_' + fileTitle) || grid.positionX.value; + grid.positionY.value = localStorage.getItem('gridPositionY_' + fileTitle) || grid.positionY.value; + + /* DOM edit */ + if(grid.toggle.value === "grid"){ + body.classList.add('grid'); // on indique qu'il y a la grille + grid.toggle.input.checked = true; + } else { + body.classList.remove('grid'); // grille désactivée + grid.toggle.input.checked = false; + } + + /* Set grid values on load */ + grid.spacing.input.value = grid.spacing.value; + document.documentElement.style.setProperty('--grid-spacing', grid.spacing.value + 'px'); + + grid.steps.input.value = grid.steps.value; + document.documentElement.style.setProperty('--steps', grid.steps.value); + + grid.positionX.input.value = grid.positionX.value; + document.documentElement.style.setProperty('--grid-position-x', grid.positionX.value + 'px'); + + grid.positionY.input.value = grid.positionY.value; + document.documentElement.style.setProperty('--grid-position-y', grid.positionY.value + 'px'); + + /* Event listeners */ + + /* Toggle event */ + grid.toggle.input.addEventListener("input", (e) => { + if(e.target.checked){ + body.classList.add('grid'); // grille activée + localStorage.setItem('gridToggle_' + fileTitle, 'grid'); + } else { + body.classList.remove('grid'); // grille désactivée + localStorage.setItem('gridToggle_' + fileTitle, 'no-grid'); + } + }); + + /* Change grid spacing on input */ + document.querySelector("#spacing-grid").addEventListener("input", (e) => { + grid.spacing.value = e.target.value; + document.documentElement.style.setProperty('--grid-spacing', grid.spacing.value + 'px'); + localStorage.setItem('gridSpacing_' + fileTitle, grid.spacing.value); + }); + + /* Change grid steps on input */ + document.querySelector("#steps-grid").addEventListener("input", (e) => { + grid.steps.value = e.target.value; + document.documentElement.style.setProperty('--steps', grid.steps.value); + localStorage.setItem('gridSteps_' + fileTitle, grid.steps.value); + }); + + /* Change grid position X on input */ + document.querySelector("#position-x-grid").addEventListener("input", (e) => { + grid.positionX.value = e.target.value; + document.documentElement.style.setProperty('--grid-position-x', grid.positionX.value + 'px'); + localStorage.setItem('gridPositionX_' + fileTitle, grid.positionX.value); + }); + + /* Change grid position Y on input */ + document.querySelector("#position-y-grid").addEventListener("input", (e) => { + grid.positionY.value = e.target.value; + document.documentElement.style.setProperty('--grid-position-y', grid.positionY.value + 'px'); + localStorage.setItem('gridPositionY_' + fileTitle, grid.positionY.value); + }); +} + diff --git a/csspageweaver/plugins/grid/grid.css b/csspageweaver/plugins/grid/grid.css new file mode 100644 index 0000000..8cd4dee --- /dev/null +++ b/csspageweaver/plugins/grid/grid.css @@ -0,0 +1,124 @@ +:root { + --grid-bold: #bfbfbf; + --grid-light: #efefef; + + --grid-spacing: 56px; + --steps: 5; + --grid-position-x: 28px; + --grid-position-y: 0px; + + --grid-subdivisions: calc(var(--grid-spacing)/var(--steps)); + +} + + +@media screen{ + + + + body.grid .pagedjs_sheet { + + + + z-index: -1; + + + background-image: + /* Traits bold */ + repeating-linear-gradient( + 90deg, + var(--grid-bold) 0 1px, + transparent 1px var(--grid-spacing) + ), + repeating-linear-gradient( + 0deg, + var(--grid-bold) 0 1px, + transparent 1px var(--grid-spacing) + ), + + /* Traits fins (3 traits → 4 carrés) */ + repeating-linear-gradient( + 90deg, + var(--grid-light) 0 1px, + transparent 1px var(--grid-subdivisions) + ), + repeating-linear-gradient( + 0deg, + var(--grid-light) 0 1px, + transparent 1px var(--grid-subdivisions) + ); + + background-position: + var(--grid-position-x) var(--grid-position-y), + var(--grid-position-x) var(--grid-position-y), + var(--grid-position-x) var(--grid-position-y), + var(--grid-position-x) var(--grid-position-y); + } + + + + + + + + .grid-page{ + --nbr-columns: 8; + width: var(--pagedjs-pagebox-width); + height: var(--pagedjs-pagebox-height); + position: absolute; + top: 0; + left: 0; + display: grid; + grid-template-columns: repeat(var(--nbr-columns), calc(100%/var(--nbr-columns))); + + box-shadow: 1px 0px 0px 0px var(--grid-color); + + --grid-color: magenta; + z-index: -1; + } + + .pagedjs_right_page .grid-page{ + padding-left: var(--pagedjs-margin-left); + padding-right: var(--pagedjs-margin-right); + } + + .pagedjs_left_page .grid-page{ + padding-left: var(--pagedjs-margin-left); + padding-right: var(--pagedjs-margin-right); + } + + + .grid-page .grid-column{ + box-shadow: 1px 0px 0px 0px var(--grid-color); + grid-row: 1/end; + width: 100%; + justify-self: right; + + + } + + .grid-column-0{ + grid-column: 1; + box-shadow: -1px 0px 0px 0px var(--grid-color)!important; + justify-self: left; + } + + .grid-column-1{ grid-column: 1; } + .grid-column-2{ grid-column: 2; } + .grid-column-3{ grid-column: 3; } + .grid-column-4{ grid-column: 4; } + .grid-column-5{ grid-column: 5; } + .grid-column-6{ grid-column: 6; } + .grid-column-7{ grid-column: 7; } + .grid-column-8{ grid-column: 8; } + .grid-column-9{ grid-column: 9; } + .grid-column-10{ grid-column: 10; } + .grid-column-11{ grid-column: 11; } + .grid-column-12{ grid-column: 12; } +} + +.no-grid .grid-page{ + display: none; +} + + diff --git a/csspageweaver/plugins/grid/template.html b/csspageweaver/plugins/grid/template.html new file mode 100644 index 0000000..8b7adcc --- /dev/null +++ b/csspageweaver/plugins/grid/template.html @@ -0,0 +1,16 @@ +
+ + +
+
+ + +
+
+ + +
+
+ + +
\ No newline at end of file diff --git a/csspageweaver/plugins/gridColumn/config.json b/csspageweaver/plugins/gridColumn/config.json deleted file mode 100644 index e67b7b0..0000000 --- a/csspageweaver/plugins/gridColumn/config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Column grid", - "description": "", - "version": "1.0", - "ui": { - "title": "Column grid", - "description": "This Toogle a column grid", - "template": "template.html", - "toggle": true - }, - "stylesheet": "grid.css", - "script": "grid-ui.js" -} \ No newline at end of file diff --git a/csspageweaver/plugins/gridColumn/grid-ui.js b/csspageweaver/plugins/gridColumn/grid-ui.js deleted file mode 100644 index df9983e..0000000 --- a/csspageweaver/plugins/gridColumn/grid-ui.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @name Grid - * @author Julie Blanc - * @see { @link https://gitlab.com/csspageweaver/plugins/grid/ } - */ - - -export default function gridEvents(id){ - let body = cssPageWeaver.ui.body; - let fileTitle = cssPageWeaver.docTitle; - let parameters = cssPageWeaver.features[id].parameters || {}; - let isParametersSet = Object.keys(parameters).length > 0; - - let grid = {}; - - // valeur par défaut - grid.default = { - steps: 7, - }; - - grid.toggle = {}; - grid.toggle.value = localStorage.getItem('gridColToggle_' + fileTitle) || 'no-grid-col'; - grid.toggle.input = document.querySelector(`#${id}-toggle`); - - grid.steps = {}; - grid.steps.value = parameters.steps || grid.default.steps; - grid.steps.input = document.querySelector('#steps-grid-col'); - - - /* Récupération de la session précédente si elle existe */ - - grid.steps.value = localStorage.getItem('gridColSteps_' + fileTitle) || grid.steps.value; - - grid.steps.input.value = grid.steps.value; - - - document.documentElement.style.setProperty('--grid-col-steps', grid.steps.value); - - - /* DOM edit */ - if(grid.toggle.value === "grid-col"){ - body.classList.add('grid-col'); // on indique qu'il y a la grille - grid.toggle.input.checked = true; - } else { - body.classList.remove('grid-col'); // grille désactivée - grid.toggle.input.checked = false; - } - - - - - /* Toggle event */ - grid.toggle.input.addEventListener("input", (e) => { - if(e.target.checked){ - body.classList.add('grid-col'); // grille activée - localStorage.setItem('gridColToggle_' + fileTitle, 'grid-col'); - } else { - body.classList.remove('grid-col'); // grille désactivée - localStorage.setItem('gridColToggle_' + fileTitle, 'no-grid-col'); - } - }); - - - /* Change grid steps on input */ - document.querySelector("#steps-grid-col").addEventListener("input", (e) => { - grid.steps.value = e.target.value; - document.documentElement.style.setProperty('--grid-col-steps', grid.steps.value); - localStorage.setItem('gridColSteps_' + fileTitle, grid.steps.value); - }); - - -} - diff --git a/csspageweaver/plugins/gridColumn/grid.css b/csspageweaver/plugins/gridColumn/grid.css deleted file mode 100644 index bcaf92d..0000000 --- a/csspageweaver/plugins/gridColumn/grid.css +++ /dev/null @@ -1,36 +0,0 @@ -:root { - --grid-col-color: #ee33d2; - --grid-light: #efefef; - - --grid-spacing: 56px; - --steps: 5; - --grid-position-x: 28px; - --grid-position-y: 0px; - - --grid-subdivisions: calc(var(--grid-spacing)/var(--steps)); - -} - - -@media screen{ - - - - body.grid-col .pagedjs_area { - - - - z-index: -1; - - box-shadow: 0px 0px 1px 0px var(--grid-col-color); - - background-image: repeating-linear-gradient(to right, var(--grid-col-color), var(--grid-col-color) 0.5px, transparent 0.5px, transparent); - background-size: calc(100%/var(--grid-col-steps)); - - } - - - -} - - diff --git a/csspageweaver/plugins/gridColumn/template.html b/csspageweaver/plugins/gridColumn/template.html deleted file mode 100644 index a19bd76..0000000 --- a/csspageweaver/plugins/gridColumn/template.html +++ /dev/null @@ -1,4 +0,0 @@ -
- - -
diff --git a/csspageweaver/plugins/inlineNotes/inlineNotes.js b/csspageweaver/plugins/inlineNotes/inlineNotes.js index 6b1e72c..a68bbe0 100644 --- a/csspageweaver/plugins/inlineNotes/inlineNotes.js +++ b/csspageweaver/plugins/inlineNotes/inlineNotes.js @@ -91,6 +91,7 @@ function createNotes(content, input, type){ inline_note.innerHTML = unwrapBlockChildren(note).innerHTML; call.after(inline_note); + call.parentElement.removeChild(call); }) diff --git a/index.html b/index.html index d0912c4..f0dfb33 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,6 @@ Höchstpersönlichkeit - @@ -47,6 +46,1154 @@ + + +
+

Abkürzungsverzeichnis

+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
A(.)L(.)R.Allgemeine(n/s) Landrecht
a. BGB.Allgemeines bürgerliches Gesetzbuch
a.A.anderer Ansicht
a.a.O.am angeführten Ort
a.E.am Ende
abl.ablehnend
Abs.Absatz
AcPArchiv für die civilistische Praxis
add.ad diem
AGGAllgemeines Gleichbehandlungsgesetz
AJPAktuelle Juristische Praxis
Aktiengesellsch.Aktiengesellschaft
allg.allgemeinen/Allgemeinen
Allg. Th.Allgemeine(r) Theil
AllgTAllgemeiner Teil
Anm.Anmerkung(en)
apr.april
apvactio praescriptis verbis
arg e contr.argumentum e contrario
ARSPArchiv für Rechts- und Sozialphilosophie
Art.Artikel(n)
art.article/articolo/artigo/artículo
ATAllgemeiner Teil
Aufl.Auflage
B(.)G(.)B(.)/BGb.Bürgerliche(s) Gesetzbuch
b(e)z(w).beziehungsweise
bayer. NotarGBayerisches Notariatsgesetz
Bd.Band
BeckOGKBeck Online Großkommentar
BeckOKBeck’sche Online-Kommentare
benef.beneficiis
besbesonders
Beschl.Beschluss
BeurkGBeurkundungsgesetz
BGBBBundesgesetz über das bäuerliche Bodenrecht vom 4. Oktober 1991 (SR +211.412)
BGEEntscheidungen des Schweizerischen Bundesgerichts
BGerBundesgericht
BGHBundesgerichtshof
BGHZAmtliche Sammlung der Entscheidungen des BGH in Zivilsachen
BKBerner Kommentar
BlZür.Blätter für Zürcherische Rechtsprechung
BSKBasler Kommentar
bspw.beispielsweise
BVBundesverfassung der Schweizerischen Eidgenossenschaft vom 18. April +1999 (SR 101)
BWNotZZeitschrift für das Notariat in Baden-Württemberg
bzgl.bezüglich
C. c.Code Civil
C. P. O.Civilprozeßordnung
cap.capitulum
CCCode civil suisse du 10 décembre 1907 (SR 210)
cf.confer
CHKHandkommentar zum Schweizer Privatrecht
cit.citatum
Cod.Codex Iustinianus
code civ.Code Civil
cond(it).condicionibus/conditionibus
contr.contrahenda
CRCommentaire Romand
CSCommentaire Stämpfli
d.der/des
D.Digesta Iustiniani
d.h.das heisst
d.i.das ist
dems.demselben
dens.denselben
ders.derselbe
dess.desselben
dies.dieselbe(n)
DRDeutsches Recht (vereinigt mit Juristische Wochenschrift), +Zentralorgan des National-Sozialistischen Rechtswahrerbundes
Dr.Doktor
ds.desselben
DVODurchführungsverordnung
E(.)Entwurf
E.Erwägung
Ed.Edition
EGBGBEinführungsgesetz zum Bürgerlichen Gesetzbuche
EheGEhegesetz
eingesetzt.eingesetzten
Einl.Einleitung
emt.emptione
Entw.Entwurf(s)
eod.eodem
ErbbauRGErbbaurechtsgesetz
ErblErblasser
ErbRZeitschrift für die gesamte erbrechtliche Praxis/Erbrecht
Erbr. E.Erbrechtsentwurf
ErbregelungsVOErbregelungsverordnung
Erl.Erläuterung(en)
et al.et alii
etc.et cetera
evtl.eventuell
F. R. Entw.Familienrechtsentwurf
f./ff(.)(und) folgende(r)
FamRZZeitschrift für das gesamte Familienrecht
Febr.Februar
FGFestgabe
fideic.fideicommissariis
flg.folgend
Fn.Fussnote(n)
fr(an)z.französische(n/s)
Fr.Franken
FSFestschrift
Gai.Gaius
Gemein R.Gemeines Recht
gesetzl.gesetzliche(n)
GGGrundgesetz
GG.Gütergemeinschaft
ggübergegenüber
GSGedenkschrift
Gsb.Gesetzbuch/Gesetzbücher
h.L.herrschende Lehre
h.t.hoc titulo
her(ed).heredibus
Hess./hess. Entw.Entwurf eines bürgerlichen Gesetzbuchs für das Großherzogtum +Hessen
HKKHistorisch-kritischer Kommentar zum BGB
HöfeOHöfeordnung
Hr.Herr(n)
HRPHandbuch des Römischen Privatrechts
Hrsg.Herausgeber(in)
HTÜHaager Trustübereinkommen
i.in
i.E.im Ergebnis
i.f.in fine
i.S.im Sinne
i.V.m.in Verbindung mit
insb(es).insbesondere
Inst.Institutiones Iustiniani
inst.instituendis
ital. GB.Italienischen Zivilgesetzbuch
JhJahrhundert
JherJbJherings Jahrbücher für die Dogmatik des bürgerlichen Rechts
jun.junior
Jurist.Juristische
JuSJuristische Schulung
JWJuristische Wochenschrift
JZJuristenzeitung
K. E.Kommissionsentwurf
Kant.kantonalen
Kap.Kapitel
KGerKantonsgericht
KJKritische Justiz
Kom.Kommission
Komm.Kommentar
krit.kritisch(en)
KritUebKritische Ueberschau der deutschen Gesetzgebung und +Rechtswissenschaft
KUKOKurzkommentar
l. V.(en)letztwillige(n/r) Verfügung(en)
L./l.Liber
l.c.loco citato
leg.legatis
Lehrb.Lehrbuch
lib.libertorum/libertatibus
LPartGLebenspartnerschaftsgesetz
LUKanton Luzern
lüb. G.Lübisches Gesetzbuch
M.Mark/Motive
m.a.W.mit anderen Worten
m.E.meines Erachtens
m.H.mit Hinweisen
m.N.mit Nachweisen
m.w.N.mit weiteren Nachweisen
manum.manumissis
Mot.Motive(n)
MünchKommMünchener Kommentar
N.Note(n), Nummer(n), Randnote(n)
nähnäher
NJWNeue Juristische Wochenschrift
No.Numero
not@lexRevue de droit privé et fiscal du patrimoine
Nr./nr.Nummer(n)/Randnummer(n)
NSNationalsozialismus
O.R./ORBundesgesetz betreffend die Ergänzung des Schweizerischen +Zivilgesetzbuches (Fünfter Teil: Obligationenrecht) vom 30. März 1911 +(SR 220)
obl.obligationibus
Oestr./österr(eich). Gsb.Österreichische(s/n) Gesetzbuch
OFKOrell Füssli Kommentar
op.operis
OrdngOrdnung
österreich.österreichische
p(ag).pagina(e)/page(s)
P.Protokolle
p. Chr. n.post Christum natum
PDPrivatdozent
pr.principium
Pr. A. L. R.Allgemeines Landrecht für die Preußischen Staaten
PraDie Praxis
PraxKommPraxiskommentar
preuß.preußische(m/n/s)
Preuß. Ldr.Allgemeines Landrecht für die Preußischen Staaten
ProdHaftGProdukthaftungsgesetz
Prof.Professor
Prot.Protokoll
RRecht
RRecht
R.R.Römischen Rechts
RabelsZRabels Zeitschrift für ausländisches und internationales +Privatrecht
RdNr.Randnummer
rechtZeitschrift für juristische Weiterbildung und Praxis
RedKom.Redaktionskommission
resp.respektive
RG(.)Reichsgericht(s)
RGBl.Reichsgesetzblatt
RGRKReichsgerichtsrätekommentar
RGZEntscheidungen des Reichsgerichts in Zivilsachen
RJRechtshistorisches Journal
Röm./röm.römische(m/n/r)
Rsp(r.)Rechtsprechung
S.Seite(n)/Satz
s.siehe
s.g.sogenannten
sächs.sächsische(n/s)
Sächs./sächs. Gsb./G(.)B.Sächsische(s/n) Gesetzbuch
SAGSchweizerische Aktiengesellschaft
Sammlg.Sammlung
sc(il).scilicet
schw(eiz)./Schweiz.schweizerische(s)
Sept.Septembre
Seuff. A.J.A. Seuffert’s Archiv für Entscheidungen der obersten Gerichte in +den deutschen Staaten
SJZSchweizerische Juristen-Zeitung
sog.sogenannte(n)
Sp.Spalte(n)
SPRSchweizerisches Privatrecht
SRSystematische Sammlung des Bundesrechts
SRZSaarbrücker Rechtszeitschrift
St.Sankt
successioZeitschrift für Erbrecht
TDPSTraité de Droit Privé Suisse
TETeilentwurf
TE-ErbrechtTeilentwurf Erbrecht
test.Testamentis/testamento
testam.testamentarische
TestGGesetz über die Errichtung von Testamenten und Erbverträgen
Thür.Thüringen
Tit.Titulus, Titel
TwegTodeswegen
u(.)und
u(.)A.und andere(s)
u(.)s(.)w.und so weiter
U.Urteil
u.a.unter anderem
u.Ä.und Ähnliches
u.dgl.und dergleichen
u.E.unseres Erachtens
u.s.f.und so fort
übrübrigen
UEUlpiani epitome (tituli ex corpore Ulpiani)
Ulp.Domitius Ulpianus
vvon
v(er)gl.vergleiche
v.vom/von/vor
verb.verborum
Verf.Verfasser(s)
VerfgVerfügung
verpflverpflichtet
VersAusglGVersorgungsausgleichsgesetz
VOVerordnung
Vorbem.Vorbemerkungen
vorl.vorliegende(n)
vs.versus
W. E.Willenserklärung
w.N.weitere(n) Nachweise(n)
WeimRVWeimarer Reichsverfassung
wirtschaftlwirtschaftlichen
WRVWeimarer Reichsverfassung
württ(emb).württembergische(n/s)
z(.)B(.)zum Beispiel
ZA(k)fDRZeitschrift der Akademie für Deutsches Recht
ZBJVZeitschrift des Bernischen Juristenvereins
ZEuPZeitschrift für Europäisches Privatrecht
ZEVZeitschrift für Erbrecht und Vermögensnachfolge
ZfPWZeitschrift für die gesamte Privatrechtswissenschaft
ZGB(.)/ZGb.Schweizerisches Zivilgesetzbuch vom 10. Dezember 1907 (SR 210)
ZHRZeitschrift für das gesamte Handels- und Wirtschaftsrecht
Ziff.Ziffer
ZivSen.Zivilsenat
ZKZürcher Kommentar
ZNRZeitschrift für Neuere Rechtsgeschichte
ZPOZivilprozessordnung
ZRG GAZeitschrift der Savigny-Stiftung für Rechtsgeschichte +(Germanistische Abteilung)
ZRG RAZeitschrift der Savigny-Stiftung für Rechtsgeschichte (Romanistische +Abteilung)
ZSRZeitschrift für Schweizerisches Recht
+ +
@@ -27631,7 +28778,6 @@ class="footnote-back" role="doc-backlink">↩︎

- diff --git a/js/addPagesNotes.js b/js/addPagesNotes.js deleted file mode 100644 index 5ee976c..0000000 --- a/js/addPagesNotes.js +++ /dev/null @@ -1,96 +0,0 @@ -import { Handler } from '/csspageweaver/lib/paged.esm.js'; - -export default class addPagesNotes extends Handler { - constructor(chunker, polisher, caller) { - super(chunker, polisher, caller); - } - - - afterParsed(parsed){ - let notes = parsed.querySelectorAll(".inline-note"); - notes.forEach(function (note, index) { - // console.log(note); - note.style.position = "absolute"; - note.style.top = "0px"; - note.style.left = "0px"; - note.style.height = "0px"; - - let counter = note.getAttribute('data-counter-note'); - - let call = document.createElement('span'); - call.classList.add('note_call'); - call.textContent = counter; - note.insertAdjacentElement('beforebegin', call); - - note.classList.replace('inline-note', 'body-note'); - let marker = document.createElement('span'); - marker.classList.add('note_marker'); - marker.textContent = counter + ". "; - note.prepend(marker); - }); - - } - - afterPageLayout(pageElement, page, breakToken, chunker) { - - // add class if page contains h1 - if (pageElement.querySelector('h1')) { - pageElement.classList.add('page-with-h1'); - } - - // move notes into previous page - let notes = pageElement.querySelectorAll(".body-note"); - if(notes){ - let container = document.createElement('div'); - container.classList.add('container-note'); - notes.forEach(function (note, index) { - container.appendChild(note); - note.style.position = "relative"; - note.style.height = "auto"; - if (note.getAttribute('data-counter-note') === '1') { - container.classList.add('container-note-first'); - } - }); - - let pageNum = parseInt(pageElement.getAttribute('data-page-number')); - let prevPage = document.querySelector('[data-page-number="' + (pageNum - 1) + '"]'); - if (prevPage) { - let content = prevPage.querySelector('[data-id="section__content"]'); - let contentId = prevPage.querySelector('#section__content'); - let titleH1 = prevPage.querySelector('h1'); - if(titleH1){ - container.classList.add('container-note-first'); - } - if(content){ - content.appendChild(container); - }else if(contentId){ - contentId.appendChild(container); - }else{ - prevPage.querySelector('.pagedjs_page_content').appendChild(container); - } - - } - - } - - - - // create blank left page - if ( - page.element.classList.contains('pagedjs_right_page') && - page.element.classList.contains('pagedjs_chapter_page') - ) { - // Check if previous page is not end chapter - let pageEnd = pageElement.querySelector(".chapter-end"); - - if (!pageEnd) { - let notesPage = chunker.addPage(); - notesPage.element.classList.add('page-notes'); - - // Make margin boxes visible (hasContent is set during polishing, which skips added pages) - notesPage.element.querySelector('.pagedjs_margin-bottom-left')?.classList.add('hasContent'); - notesPage.element.querySelector('.pagedjs_margin-bottom-center')?.classList.add('hasContent'); - } - } - } -} diff --git a/js/beforeAll.js b/js/beforeAll.js deleted file mode 100644 index 5a823d3..0000000 --- a/js/beforeAll.js +++ /dev/null @@ -1,263 +0,0 @@ -import { Handler } from '/csspageweaver/lib/paged.esm.js'; - -export default class beforeAll extends Handler { - constructor(chunker, polisher, caller) { - super(chunker, polisher, caller); - } - - beforeParsed(content){ - - listAbbr(content); - numParagraph(content); - thesis(content); - wrapChapterAndIntro(content); - } - - afterPageLayout(pageElement, page, breakToken){ - let intro = pageElement.querySelector('.intro'); - let pageContent = pageElement.querySelector('.pagedjs_page_content'); - - if(intro && pageContent){ - let introBottom = intro.getBoundingClientRect().bottom; - let pageContentBottom = pageContent.getBoundingClientRect().bottom; - let gap = pageContentBottom - introBottom; - gap = gap - 4; // snap on baseline - intro.style.paddingTop = gap + "px"; - } - - let thesisList = pageElement.querySelectorAll('.thesis'); - if(thesisList.length > 0 && pageContent){ - let lastThesis = thesisList[thesisList.length - 1]; - let firstThesis = thesisList[0]; - let lastThesisBottom = lastThesis.getBoundingClientRect().bottom; - let pageContentBottom = pageContent.getBoundingClientRect().bottom; - let gap = pageContentBottom - lastThesisBottom; - gap = gap - 4; // snap on baseline - firstThesis.style.marginTop = gap + "px"; - } - - } - - - -} - - -function listAbbr(content){ - const h1s = content.querySelectorAll('h1'); - let abbrH1 = null; - - h1s.forEach(h1 => { - if (h1.textContent.trim().includes('Abkürzungsverzeichnis')) { - abbrH1 = h1; - } - }); - - if (!abbrH1) return; - - const sectionContent = content.querySelector('#section__content'); - if (!sectionContent || !sectionContent.contains(abbrH1)) return; - - // Collect h1 and all following siblings until next h1 - const elements = [abbrH1]; - let next = abbrH1.nextElementSibling; - while (next && next.tagName.toLowerCase() !== 'h1') { - elements.push(next); - next = next.nextElementSibling; - } - - // Create section and move elements into it - const section = document.createElement('section'); - section.id = 'list-of-abbr'; - elements.forEach(el => section.appendChild(el)); - - // content is the DocumentFragment; insert #list-of-abbr before #section__content - content.insertBefore(section, sectionContent); -} - -function numParagraph(content){ - let numParagraphs = content.querySelectorAll('ol[type="1"]'); - numParagraphs.forEach(function (num, index) { - let start = num.getAttribute('start'); - num.querySelector('li').innerHTML = start; - }); -} - - -function wrapChapterAndIntro(content){ - // Wrap h1 and following content in .chapter sections - const sectionContent = content.querySelector('#section__content'); - if (sectionContent) { - const h1s = sectionContent.querySelectorAll(':scope > h1'); - h1s.forEach(h1 => { - // Create chapter section - const chapter = document.createElement('section'); - chapter.classList.add('chapter'); - - // Insert chapter before h1 - h1.parentNode.insertBefore(chapter, h1); - - // Move h1 into chapter - chapter.appendChild(h1); - - // Move following siblings until next h1 or end - let nextElement = chapter.nextElementSibling; - while (nextElement && nextElement.tagName.toLowerCase() !== 'h1') { - const current = nextElement; - nextElement = nextElement.nextElementSibling; - chapter.appendChild(current); - } - - let divEnd = document.createElement('div'); - divEnd.classList.add("chapter-end"); // need to avoid to add new page - chapter.appendChild(divEnd); - - }); - - - - // Wrap content between h1 and h2 in .intro if chapter doesn't contain .thesis - const chapters = sectionContent.querySelectorAll('.chapter'); - chapters.forEach(chapter => { - if (chapter.querySelector('.thesis')) { - // Case 1: Chapter has thesis - chapter.classList.add('has-thesis'); - } else { - const h1 = chapter.querySelector('h1'); - - if (h1) { - // Calculate chapter content length excluding notes - const chapterClone = chapter.cloneNode(true); - // Remove notes (common note selectors) - chapterClone.querySelectorAll('.note, .footnote, .sidenote, aside, [role="note"]').forEach(note => note.remove()); - const contentLength = chapterClone.textContent.trim().length; - - const intro = document.createElement('div'); - intro.classList.add('intro'); - - if (contentLength < 5000) { - // Case 2: Short chapter, wrap all content after h1 - h1.parentNode.insertBefore(intro, h1.nextSibling); - - let current = intro.nextSibling; - while (current) { - const next = current.nextSibling; - intro.appendChild(current); - current = next; - } - chapter.classList.add('has-only-intro'); - } else { - const nextHeading = chapter.querySelector('h2, h3, h4, h5, h6'); - - if (nextHeading) { - // Case 3: Has heading, wrap all content between h1 and that heading - h1.parentNode.insertBefore(intro, h1.nextSibling); - - let current = intro.nextSibling; - while (current && current !== nextHeading) { - const next = current.nextSibling; - intro.appendChild(current); - current = next; - } - chapter.classList.add('has-intro'); - } else { - // Case 4: No heading, wrap first ol[type="1"] and first p after h1 - h1.parentNode.insertBefore(intro, h1.nextSibling); - - let foundOl = false; - let foundP = false; - let current = intro.nextSibling; - - while (current && (!foundOl || !foundP)) { - const next = current.nextSibling; - - // Skip text nodes (whitespace) - if (current.nodeType !== 1) { - current = next; - continue; - } - - const isOlType1 = current.tagName.toLowerCase() === 'ol' && current.getAttribute('type') === '1'; - const isP = current.tagName.toLowerCase() === 'p'; - - if (isOlType1 && !foundOl) { - intro.appendChild(current); - foundOl = true; - current = next; - } else if (isP && !foundP) { - intro.appendChild(current); - foundP = true; - current = next; - } else if (!isOlType1 && !isP) { - break; - } else { - current = next; - } - } - - if (intro.children.length > 0) { - chapter.classList.add('has-intro-1-paragraph'); - } - } - } - } - } - }); - } -} - -function thesis(content){ - const strongs = content.querySelectorAll('strong'); - const thesisElements = []; - - strongs.forEach(strong => { - if (/^these\s+\d+/i.test(strong.textContent.trim())) { - const parent = strong.closest('p'); - if (parent) { - // Create thesis wrapper - const thesisWrapper = document.createElement('div'); - thesisWrapper.classList.add('thesis'); - - // Find preceding ol if it exists - let prev = parent.previousElementSibling; - let olElement = null; - if (prev && prev.tagName.toLowerCase() === 'ol') { - olElement = prev; - } - - // Insert thesis wrapper before ol or before p - if (olElement) { - olElement.parentNode.insertBefore(thesisWrapper, olElement); - thesisWrapper.appendChild(olElement); - } else { - parent.parentNode.insertBefore(thesisWrapper, parent); - } - - // Create thesis-title - const thesisTitleDiv = document.createElement('div'); - thesisTitleDiv.classList.add('thesis-title'); - const thesisP = document.createElement('p'); - thesisP.textContent = strong.textContent; - var line = document.createElement('div'); - line.classList.add('thesis-line'); - - thesisTitleDiv.appendChild(thesisP); - thesisTitleDiv.appendChild(line) - thesisWrapper.appendChild(thesisTitleDiv); - - // Transform parent p into thesis-content - strong.remove(); - parent.classList.add('thesis-content'); - thesisWrapper.appendChild(parent); - - thesisElements.push(thesisWrapper); - } - } - }); - - // Mark first and last thesis - if (thesisElements.length > 0) { - thesisElements[0].classList.add('thesis-first'); - thesisElements[thesisElements.length - 1].classList.add('thesis-last'); - } -} \ No newline at end of file diff --git a/js/counters.js b/js/counters.js index 77749c2..8e393eb 100644 --- a/js/counters.js +++ b/js/counters.js @@ -55,8 +55,7 @@ export default class counters extends Handler { h1Count++; h2Count = 0; // reset h2 const originalText = el.innerHTML; - el.innerHTML = `${this.toUpperAlpha(h1Count)}${originalText}`; - el.setAttribute('data-counter', this.toUpperAlpha(h1Count)); + el.innerHTML = `${this.toUpperAlpha(h1Count)}.${originalText}`; break; case 'h2': diff --git a/js/numParagraph.js b/js/numParagraph.js new file mode 100644 index 0000000..80297b5 --- /dev/null +++ b/js/numParagraph.js @@ -0,0 +1,110 @@ +import { Handler } from '/csspageweaver/lib/paged.esm.js'; + +export default class thesis extends Handler { + constructor(chunker, polisher, caller) { + super(chunker, polisher, caller); + } + + + // Créer un wrapper pour récupérer tous les éléments qui suivent le ol (hors titres et .container-following-note) + // -------------------------------------------------------------------------------------------------------------- + beforeParsed(content){ + const nums = content.querySelectorAll('ol[type="1"]'); + + nums.forEach((num) => { + const wrapper = document.createElement('div'); + wrapper.classList.add('wrapper-ol'); + wrapper.id = 'wrapper-' + (num.getAttribute('start') || '1'); + + // Collecter les frères/sœurs suivants jusqu'à la prochaine limite + const siblings = []; + let sibling = num.nextElementSibling; + while (sibling) { + if (sibling.matches('ol[type="1"], h1, h2, h3, h4, h5, h6, .container-following-note')) break; + siblings.push(sibling); + sibling = sibling.nextElementSibling; + } + + // Insérer le wrapper à la place du ol + num.before(wrapper); + wrapper.appendChild(num); + siblings.forEach(s => wrapper.appendChild(s)); + }); + + // Si le dernier enfant d'un wrapper est un p et que le suivant est aussi un wrapper → .wrapper-indent + const wrappers = content.querySelectorAll('.wrapper-ol'); + wrappers.forEach((wrapper) => { + const last = wrapper.lastElementChild; + const next = wrapper.nextElementSibling; + if (last && last.nodeName === 'P' && next && next.classList.contains('wrapper-ol')) { + const firstP = next.querySelector('p'); + if (!firstP || !firstP.classList.contains('p-these')) { + next.classList.add('wrapper-indent'); + } + } + }); + } + + + + + afterPageLayout(pageElement, page, breakToken){ + + const wrappers = pageElement.querySelectorAll('.wrapper-ol'); + const minSize = 37; // taille minimal du wrapper pour qu’il y ait clone (2 lignes) + + // Fais un clone du ol pour de la page précédente + // ----------------------------------------------- + + if (wrappers.length > 0) { + const first = wrappers[0]; + if (first.hasAttribute('data-split-from')) { + let idWrapper = first.getAttribute('data-id'); + let numPage = pageElement.getAttribute('data-page-number'); + let numPrev = parseInt(numPage) - 1; + let prevPage = document.querySelector('#page-' + numPrev); + let olPara = prevPage.querySelector('#' + idWrapper + ' ol[type="1"]'); + + if (olPara && first.offsetHeight >= minSize) { + const start = olPara.getAttribute('start') || '1'; + const olClonePage = document.createElement('ol'); + olClonePage.setAttribute('start', start); + olClonePage.setAttribute('type', '1'); + olClonePage.classList.add('ol-clone-page'); + olClonePage.style.height = first.offsetHeight + 'px'; + const li = document.createElement('li'); + li.setAttribute('data-item-num', start); + olClonePage.appendChild(li); + first.prepend(olClonePage); + } + } + } + + + // Fais un clone du ol pour la colonne suivante (dans la même page) + // ---------------------------------------------------------------- + wrappers.forEach((wrapper) => { + const ol = wrapper.querySelector('ol[type="1"]'); + if (!ol) return; + + const rects = wrapper.getClientRects(); + if (rects.length === 1) { + ol.style.height = rects[0].height + 'px'; + } else if (rects.length === 2) { + ol.style.height = rects[0].height + 'px'; + if (rects[1].height >= minSize) { + const olClone = ol.cloneNode(true); + olClone.classList.add('ol-clone'); + olClone.style.height = rects[1].height + 'px'; + olClone.removeAttribute('id'); + ol.after(olClone); + } + } + }); + + + + + } + +} diff --git a/js/snapToBaseline.js b/js/snapToBaseline.js index 9ae7ad9..ed583e3 100644 --- a/js/snapToBaseline.js +++ b/js/snapToBaseline.js @@ -9,12 +9,12 @@ export default class snapToBaseline extends Handler { beforeParsed(content){ this.baseline = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--baseline').trim()); - // content.querySelectorAll('blockquote').forEach((bq) => { - // const prev = bq.previousElementSibling; - // if (!prev || prev.nodeName !== 'P') { - // // bq.style.color = 'red'; - // } - // }); + content.querySelectorAll('blockquote').forEach((bq) => { + const prev = bq.previousElementSibling; + if (!prev || prev.nodeName !== 'P') { + // bq.style.color = 'red'; + } + }); } renderNode(node, sourceNode){ @@ -30,7 +30,12 @@ export default class snapToBaseline extends Handler { const modulo = relativeTop % this.baseline; if (modulo !== 0) { - node.style.paddingTop = (this.baseline - modulo) + 'px'; + const pt = (this.baseline - modulo) + 'px'; + node.style.paddingTop = pt; + const prev = node.previousElementSibling; + if (prev && prev.matches('ol[type="1"]')) { + prev.style.paddingTop = pt; + } } } return node; @@ -56,7 +61,12 @@ export default class snapToBaseline extends Handler { const relativeTop = firstRect.top - areaRect.top; const modulo = relativeTop % this.baseline; if (modulo !== 0) { - node.style.paddingTop = (this.baseline - modulo) + 'px'; + const pt = (this.baseline - modulo) + 'px'; + node.style.paddingTop = pt; + const prev = node.previousElementSibling; + if (prev && prev.matches('ol[type="1"]')) { + prev.style.paddingTop = pt; + } } }); diff --git a/js/these.js b/js/these.js index 8c6321c..480dba1 100644 --- a/js/these.js +++ b/js/these.js @@ -7,7 +7,26 @@ export default class thesis extends Handler { beforeParsed(content){ - + const strongs = content.querySelectorAll('strong'); + strongs.forEach(strong => { + if (/^these\s+\d+/i.test(strong.textContent.trim())) { + const parent = strong.closest('p'); + if (parent) { + parent.classList.add('p-these'); + } + } + }); + + const theseParas = content.querySelectorAll('.p-these'); + theseParas.forEach(p => { + let next = p.nextElementSibling; + while (next && next.tagName.toLowerCase() === 'ol') { + next = next.nextElementSibling; + } + if (!next || !next.classList.contains('p-these')) { + p.classList.add('p-these-last'); + } + }); } diff --git a/src/output.html b/src/output.html index eed0aea..c90ec47 100644 --- a/src/output.html +++ b/src/output.html @@ -1,4 +1,5 @@ - +

Höchstpersönlichkeit

+

Eine Erbrechtsgeschichte von Missverständnissen

«Der Gedanke … des … [W]illens hat sich nicht bewährt, der Glaube der modernen Jurisprudenz, in dem animus … den Schlüssel entdeckt zu haben, der ihr das Verständniß der ganzen … [L]ehre erschlüsse, hat