diff --git a/themes/sandpoints/assets/css/site.css b/themes/sandpoints/assets/css/site.css index d086a04..870f9ac 100644 --- a/themes/sandpoints/assets/css/site.css +++ b/themes/sandpoints/assets/css/site.css @@ -431,22 +431,54 @@ body { color: black; } -.logolink { +.header { + display: grid; + grid-auto-flow: column; + position: sticky; + top: 0; + padding-top: 0.5rem; + font-size: 1.1rem; + background-color: white; + z-index: 10; +} + +.topicbar { + display: none; +} + +.breadcrumbs { + grid-column: 1; +} + +.bibliotheke { + width: 2.4rem; + grid-column: 2; + margin-left: auto; +} + +.bibliotheke:hover { + text-decoration: none; + font-size: 1rem; +} + +.logolink { + width: 2.4rem; margin-left: auto; - order: 2; } .sandpointlogo { + border-radius: 50%; + border: 0.3em solid red; display: inline-flex; font-family: 'Great Vibes', cursive; - font-size: 1.3rem; + font-size: 6rem; + font-weight: bold; color: white; - background-color: rgba(255, 0, 0, 0.8); + background-color: red; position: relative; - padding-top: 0.4em; padding-left: 1em; - padding-right: 0.7em; - padding-bottom: 1.4em; + padding-right: 0.3em; + padding-bottom: 1.2em; max-width: 0em; max-height: 0em; } @@ -460,31 +492,22 @@ body { .sandpointN { position: absolute; - margin-left: -0.3em; - margin-top: -0.1em; + font-size: 0.7em; + margin-top: 0.4em; + color: red; + margin-left: -0.5em; } .sandpointC { position: absolute; - margin-top: 0.2em; - margin-left: 0.1em; -} - -.sandpoints { - display: inline-flex; - background-color: white; - color: black; - font-family: 'Vollkorn', serif; - font-style: italic; + font-size: 1em; + margin-left: -0.37em; } footer { display: flex; - font-size: 1rem; -} - -.footerline { - margin-top: auto; + margin-bottom: 1rem; + margin-top: 4rem; } li { @@ -495,10 +518,6 @@ img { width: 100%; } -.dotslash { - display: none -} - .sup { display: inline-flex; flex-wrap: nowrap; @@ -644,19 +663,6 @@ blockquote { background-color: #fff9f9; } -.header { - position: sticky; - top: 0; - padding-top: 0.5rem; - font-size: 1.1rem; - background-color: white; - z-index: 10; -} - -.topicbar { - display: none; -} - h2 + p:first-letter { font-family: "Great Vibes", cursive; color: rgba(0, 0, 0, 0.8); @@ -730,7 +736,7 @@ h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.n } .grid { - display: none; + display: inline; } .syllabustitle { @@ -739,12 +745,6 @@ h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.n font-size: 2.2rem; } - .mobilegrid { - display: grid; - grid-template-columns: 1fr 1fr; - padding: 0; - } - .leftcolumn { display: none; } @@ -756,6 +756,7 @@ h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.n .session, .topic { margin-bottom: 0.2em; } + .content { padding: 0px; margin: 0 auto; @@ -765,44 +766,12 @@ h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.n .hpar { display: none; } - + .topicstitle { font-size: 1.7rem; } - .dotslash { - content: ".⁄"; - display: inline-flex; - flex-wrap: nowrap; - font-family: 'Great Vibes', cursive; - font-size: 0.8em; - font-weight: 700; - background-color: rgba(255, 0, 0, 0.8); - color: white; - vertical-align: baseline; - position: relative; - top: -0.4em; - margin-right: 0.5em; - padding-left: 0.1em; - padding-right: 0.5em; - padding-top: 0.2em; - padding-bottom: 0; - } - - .ddmenu { - display: inline; - } - .ddmenu input { + .sessiongrid { display: none; } - - .ddmenu .hiddendiv { - display: none; - } - - .ddmenu input:checked ~ .hiddendiv { - display: block; - } - - } diff --git a/static/js/sandpoints.js b/themes/sandpoints/assets/js/sandpoints.js similarity index 50% rename from static/js/sandpoints.js rename to themes/sandpoints/assets/js/sandpoints.js index 6c33c39..b6d65f0 100644 --- a/static/js/sandpoints.js +++ b/themes/sandpoints/assets/js/sandpoints.js @@ -1,57 +1,31 @@ window.addEventListener('scroll', function(e) { - console.log(document.querySelector('body').clientWidth); if (document.querySelector('body').clientWidth > 1024) { let rightcolumn = document.querySelector('.rightcolumn'); let topicstitle = document.querySelector('.topicstitle') let topicbar = document.querySelector('.topicbar') let grid = document.querySelector('.grid') let gridrect = topicstitle.getBoundingClientRect(); - if (gridrect.top < 12 && !grid.classList.contains('moved')) { + if (gridrect.top < 20 && !grid.classList.contains('moved')) { grid.classList.add('moved'); topicbar.style.display = "inline"; topicstitle.style.visibility = "hidden"; grid.style.display = "none"; window.scrollBy({top: grid.clientHeight + topicstitle.clientHeight, behavior: 'smooth'}) + } else if (gridrect.top > 21 && grid.classList.contains('moved')) { + grid.classList.remove('moved'); + topicstitle.style.visibility = "visible"; + topicbar.style.display = "none"; + grid.style.display = "grid"; + window.scroll({top: 0, behavior: 'smooth'}) } } }) window.addEventListener('DOMContentLoaded', (e) => { - if (document.querySelector('.syllabusgrid')) { - if (document.querySelector('body').clientWidth > 1024) { - document.querySelector('.syllabusgrid').classList.remove('syllabusgrid') - } else { - toggle('syllabus/'); - } - } else if (document.querySelector('body').clientWidth < 361) { - toggle('syllabus/'); - } - let par = document.querySelector("#TableOfContents > ol:first-child > li:first-child"); let s = document.createElement("span"); s.appendChild(par.cloneNode(true)) par.remove() document.querySelector("#TableOfContents > ol:first-child").insertBefore(s, document.querySelector("#TableOfContents > ol:first-child").firstChild) }) - - -var toggle = function(ts) { - let rightcolumn = document.querySelector('.rightcolumn'); - let grid = document.querySelector('.grid'); - - if (grid) { - grid.classList.remove('grid') - grid.classList.add('mobilegrid') - } - - if (rightcolumn.classList.contains('shown')) { - rightcolumn.classList.remove('shown'); - rightcolumn.style.display = "none"; - document.querySelector('.mobilegrid').style.display = "none"; - } else { - rightcolumn.classList.add('shown'); - rightcolumn.style.display = "grid"; - document.querySelector('.mobilegrid').style.display = "block"; - } -} diff --git a/themes/sandpoints/layouts/_default/list.html b/themes/sandpoints/layouts/_default/list.html index 0e21a60..dde3ef1 100644 --- a/themes/sandpoints/layouts/_default/list.html +++ b/themes/sandpoints/layouts/_default/list.html @@ -2,7 +2,7 @@ {{$currentNode := . }}