From 420c04f9168527a6b83b5bc74b81fb1d57a9c11a Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 7 Aug 2024 15:51:19 +0100 Subject: [PATCH] More css organisation --- layouts/partials/head.html | 1 + static/css/articles.css | 20 +++++++- static/css/charts.css | 18 +++++++ static/css/codeblock.css | 2 +- static/css/style.css | 97 ++++++++++++-------------------------- 5 files changed, 67 insertions(+), 71 deletions(-) create mode 100644 static/css/charts.css diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 137b9a5..7ff05ca 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -7,6 +7,7 @@ + */ :not(pre) > code { - color: #aaa4a0; + color: var(--inline-code-color); background-color: var(--inline-code-bg-color); padding: 5px; border-radius: 2px; diff --git a/static/css/style.css b/static/css/style.css index afb4424..161244d 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -5,13 +5,27 @@ } :root { + /* root */ --font-family: "Montserrat", sans-serif; --code-font-family: "IBM Plex Mono", monospace; --font-size: 10; - --author-row-font-size: 12px; + --background-color: #181a1b; + --text-color: #e0ddd9; + --subtext-color: #6c757d; + --link-color: #60b2f1; + --hover-color: #0056b3; + --border-color: #363a3d; + --border-width: 2px; + --border-style: solid; + + /* headings */ + --heading1-color: #fc8452; + --heading2-color: #e0ddd9; + --heading3-color: #e0ddd9; --heading1-font-size: 25px; - --code-block-font-size: 10px; - --chart-modifier-height: 60px; + + /* content */ + --author-row-font-size: 12px; --article-max-width: 70%; --content-padding: 40px; --content-margin: 40px; @@ -21,33 +35,28 @@ --heading-margin: 30px; --radius: 5px; --line-height: 1.5; - --checkbox-width: max-content; - --checkbox-font-size: 16px; - --avatar-width: 20px; - --background-color: #181a1b; - --text-color: #e0ddd9; - --subtext-color: #6c757d; - --link-color: #60b2f1; - --hover-color: #0056b3; - --heading1-color: #fc8452; - --heading2-color: #e0ddd9; - --heading3-color: #e0ddd9; + --summary-container-hover-bg: #343a40; + --article-card-bg-color: white; + + /* code */ + --code-block-font-size: 10px; + --inline-code-color: #aaa4a0; + --codeblock-bg-color: #1b1d1e; + --inline-code-bg-color: #353535; + + /* navbar/footer */ --navbar-background-color: #181a1b; --navbar-text-color: #e0ddd9; --navbar-hover: #333; --footer-background-color: #333; - --summary-container-hover-bg: #343a40; - --codeblock-bg-color: #1b1d1e; - --inline-code-bg-color: #353535; + + /* table */ --table-even-row-bg-color: #343a40; --table-odd-row-bg-color: #515c66; --table-header-bg: #212529; --table-font-color: #e0ddd9; --table-header-font-size: 14px; --table-row-font-size: 12px; - --border-color: #363a3d; - --border-width: 2px; - --border-style: solid; } @media (max-width: 600px) { @@ -101,26 +110,6 @@ time { margin-bottom: var(--article-margin); } -/* Charts */ -.chart-flex-container { - display: flex; -} - -.chart-flex-container article { - flex: 1; -} - -#chart { - width: 100%; - height: 50vh; -} - -.chart-area { - width: 60%; - margin: var(--article-margin); -} - -/* Footer */ footer { background-color: var(--footer-background-color); color: var(--text-color); @@ -134,31 +123,3 @@ footer a:hover { background-color: #ddd; color: black; } - -.author-row { - display: flex; - justify-content: left; - align-items: center; - color: var(--subtext-color); - font-size: var(--author-row-font-size); - margin-bottom: 20px; -} - -.avatar-container { - width: var(--avatar-width); - margin-right: var(--element-margin); -} - -.avatar { - display: block; - width: 100%; - height: auto; -} - -.author-name { - margin: 2px; -} - -.author-row time { - margin: 2px; -}