Compare commits
No commits in common. "main" and "following-notes" have entirely different histories.
main
...
following-
25 changed files with 388 additions and 1176 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,4 +2,3 @@
|
||||||
.zip
|
.zip
|
||||||
weaver_manager.sh
|
weaver_manager.sh
|
||||||
fonts/*
|
fonts/*
|
||||||
images/*
|
|
||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"liveServer.settings.port": 5501
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +1,24 @@
|
||||||
.container-following-note{
|
.container-following-note{
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-size: var(--fs-small);
|
font-size: var(--fs-small);
|
||||||
line-height: calc(var(--baseline)*0.75);
|
line-height: calc(var(--baseline)*0.8);
|
||||||
|
// padding-left: var(--indent);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 2px;
|
|
||||||
// margin-top: calc(var(--baseline)*0.25);
|
|
||||||
|
|
||||||
hyphens: auto;
|
|
||||||
hyphenate-limit-chars: 7 3 4;
|
|
||||||
hyphenate-limit-lines: 2;
|
|
||||||
hyphenate-limit-zone: 8%;
|
|
||||||
word-spacing: -0.004em;
|
|
||||||
text-align: justify;
|
|
||||||
// color: #999;
|
|
||||||
|
|
||||||
|
// columns: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.body_note{
|
.body_note{
|
||||||
// padding-left: calc(var(--indent)*1);
|
padding-left: calc(var(--indent)*1);
|
||||||
// position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.following-note_marker::after{
|
.following-note_marker{
|
||||||
content: ". "
|
position: absolute;
|
||||||
|
// left: calc(var(--indent)*2);
|
||||||
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.following-note_call{
|
.following-note_call{
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-size: var(--fs-small);
|
font-size: var(--fs-small);
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
// INUTILE
|
|
||||||
|
|
||||||
|
|
||||||
@page {
|
@page {
|
||||||
@footnote {
|
@footnote {
|
||||||
float: bottom;
|
float: bottom;
|
||||||
|
|
|
||||||
|
|
@ -1,73 +1,52 @@
|
||||||
$width: 176mm;
|
|
||||||
$height: 240mm;
|
|
||||||
$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;
|
|
||||||
|
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
@page {
|
@page {
|
||||||
size: $width $height;
|
size: 176mm 240mm;
|
||||||
margin-top: $top;
|
// size: 150mm 220mm;
|
||||||
margin-bottom: $bottom;
|
margin-top: 36px;
|
||||||
|
margin-bottom: 20mm;
|
||||||
|
|
||||||
// bleed: 6mm;
|
bleed: 6mm;
|
||||||
// marks: crop;
|
marks: crop;
|
||||||
}
|
}
|
||||||
@page:left {
|
@page:left {
|
||||||
margin-left: $outside;
|
margin-left: 18mm;
|
||||||
margin-right: $inside;
|
margin-right: 26mm;
|
||||||
|
|
||||||
// background-image: url("/images/layout-2_3.png");
|
|
||||||
// background-size: 100% 100%;
|
|
||||||
|
|
||||||
|
|
||||||
@bottom-left {
|
@bottom-left {
|
||||||
content: counter(page);
|
content: counter(page);
|
||||||
font-family: var(--font-sans);
|
font-family: var(--font-title);
|
||||||
|
font-weight: 500;
|
||||||
font-size: var(--fs-num);
|
font-size: var(--fs-num);
|
||||||
text-align: left;
|
|
||||||
width: $indent;
|
|
||||||
}
|
}
|
||||||
@bottom-center {
|
// @top-right {
|
||||||
content: "Höchstpersönlichkeit";
|
// content: "Höchstpersönlichkeit";
|
||||||
font-family: var(--font-sans);
|
// font-variant-caps: small-caps;
|
||||||
font-size: var(--fs-num);
|
// letter-spacing: 0.01em;
|
||||||
text-align: left;
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@page:right {
|
@page:right {
|
||||||
margin-left: $inside;
|
margin-left: 26mm;
|
||||||
margin-right: $outside;
|
margin-right: 18mm;
|
||||||
|
@bottom-right {
|
||||||
@bottom-left {
|
|
||||||
content: string(chapterCount);
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-size: var(--fs-num);
|
|
||||||
text-align: left;
|
|
||||||
width: $indent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@bottom-center {
|
|
||||||
content: string(chapter);
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-size: var(--fs-num);
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
@bottom-right {
|
|
||||||
content: counter(page);
|
content: counter(page);
|
||||||
font-family: var(--font-sans);
|
font-family: var(--font-title);
|
||||||
|
font-weight: 500;
|
||||||
font-size: var(--fs-num);
|
font-size: var(--fs-num);
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
|
@right-top {
|
||||||
|
content: "Höchstpersönlichkeit";
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@page:first {
|
@page:first {
|
||||||
|
|
@ -106,27 +85,6 @@ $indent: 10mm;
|
||||||
@bottom-right { content: none; }
|
@bottom-right { content: none; }
|
||||||
@bottom-right-corner { content: none; }
|
@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; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -134,33 +92,3 @@ $indent: 10mm;
|
||||||
break-before: right;
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
#section__content h1 .h1-text{
|
|
||||||
string-set: chapter content(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
[data-id="section__content"]{
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol[type="1"]{
|
|
||||||
list-style-type: none;
|
|
||||||
position: relative;
|
|
||||||
break-after: avoid;
|
|
||||||
width: $indent;
|
|
||||||
position: absolute;
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
// justify-content: center;
|
|
||||||
|
|
||||||
&::after{
|
|
||||||
content: attr(start);
|
|
||||||
display: block;
|
|
||||||
// position: absolute;
|
|
||||||
font-size: var(--fs-small);
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ol[type="1"].ol-clone{
|
|
||||||
break-before: column;
|
|
||||||
break-after: avoid;
|
|
||||||
top: 0;
|
|
||||||
left: calc($content-w/2 + $gap/2)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sup{
|
sup{
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
}
|
}
|
||||||
|
|
@ -22,8 +19,6 @@ p{
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
orphans: 2;
|
orphans: 2;
|
||||||
widows: 2;
|
widows: 2;
|
||||||
margin-left: $indent;
|
|
||||||
// padding-left: $indent*0.2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p, li{
|
p, li{
|
||||||
|
|
@ -32,57 +27,83 @@ p, li{
|
||||||
hyphenate-limit-lines: 2;
|
hyphenate-limit-lines: 2;
|
||||||
hyphenate-limit-zone: 8%;
|
hyphenate-limit-zone: 8%;
|
||||||
word-spacing: -0.004em;
|
word-spacing: -0.004em;
|
||||||
widows: 2;
|
|
||||||
orphans: 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.wrapper-indent > p:first-of-type {
|
p + p,
|
||||||
text-indent: $indent*0.5;
|
ol[type="1"] + p{
|
||||||
|
text-indent: calc(var(--indent)*0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
blockquote{
|
blockquote{
|
||||||
font-family: var(--font-quote);
|
font-family: var(--font-serif);
|
||||||
}
|
padding-left: calc(var(--indent)*1);
|
||||||
|
padding-right: calc(var(--indent)*1);
|
||||||
// blockquote u{
|
// font-size: var(--fs-small);
|
||||||
// text-decoration: none;
|
margin-top: calc(var(--baseline)*0.5);
|
||||||
// text-transform: uppercase;
|
|
||||||
// font-size: var(--fs-small);
|
|
||||||
// color: red;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// u{
|
|
||||||
// color: red;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
ul{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.p-these{
|
|
||||||
font-weight: 500;
|
|
||||||
margin-bottom: calc(var(--baseline)*0.5);
|
margin-bottom: calc(var(--baseline)*0.5);
|
||||||
strong{
|
font-size: 12px;
|
||||||
text-transform: uppercase;
|
color: #343434;
|
||||||
display: inline-block;
|
|
||||||
min-width: $indent*2;
|
|
||||||
font-weight: bold;
|
}
|
||||||
font-size: var(--fs-small);
|
|
||||||
letter-spacing: 0.05rem;
|
.these + ol + p,
|
||||||
|
blockquote + ol + p{
|
||||||
|
text-indent: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.these{
|
||||||
|
// 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: 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li::before{
|
||||||
|
font-size: var(--fs-small);
|
||||||
|
content: "¶";
|
||||||
|
color: #d7d7d7;
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-these-last{
|
|
||||||
margin-bottom: calc(var(--baseline)*1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,21 @@
|
||||||
|
|
||||||
#section__content{
|
#section__content{
|
||||||
// margin-left: 28mm;
|
margin-left: 28mm;
|
||||||
|
|
||||||
|
h1, h2, h3 {
|
||||||
|
&::before{
|
||||||
h1{
|
content: attr(data-counter);
|
||||||
|
}
|
||||||
column-span: all;
|
|
||||||
height: $content-h;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h4, h5, h6{
|
||||||
|
|
||||||
h2, h3, h4, h5, h6 {
|
|
||||||
&::before{
|
&::before{
|
||||||
content: attr(data-counter) ". ";
|
content: attr(data-counter) ". ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
h2, h3 , h4{
|
h1, h2, h3 , h4{
|
||||||
break-inside: avoid;
|
break-inside: avoid;
|
||||||
break-after: avoid;
|
break-after: avoid;
|
||||||
text-wrap: balance;
|
text-wrap: balance;
|
||||||
|
|
@ -61,131 +57,90 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
h1{
|
|
||||||
|
|
||||||
font-weight: 200;
|
|
||||||
font-size: 105px;
|
|
||||||
line-height: 0.9;
|
|
||||||
hyphens: auto;
|
|
||||||
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{
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
h2{
|
h2{
|
||||||
font-size: 22px;
|
font-family: var(--font-title);
|
||||||
font-weight: 200;
|
font-size: 1.1rem;
|
||||||
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-align: center;
|
line-height: calc(var(--baseline)*1.2);
|
||||||
line-height: calc(var(--baseline)*1.4);
|
position: relative;
|
||||||
margin-top: 4mm;
|
margin-top: calc(var(--baseline)*1 + 6px);
|
||||||
padding-bottom: calc(var(--baseline)*0.5);
|
padding-bottom: calc(var(--baseline)*1);
|
||||||
hyphens: auto;
|
padding-right: 2ch;
|
||||||
|
padding-left: calc(var(--indent)*2);
|
||||||
// color: red;
|
|
||||||
|
|
||||||
&::before{
|
&::before{
|
||||||
display: block;
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
// display: block;
|
||||||
|
// font-size: var(--fs-num);
|
||||||
|
// padding-left: var(--indent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// &::after{
|
|
||||||
// content: '';
|
|
||||||
// display: block;
|
|
||||||
// width: 100%;
|
|
||||||
// border-bottom: 1px solid currentColor;
|
|
||||||
// position: relative;
|
|
||||||
// top: calc(var(--baseline)*-2.5);
|
|
||||||
// opacity: 0.2;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
h3{
|
h3{
|
||||||
font-weight: normal;
|
font-family: var(--font-title);
|
||||||
font-size: 16px;
|
font-weight: 500;
|
||||||
|
font-size: 1rem;
|
||||||
line-height: calc(var(--baseline)*1);
|
line-height: calc(var(--baseline)*1);
|
||||||
|
|
||||||
|
// padding-left: var(--indent);
|
||||||
|
padding-right: calc(var(--indent)*2);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 4mm;
|
margin-top: calc(var(--baseline)*1 + 4px);
|
||||||
padding-bottom: 2mm;
|
padding-bottom: calc(var(--baseline)*0.75);
|
||||||
padding-left: $indent*1.5;
|
padding-left: calc(var(--indent)*2);
|
||||||
text-align: left;
|
|
||||||
&::before{
|
&::before{
|
||||||
display: block;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: $indent;
|
left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
h4{
|
h4{
|
||||||
|
font-family: var(--font-title);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1em;
|
font-size: 0.9rem;
|
||||||
line-height: calc(var(--baseline)*0.75);
|
line-height: calc(var(--baseline)*1);
|
||||||
|
padding-right: calc(var(--indent)*2);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: calc(var(--baseline)*1);
|
margin-top: calc(var(--baseline)*1 + 4px);
|
||||||
padding-bottom: calc(var(--baseline)*0.5);
|
padding-bottom: calc(var(--baseline)*0.75);
|
||||||
padding-left: $indent*1.5;
|
text-decoration: underline 1px #cfcfcf;
|
||||||
|
text-underline-offset: 3px;
|
||||||
|
|
||||||
|
padding-left: calc(var(--indent)*2);
|
||||||
&::before{
|
&::before{
|
||||||
display: block;
|
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
left: $indent;
|
// left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
h5{
|
h5{
|
||||||
font-weight: normal;
|
font-family: var(--font-title);
|
||||||
font-size: 1em;
|
font-weight: 500;
|
||||||
line-height: calc(var(--baseline)*0.75);
|
font-size: 0.8rem;
|
||||||
|
line-height: calc(var(--baseline)*1);
|
||||||
|
padding-left: calc(var(--indent)*2);
|
||||||
|
// padding-right: calc(var(--indent)*2);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: calc(var(--baseline)*1);
|
margin-top: calc(var(--baseline)*1 + 4px);
|
||||||
padding-bottom: calc(var(--baseline)*0.25);
|
padding-bottom: calc(var(--baseline)*0.25);
|
||||||
padding-left: $indent;
|
|
||||||
|
|
||||||
text-indent: $indent;
|
|
||||||
&::before{
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h6{
|
h6{
|
||||||
font-weight: normal;
|
font-family: var(--font-title);
|
||||||
font-size: 1em;
|
font-weight: 500;
|
||||||
line-height: calc(var(--baseline)*0.75);
|
font-size: 0.8rem;
|
||||||
position: relative;
|
margin-top: calc(var(--baseline)*0.5);
|
||||||
margin-top: calc(var(--baseline)*1);
|
padding-bottom: calc(var(--baseline)*0.25);
|
||||||
padding-left: $indent;
|
color: #666;
|
||||||
|
|
||||||
text-indent: $indent;
|
|
||||||
&::before{
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -197,3 +152,37 @@
|
||||||
margin-top: 0;
|
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);
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
#toc_container{
|
|
||||||
|
|
||||||
break-before: page;
|
|
||||||
break-after: page;
|
|
||||||
// color: red;
|
|
||||||
|
|
||||||
ul{
|
|
||||||
list-style-type: none;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-element-level-1{
|
|
||||||
margin-top: calc(var(--baseline)*1);
|
|
||||||
margin-bottom: calc(var(--baseline)*0.5);
|
|
||||||
font-size: 1.2rem;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-element-level-2{
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: calc(var(--baseline)*0.5);
|
|
||||||
margin-bottom: calc(var(--baseline)*0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-element-level-3{
|
|
||||||
text-indent: 5mm;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-element-level-4{
|
|
||||||
text-indent: 10mm;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-element-level-5{
|
|
||||||
text-indent: 15mm;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-element-level-6{
|
|
||||||
text-indent: 20mm;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
:root{
|
:root{
|
||||||
--font: 'Moulin', sans-serif;
|
--font: 'Akkurat Std', sans-serif;
|
||||||
--font-serif: 'Moulin', sans-serif;
|
--font-serif: 'Edgar', sans-serif;
|
||||||
--font-quote: 'Louize', sans-serif;
|
--font-title: 'Allium Rounded', sans-serif;
|
||||||
--font-sans: 'Basis Grotesque Pro', sans-serif;
|
--font-sans: 'Allium Rounded', sans-serif;
|
||||||
--font-size: 12px;
|
--font-size: 11px;
|
||||||
--fs-small: 9.8px;
|
--fs-small: 8.5px;
|
||||||
--baseline: 18px;
|
--fs-num: 14px;
|
||||||
|
--baseline: 16px;
|
||||||
|
|
||||||
--indent: 26px;
|
--indent: 26px;
|
||||||
--fs-num: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
418
css/style.css
418
css/style.css
|
|
@ -1,14 +1,14 @@
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
:root {
|
:root {
|
||||||
--font: 'Moulin', sans-serif;
|
--font: 'Akkurat Std', sans-serif;
|
||||||
--font-serif: 'Moulin', sans-serif;
|
--font-serif: 'Edgar', sans-serif;
|
||||||
--font-quote: 'Louize', sans-serif;
|
--font-title: 'Allium Rounded', sans-serif;
|
||||||
--font-sans: 'Basis Grotesque Pro', sans-serif;
|
--font-sans: 'Allium Rounded', sans-serif;
|
||||||
--font-size: 12px;
|
--font-size: 11px;
|
||||||
--fs-small: 9.8px;
|
--fs-small: 8.5px;
|
||||||
--baseline: 18px;
|
--fs-num: 14px;
|
||||||
|
--baseline: 16px;
|
||||||
--indent: 26px;
|
--indent: 26px;
|
||||||
--fs-num: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
|
|
@ -34,47 +34,43 @@ body {
|
||||||
@media print {
|
@media print {
|
||||||
@page {
|
@page {
|
||||||
size: 176mm 240mm;
|
size: 176mm 240mm;
|
||||||
margin-top: 6mm;
|
margin-top: 36px;
|
||||||
margin-bottom: 20mm;
|
margin-bottom: 20mm;
|
||||||
|
bleed: 6mm;
|
||||||
|
marks: crop;
|
||||||
}
|
}
|
||||||
@page :left {
|
@page :left {
|
||||||
margin-left: 6mm;
|
margin-left: 18mm;
|
||||||
margin-right: 12mm;
|
margin-right: 26mm;
|
||||||
@bottom-left {
|
@bottom-left {
|
||||||
content: counter(page);
|
content: counter(page);
|
||||||
font-family: var(--font-sans);
|
font-family: var(--font-title);
|
||||||
|
font-weight: 500;
|
||||||
font-size: var(--fs-num);
|
font-size: var(--fs-num);
|
||||||
text-align: left;
|
|
||||||
width: 10mm;
|
|
||||||
}
|
|
||||||
@bottom-center {
|
|
||||||
content: "Höchstpersönlichkeit";
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-size: var(--fs-num);
|
|
||||||
text-align: left;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@page :right {
|
@page :right {
|
||||||
margin-left: 12mm;
|
margin-left: 26mm;
|
||||||
margin-right: 6mm;
|
margin-right: 18mm;
|
||||||
@bottom-left {
|
|
||||||
content: string(chapterCount);
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-size: var(--fs-num);
|
|
||||||
text-align: left;
|
|
||||||
width: 10mm;
|
|
||||||
}
|
|
||||||
@bottom-center {
|
|
||||||
content: string(chapter);
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-size: var(--fs-num);
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
@bottom-right {
|
@bottom-right {
|
||||||
content: counter(page);
|
content: counter(page);
|
||||||
font-family: var(--font-sans);
|
font-family: var(--font-title);
|
||||||
|
font-weight: 500;
|
||||||
font-size: var(--fs-num);
|
font-size: var(--fs-num);
|
||||||
text-align: right;
|
}
|
||||||
|
@right-top {
|
||||||
|
content: "Höchstpersönlichkeit";
|
||||||
|
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 {
|
@page :first {
|
||||||
|
|
@ -177,94 +173,12 @@ body {
|
||||||
content: none;
|
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 {
|
#section__content {
|
||||||
-moz-column-break-before: right;
|
-moz-column-break-before: right;
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
#section__content h1 .h1-text {
|
|
||||||
string-set: chapter content(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
sup {
|
sup {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
}
|
}
|
||||||
|
|
@ -287,7 +201,6 @@ p {
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
orphans: 2;
|
orphans: 2;
|
||||||
widows: 2;
|
widows: 2;
|
||||||
margin-left: 10mm;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p, li {
|
p, li {
|
||||||
|
|
@ -296,41 +209,34 @@ p, li {
|
||||||
hyphenate-limit-lines: 2;
|
hyphenate-limit-lines: 2;
|
||||||
hyphenate-limit-zone: 8%;
|
hyphenate-limit-zone: 8%;
|
||||||
word-spacing: -0.004em;
|
word-spacing: -0.004em;
|
||||||
widows: 2;
|
|
||||||
orphans: 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper-indent > p:first-of-type {
|
p + p,
|
||||||
text-indent: 5mm;
|
ol[type="1"] + p {
|
||||||
|
text-indent: calc(var(--indent) * 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
font-family: var(--font-quote);
|
font-family: var(--font-serif);
|
||||||
}
|
padding-left: calc(var(--indent) * 1);
|
||||||
|
padding-right: calc(var(--indent) * 1);
|
||||||
ul {
|
margin-top: calc(var(--baseline) * 0.5);
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-these {
|
|
||||||
font-weight: 500;
|
|
||||||
margin-bottom: calc(var(--baseline) * 0.5);
|
margin-bottom: calc(var(--baseline) * 0.5);
|
||||||
}
|
font-size: 12px;
|
||||||
.p-these strong {
|
color: #343434;
|
||||||
text-transform: uppercase;
|
|
||||||
display: inline-block;
|
|
||||||
min-width: 20mm;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: var(--fs-small);
|
|
||||||
letter-spacing: 0.05rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-these-last {
|
.these + ol + p,
|
||||||
|
blockquote + ol + p {
|
||||||
|
text-indent: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.these {
|
||||||
margin-bottom: calc(var(--baseline) * 1);
|
margin-bottom: calc(var(--baseline) * 1);
|
||||||
}
|
border-left: 4px solid #efefef;
|
||||||
|
-webkit-box-decoration-break: clone;
|
||||||
[data-id=section__content] {
|
box-decoration-break: clone;
|
||||||
position: relative;
|
padding-left: calc(var(--indent) * 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
ol[type="1"] {
|
ol[type="1"] {
|
||||||
|
|
@ -338,34 +244,34 @@ ol[type="1"] {
|
||||||
position: relative;
|
position: relative;
|
||||||
-moz-column-break-after: avoid;
|
-moz-column-break-after: avoid;
|
||||||
break-after: avoid;
|
break-after: avoid;
|
||||||
width: 10mm;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
left: 0px;
|
||||||
|
display: flex;
|
||||||
|
gap: 0.25ch;
|
||||||
}
|
}
|
||||||
ol[type="1"]::after {
|
ol[type="1"]::after {
|
||||||
content: attr(start);
|
content: attr(start);
|
||||||
display: block;
|
|
||||||
font-size: var(--fs-small);
|
font-size: var(--fs-small);
|
||||||
opacity: 0.5;
|
color: #999;
|
||||||
|
}
|
||||||
|
ol[type="1"] li::before {
|
||||||
|
font-size: var(--fs-small);
|
||||||
|
content: "¶";
|
||||||
|
color: #d7d7d7;
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol[type="1"].ol-clone {
|
#section__content {
|
||||||
-moz-column-break-before: column;
|
margin-left: 28mm;
|
||||||
break-before: column;
|
|
||||||
-moz-column-break-after: avoid;
|
|
||||||
break-after: avoid;
|
|
||||||
top: 0;
|
|
||||||
left: 81mm;
|
|
||||||
}
|
}
|
||||||
|
#section__content h1::before, #section__content h2::before, #section__content h3::before {
|
||||||
#section__content h1 {
|
content: attr(data-counter);
|
||||||
-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 {
|
#section__content h4::before, #section__content h5::before, #section__content h6::before {
|
||||||
content: attr(data-counter) ". ";
|
content: attr(data-counter) ". ";
|
||||||
}
|
}
|
||||||
#section__content h2, #section__content h3, #section__content h4 {
|
#section__content h1, #section__content h2, #section__content h3, #section__content h4 {
|
||||||
-moz-column-break-inside: avoid;
|
-moz-column-break-inside: avoid;
|
||||||
break-inside: avoid;
|
break-inside: avoid;
|
||||||
-moz-column-break-after: avoid;
|
-moz-column-break-after: avoid;
|
||||||
|
|
@ -374,7 +280,7 @@ ol[type="1"].ol-clone {
|
||||||
/* hack for avoiding break-after */
|
/* hack for avoiding break-after */
|
||||||
margin-bottom: calc(var(--baseline) * -3);
|
margin-bottom: calc(var(--baseline) * -3);
|
||||||
}
|
}
|
||||||
#section__content h2::after, #section__content h3::after, #section__content h4::after {
|
#section__content h1::after, #section__content h2::after, #section__content h3::after, #section__content h4::after {
|
||||||
content: "";
|
content: "";
|
||||||
display: block;
|
display: block;
|
||||||
height: calc(var(--baseline) * 3);
|
height: calc(var(--baseline) * 3);
|
||||||
|
|
@ -401,160 +307,120 @@ ol[type="1"].ol-clone {
|
||||||
#section__content h6 + ol + p {
|
#section__content h6 + ol + p {
|
||||||
text-indent: 0;
|
text-indent: 0;
|
||||||
}
|
}
|
||||||
#section__content h1 {
|
|
||||||
font-weight: 200;
|
|
||||||
font-size: 105px;
|
|
||||||
line-height: 0.9;
|
|
||||||
hyphens: auto;
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
#section__content h2 {
|
#section__content h2 {
|
||||||
font-size: 22px;
|
font-family: var(--font-title);
|
||||||
font-weight: 200;
|
font-size: 1.1rem;
|
||||||
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-align: center;
|
line-height: calc(var(--baseline) * 1.2);
|
||||||
line-height: calc(var(--baseline) * 1.4);
|
position: relative;
|
||||||
margin-top: 4mm;
|
margin-top: calc(var(--baseline) * 1 + 6px);
|
||||||
padding-bottom: calc(var(--baseline) * 0.5);
|
padding-bottom: calc(var(--baseline) * 1);
|
||||||
hyphens: auto;
|
padding-right: 2ch;
|
||||||
|
padding-left: calc(var(--indent) * 2);
|
||||||
}
|
}
|
||||||
#section__content h2::before {
|
#section__content h2::before {
|
||||||
display: block;
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
}
|
}
|
||||||
#section__content h3 {
|
#section__content h3 {
|
||||||
font-weight: normal;
|
font-family: var(--font-title);
|
||||||
font-size: 16px;
|
font-weight: 500;
|
||||||
|
font-size: 1rem;
|
||||||
line-height: calc(var(--baseline) * 1);
|
line-height: calc(var(--baseline) * 1);
|
||||||
|
padding-right: calc(var(--indent) * 2);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 4mm;
|
margin-top: calc(var(--baseline) * 1 + 4px);
|
||||||
padding-bottom: 2mm;
|
padding-bottom: calc(var(--baseline) * 0.75);
|
||||||
padding-left: 15mm;
|
padding-left: calc(var(--indent) * 2);
|
||||||
text-align: left;
|
|
||||||
}
|
}
|
||||||
#section__content h3::before {
|
#section__content h3::before {
|
||||||
display: block;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 10mm;
|
left: 0;
|
||||||
}
|
}
|
||||||
#section__content h4 {
|
#section__content h4 {
|
||||||
|
font-family: var(--font-title);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1em;
|
font-size: 0.9rem;
|
||||||
line-height: calc(var(--baseline) * 0.75);
|
line-height: calc(var(--baseline) * 1);
|
||||||
|
padding-right: calc(var(--indent) * 2);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: calc(var(--baseline) * 1);
|
margin-top: calc(var(--baseline) * 1 + 4px);
|
||||||
padding-bottom: calc(var(--baseline) * 0.5);
|
padding-bottom: calc(var(--baseline) * 0.75);
|
||||||
padding-left: 15mm;
|
-webkit-text-decoration: underline 1px #cfcfcf;
|
||||||
}
|
text-decoration: underline 1px #cfcfcf;
|
||||||
#section__content h4::before {
|
text-underline-offset: 3px;
|
||||||
display: block;
|
padding-left: calc(var(--indent) * 2);
|
||||||
position: absolute;
|
|
||||||
left: 10mm;
|
|
||||||
}
|
}
|
||||||
#section__content h5 {
|
#section__content h5 {
|
||||||
font-weight: normal;
|
font-family: var(--font-title);
|
||||||
font-size: 1em;
|
font-weight: 500;
|
||||||
line-height: calc(var(--baseline) * 0.75);
|
font-size: 0.8rem;
|
||||||
|
line-height: calc(var(--baseline) * 1);
|
||||||
|
padding-left: calc(var(--indent) * 2);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: calc(var(--baseline) * 1);
|
margin-top: calc(var(--baseline) * 1 + 4px);
|
||||||
padding-bottom: calc(var(--baseline) * 0.25);
|
padding-bottom: calc(var(--baseline) * 0.25);
|
||||||
padding-left: 10mm;
|
|
||||||
text-indent: 10mm;
|
|
||||||
}
|
|
||||||
#section__content h5::before {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
}
|
}
|
||||||
#section__content h6 {
|
#section__content h6 {
|
||||||
font-weight: normal;
|
font-family: var(--font-title);
|
||||||
font-size: 1em;
|
font-weight: 500;
|
||||||
line-height: calc(var(--baseline) * 0.75);
|
font-size: 0.8rem;
|
||||||
position: relative;
|
margin-top: calc(var(--baseline) * 0.5);
|
||||||
margin-top: calc(var(--baseline) * 1);
|
padding-bottom: calc(var(--baseline) * 0.25);
|
||||||
padding-left: 10mm;
|
color: #666;
|
||||||
text-indent: 10mm;
|
|
||||||
}
|
|
||||||
#section__content h6::before {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-id=section__content][data-split-from] > :first-child {
|
[data-id=section__content][data-split-from] > :first-child {
|
||||||
margin-top: 0;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
#section__list-of-abbr {
|
#section__list-of-abbr {
|
||||||
display: none;
|
display: none;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container-following-note {
|
.container-following-note {
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-size: var(--fs-small);
|
font-size: var(--fs-small);
|
||||||
line-height: calc(var(--baseline) * 0.75);
|
line-height: calc(var(--baseline) * 0.8);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 2px;
|
|
||||||
hyphens: auto;
|
|
||||||
hyphenate-limit-chars: 7 3 4;
|
|
||||||
hyphenate-limit-lines: 2;
|
|
||||||
hyphenate-limit-zone: 8%;
|
|
||||||
word-spacing: -0.004em;
|
|
||||||
text-align: justify;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.following-note_marker::after {
|
.body_note {
|
||||||
content: ". ";
|
padding-left: calc(var(--indent) * 1);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.following-note_marker {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.following-note_call {
|
.following-note_call {
|
||||||
font-family: var(--font-sans);
|
|
||||||
font-size: var(--fs-small);
|
font-size: var(--fs-small);
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -4px;
|
top: -4px;
|
||||||
}
|
|
||||||
|
|
||||||
#toc_container {
|
|
||||||
-moz-column-break-before: page;
|
|
||||||
break-before: page;
|
|
||||||
-moz-column-break-after: page;
|
|
||||||
break-after: page;
|
|
||||||
}
|
|
||||||
#toc_container ul {
|
|
||||||
list-style-type: none;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
#toc_container .toc-element-level-1 {
|
|
||||||
margin-top: calc(var(--baseline) * 1);
|
|
||||||
margin-bottom: calc(var(--baseline) * 0.5);
|
|
||||||
font-size: 1.2rem;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
#toc_container .toc-element-level-2 {
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: calc(var(--baseline) * 0.5);
|
|
||||||
margin-bottom: calc(var(--baseline) * 0.5);
|
|
||||||
}
|
|
||||||
#toc_container .toc-element-level-3 {
|
|
||||||
text-indent: 5mm;
|
|
||||||
}
|
|
||||||
#toc_container .toc-element-level-4 {
|
|
||||||
text-indent: 10mm;
|
|
||||||
}
|
|
||||||
#toc_container .toc-element-level-5 {
|
|
||||||
text-indent: 15mm;
|
|
||||||
}
|
|
||||||
#toc_container .toc-element-level-6 {
|
|
||||||
text-indent: 20mm;
|
|
||||||
}/*# sourceMappingURL=style.css.map */
|
}/*# sourceMappingURL=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/_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,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;;AGnBA;EACI;IACI,iBAAA;IACA,eAbF;IAcE,mBAbC;EHmCP;EGjBE;IACI,gBAjBE;IAkBF,kBAnBC;IAyBD;MACI,sBAAA;MACA,6BAAA;MACA,wBAAA;MACA,gBAAA;MACC,WAzBJ;IHuCL;IGZM;MACE,+BAAA;MACA,6BAAA;MACA,wBAAA;MACA,gBAAA;IHcR;EACF;EGXE;IACI,iBAzCC;IA0CD,iBAzCE;IA2CF;MACI,6BAAA;MACE,6BAAA;MACD,wBAAA;MACA,gBAAA;MACA,WA5CJ;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A;EACA,UH9IH;AHobT;AMjSK;EACE,mBAAA;EACC,cAAA;EACA,yCAAA;EACA,kBAAA;EACA,qCAAA;EACA,4CAAA;EACA,kBH1JC;EG4JD,iBH5JC;AH8bT;AMjSQ;EACI,cAAA;EACA,kBAAA;EACA,OAAA;ANmSZ;AM/RI;EACI,mBAAA;EACA,cAAA;EACA,yCAAA;EACA,kBAAA;EACA,qCAAA;EACA,kBH1KC;EG4KD,iBH5KC;AH4cT;AM/RQ;EACI,cAAA;EACA,kBAAA;EACA,OAAA;ANiSZ;;AMvRA;EACQ,aAAA;AN0RR;;AO9dA;EACI,aAAA;EACA,UAAA;APieJ;;AQneA;EACI,6BAAA;EACA,0BAAA;EACA,yCAAA;EACA,kBAAA;EACA,eAAA;EAGA,aAAA;EACA,4BAAA;EACA,wBAAA;EACA,wBAAA;EACA,sBAAA;EACA,mBAAA;ARoeJ;;AQ1dA;EACI,aAAA;AR6dJ;;AQ1dA;EACI,6BAAA;EACA,0BAAA;EACA,cAAA;EACA,kBAAA;EACA,SAAA;AR6dJ;;AS7fA;EAEI,8BAAA;OAAA,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"}
|
{"version":3,"sources":["style.css","modules/_var.scss","modules/_init.scss","modules/_layout.scss","modules/_text.scss","modules/_titles.scss","modules/_list-of-abbr.scss","modules/_followingNotes.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACAhB;EACI,iCAAA;EACA,iCAAA;EACA,0CAAA;EACA,yCAAA;EACA,iBAAA;EACA,iBAAA;EACA,cAAA;EACA,gBAAA;E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ACA,OAAA;EACA,sCAAA;AL8Mb;;AKxMI;EACI,0BAAA;AL2MR;;AMrYA;EACI,aAAA;EACA,UAAA;ANwYJ;;AO1YA;EACI,0BAAA;EACA,wCAAA;EAEA,kBAAA;AP4YJ;;AOvYA;EACI,qCAAA;EACA,kBAAA;AP0YJ;;AOvYA;EACI,kBAAA;EAEA,OAAA;APyYJ;;AOtYA;EACI,0BAAA;EACA,cAAA;EACA,kBAAA;EACA,SAAA;APyYJ","file":"style.css"}
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
@import 'modules/init';
|
@import 'modules/init';
|
||||||
@import 'modules/layout';
|
@import 'modules/layout';
|
||||||
@import 'modules/text';
|
@import 'modules/text';
|
||||||
@import 'modules/num-paragraph';
|
|
||||||
@import 'modules/titles';
|
@import 'modules/titles';
|
||||||
|
// @import 'modules/footnotes';
|
||||||
@import 'modules/list-of-abbr';
|
@import 'modules/list-of-abbr';
|
||||||
@import 'modules/followingNotes';
|
@import 'modules/followingNotes';
|
||||||
@import 'modules/toc';
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
"marginBox",
|
"marginBox",
|
||||||
"imposition","spread","previewPage","reloadInPlace",
|
"imposition","spread","previewPage","reloadInPlace",
|
||||||
"inlineNotes",
|
"inlineNotes",
|
||||||
"followingNotes",
|
"followingNotes"
|
||||||
"tableOfContent"
|
|
||||||
],
|
],
|
||||||
"pluginsParameters":{},
|
"pluginsParameters":{},
|
||||||
"css": [
|
"css": [
|
||||||
|
|
@ -21,17 +20,10 @@
|
||||||
"followingNotes": {
|
"followingNotes": {
|
||||||
"selector": ".inline-note",
|
"selector": ".inline-note",
|
||||||
"reset": ".chapter"
|
"reset": ".chapter"
|
||||||
},
|
|
||||||
"tableOfContent": {
|
|
||||||
"tocContainer": "#toc_container",
|
|
||||||
"tocTitles": ["#section__content h1", "#section__content h2", "h3", "h4", "h5", "h6"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hook": [
|
"hook": [
|
||||||
"/js/counters.js",
|
"/js/counters.js"
|
||||||
"/js/these.js",
|
|
||||||
"/js/snapToBaseline.js",
|
|
||||||
"/js/numParagraph.js"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,50 +20,26 @@ export default class followingNotes extends Handler {
|
||||||
|
|
||||||
beforeParsed(content) {
|
beforeParsed(content) {
|
||||||
|
|
||||||
|
console.log("floatnotes");
|
||||||
|
|
||||||
let newNotesClass = this.newNotesClass;
|
let newNotesClass = this.newNotesClass;
|
||||||
resetCounter(content, this.reset, this.notesClass);
|
resetCounter(content, this.reset, this.notesClass);
|
||||||
createCallandMarker(content, this.notesClass, newNotesClass);
|
createCallandMarker(content, this.notesClass, newNotesClass);
|
||||||
|
|
||||||
|
|
||||||
const containerMap = new Map();
|
|
||||||
|
|
||||||
let notes = content.querySelectorAll(this.notesClass);
|
let notes = content.querySelectorAll(this.notesClass);
|
||||||
notes.forEach(function (note) {
|
notes.forEach(function (note) {
|
||||||
let paragraph = note.closest("p");
|
let paragraph = note.closest("p");
|
||||||
if (!paragraph) return;
|
if (!paragraph) return;
|
||||||
|
|
||||||
// Remonter au niveau direct de #section__content (ignorer blockquote et autres conteneurs)
|
let container = paragraph.nextElementSibling;
|
||||||
const sectionContent = note.closest('#section__content') || content;
|
if (!container || !container.classList.contains("container-following-note")) {
|
||||||
let topLevel = paragraph;
|
container = document.createElement("div");
|
||||||
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");
|
container.classList.add("container-following-note");
|
||||||
if (boundary) {
|
paragraph.after(container);
|
||||||
boundary.before(container);
|
|
||||||
} else {
|
|
||||||
sectionContent.appendChild(container);
|
|
||||||
}
|
|
||||||
containerMap.set(mapKey, container);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
containerMap.get(mapKey).appendChild(note);
|
container.appendChild(note);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
.DS_Store
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
---
|
|
||||||
name: tableOfContent
|
|
||||||
tags: recommended, stable
|
|
||||||
description: A script to generate a table of content.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Table of content
|
|
||||||
|
|
||||||
A script to generate a table of content.
|
|
||||||
|
|
||||||
See pagedjs.org post: [Build a Table of Contents from your HTML](https://pagedjs.org/post/toc/)
|
|
||||||
|
|
||||||
**tags**: recommended, stable
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
The plugin contain also a minimal stylesheet to add the corresponding page numbers with paged.js and add some style to the toc list.
|
|
||||||
|
|
||||||
In `manifest.json`, you can modify/add some parameters:
|
|
||||||
|
|
||||||
```json
|
|
||||||
"plugins":{
|
|
||||||
"tableOfContent"
|
|
||||||
},
|
|
||||||
"pluginsParameters":{
|
|
||||||
"tableOfContent": {
|
|
||||||
"tocContainer": "#toc_container",
|
|
||||||
"tocTitles": ["h1", "h2"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
```
|
|
||||||
|
|
||||||
- `tocElement` → define the id element where the toc list will be create (by default: `#toc`)
|
|
||||||
- `titleElements` → array of the title element you want in the toc list. You can add as many as you want and the elements can be classes like `.title-1` or `.my-content h1:not(.unlisted)`. (by default: `["h1", "h2"]`)
|
|
||||||
- `beforePageNumber` (optional) → if you want to add some text before the page number ("page ", "p. ", ...)
|
|
||||||
- `position` → put the page number before or after the toc element, create `::before` or `::after` pseudo-element (by default: `after`)
|
|
||||||
|
|
||||||
|
|
||||||
## Stylesheet
|
|
||||||
|
|
||||||
This plugin have a minimal stylesheet
|
|
||||||
|
|
||||||
```CSS
|
|
||||||
#list-toc-generated{
|
|
||||||
--before-page: "";
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
`--before-page` refers to the text before the page number ("page ", "p. ", ...), you can change it directly here or in the config.json
|
|
||||||
|
|
||||||
|
|
||||||
If the page number is positionned after the toc element (`"position": "after"` in config.json), this style apply:
|
|
||||||
|
|
||||||
```CSS
|
|
||||||
.toc-element a.toc-page-after::after{
|
|
||||||
content: var(--before-page) target-counter(attr(href), page); /* This line create the page number */
|
|
||||||
float: right; /* put number at the right of the page */
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
If the page number is positionned before the toc element (`"position": "before"` in config.json), this style apply:
|
|
||||||
|
|
||||||
```CSS
|
|
||||||
.toc-element a.toc-page-before::before{
|
|
||||||
content: var(--before-page) target-counter(attr(href), page);
|
|
||||||
margin-right: 1ch; /* space after number */
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## How to install
|
|
||||||
|
|
||||||
### Download
|
|
||||||
|
|
||||||
1. Download the ZIP archive via Code > Download ZIP.
|
|
||||||
2. Unzip the archive.
|
|
||||||
3. Rename the extracted folder by removing the branch name suffix: `tableOfContent-main` → `tableOfContent`
|
|
||||||
4. Move the folder into the `csspageweaver/plugins/` directory.
|
|
||||||
5. Add the required parameters to `manifest.json` (see above).
|
|
||||||
|
|
||||||
|
|
||||||
### Git clone
|
|
||||||
|
|
||||||
1. Use git clone
|
|
||||||
2. Move the folder into the `csspageweaver/plugins/` directory.
|
|
||||||
3. Add the required parameters to `manifest.json` (see above).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Table of content",
|
|
||||||
"description": "A script to generate a table of content",
|
|
||||||
"author": ["Julie Blanc", "Julien Taquet"],
|
|
||||||
"licence": "MIT",
|
|
||||||
"version": "1.0",
|
|
||||||
"hook": "tableOfContent.js",
|
|
||||||
"stylesheet": "tableOfContent.css"
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
#list-toc-generated{
|
|
||||||
--before-page: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-element a.toc-page-after::after{
|
|
||||||
content: var(--before-page) target-counter(attr(href), page);
|
|
||||||
float: right; /* put number at the right of the page */
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-element a.toc-page-before::before{
|
|
||||||
content: var(--before-page) target-counter(attr(href), page);
|
|
||||||
margin-right: 1ch; /* space after number */
|
|
||||||
}
|
|
||||||
|
|
@ -1,139 +0,0 @@
|
||||||
/**
|
|
||||||
* @name Table of content
|
|
||||||
* @author Julie Blanc <contact@julie-blanc.fr>
|
|
||||||
* @see { @link https://gitlab.com/csspageweaver/plugins/table_of_content/ }
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Handler } from '/csspageweaver/lib/paged.esm.js';
|
|
||||||
|
|
||||||
export default class tableOfContent extends Handler {
|
|
||||||
|
|
||||||
constructor(chunker, polisher, caller) {
|
|
||||||
super(chunker, polisher, caller);
|
|
||||||
this.tocContainer = cssPageWeaver.features.tableOfContent.parameters?.tocContainer || "#toc_container";
|
|
||||||
this.tocTitles = cssPageWeaver.features.tableOfContent.parameters?.tocTitles || ["h1", "h2"];
|
|
||||||
this.beforePageNumber = cssPageWeaver.features.tableOfContent.parameters?.beforePageNumber;
|
|
||||||
this.position = cssPageWeaver.features.tableOfContent.parameters?.position;
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeParsed(content) {
|
|
||||||
createToc({
|
|
||||||
content: content,
|
|
||||||
container: this.tocContainer,
|
|
||||||
titleElements: this.tocTitles,
|
|
||||||
position: this.position
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
afterParsed(parsed) {
|
|
||||||
const tocLinks = parsed.querySelectorAll('.toc-element a');
|
|
||||||
tocLinks.forEach(link => {
|
|
||||||
const id = link.getAttribute('href')?.slice(1);
|
|
||||||
if (!id) return;
|
|
||||||
const heading = parsed.querySelector('#' + CSS.escape(id));
|
|
||||||
if (!heading) return;
|
|
||||||
const counter = heading.getAttribute('data-counter');
|
|
||||||
if (!counter) return;
|
|
||||||
const span = document.createElement('span');
|
|
||||||
span.className = 'toc-counter';
|
|
||||||
span.textContent = counter;
|
|
||||||
link.prepend(span);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function createToc(config) {
|
|
||||||
|
|
||||||
const content = config.content;
|
|
||||||
const tocElement = config.container;
|
|
||||||
const titleElements = config.titleElements;
|
|
||||||
|
|
||||||
let tocElementDiv = content.querySelector(tocElement)
|
|
||||||
if(!tocElementDiv) return console.warn('couldn’t start the toc')
|
|
||||||
tocElementDiv.innerHTML = ''
|
|
||||||
let tocUl = document.createElement('ul')
|
|
||||||
tocUl.id = 'list-toc-generated'
|
|
||||||
|
|
||||||
|
|
||||||
if(config.before){
|
|
||||||
tocUl.style.setProperty('--before-page', '"' + config.before + '"');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
tocElementDiv.appendChild(tocUl)
|
|
||||||
|
|
||||||
// add class to all title elements
|
|
||||||
let tocElementNbr = 0
|
|
||||||
for (var i = 0; i < titleElements.length; i++) {
|
|
||||||
let titleHierarchy = i + 1
|
|
||||||
let titleElement = content.querySelectorAll(titleElements[i])
|
|
||||||
|
|
||||||
titleElement.forEach(function (element) {
|
|
||||||
// check if shouldbe shown
|
|
||||||
if (
|
|
||||||
!element.classList.contains('toc-ignore') ||
|
|
||||||
!element.classList.contains('toc-ignore')
|
|
||||||
) {
|
|
||||||
// add classes to the element
|
|
||||||
element.classList.add('title-element')
|
|
||||||
element.setAttribute('data-title-level', titleHierarchy)
|
|
||||||
|
|
||||||
// add an id if doesn't exist
|
|
||||||
tocElementNbr++
|
|
||||||
|
|
||||||
if (element.id == '') {
|
|
||||||
element.id = 'title-element-' + tocElementNbr
|
|
||||||
}
|
|
||||||
let newIdElement = element.id
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// create toc list
|
|
||||||
let tocElements = content.querySelectorAll('.title-element')
|
|
||||||
|
|
||||||
for (var i = 0; i < tocElements.length; i++) {
|
|
||||||
let tocElement = tocElements[i]
|
|
||||||
|
|
||||||
let tocNewLi = document.createElement('li')
|
|
||||||
|
|
||||||
// Add class for the hierarcy of toc
|
|
||||||
tocNewLi.classList.add('toc-element')
|
|
||||||
tocNewLi.classList.add('toc-element-level-' + tocElement.dataset.titleLevel)
|
|
||||||
|
|
||||||
let classes = [
|
|
||||||
...(tocElement.className ? tocElement.className.split(' ') : []),
|
|
||||||
...(tocElement.closest('section')?.className ? tocElement.closest('section')?.className.split(' ') : []),
|
|
||||||
];
|
|
||||||
|
|
||||||
classes.forEach((meta) => {
|
|
||||||
if (!meta || meta === 'title-element') return;
|
|
||||||
tocNewLi.classList.add(`toc-${meta}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
//get the exisiting class
|
|
||||||
// Keep class of title elements
|
|
||||||
let classTocElement = tocElement.classList
|
|
||||||
for (var n = 0; n < classTocElement.length; n++) {
|
|
||||||
if (classTocElement[n] != 'title-element') {
|
|
||||||
tocNewLi.classList.add(classTocElement[n])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(config.position && config.position === "before"){
|
|
||||||
tocNewLi.innerHTML =
|
|
||||||
'<a class="toc-page-before" href="#' + tocElement.id + '">' + tocElement.innerHTML + '</a>';
|
|
||||||
}else{
|
|
||||||
tocNewLi.innerHTML =
|
|
||||||
'<a class="toc-page-after" href="#' + tocElement.id + '">' + tocElement.innerHTML + '</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
tocUl.appendChild(tocNewLi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
28
index.html
28
index.html
|
|
@ -4,12 +4,15 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="shortcut icon" href="data:image/x-icon;" type="image/x-icon">
|
<link rel="shortcut icon" href="data:image/x-icon;" type="image/x-icon">
|
||||||
<title>Höchstpersönlichkeit</title>
|
<title>CSS Page Weaver Example</title>
|
||||||
<script src="/csspageweaver/main.js" type="module"></script>
|
<script src="/csspageweaver/main.js" type="module"></script>
|
||||||
|
|
||||||
<link rel="stylesheet" href="/fonts/Moulin/stylesheet.css">
|
<link rel="stylesheet" href="/fonts/Edgar/stylesheet.css">
|
||||||
<link rel="stylesheet" href="/fonts/BasisGrotesquePro/stylesheet.css">
|
<link rel="stylesheet" href="/fonts/Heliotrope/stylesheet.css">
|
||||||
<link rel="stylesheet" href="/fonts/Louize/stylesheet.css">
|
<link rel="stylesheet" href="/fonts/HeliotropeCaps/stylesheet.css">
|
||||||
|
<link rel="stylesheet" href="/fonts/Prensa/stylesheet.css">
|
||||||
|
<link rel="stylesheet" href="/fonts/AlliumRounded/stylesheet.css">
|
||||||
|
<link rel="stylesheet" href="/fonts/Akkurat/stylesheet.css">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
@ -42,9 +45,6 @@
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="toc_container">
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1198,6 +1198,20 @@ Abteilung)</td>
|
||||||
<section id="section__content">
|
<section id="section__content">
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h1>Titre niveau 1</h1>
|
||||||
|
<h1>Titre niveau 1</h1>
|
||||||
|
<h1>Titre niveau 1</h1>
|
||||||
|
<h2>Titre niveau 2</h2>
|
||||||
|
<h2>Titre niveau 2</h2>
|
||||||
|
<h2>Titre niveau 2</h2>
|
||||||
|
<h3>Titre niveau 3</h3>
|
||||||
|
<h3>Titre niveau 3</h3>
|
||||||
|
<h3>Titre niveau 3</h3>
|
||||||
|
<h4>Titre niveau 4</h4> <h4>Titre niveau 4</h4> <h4>Titre niveau 4</h4>
|
||||||
|
<h5>Titre niveau 5</h5><h5>Titre niveau 5</h5><h5>Titre niveau 5</h5>
|
||||||
|
<h6>Titre niveau 6</h6><h6>Titre niveau 6</h6><h6>Titre niveau 6</h6>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<h1 id="vorrede"> Vorrede</h1>
|
<h1 id="vorrede"> Vorrede</h1>
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,7 @@ export default class counters extends Handler {
|
||||||
case 'h1':
|
case 'h1':
|
||||||
h1Count++;
|
h1Count++;
|
||||||
h2Count = 0; // reset h2
|
h2Count = 0; // reset h2
|
||||||
const originalText = el.innerHTML;
|
el.setAttribute('data-counter', this.toUpperAlpha(h1Count));
|
||||||
el.innerHTML = `<span class="h1-count">${this.toUpperAlpha(h1Count)}.</span><span class="h1-text">${originalText}</span>`;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'h2':
|
case 'h2':
|
||||||
|
|
|
||||||
|
|
@ -1,110 +0,0 @@
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,80 +0,0 @@
|
||||||
import { Handler } from '/csspageweaver/lib/paged.esm.js';
|
|
||||||
|
|
||||||
export default class snapToBaseline extends Handler {
|
|
||||||
constructor(chunker, polisher, caller) {
|
|
||||||
super(chunker, polisher, caller);
|
|
||||||
this.baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
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';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
renderNode(node, sourceNode){
|
|
||||||
if (node.nodeName === 'P') {
|
|
||||||
this.baseline = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--baseline').trim());
|
|
||||||
if (!shouldSnap(node)) return node;
|
|
||||||
const area = node.closest('.pagedjs_area');
|
|
||||||
if (area) {
|
|
||||||
const areaRect = area.getBoundingClientRect(); // cible les paragraphes sur 2 colonnes
|
|
||||||
const firstRect = node.getClientRects()[0];
|
|
||||||
if (!firstRect) return node;
|
|
||||||
const relativeTop = firstRect.top - areaRect.top;
|
|
||||||
const modulo = relativeTop % this.baseline;
|
|
||||||
|
|
||||||
if (modulo !== 0) {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
afterPageLayout(pageElement, page, breakToken){
|
|
||||||
const area = pageElement.querySelector('.pagedjs_area');
|
|
||||||
if (!area) return;
|
|
||||||
|
|
||||||
const areaRect = area.getBoundingClientRect();
|
|
||||||
const paragraphs = pageElement.querySelectorAll('p');
|
|
||||||
|
|
||||||
paragraphs.forEach((node) => {
|
|
||||||
if (!shouldSnap(node)) return;
|
|
||||||
|
|
||||||
const firstRect = node.getClientRects()[0];
|
|
||||||
if (!firstRect) return;
|
|
||||||
|
|
||||||
|
|
||||||
if (firstRect.bottom < areaRect.bottom - this.baseline) return; // cible les paragraphes qui sont sur 2 colonnes
|
|
||||||
|
|
||||||
const relativeTop = firstRect.top - areaRect.top;
|
|
||||||
const modulo = relativeTop % this.baseline;
|
|
||||||
if (modulo !== 0) {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function shouldSnap(node) {
|
|
||||||
return !node.closest('blockquote');
|
|
||||||
}
|
|
||||||
36
js/these.js
36
js/these.js
|
|
@ -1,36 +0,0 @@
|
||||||
import { Handler } from '/csspageweaver/lib/paged.esm.js';
|
|
||||||
|
|
||||||
export default class thesis extends Handler {
|
|
||||||
constructor(chunker, polisher, caller) {
|
|
||||||
super(chunker, polisher, caller);
|
|
||||||
}
|
|
||||||
|
|
||||||
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');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue