From 55cfef7fcaad7a657336b8be62508be9f631ff86 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sun, 6 Jun 2021 08:41:27 -0600 Subject: reflect new changes --- static/css/style.css | 66 ++++++++++++++++++++++++++++++------------- static/css/theme.css | 6 ++-- static/hl/highlight-ln.min.js | 1 + 3 files changed, 50 insertions(+), 23 deletions(-) create mode 100644 static/hl/highlight-ln.min.js (limited to 'static') diff --git a/static/css/style.css b/static/css/style.css index ec95b6a..753cf3e 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -3,18 +3,14 @@ font-size: larger; } -h1 { - text-align: center; -} - -ul { - margin-left: 2em; - margin-right: 2em; +* { + box-sizing: border-box; + transition: all 0.25s ease-in-out; } -ul.page-list { - margin-left: 0; - margin-right: 0; +h1, +h2 { + text-align: center; } body, html { @@ -22,11 +18,6 @@ body, html { padding: 0; } -* { - box-sizing: border-box; - transition: all 0.25s ease-in-out; -} - body { width: 100%; display: grid; @@ -49,6 +40,7 @@ body > footer { main { grid-area: main; + border-radius: 5px; } a{ @@ -91,7 +83,8 @@ nav ul { nav li { display: block; float: left; - min-width: 2em; + border-radius: 5px; + min-width: 1em; max-width: 10em; padding-top: 0.2em; padding-bottom: 0.2em; @@ -118,7 +111,14 @@ nav > ul > li > ul > li { } nav span { - padding-left: 0.4em; + display: none; +} + +@media screen and (min-width: 600px) { + nav span { + display: inline; + padding-left: 0.4em; + } } @@ -168,9 +168,35 @@ button.theme-switcher > .fa-moon { } /* code blocks */ +pre { + white-space: pre-wrap; +} + +code { + overflow-wrap: anywhere; +} + code.crypto { font-size: smaller; - overflow-wrap: anywhere; +} + +/* for hljs line numbers */ +.hljs-ln-numbers { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + text-align: right; + border-right: 1px solid #CCC; + vertical-align: top; + padding-right: 0.5em !important; +} + +.hljs-ln-code { + padding-left: 0.5em !important; } @@ -230,11 +256,11 @@ div.art-grid img { overflow: hidden; } -@media screen and (min-width: 600px) { +@media screen and (min-width: 600px) { div.art-grid img.wide { grid-column: span 2 / auto; } - + div.art-grid img.tall { grid-row: span 2 / auto; } diff --git a/static/css/theme.css b/static/css/theme.css index 6fc0501..f490841 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -109,7 +109,7 @@ body { } main { - background: linear-gradient(var(--bg) 0.5em, 1em, var(--body-bg) 1.5em calc(100% - 1.5em), calc(100% - 1em), var(--bg) calc(100% - 0.5em)); + background: var(--body-bg); } pre, code { @@ -119,7 +119,7 @@ pre, code { /* nav bar */ body > header { - background: linear-gradient(var(--body-bg) calc(100% - 1.5em), calc(100% - 1em), var(--bg) calc(100% - 0.5em)); + background: var(--bg); } nav li { @@ -142,7 +142,7 @@ nav li:hover > a { /* footer */ body > footer { - background: linear-gradient(var(--bg) calc(100% - 1.5em), calc(100% - 1em), var(--body-bg) calc(100% - 0.5em)); + background: var(--bg); } diff --git a/static/hl/highlight-ln.min.js b/static/hl/highlight-ln.min.js new file mode 100644 index 0000000..a5f9f20 --- /dev/null +++ b/static/hl/highlight-ln.min.js @@ -0,0 +1 @@ +!function(r,o){"use strict";var e,i="hljs-ln",l="hljs-ln-line",h="hljs-ln-code",s="hljs-ln-numbers",c="hljs-ln-n",m="data-line-number",a=/\r\n|\r|\n/g;function u(e){for(var n=e.toString(),t=e.anchorNode;"TD"!==t.nodeName;)t=t.parentNode;for(var r=e.focusNode;"TD"!==r.nodeName;)r=r.parentNode;var o=parseInt(t.dataset.lineNumber),a=parseInt(r.dataset.lineNumber);if(o==a)return n;var i,l=t.textContent,s=r.textContent;for(a
{6}',[l,s,c,m,h,o+n.startFrom,0{1}',[i,r])}return e}(e.innerHTML,o)}function v(e){var n=e.className;if(/hljs-/.test(n)){for(var t=g(e.innerHTML),r=0,o="";r{1}\n',[n,0