From 70e783628b1bf863da45cc8879b06288a498840b Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Fri, 5 May 2023 03:16:06 -0600 Subject: update css, make articles more uniform, add toc and add functionality to scroll to the top --- live/static/css/style.css | 51 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) (limited to 'live/static/css/style.css') diff --git a/live/static/css/style.css b/live/static/css/style.css index 5a18881..161da3d 100644 --- a/live/static/css/style.css +++ b/live/static/css/style.css @@ -13,6 +13,46 @@ h2 { text-align: center; } +h1 a.headerlink, +h2 a.headerlink, +h3 a.headerlink, +h4 a.headerlink, +h5 a.headerlink, +h5 a.headerlink { + display: none; + padding-left: 0.3em; +} + +h1:hover a.headerlink, +h2:hover a.headerlink, +h3:hover a.headerlink, +h4:hover a.headerlink, +h5:hover a.headerlink, +h6:hover a.headerlink{ + display: inline; +} + +div.return-top { + position: fixed; + bottom: 1em; + right: 1em; +} + +button.return-top { + display: none; + border: none; + font: inherit; + cursor: pointer; + position: relative; + border-radius: 5px; + min-width: 1em; + padding-top: 0.2em; + padding-bottom: 0.2em; + padding-left: 0.4em; + padding-right: 0.4em; +} + + body, html { margin: 0; @@ -77,6 +117,12 @@ main.art p { width: clamp(30ch, calc(100% - 1em), 75ch); } +/* TOC */ + +div.toc { + border-radius: 5px; + overflow-wrap: anywhere; +} /* article/art elements */ div.article-info, @@ -243,7 +289,6 @@ img { display: block; margin-left: auto; margin-right: auto; - vertical-align: middle; } img.wrap-right { @@ -377,7 +422,9 @@ div.page-nav > span { padding-left: 0.4em; padding-right: 0.4em; margin-left: 0.2em; - margin-right: 0.2em; + margin-right: 0.2em + + ; } div.art-nav > span span, -- cgit v1.2.3-54-g00ecf