From 66c4a84f10026472918371f3d1a051004771eb08 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Thu, 27 Aug 2020 01:45:01 +0200 Subject: [PATCH] fixed regression at front page if *not* small screen.. --- static/js/sandpoints.js | 9 +++++++-- themes/sandpoints/assets/css/site.css | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/static/js/sandpoints.js b/static/js/sandpoints.js index 6d44e5b..ce1068b 100644 --- a/static/js/sandpoints.js +++ b/static/js/sandpoints.js @@ -19,8 +19,13 @@ window.addEventListener('scroll', function(e) { window.addEventListener('DOMContentLoaded', (e) => { if (document.querySelector('.syllabusgrid')) { - toggle('syllabus/'); + if (document.querySelector('body').clientWidth > 1024) { + document.querySelector('.syllabusgrid').classList.remove('syllabusgrid') + } else { + toggle('syllabus/'); + } } + let par = document.querySelector("#TableOfContents > ol:first-child > li:first-child"); let s = document.createElement("span"); s.appendChild(par.cloneNode(true)) @@ -28,6 +33,7 @@ window.addEventListener('DOMContentLoaded', (e) => { 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'); @@ -37,7 +43,6 @@ var toggle = function(ts) { grid.classList.add('mobilegrid') } - if (rightcolumn.classList.contains('shown')) { rightcolumn.classList.remove('shown'); rightcolumn.style.display = "none"; diff --git a/themes/sandpoints/assets/css/site.css b/themes/sandpoints/assets/css/site.css index 37299e3..0b257b3 100644 --- a/themes/sandpoints/assets/css/site.css +++ b/themes/sandpoints/assets/css/site.css @@ -435,6 +435,10 @@ body { display: none } +li { + list-style-type: "› "; +} + .sup { display: inline-flex; flex-wrap: nowrap; @@ -689,6 +693,7 @@ h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.n .content { padding: 0px; margin: 0 auto; + margin-top: 4rem; } .hpar {