From f29bffad278a0bc14ca9e9fd35681e98283870ec Mon Sep 17 00:00:00 2001 From: Jieiku Date: Fri, 24 Jun 2022 23:19:47 -0700 Subject: Code Block Type and Copy Button Improvements --- sass/include/_zola.scss | 17 +++++++++++++---- sass/syntax/syntax-abridge-light.scss | 2 +- sass/syntax/syntax-abridge-switcher.scss | 2 +- sass/syntax/syntax-abridge.scss | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) (limited to 'sass') diff --git a/sass/include/_zola.scss b/sass/include/_zola.scss index cf69f46..cbf1166 100644 --- a/sass/include/_zola.scss +++ b/sass/include/_zola.scss @@ -11,22 +11,30 @@ font-size: 1.5em } pre code[data-lang]::before { - content: ' ' attr(data-lang) ': ' " + color: var(--f1); + text-transform: uppercase; + content: ' [' attr(data-lang) '] ' " + "; - color: var(--a1); } // code copy wrapper .ccw { position: relative; } +.ccw:hover { + .cc { + opacity: 1; + } +} // code copy button .cc { + opacity: 0; z-index: 9; position: absolute; - right: 0px; + right: 9px; + top: 9px; font-size: .8rem; } - // Mark Override, this is used for Zola's linenos and hl_lines :root:not(.light) code table { mark { @@ -36,6 +44,7 @@ pre code[data-lang]::before { // Table Override, this is used for Zola's linenos and hl_lines code table { font-size: .8rem; + margin: 0; td, th, tr { padding: 0; border-bottom: none; diff --git a/sass/syntax/syntax-abridge-light.scss b/sass/syntax/syntax-abridge-light.scss index 0fc3f64..4c3eea6 100644 --- a/sass/syntax/syntax-abridge-light.scss +++ b/sass/syntax/syntax-abridge-light.scss @@ -1,6 +1,6 @@ .z-code { color: #50565a; - background-color: #ffffff; + background-color: #fafafa; } .z-comment, .z-punctuation.z-definition.z-comment { color: #676c72; diff --git a/sass/syntax/syntax-abridge-switcher.scss b/sass/syntax/syntax-abridge-switcher.scss index 92f9153..c497430 100644 --- a/sass/syntax/syntax-abridge-switcher.scss +++ b/sass/syntax/syntax-abridge-switcher.scss @@ -278,7 +278,7 @@ :root.light { .z-code { color: #50565a; - background-color: #ffffff; + background-color: #fafafa; } .z-comment, .z-punctuation.z-definition.z-comment { color: #676c72; diff --git a/sass/syntax/syntax-abridge.scss b/sass/syntax/syntax-abridge.scss index 7cf5d34..6fc427c 100644 --- a/sass/syntax/syntax-abridge.scss +++ b/sass/syntax/syntax-abridge.scss @@ -279,7 +279,7 @@ :root { .z-code { color: #50565a; - background-color: #ffffff; + background-color: #fafafa; } .z-comment, .z-punctuation.z-definition.z-comment { color: #676c72; -- cgit v1.3.1