From c2856146f2254fcf222dde5f3a887f9e8cf4c144 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Tue, 2 May 2023 23:36:54 +0200 Subject: [PATCH] counting headers is now part of hugo templates --- assets/css/site.css | 64 ++---------------- customizations/Dotawo/assets/css/site.css | 64 +----------------- customizations/Dotawo/static/css/site.min.css | 2 +- .../layouts/print/single.html | 65 ------------------ layouts/_default/_markup/render-heading.html | 31 ++++++++- layouts/partials/pagedjs.html | 2 - layouts/print/single.html | 67 +------------------ static/js/paged.polyfill.js | 13 +++- static/js/pagedjsCustomizations.js | 0 static/js/popcorn.min.js | 0 static/js/soundcite.min.js | 0 11 files changed, 49 insertions(+), 259 deletions(-) mode change 100644 => 100755 static/js/paged.polyfill.js mode change 100644 => 100755 static/js/pagedjsCustomizations.js mode change 100644 => 100755 static/js/popcorn.min.js mode change 100644 => 100755 static/js/soundcite.min.js diff --git a/assets/css/site.css b/assets/css/site.css index 35653aa..92b8183 100644 --- a/assets/css/site.css +++ b/assets/css/site.css @@ -576,6 +576,10 @@ img, video { padding-left: 0.1em; } +.counters { + color: rgba(0, 0, 0, 0.4); +} + .rightcolumn { /* display: grid; grid-column: 2; @@ -731,66 +735,6 @@ h2 + p:first-letter { font-weight: 400; } -body { - counter-reset: h2 glossN; -} - -h2 { - counter-reset: h3; -} - -h3 { - counter-reset: h4; -} - -h4 { - counter-reset: h5; -} - -h5 { - counter-reset: h6; -} - -h2:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h2; - content: counter(h2) ". "; -} - -h3:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h3; - content: counter(h2) "." counter(h3) ". "; -} - -h4:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h4; - content: counter(h2) "." counter(h3) "." counter(h4) ". "; -} - -h5:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h5; - content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". "; -} - -h6:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h6; - content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." - counter(h6) ". "; -} - -h2.nocount:before, -h3.nocount:before, -h4.nocount:before, -h5.nocount:before, -h6.nocount:before { - content: ""; - counter-increment: none; -} - details { padding-left: 1rem; } diff --git a/customizations/Dotawo/assets/css/site.css b/customizations/Dotawo/assets/css/site.css index 244443e..e1ccddc 100644 --- a/customizations/Dotawo/assets/css/site.css +++ b/customizations/Dotawo/assets/css/site.css @@ -401,6 +401,9 @@ ol li { font-weight: bold; } +.counters { + color: rgba(0, 0, 0, 0.4); +} /* #TableOfContents > ol:first-child > span > li > a::after { */ /* content: "¶"; */ /* color: rgba(0, 0, 0, 0.2); */ @@ -556,67 +559,6 @@ blockquote { font-family: "Gentium Plus", serif; font-variant: small-caps; } - -body { - counter-reset: h2 glossN; -} - -h2 { - counter-reset: h3; -} - -h3 { - counter-reset: h4; -} - -h4 { - counter-reset: h5; -} - -h5 { - counter-reset: h6; -} - -h2:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h2; - content: counter(h2) ". "; -} - -h3:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h3; - content: counter(h2) "." counter(h3) ". "; -} - -h4:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h4; - content: counter(h2) "." counter(h3) "." counter(h4) ". "; -} - -h5:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h5; - content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". "; -} - -h6:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: h6; - content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." - counter(h6) ". "; -} - -h2.nocount:before, -h3.nocount:before, -h4.nocount:before, -h5.nocount:before, -h6.nocount:before { - content: ""; - counter-increment: none; -} - details { padding-left: 1rem; } diff --git a/customizations/Dotawo/static/css/site.min.css b/customizations/Dotawo/static/css/site.min.css index cf0ffd6..999db40 100644 --- a/customizations/Dotawo/static/css/site.min.css +++ b/customizations/Dotawo/static/css/site.min.css @@ -1 +1 @@ -html,body,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}img,video{height:auto;max-width:100%}iframe{border:0}strong del{display:inline;text-decoration:none;margin-left:1rem;box-decoration-break:clone;-webkit-box-decoration-break:clone}table{border-collapse:collapse;border-spacing:0;background-color:#fff9f9;border-left:1px red solid;margin-left:1rem}td,th{padding:0;vertical-align:top;padding-right:1rem;padding-left:1rem;padding-bottom:.5rem}td:not([align]),th:not([align]){text-align:left}@font-face{font-family:gentium plus;font-style:normal;src:url(../fonts/GentiumPlus-R.woff),url(../fonts/GentiumPlus-R.woff)format("woff")}@font-face{font-family:gentium plus;font-style:italic;src:url(../fonts/GentiumPlus-I.woff),url(../fonts/GentiumPlus-I.woff)format("woff")}@font-face{font-family:great vibes;font-style:normal;font-weight:400;src:url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot);src:local("Great Vibes"),local("GreatVibes-Regular"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff)format("woff"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes)format("svg")}@font-face{font-family:antinoou;font-style:normal;src:url(../fonts/Antinoou.ttf),url(../fonts/Antinoou.ttf)format("truetype");unicode-range:U+2C80–U+2CFF,U+0370–U+03FF,U+102E0–U+102FF}@font-face{font-family:antinoou;font-style:italic;src:url(../fonts/AntinoouItalic.ttf),url(../fonts/AntinoouItalic.ttf)format("truetype");unicode-range:U+2C80–U+2CFF,U+0370–U+03FF,U+102E0–U+102FF}html{line-height:1.5}body{font-family:gentium plus,antinoou,serif;max-width:1024px;font-size:1.4rem;padding-left:3rem;padding-top:.5rem;padding-right:2rem;color:#000}#preview{display:none}sup,sub{vertical-align:baseline;position:relative;top:-.4em}sub{top:.4em}.headiter{display:flex;justify-content:space-between;border-bottom:.3rem solid red;border-top:.1rem solid red;padding-top:1rem;padding-bottom:.5rem;padding-left:1rem;padding-right:1rem;margin-bottom:1rem}a.edit-button{color:#000;text-decoration:none}a.edit-button:hover{text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:red;font-weight:700;cursor:pointer}.header{display:grid;grid-template-columns:auto;grid-auto-flow:column;position:sticky;top:0;padding-top:.5rem;font-size:1.1rem;background-color:#fff;z-index:10}.mantlebar{display:none}.breadcrumbs{grid-column:1}.bibliotheke{width:2.4rem;grid-column:2;margin-left:auto}.bibliotheke:hover{text-decoration:none;font-size:1rem}.alsoin{font-weight:700;display:inline-flex;padding-left:.2rem;padding-right:.3rem}.ddmenu{cursor:pointer;display:inline-grid}.ddmenu input{display:none}.ddmenu li{list-style-type:none}.ddmenu .hiddendiv{display:none;margin-top:-.9rem}input:focus,select:focus,textarea:focus,label:focus,button:focus{outline:none}.ddmenu input:checked~.hiddendiv{display:block}.logolink{width:2.4rem;margin-left:auto}.sandpointlogo{border-radius:50%;border:.3em solid red;display:inline-flex;font-family:great vibes,cursive;font-size:1.2rem;font-weight:700;color:#fff;background-color:red;position:relative;padding-left:1em;padding-right:.3em;padding-bottom:1.2em;max-width:0;max-height:0}.sandpointF{position:absolute;font-size:1.2em;margin-top:-.2em;margin-left:-.4em}.sandpointN{position:absolute;font-size:.7em;margin-top:.4em;color:red;margin-left:-.5em}.sandpointC{position:absolute;font-size:1em;margin-left:-.37em}footer{display:flex;margin-bottom:1rem;margin-top:4rem}li{list-style-type:"› "}li[role=doc-endnote]{list-style-type:decimal}ol li{list-style-type:decimal}.supt{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:rgba(0,0,0,.8);vertical-align:baseline;position:relative;top:-.3em}.sup{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative;top:-.3em}.sup:hover{font-weight:400!important}.nosup a{color:red}.nosup a span.sup{display:none}.syllabustitle,.coretitle{margin-top:4rem;font-style:italic;font-size:4rem;margin-bottom:4rem}.mantletitle,.crusttitle{margin-top:4rem;font-style:italic;font-size:2rem;margin-bottom:4rem}.grid{padding-left:3rem;margin-bottom:2rem;display:grid;grid-template-columns:1fr 1fr}.leftcolumn{grid-column:1;padding-right:1.2rem;position:relative}#TableOfContents{margin-left:-2rem;margin-top:-1.5rem}#TableOfContents li{list-style:decimal inside;padding-left:.5rem;color:rgba(0,0,0,.4);margin:0;padding:0}#TableOfContents li a{font-family:gentium plus;font-size:1.4rem;font-weight:700}.rightcolumn{padding-left:.5rem}.has{display:inline-grid;grid-column:2;grid-auto-rows:max-content;font-size:1.4rem;font-style:italic;margin-bottom:.8rem}.hasauthors{font-size:1.6rem!important;display:flex}.hassup{grid-column:1;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative}.afterhas{grid-column:2}.content{margin-top:4rem;padding-left:3rem;padding-right:10rem;max-width:720px}a{color:#000;text-decoration:none}a:hover{text-decoration:underline;text-decoration-color:red;font-weight:700;cursor:pointer}h1{display:none}h2{font-weight:700;font-size:1.6rem}h3{font-weight:700;font-size:1.4rem}h4{font-weight:700;font-size:1.2rem}h5{font-weight:700;font-size:1.1rem}h6{font-weight:700;font-size:1rem}.abstract{font-style:italic;border-left:1px solid #000;margin-left:5rem;margin-right:2rem;margin-bottom:1.2rem;padding-left:1rem;padding-right:2rem;padding-top:1.2rem;padding-bottom:1.2rem;background-color:rgba(0,0,0,5%);max-width:70ch}.authors{display:inline-block;font-size:1.8rem;margin-left:5rem;margin-right:2rem;padding-left:1rem}.keywords{display:inline-block;font-size:1.2rem;margin-left:5rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;margin-bottom:2.2rem;max-width:72ch}blockquote{border-left:1px red solid;margin-left:1rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}.hx{position:relative}.hpar{display:none}.smallcaps{font-family:gentium plus,serif;font-variant:small-caps}body{counter-reset:h2 glossN}h2{counter-reset:h3}h3{counter-reset:h4}h4{counter-reset:h5}h5{counter-reset:h6}h2:before{color:rgba(0,0,0,.4);counter-increment:h2;content:counter(h2)". "}h3:before{color:rgba(0,0,0,.4);counter-increment:h3;content:counter(h2)"." counter(h3)". "}h4:before{color:rgba(0,0,0,.4);counter-increment:h4;content:counter(h2)"." counter(h3)"." counter(h4)". "}h5:before{color:rgba(0,0,0,.4);counter-increment:h5;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)". "}h6:before{color:rgba(0,0,0,.4);counter-increment:h6;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)"." counter(h6)". "}h2.nocount:before,h3.nocount:before,h4.nocount:before,h5.nocount:before,h6.nocount:before{content:"";counter-increment:none}details{padding-left:1rem}#toggleAllLinks{font-size:.8rem}#toggleAllLinks:hover{cursor:pointer;text-decoration:underline;text-decoration-color:red}.glosscontainer{display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr;gap:0 0;grid-template-areas:"glossnumber gloss";border-left:1px red solid;background-color:#fff9f9;padding-top:.4em;margin-top:1rem;margin-bottom:1rem;margin-left:1rem;margin-right:2rem;padding-bottom:.4em;padding-left:1rem;padding-right:2rem}.gloss{grid-area:gloss}.glossnumber{grid-area:glossnumber;padding-right:.6rem}.glossnumberAuto::before{counter-increment:glossN;content:"(" counter(glossN)")"}.glosswords{display:inline-block;padding-left:-.3rem;padding-right:1rem}.sitemap{padding-left:3rem;font-size:1.2rem}.sitemap a{color:rgba(0,0,0,.4)}.sitemap .sup{color:rgba(255,0,0,.7)}.highline a,.sitemap a:hover{color:#000}.highline .sup,.sitemap .sup:hover{color:red}.highline{font-size:1.6rem;color:#000;border-left:1px red solid;padding-left:1rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}.affiliation{font-size:smaller}@media(max-width:767px){html{box-sizing:border-box;max-width:767px;margin:0 auto;padding:0}body{font-size:1rem;padding-left:10px;padding-right:10px}.grid{display:inline}.coretitle{margin-top:3rem;margin-bottom:2rem;font-size:2.2rem}.leftcolumn{display:none}.has,.afterhas{font-size:1.1rem}.mantle,.crust{margin-bottom:.2em}.content{padding:0;margin:0 auto;margin-top:4rem}.hpar{display:none}.mantletitle{font-size:1.7rem}.sessiongrid{display:none}} \ No newline at end of file +html,body,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}img,video{height:auto;max-width:100%}iframe{border:0}strong del{display:inline;text-decoration:none;margin-left:1rem;box-decoration-break:clone;-webkit-box-decoration-break:clone}table{border-collapse:collapse;border-spacing:0;background-color:#fff9f9;border-left:1px red solid;margin-left:1rem}td,th{padding:0;vertical-align:top;padding-right:1rem;padding-left:1rem;padding-bottom:.5rem}td:not([align]),th:not([align]){text-align:left}@font-face{font-family:gentium plus;font-style:normal;src:url(../fonts/GentiumPlus-R.woff),url(../fonts/GentiumPlus-R.woff)format("woff")}@font-face{font-family:gentium plus;font-style:italic;src:url(../fonts/GentiumPlus-I.woff),url(../fonts/GentiumPlus-I.woff)format("woff")}@font-face{font-family:great vibes;font-style:normal;font-weight:400;src:url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot);src:local("Great Vibes"),local("GreatVibes-Regular"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff)format("woff"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes)format("svg")}@font-face{font-family:antinoou;font-style:normal;src:url(../fonts/Antinoou.ttf),url(../fonts/Antinoou.ttf)format("truetype");unicode-range:U+2C80–U+2CFF,U+0370–U+03FF,U+102E0–U+102FF}@font-face{font-family:antinoou;font-style:italic;src:url(../fonts/AntinoouItalic.ttf),url(../fonts/AntinoouItalic.ttf)format("truetype");unicode-range:U+2C80–U+2CFF,U+0370–U+03FF,U+102E0–U+102FF}html{line-height:1.5}body{font-family:gentium plus,antinoou,serif;max-width:1024px;font-size:1.4rem;padding-left:3rem;padding-top:.5rem;padding-right:2rem;color:#000}#preview{display:none}sup,sub{vertical-align:baseline;position:relative;top:-.4em}sub{top:.4em}.headiter{display:flex;justify-content:space-between;border-bottom:.3rem solid red;border-top:.1rem solid red;padding-top:1rem;padding-bottom:.5rem;padding-left:1rem;padding-right:1rem;margin-bottom:1rem}a.edit-button{color:#000;text-decoration:none}a.edit-button:hover{text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:red;font-weight:700;cursor:pointer}.header{display:grid;grid-template-columns:auto;grid-auto-flow:column;position:sticky;top:0;padding-top:.5rem;font-size:1.1rem;background-color:#fff;z-index:10}.mantlebar{display:none}.breadcrumbs{grid-column:1}.bibliotheke{width:2.4rem;grid-column:2;margin-left:auto}.bibliotheke:hover{text-decoration:none;font-size:1rem}.alsoin{font-weight:700;display:inline-flex;padding-left:.2rem;padding-right:.3rem}.ddmenu{cursor:pointer;display:inline-grid}.ddmenu input{display:none}.ddmenu li{list-style-type:none}.ddmenu .hiddendiv{display:none;margin-top:-.9rem}input:focus,select:focus,textarea:focus,label:focus,button:focus{outline:none}.ddmenu input:checked~.hiddendiv{display:block}.logolink{width:2.4rem;margin-left:auto}.sandpointlogo{border-radius:50%;border:.3em solid red;display:inline-flex;font-family:great vibes,cursive;font-size:1.2rem;font-weight:700;color:#fff;background-color:red;position:relative;padding-left:1em;padding-right:.3em;padding-bottom:1.2em;max-width:0;max-height:0}.sandpointF{position:absolute;font-size:1.2em;margin-top:-.2em;margin-left:-.4em}.sandpointN{position:absolute;font-size:.7em;margin-top:.4em;color:red;margin-left:-.5em}.sandpointC{position:absolute;font-size:1em;margin-left:-.37em}footer{display:flex;margin-bottom:1rem;margin-top:4rem}li{list-style-type:"› "}li[role=doc-endnote]{list-style-type:decimal}ol li{list-style-type:decimal}.supt{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:rgba(0,0,0,.8);vertical-align:baseline;position:relative;top:-.3em}.sup{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative;top:-.3em}.sup:hover{font-weight:400!important}.nosup a{color:red}.nosup a span.sup{display:none}.syllabustitle,.coretitle{margin-top:4rem;font-style:italic;font-size:4rem;margin-bottom:4rem}.mantletitle,.crusttitle{margin-top:4rem;font-style:italic;font-size:2rem;margin-bottom:4rem}.grid{padding-left:3rem;margin-bottom:2rem;display:grid;grid-template-columns:1fr 1fr}.leftcolumn{grid-column:1;padding-right:1.2rem;position:relative}#TableOfContents{margin-left:-2rem;margin-top:-1.5rem}#TableOfContents li{list-style:decimal inside;padding-left:.5rem;color:rgba(0,0,0,.4);margin:0;padding:0}#TableOfContents li a{font-family:gentium plus;font-size:1.4rem;font-weight:700}.counters{color:rgba(0,0,0,.4)}.rightcolumn{padding-left:.5rem}.has{display:inline-grid;grid-column:2;grid-auto-rows:max-content;font-size:1.4rem;font-style:italic;margin-bottom:.8rem}.hasauthors{font-size:1.6rem!important;display:flex}.hassup{grid-column:1;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative}.afterhas{grid-column:2}.content{margin-top:4rem;padding-left:3rem;padding-right:10rem;max-width:720px}a{color:#000;text-decoration:none}a:hover{text-decoration:underline;text-decoration-color:red;font-weight:700;cursor:pointer}h1{display:none}h2{font-weight:700;font-size:1.6rem}h3{font-weight:700;font-size:1.4rem}h4{font-weight:700;font-size:1.2rem}h5{font-weight:700;font-size:1.1rem}h6{font-weight:700;font-size:1rem}.abstract{font-style:italic;border-left:1px solid #000;margin-left:5rem;margin-right:2rem;margin-bottom:1.2rem;padding-left:1rem;padding-right:2rem;padding-top:1.2rem;padding-bottom:1.2rem;background-color:rgba(0,0,0,5%);max-width:70ch}.authors{display:inline-block;font-size:1.8rem;margin-left:5rem;margin-right:2rem;padding-left:1rem}.keywords{display:inline-block;font-size:1.2rem;margin-left:5rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;margin-bottom:2.2rem;max-width:72ch}blockquote{border-left:1px red solid;margin-left:1rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}.hx{position:relative}.hpar{display:none}.smallcaps{font-family:gentium plus,serif;font-variant:small-caps}details{padding-left:1rem}#toggleAllLinks{font-size:.8rem}#toggleAllLinks:hover{cursor:pointer;text-decoration:underline;text-decoration-color:red}.glosscontainer{display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr;gap:0 0;grid-template-areas:"glossnumber gloss";border-left:1px red solid;background-color:#fff9f9;padding-top:.4em;margin-top:1rem;margin-bottom:1rem;margin-left:1rem;margin-right:2rem;padding-bottom:.4em;padding-left:1rem;padding-right:2rem}.gloss{grid-area:gloss}.glossnumber{grid-area:glossnumber;padding-right:.6rem}.glossnumberAuto::before{counter-increment:glossN;content:"(" counter(glossN)")"}.glosswords{display:inline-block;padding-left:-.3rem;padding-right:1rem}.sitemap{padding-left:3rem;font-size:1.2rem}.sitemap a{color:rgba(0,0,0,.4)}.sitemap .sup{color:rgba(255,0,0,.7)}.highline a,.sitemap a:hover{color:#000}.highline .sup,.sitemap .sup:hover{color:red}.highline{font-size:1.6rem;color:#000;border-left:1px red solid;padding-left:1rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}.affiliation{font-size:smaller}@media(max-width:767px){html{box-sizing:border-box;max-width:767px;margin:0 auto;padding:0}body{font-size:1rem;padding-left:10px;padding-right:10px}.grid{display:inline}.coretitle{margin-top:3rem;margin-bottom:2rem;font-size:2.2rem}.leftcolumn{display:none}.has,.afterhas{font-size:1.1rem}.mantle,.crust{margin-bottom:.2em}.content{padding:0;margin:0 auto;margin-top:4rem}.hpar{display:none}.mantletitle{font-size:1.7rem}.sessiongrid{display:none}} \ No newline at end of file diff --git a/customizations/SpectreOfReflections/layouts/print/single.html b/customizations/SpectreOfReflections/layouts/print/single.html index 648807b..ea94447 100644 --- a/customizations/SpectreOfReflections/layouts/print/single.html +++ b/customizations/SpectreOfReflections/layouts/print/single.html @@ -1,59 +1,4 @@ {{- define "singlebody" -}} - {{ $cssTemplate := `.css-_rplc_-h2 { - counter-reset: css-_rplc_-h3; - } - - .css-_rplc_-h3 { - counter-reset: css-_rplc_-h4; - } - - .css-_rplc_-h4 { - counter-reset: css-_rplc_-h5; - } - - .css-_rplc_-h5 { - counter-reset: css-_rplc_-h6; - } - - .css-_rplc_-h2:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h2 1; - content: counter(css-_rplc_-h2) ". "; - } - - .css-_rplc_-h3:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h3 1; - content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) ". "; - } - - .css-_rplc_-h4:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h4 1; - content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) "." counter(css-_rplc_-h4) ". "; - } - - .css-_rplc_-h5:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h5 1; - content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) "." counter(css-_rplc_-h4) "." counter(css-_rplc_-h5) ". "; - } - - .css-_rplc_-h6:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h6 1; - content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) "." counter(css-_rplc_-h4) "." counter(css-_rplc_-h5) "." - counter(css-_rplc_-h6) ". "; - } - - .css-_rplc_-h2.nocount:before, - .css-_rplc_-h3.nocount:before, - .css-_rplc_-h4.nocount:before, - .css-_rplc_-h5.nocount:before, - .css-_rplc_-h6.nocount:before { - content: ""; - counter-increment: none; - }` }} {{ $cssOutput := "" }} {{ $cssHashes := "" }} @@ -74,8 +19,6 @@ {{ end }}
{{ substr $p.File.Dir 0 -1 }}⁄{{ $tit }}
{{ $p.Content }}
- {{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" $p.File.UniqueID) }} - {{ $cssHashes = printf "%s css-%s-h2" $cssHashes $p.File.UniqueID }} {{ range $scratch.has_children }}
@@ -102,8 +45,6 @@ {{ partial "printsinglebody.html" . }} {{ .Content }} {{ .Scratch.Set "alreadyRendered" true }} - {{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }} - {{ $cssHashes = printf "%s css-%s-h2" $cssHashes .File.UniqueID }} {{end}} {{ $kid := $s.Get (printf "/%s" .File) }} @@ -137,8 +78,6 @@ {{ end }} {{ .Scratch.Set "alreadyRendered" true }} - {{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }} - {{ $cssHashes = printf "%s css-%s-h2" $cssHashes .File.UniqueID }} {{ end }} {{end}} {{ end }} @@ -156,8 +95,4 @@ {{ end }} {{ end }} {{ end }} - - {{ $cssOutput = printf "body {counter-reset: %s;}\n%s" $cssHashes $cssOutput }} - {{ $var := $cssOutput | resources.FromString "css/dyn.css" }} - {{ $dummy := $var.Permalink }} {{- end -}} diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index 57c5da4..e05ac21 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -1 +1,30 @@ -{{ .Text | safeHTML }} +{{ $currentLevel := .Level }} +{{ $currentHeaderKey := printf "H_%d" $currentLevel }} + +{{ if not (.Page.Scratch.Get $currentHeaderKey) }} + {{ .Page.Scratch.Set $currentHeaderKey 1 }} +{{ else }} + {{ .Page.Scratch.Set $currentHeaderKey (add 1 (.Page.Scratch.Get $currentHeaderKey)) }} +{{ end }} + +{{ if .Page.Scratch.Get "previousLevel" }} + {{ $previousLevel := .Page.Scratch.Get "previousLevel" }} + {{ if gt $previousLevel $currentLevel }} + {{ range $header := slice 1 2 3 4 5 6 }} + {{ if gt $header $currentLevel }} + {{ $.Page.Scratch.Delete (printf "H_%d" $header) }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} + +{{ $counter := "" }} +{{ range $header := slice 1 2 3 4 5 6 }} +{{ if gt ($.Page.Scratch.Get (printf "H_%d" $header)) 0 }} + {{ $counter = printf "%s%d." $counter ($.Page.Scratch.Get (printf "H_%d" $header))}} +{{ end }} +{{end}} + +{{ $counter }} {{ .Text | safeHTML }} {{ .Page.Scratch.Get "level" }} + +{{ .Page.Scratch.Set "previousLevel" .Level }} diff --git a/layouts/partials/pagedjs.html b/layouts/partials/pagedjs.html index cd0e6a3..1336d1d 100644 --- a/layouts/partials/pagedjs.html +++ b/layouts/partials/pagedjs.html @@ -1,5 +1,3 @@ - - diff --git a/layouts/print/single.html b/layouts/print/single.html index 1a4a24e..a074dd8 100644 --- a/layouts/print/single.html +++ b/layouts/print/single.html @@ -1,60 +1,4 @@ {{- define "singlebody" -}} - {{ $cssTemplate := `.css-_rplc_-h2 { - counter-reset: css-_rplc_-h3; - } - - .css-_rplc_-h3 { - counter-reset: css-_rplc_-h4; - } - - .css-_rplc_-h4 { - counter-reset: css-_rplc_-h5; - } - - .css-_rplc_-h5 { - counter-reset: css-_rplc_-h6; - } - - .css-_rplc_-h2:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h2 1; - content: counter(css-_rplc_-h2) ". "; - } - - .css-_rplc_-h3:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h3 1; - content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) ". "; - } - - .css-_rplc_-h4:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h4 1; - content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) "." counter(css-_rplc_-h4) ". "; - } - - .css-_rplc_-h5:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h5 1; - content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) "." counter(css-_rplc_-h4) "." counter(css-_rplc_-h5) ". "; - } - - .css-_rplc_-h6:before { - color: rgba(0, 0, 0, 0.4); - counter-increment: css-_rplc_-h6 1; - content: counter(css-_rplc_-h2) "." counter(css-_rplc_-h3) "." counter(css-_rplc_-h4) "." counter(css-_rplc_-h5) "." - counter(css-_rplc_-h6) ". "; - } - - .css-_rplc_-h2.nocount:before, - .css-_rplc_-h3.nocount:before, - .css-_rplc_-h4.nocount:before, - .css-_rplc_-h5.nocount:before, - .css-_rplc_-h6.nocount:before { - content: ""; - counter-increment: none; - }` }} - {{ $cssOutput := "" }} {{ $cssHashes := "" }} @@ -85,9 +29,7 @@
{{ partial "printsinglebody.html" $p }}
{{ $p.Content }}
- {{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" $p.File.UniqueID) }} - {{ $cssHashes = printf "%s css-%s-h2" $cssHashes $p.File.UniqueID }} - + {{ range $scratch.has_children }}
{{ $addS := 0 }} @@ -120,8 +62,6 @@
{{ index $scratch.crust 0 }}⁄{{ $tit }}
{{ partial "printsinglebody.html" . }} {{ .Content }} - {{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }} - {{ $cssHashes = printf "%s css-%s-h2" $cssHashes .File.UniqueID }} {{ $kid := $s.Get (printf "/%s" .File) }} {{ range $kid.has_children }}
@@ -146,8 +86,6 @@
{{ index $scratch.crust 0 }}⁄{{ $tit }}
{{ partial "printsinglebody.html" . }} {{ .Content }} - {{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }} - {{ $cssHashes = printf "%s css-%s-h2" $cssHashes .File.UniqueID }} {{ end }} {{ end }} @@ -172,7 +110,4 @@
{{ end }} {{ end }} - {{ $cssOutput = printf "body {counter-reset: %s;}\n%s" $cssHashes $cssOutput }} - {{ $var := $cssOutput | resources.FromString "css/dyn.css" }} - {{ $dummy := $var.Permalink }} {{- end -}} diff --git a/static/js/paged.polyfill.js b/static/js/paged.polyfill.js old mode 100644 new mode 100755 index e1f48b4..3e06680 --- a/static/js/paged.polyfill.js +++ b/static/js/paged.polyfill.js @@ -1,5 +1,5 @@ /** - * @license Paged.js v0.4.0 | MIT | https://gitlab.pagedmedia.org/tools/pagedjs + * @license Paged.js v0.4.1 | MIT | https://gitlab.pagedmedia.org/tools/pagedjs */ (function (global, factory) { @@ -27116,13 +27116,20 @@ counter-reset: unset; } -[data-footnote-marker]:not([data-split-from]) { - counter-increment: footnote-marker; +[data-footnote-marker] { text-indent: 0; display: list-item; list-style-position: inside; } +[data-footnote-marker][data-split-from] { + list-style: none; +} + +[data-footnote-marker]:not([data-split-from]) { + counter-increment: footnote-marker; +} + [data-footnote-marker]::marker { content: counter(footnote-marker) ". "; } diff --git a/static/js/pagedjsCustomizations.js b/static/js/pagedjsCustomizations.js old mode 100644 new mode 100755 diff --git a/static/js/popcorn.min.js b/static/js/popcorn.min.js old mode 100644 new mode 100755 diff --git a/static/js/soundcite.min.js b/static/js/soundcite.min.js old mode 100644 new mode 100755