From f96c3f71f6c8be30a333fcce69b4d1896953aab2 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sun, 28 Aug 2022 11:42:19 -0400 Subject: [i-love-my-pinephone] Final cut + publish --- haunt/jakob/builder/blog.scm | 1 + haunt/static/css/style.css | 5 +++-- haunt/static/js/section-folds.js | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'haunt') diff --git a/haunt/jakob/builder/blog.scm b/haunt/jakob/builder/blog.scm index 8f02a80..cf333d6 100644 --- a/haunt/jakob/builder/blog.scm +++ b/haunt/jakob/builder/blog.scm @@ -95,6 +95,7 @@ (p "Alternatively, you can send an " ,(hyperlink (build-anonymous-comment-url post) "anonymous comment") ".") + ,(script "section-folds.js") ,(script "webmention.js")))) (define (render-preview post) diff --git a/haunt/static/css/style.css b/haunt/static/css/style.css index 930ef02..6dbbe4e 100644 --- a/haunt/static/css/style.css +++ b/haunt/static/css/style.css @@ -121,6 +121,7 @@ a:link, a:visited { color: #00E; text-decoration: none; } figure > img { display: block; + max-height: 600px; max-width: 90%; margin: auto; @@ -310,9 +311,9 @@ button { /* Folded sections. */ .fold-hidden { - height: 45px; + height: 300px; overflow: hidden; - mask-image: linear-gradient(to bottom, black 0%, transparent 100%); + mask-image: linear-gradient(to bottom, black 0%, black 80%, transparent 100%); } /* Styles specific to the "about" page. */ diff --git a/haunt/static/js/section-folds.js b/haunt/static/js/section-folds.js index ed6507e..559dd9a 100644 --- a/haunt/static/js/section-folds.js +++ b/haunt/static/js/section-folds.js @@ -40,10 +40,9 @@ function handleFolds() { // The text will be inside of an anchor, which we'll hook onto using an // event listener. let foldAnchor = document.createElement("a"); - foldAnchor.href = "#"; let foldText = document.createElement("p"); foldAnchor.appendChild(foldText); - fold.parentNode.insertBefore(foldAnchor, fold); + fold.parentNode.insertBefore(foldAnchor, fold.nextSibling); // The fold will start off in the "hidden" state. let toggle = false; -- cgit v1.3