From 198194ea194b6f091868e71f7b129e36caa4d6f4 Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 8 Oct 2019 13:21:30 +0200 Subject: layout fixes: - link from logo to root - links to path/: unless `STATIC` is set --- scss/_browser.scss | 156 ++++++++++++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 78 deletions(-) (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index 4d4a260..2bfc73e 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -3,109 +3,109 @@ flex: 1; border-top: 0.2rem solid $gray-bright; +} - .view { - display: flex; - flex-direction: column; - - flex: 1 1 0; - min-width: 0; +.view { + display: flex; + flex-direction: column; - &.inspector { - top: 0; - position: sticky; - max-height: 100vh; - color: #c5c8c6; + flex: 1 1 0; + min-width: 0; - @include left-border; - border-color: $gray-dark; - background: $gray-dark; + &.inspector { + top: 0; + position: sticky; + max-height: 100vh; + color: #c5c8c6; - nav { - background: inherit; - } - - .content { - margin: 0; - padding: 0; - display: flex; - background: $gray-darker; - - > * { - display: block; - margin: 0; - padding: 1em; - border-radius: 0; - border: 0; - flex: 1; - } - } - } + @include left-border; + border-color: $gray-dark; + background: $gray-dark; nav { - position: sticky; - top: 0; + background: inherit; + } + .content { + margin: 0; + padding: 0; display: flex; - flex: 0 0 auto; - flex-wrap: wrap; - justify-content: space-between; - background: $gray-bright; - z-index: 1000; - - > span:first-of-type { - flex: 1 0 auto; - } + background: $gray-darker; > * { - margin: 1em; - white-space: nowrap; - } - - > .inspect-btn { - @include media-small() { display: none; } + display: block; + margin: 0; + padding: 1em; + border-radius: 0; + border: 0; + flex: 1; } } + } + + nav { + position: sticky; + top: 0; - .error-wrap { - flex: 0 0 auto; - padding: 1em 2em; - overflow: hidden; + display: flex; + flex: 0 0 auto; + flex-wrap: wrap; + justify-content: space-between; + background: $gray-bright; + z-index: 1000; + + > span:first-of-type { + flex: 1 0 auto; + } - background: $gray-fail; + > * { + margin: 1em; + white-space: nowrap; + } - &.empty { - display: none; - } + > .inspect-btn { + @include media-small() { display: none; } + } + } - > span { - display: inline-block; - margin-bottom: 0.5em; + .error-wrap { + flex: 0 0 auto; + padding: 1em 2em; + overflow: hidden; - font-weight: bold; - color: #f00; - } + background: $gray-fail; - > pre { - margin: 0; - } + &.empty { + display: none; } - .content { - flex: 1 1 auto; - overflow: auto; - padding: 1em 2em; + > span { + display: inline-block; + margin-bottom: 0.5em; + + font-weight: bold; + color: #f00; + } - position: relative; + > pre { + margin: 0; } } .content { - opacity: 1; - transition: opacity 150ms; + flex: 1 1 auto; + overflow: auto; + padding: 1em 2em; - body.loading & { - opacity: 0; - } + position: relative; + } +} + +.content { + opacity: 1; + transition: opacity 150ms; + + body.loading & { + opacity: 0; } } -- cgit v1.2.3 From 75b1f5a1a21069154d41742a84970f4d2ccb2d58 Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 8 Oct 2019 21:46:55 +0200 Subject: fix header, double div.content --- scss/_header.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scss') diff --git a/scss/_header.scss b/scss/_header.scss index ccaf658..fd3aec3 100644 --- a/scss/_header.scss +++ b/scss/_header.scss @@ -26,8 +26,12 @@ header { font-weight: 400; } - .sun { + > a { height: 5rem; + } + + .sun { + height: 100%; stroke: currentColor; fill: currentColor; -- cgit v1.2.3 From e69acb97c24f6f2659633596f33edcaa8c08d2bd Mon Sep 17 00:00:00 2001 From: s-ol Date: Wed, 9 Oct 2019 14:41:26 +0200 Subject: add ba_log entry 2019-10-09 --- scss/_reset.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scss') diff --git a/scss/_reset.scss b/scss/_reset.scss index 99f1cae..0f4fa6e 100644 --- a/scss/_reset.scss +++ b/scss/_reset.scss @@ -16,7 +16,7 @@ h1, h2, h3, h4, h5, h6 { font-weight: bold; } input, select, button { color: initial; } tt, code, kbd, samp { font-family: monospace; } code { font-size: 0.8em; } -b { font-weight: bold; } +b, strong { font-weight: bold; } em, i { font-style: italic; } a { font-size: 1em; cursor: pointer; } hr { clear: both; } -- cgit v1.2.3 From b23af2ff33e920d3994ad4b603221c4a208c5cde Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 26 Oct 2019 13:48:51 +0200 Subject: adjust mermaid-diagram size to content width --- scss/_content.scss | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scss') diff --git a/scss/_content.scss b/scss/_content.scss index 708685f..66b9f42 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -8,6 +8,8 @@ .markdown > p, .markdown > p > a, .markdown > a { + max-width: 100%; + > img, > video { display: block; max-width: 100%; @@ -21,6 +23,7 @@ .embed { width: inherit; height: inherit; + max-width: inherit; .description { text-align: center; -- cgit v1.2.3 From 3e896d7326cd573dc39b64a3ea1d987cb42aad67 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 26 Oct 2019 15:56:09 +0200 Subject: print css fix --- scss/_browser.scss | 5 +++++ scss/_footer.scss | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index 2bfc73e..b9910e8 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -47,6 +47,11 @@ position: sticky; top: 0; + @media print { + position: relative; + display: none; + } + display: flex; flex: 0 0 auto; flex-wrap: wrap; diff --git a/scss/_footer.scss b/scss/_footer.scss index 3cc3f5a..727ebda 100644 --- a/scss/_footer.scss +++ b/scss/_footer.scss @@ -4,6 +4,12 @@ footer { position: sticky; bottom: 0; + + @media print { + position: absolute; + display: none; + } + color: $gray-bright; background: $gray-dark; -- cgit v1.2.3 From 28653c9ae46b2b3e42c2c75879589138c731f37b Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 27 Oct 2019 20:22:00 +0100 Subject: facet editing with CodeMirror! --- scss/_browser.scss | 2 +- scss/_footer.scss | 1 + scss/codemirror.scss | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ scss/main.scss | 1 + 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 scss/codemirror.scss (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index b9910e8..b843916 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -15,7 +15,7 @@ &.inspector { top: 0; position: sticky; - max-height: 100vh; + max-height: calc(100vh - 3rem); color: #c5c8c6; @include left-border; diff --git a/scss/_footer.scss b/scss/_footer.scss index 727ebda..4f1c8bd 100644 --- a/scss/_footer.scss +++ b/scss/_footer.scss @@ -1,6 +1,7 @@ footer { display: flex; padding: 1rem 2rem; + height: 1rem; position: sticky; bottom: 0; diff --git a/scss/codemirror.scss b/scss/codemirror.scss new file mode 100644 index 0000000..1967f8c --- /dev/null +++ b/scss/codemirror.scss @@ -0,0 +1,72 @@ +/* + vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) +*/ + +/*background color*/ +.CodeMirror.cm-s-hybrid { + color: #c5c8c6; + background: #1d1f21; + + height: auto; + + /*selection color*/ + .CodeMirror-selected, + .CodeMirror-line::selection, + .CodeMirror-line > span::selection, + .CodeMirror-line > span > span::selection, { + background: #373b41; + } + + /*foreground color*/ + .CodeMirror-cursor { + border-color: #c5c8c6; + } + + /*color: fg_yellow*/ + .cm-keyword { + color: #f0c674; + } + + /*color: fg_comment*/ + .cm-comment, + .cm-meta { + color: #707880; + } + + /*color: fg_red*/ + .cm-number, + .cm-atom { + color: #cc6666 + } + + /*color: fg_green*/ + .cm-string, + .cm-string-2, + .cm-operator { + color: #b5bd68; + } + + /*color: fg_purple*/ + .cm-attribute, + .cm-propery { + color: #b294bb; + } + + /*color: fg_blue*/ + .cm-tag, + .cm-qualifier { + color: #81a2be; + } + + /*color: fg_aqua*/ + .cm-link, + .cm-header, + .cm-hr { + color: #8abeb7; + } + + /*color: fg_orange*/ + .cm-builtin, { + color: #de935f; + } +} diff --git a/scss/main.scss b/scss/main.scss index c1e9d38..08ce942 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -1,6 +1,7 @@ @import 'defs'; @import 'reset'; @import 'hljs'; +@import 'codemirror'; @import 'header'; @import 'footer'; @import 'browser'; -- cgit v1.2.3 From 78a90d184f0b186164b41e07dc0ce3891420c99d Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 26 Oct 2019 21:36:51 +0200 Subject: fix the damn text width problem, once and for all ???? --- scss/_browser.scss | 5 +++++ scss/_content.scss | 16 +++++++++++++--- scss/_defs.scss | 1 + scss/_reset.scss | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index b843916..da49f71 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -30,6 +30,7 @@ margin: 0; padding: 0; display: flex; + align-self: stretch; background: $gray-darker; > * { @@ -101,6 +102,10 @@ flex: 1 1 auto; overflow: auto; padding: 1em 2em; + margin: 0 1em; + align-self: flex-start; + min-width: 30vw; + background: var(--white); position: relative; } diff --git a/scss/_content.scss b/scss/_content.scss index 66b9f42..6993fef 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -4,11 +4,17 @@ height: inherit; } + .markdown { + max-width: 640px; + position: relative; + } + .markdown, .markdown > p, - .markdown > p > a, - .markdown > a { - max-width: 100%; + .markdown > p > a { + p, a { + max-width: 100%; + } > img, > video { display: block; @@ -39,6 +45,10 @@ margin: 0.2em; background: $gray-bright; } + + > *:not(.description) { + max-width: 100%; + } } pre > code { diff --git a/scss/_defs.scss b/scss/_defs.scss index 7806420..40804b2 100644 --- a/scss/_defs.scss +++ b/scss/_defs.scss @@ -22,6 +22,7 @@ $break-large: 768px; } :root { + --white: #{$white}; --gray-bright: #{$gray-bright}; --gray-dark: #{$gray-dark}; --gray-darker: #{$gray-darker}; diff --git a/scss/_reset.scss b/scss/_reset.scss index 0f4fa6e..859f96f 100644 --- a/scss/_reset.scss +++ b/scss/_reset.scss @@ -27,7 +27,7 @@ body { flex-direction: column; justify-content: space-between; - background: $white; + background: var(--gray-bright); font-family: sans-serif; min-height: 100vh; -- cgit v1.2.3 From 4b8d9be10e4517114c0c216fa24aaaa310503d4a Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 29 Oct 2019 12:52:56 +0100 Subject: save edited changes --- scss/codemirror.scss | 1 + 1 file changed, 1 insertion(+) (limited to 'scss') diff --git a/scss/codemirror.scss b/scss/codemirror.scss index 1967f8c..fd50b00 100644 --- a/scss/codemirror.scss +++ b/scss/codemirror.scss @@ -8,6 +8,7 @@ background: #1d1f21; height: auto; + flex: 1; /*selection color*/ .CodeMirror-selected, -- cgit v1.2.3 From e0a96098143697821d66153acd0b8d0cf8acbb2a Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 29 Oct 2019 12:53:09 +0100 Subject: small styling fixes --- scss/_browser.scss | 1 + scss/_reset.scss | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index da49f71..1c5b5b2 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -79,6 +79,7 @@ padding: 1em 2em; overflow: hidden; + color: $gray-darker; background: $gray-fail; &.empty { diff --git a/scss/_reset.scss b/scss/_reset.scss index 859f96f..396c3e7 100644 --- a/scss/_reset.scss +++ b/scss/_reset.scss @@ -13,7 +13,12 @@ body, html, h1, h2, h3, h4, h5, h6 { } h1, h2, h3, h4, h5, h6 { font-weight: bold; } -input, select, button { color: initial; } +input, select, button { + color: initial; + &:disabled { + color: graytext; + } +} tt, code, kbd, samp { font-family: monospace; } code { font-size: 0.8em; } b, strong { font-weight: bold; } -- cgit v1.2.3 From 3c79e6904c2df4e542d43b9e1068c75384fb6a89 Mon Sep 17 00:00:00 2001 From: s-ol Date: Wed, 30 Oct 2019 11:51:43 +0100 Subject: fix embed in static rendered markdown --- scss/_content.scss | 1 + 1 file changed, 1 insertion(+) (limited to 'scss') diff --git a/scss/_content.scss b/scss/_content.scss index 6993fef..51994a3 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -27,6 +27,7 @@ } .embed { + display: block; width: inherit; height: inherit; max-width: inherit; -- cgit v1.2.3 From dc08e262cd53a48480a88235aa58500f0638ad79 Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 31 Oct 2019 17:14:07 +0100 Subject: allow adding and removing of facets --- scss/_browser.scss | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index 1c5b5b2..47be262 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -72,6 +72,10 @@ > .inspect-btn { @include media-small() { display: none; } } + + .tight { + margin-left: 0; + } } .error-wrap { -- cgit v1.2.3 From ff9ee8e99cd5f5c420ba0501c335ac18f1b10769 Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 31 Oct 2019 18:26:31 +0100 Subject: browsing, adding, removing fileders in inspector --- scss/_browser.scss | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index 47be262..f39e1df 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -42,6 +42,14 @@ flex: 1; } } + + .children { + margin: 0; + padding: 1em; + + align-self: stretch; + background: $gray-darker; + } } nav { -- cgit v1.2.3 From b897f7705e437a776d18bb3a8c6725d009d31111 Mon Sep 17 00:00:00 2001 From: s-ol Date: Fri, 1 Nov 2019 14:08:37 +0100 Subject: fix inspector --- scss/_browser.scss | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index f39e1df..adf9dd1 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -77,6 +77,10 @@ white-space: nowrap; } + &.thin > * { + margin: 0.5em 1em; + } + > .inspect-btn { @include media-small() { display: none; } } -- cgit v1.2.3 From 19b4e92138bbcef9cde90a12141530e1bd6aa13a Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 17 Dec 2019 20:26:29 +0100 Subject: add sidenote support --- scss/_sidenotes.scss | 31 +++++++++++++++++++++++++++++++ scss/main.scss | 1 + 2 files changed, 32 insertions(+) create mode 100644 scss/_sidenotes.scss (limited to 'scss') diff --git a/scss/_sidenotes.scss b/scss/_sidenotes.scss new file mode 100644 index 0000000..8579ba1 --- /dev/null +++ b/scss/_sidenotes.scss @@ -0,0 +1,31 @@ +$sidenote-width: 14rem; + +.sidenote-container { + margin-right: $sidenote-width + 1rem; + + @include media-medium { + margin: auto; + } + + .sidenote { + position: absolute; + box-sizing: border-box; + + width: $sidenote-width; + right: -$sidenote-width - 2rem; + padding: 0 1rem; + + color: $gray-dark; + border-top: 1px solid $gray-dark; + font-size: 0.8em; + + @include media-medium { + width: initial; + position: initial; + right: initial; + + border-bottom: 1px solid $gray-dark; + margin: 0.5rem 0; + } + } +} diff --git a/scss/main.scss b/scss/main.scss index 08ce942..efec299 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -6,4 +6,5 @@ @import 'footer'; @import 'browser'; @import 'content'; +@import 'sidenotes'; @import 'canvasapp'; -- cgit v1.2.3 From a4038511560d408827cdea7e2e99751496687181 Mon Sep 17 00:00:00 2001 From: s-ol Date: Wed, 18 Dec 2019 00:46:04 +0100 Subject: cites plugin --- scss/_content.scss | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'scss') diff --git a/scss/_content.scss b/scss/_content.scss index 51994a3..ad854de 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -7,6 +7,19 @@ .markdown { max-width: 640px; position: relative; + + &.wide { + max-width: max-content; + } + + > blockquote { + @include left-border; + + margin: 1rem var(--margin-wide); + padding: 1rem; + background: $gray-bright; + border-color: $gray-neutral; + } } .markdown, @@ -57,7 +70,6 @@ border-color: $gray-dark; display: block; - border-radius: 6px; margin: 0 var(--margin-wide); padding: 1em; white-space: pre-wrap; -- cgit v1.2.3 From a1923464f33480eed90d69e4f54cf3c4b6274599 Mon Sep 17 00:00:00 2001 From: s-ol Date: Wed, 18 Dec 2019 17:29:29 +0100 Subject: more sidenote/reference formatting --- scss/_sidenotes.scss | 1 + 1 file changed, 1 insertion(+) (limited to 'scss') diff --git a/scss/_sidenotes.scss b/scss/_sidenotes.scss index 8579ba1..eddebc1 100644 --- a/scss/_sidenotes.scss +++ b/scss/_sidenotes.scss @@ -18,6 +18,7 @@ $sidenote-width: 14rem; color: $gray-dark; border-top: 1px solid $gray-dark; font-size: 0.8em; + word-break: break-word; @include media-medium { width: initial; -- cgit v1.2.3 From 97055474ad6dfce6d66faeb2580fb31bbb1bfb2c Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 19 Dec 2019 20:47:48 +0100 Subject: more sidenote/reference features --- scss/_browser.scss | 8 ++++++++ scss/_content.scss | 2 +- scss/_reset.scss | 16 ++++++++++++++-- scss/_sidenotes.scss | 24 ++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index adf9dd1..118842f 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -26,6 +26,14 @@ background: inherit; } + .subnav { + display: flex; + flex: 0; + background: $gray-darker; + border-bottom: 2px solid $gray-dark; + padding: 0.5em; + } + .content { margin: 0; padding: 0; diff --git a/scss/_content.scss b/scss/_content.scss index ad854de..a5b626a 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -5,8 +5,8 @@ } .markdown { - max-width: 640px; position: relative; + max-width: 640px; &.wide { max-width: max-content; diff --git a/scss/_reset.scss b/scss/_reset.scss index 396c3e7..724624d 100644 --- a/scss/_reset.scss +++ b/scss/_reset.scss @@ -13,6 +13,11 @@ body, html, h1, h2, h3, h4, h5, h6 { } h1, h2, h3, h4, h5, h6 { font-weight: bold; } +h1 { font-size: 1.6em; } +h2 { font-size: 1.4em; } +h3 { font-size: 1.17em; } +h4, h5, h6 { font-size: 1em; } + input, select, button { color: initial; &:disabled { @@ -23,10 +28,16 @@ tt, code, kbd, samp { font-family: monospace; } code { font-size: 0.8em; } b, strong { font-weight: bold; } em, i { font-style: italic; } -a { font-size: 1em; cursor: pointer; } hr { clear: both; } ul { margin: 0; } +sup, sub { + vertical-align: baseline; + position: relative; + top: -0.4em; +} +sub { top: 0.4em; } + body { display: flex; flex-direction: column; @@ -40,11 +51,12 @@ body { a { display: inline-block; - + font-size: 1em; font-weight: bold; text-decoration: underline; text-decoration-color: transparent; + cursor: pointer; &:hover { filter: invert(40%); text-decoration-color: currentColor; diff --git a/scss/_sidenotes.scss b/scss/_sidenotes.scss index eddebc1..28b1494 100644 --- a/scss/_sidenotes.scss +++ b/scss/_sidenotes.scss @@ -20,6 +20,30 @@ $sidenote-width: 14rem; font-size: 0.8em; word-break: break-word; + .hook { + position: absolute; + top: -4rem; + width: 0; + height: 0; + + @media print { + top: 0; + } + } + + .ref { + display: block; + position: absolute; + + width: 1rem; + margin-left: -1.2rem; + text-align: right; + } + + a { + display: inline; + } + @include media-medium { width: initial; position: initial; -- cgit v1.2.3 From a02ae9cec3aec9f8781ab026239b639ffc1487fc Mon Sep 17 00:00:00 2001 From: s-ol Date: Fri, 20 Dec 2019 15:06:33 +0100 Subject: add support for nested sidenotes --- scss/_sidenotes.scss | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scss') diff --git a/scss/_sidenotes.scss b/scss/_sidenotes.scss index 28b1494..c003496 100644 --- a/scss/_sidenotes.scss +++ b/scss/_sidenotes.scss @@ -7,6 +7,11 @@ $sidenote-width: 14rem; margin: auto; } + .sidenote-container & { + margin-right: initial; + margin: initial; + } + .sidenote { position: absolute; box-sizing: border-box; -- cgit v1.2.3 From dc7ee6dc261d5c3351552ed092c9d7ed66f163cc Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 28 Dec 2019 18:48:49 +0100 Subject: more write- and referencing --- scss/_content.scss | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scss') diff --git a/scss/_content.scss b/scss/_content.scss index a5b626a..e58b13b 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -104,4 +104,8 @@ background: $gray-bright; border-color: $gray-neutral; } + + .well-warning { + border-color: $gray-fail; + } } -- cgit v1.2.3 From 77777347b56d6914aa42aca19effc2ad664524ee Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 29 Dec 2019 14:49:49 +0100 Subject: much improved side-note referencing --- scss/_sidenotes.scss | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scss') diff --git a/scss/_sidenotes.scss b/scss/_sidenotes.scss index c003496..ea7520f 100644 --- a/scss/_sidenotes.scss +++ b/scss/_sidenotes.scss @@ -25,6 +25,8 @@ $sidenote-width: 14rem; font-size: 0.8em; word-break: break-word; + text-align: initial; + .hook { position: absolute; top: -4rem; -- cgit v1.2.3 From b81d20c5496b8612bb1cf669b614abfbc223829e Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 29 Dec 2019 14:56:26 +0100 Subject: justify all markdown --- scss/_content.scss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scss') diff --git a/scss/_content.scss b/scss/_content.scss index e58b13b..5f7d774 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -4,13 +4,15 @@ height: inherit; } + .wide.markdown, + .wide .markdown { + max-width: max-content; + } + .markdown { position: relative; max-width: 640px; - - &.wide { - max-width: max-content; - } + text-align: justify; > blockquote { @include left-border; -- cgit v1.2.3 From 7e119b7721fed09fe9cd3550d7c6a1850a8a3539 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 29 Dec 2019 15:30:11 +0100 Subject: print CSS --- scss/_browser.scss | 2 +- scss/_print.scss | 31 +++++++++++++++++++++++++++++++ scss/_reset.scss | 2 +- scss/main.scss | 1 + 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 scss/_print.scss (limited to 'scss') diff --git a/scss/_browser.scss b/scss/_browser.scss index 118842f..48af7d4 100644 --- a/scss/_browser.scss +++ b/scss/_browser.scss @@ -130,7 +130,7 @@ margin: 0 1em; align-self: flex-start; min-width: 30vw; - background: var(--white); + background: $white; position: relative; } diff --git a/scss/_print.scss b/scss/_print.scss new file mode 100644 index 0000000..36f2a96 --- /dev/null +++ b/scss/_print.scss @@ -0,0 +1,31 @@ +@media print { + h1, h2, h3 { + break-after: avoid-page; + } + + .view { + flex: 1 0 auto; + + .content { + flex: 1 0 auto; + } + } + + body { + background: $white; + } +} + +@page { + size: a4; + margin: 2.5cm 0 2.5cm; +} + +@page :first { + margin-top: 0; +} + +@page :last { + margin-bottom: 0; +} + diff --git a/scss/_reset.scss b/scss/_reset.scss index 724624d..ea77593 100644 --- a/scss/_reset.scss +++ b/scss/_reset.scss @@ -43,7 +43,7 @@ body { flex-direction: column; justify-content: space-between; - background: var(--gray-bright); + background: $gray-bright; font-family: sans-serif; min-height: 100vh; diff --git a/scss/main.scss b/scss/main.scss index efec299..9b6e6ce 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -8,3 +8,4 @@ @import 'content'; @import 'sidenotes'; @import 'canvasapp'; +@import 'print'; -- cgit v1.2.3 From b0b26d2a9dcd4944d9aae90480591793691730c1 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 29 Dec 2019 18:56:23 +0100 Subject: marginnote embedding --- scss/_content.scss | 5 +++++ scss/_sidenotes.scss | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'scss') diff --git a/scss/_content.scss b/scss/_content.scss index 5f7d774..e809204 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -17,6 +17,7 @@ > blockquote { @include left-border; + line-height: normal; margin: 1rem var(--margin-wide); padding: 1rem; background: $gray-bright; @@ -47,6 +48,8 @@ height: inherit; max-width: inherit; + line-height: normal; + .description { text-align: center; } @@ -77,6 +80,7 @@ white-space: pre-wrap; overflow-x: auto; + line-height: normal; background: #1d1f21; color: #c5c8c6; } @@ -103,6 +107,7 @@ margin: 1rem var(--margin-wide); padding: 1rem; + line-height: normal; background: $gray-bright; border-color: $gray-neutral; } diff --git a/scss/_sidenotes.scss b/scss/_sidenotes.scss index ea7520f..2cd4965 100644 --- a/scss/_sidenotes.scss +++ b/scss/_sidenotes.scss @@ -22,9 +22,10 @@ $sidenote-width: 14rem; color: $gray-dark; border-top: 1px solid $gray-dark; - font-size: 0.8em; word-break: break-word; + font-size: 0.8em; + line-height: 1.1; text-align: initial; .hook { @@ -47,6 +48,10 @@ $sidenote-width: 14rem; text-align: right; } + > .markdown > p:first-child { + margin-top: 0; + } + a { display: inline; } -- cgit v1.2.3 From c6ca31d55c2b6986509d25d16b947881a63ad595 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 29 Dec 2019 19:30:58 +0100 Subject: print styling fixes --- scss/_content.scss | 3 +++ scss/_print.scss | 11 ----------- scss/_sidenotes.scss | 1 + 3 files changed, 4 insertions(+), 11 deletions(-) (limited to 'scss') diff --git a/scss/_content.scss b/scss/_content.scss index e809204..e40145e 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -47,6 +47,7 @@ width: inherit; height: inherit; max-width: inherit; + break-inside: avoid-page; line-height: normal; @@ -78,6 +79,7 @@ margin: 0 var(--margin-wide); padding: 1em; white-space: pre-wrap; + break-inside: avoid-page; overflow-x: auto; line-height: normal; @@ -110,6 +112,7 @@ line-height: normal; background: $gray-bright; border-color: $gray-neutral; + break-inside: avoid-page; } .well-warning { diff --git a/scss/_print.scss b/scss/_print.scss index 36f2a96..1eac26a 100644 --- a/scss/_print.scss +++ b/scss/_print.scss @@ -4,8 +4,6 @@ } .view { - flex: 1 0 auto; - .content { flex: 1 0 auto; } @@ -20,12 +18,3 @@ size: a4; margin: 2.5cm 0 2.5cm; } - -@page :first { - margin-top: 0; -} - -@page :last { - margin-bottom: 0; -} - diff --git a/scss/_sidenotes.scss b/scss/_sidenotes.scss index 2cd4965..607b713 100644 --- a/scss/_sidenotes.scss +++ b/scss/_sidenotes.scss @@ -27,6 +27,7 @@ $sidenote-width: 14rem; font-size: 0.8em; line-height: 1.1; text-align: initial; + break-inside: avoid-page; .hook { position: absolute; -- cgit v1.2.3 From 5db27ae44907974230dbdfba002182e68e59038e Mon Sep 17 00:00:00 2001 From: s-ol Date: Mon, 30 Dec 2019 19:52:37 +0100 Subject: lots of fixes --- scss/_content.scss | 22 ++++++++++++++++++++++ scss/_footer.scss | 1 - scss/_print.scss | 27 ++++++++++++++++++++++++++- scss/_sidenotes.scss | 4 ++++ 4 files changed, 52 insertions(+), 2 deletions(-) (limited to 'scss') diff --git a/scss/_content.scss b/scss/_content.scss index e40145e..1789397 100644 --- a/scss/_content.scss +++ b/scss/_content.scss @@ -4,6 +4,11 @@ height: inherit; } + ul, ol { + break-before: avoid-page; + break-inside: avoid-page; + } + .wide.markdown, .wide .markdown { max-width: max-content; @@ -25,9 +30,15 @@ } } + p { + orphans: 6; + widows: 6; + } + .markdown, .markdown > p, .markdown > p > a { + p, a { max-width: 100%; } @@ -118,4 +129,15 @@ .well-warning { border-color: $gray-fail; } + + .spacious { + h1, h2, h3 { + margin-top: 1.7em; + } + + h1 + h2, + h2 + h3 { + margin-top: 0; + } + } } diff --git a/scss/_footer.scss b/scss/_footer.scss index 4f1c8bd..6cd73c8 100644 --- a/scss/_footer.scss +++ b/scss/_footer.scss @@ -11,7 +11,6 @@ footer { display: none; } - color: $gray-bright; background: $gray-dark; diff --git a/scss/_print.scss b/scss/_print.scss index 1eac26a..c221fa4 100644 --- a/scss/_print.scss +++ b/scss/_print.scss @@ -1,9 +1,29 @@ +.print-only { + display: none; + + @media print { + display: block; + } +} + +.screen-only { + @media print { + display: none; + } +} + @media print { - h1, h2, h3 { + h1, h2, h3, h4, h5 { break-after: avoid-page; + + + * { + break-before: avoid-page; + } } .view { + flex: 1 0 auto; + .content { flex: 1 0 auto; } @@ -14,6 +34,11 @@ } } +.print-ownpage { + break-before: page; + break-after: page; +} + @page { size: a4; margin: 2.5cm 0 2.5cm; diff --git a/scss/_sidenotes.scss b/scss/_sidenotes.scss index 607b713..0b9effe 100644 --- a/scss/_sidenotes.scss +++ b/scss/_sidenotes.scss @@ -1,5 +1,9 @@ $sidenote-width: 14rem; +:root { + --sidenote-width: #{$sidenote-width}; +} + .sidenote-container { margin-right: $sidenote-width + 1rem; -- cgit v1.2.3