From 269fd5ed95b89af22ec25dec8496f2b4edc8bfd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Wed, 16 Feb 2022 01:38:44 +0100 Subject: [PATCH] theme: rework color boxes for dark mode #175 --- .../content/basics/customization/_index.en.md | 14 +- layouts/shortcodes/attachments.html | 8 +- layouts/shortcodes/notice.html | 8 +- static/css/theme-blue.css | 12 ++ static/css/theme-green.css | 12 ++ static/css/theme-learn.css | 12 ++ static/css/theme-red.css | 12 ++ static/css/theme-relearn-dark.css | 12 ++ static/css/theme-relearn-light.css | 12 ++ static/css/theme.css | 180 +++++++++--------- static/css/variant.css | 99 ++++++++-- 11 files changed, 262 insertions(+), 119 deletions(-) diff --git a/exampleSite/content/basics/customization/_index.en.md b/exampleSite/content/basics/customization/_index.en.md index 67bc0f9f2b..502e050f3f 100644 --- a/exampleSite/content/basics/customization/_index.en.md +++ b/exampleSite/content/basics/customization/_index.en.md @@ -149,7 +149,19 @@ First, create a new CSS file in your local `static/css` folder prefixed by `them --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #ffffff; /* Color of background for the active category (only) */ --MENU-VISITED-color: #506397; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #282830; /* Color of
separator in menu */ + --MENU-SECTION-HR-color: #606060; /* Color of
separator in menu */ + + /* base styling for boxes */ + --BOX-CAPTION-color: rgba( 255, 255, 255, 1 ); /* color of the title text */ + --BOX-BG-color: rgba( 255, 255, 255, .833 ); /* color of the content background */ + --BOX-TEXT-color: rgba( 16, 16, 16, 1 ); /* fixed color of the content text */ + + /* optional base colors for colored boxes as in attachments and notice shortcode */ + --BOX-BLUE-color: rgba( 48, 117, 229, 1 ); + --BOX-GREEN-color: rgba( 42, 178, 24, 1 ); + --BOX-GREY-color: rgba( 128, 128, 128, 1 ); + --BOX-ORANGE-color: rgba( 237, 153, 9, 1 ); + --BOX-RED-color: rgba( 224, 62, 62, 1 ); } ``` diff --git a/layouts/shortcodes/attachments.html b/layouts/shortcodes/attachments.html index 0c17506257..471bc78170 100644 --- a/layouts/shortcodes/attachments.html +++ b/layouts/shortcodes/attachments.html @@ -1,10 +1,10 @@ {{- $_hugo_config := `{ "version": 1 }` }} -{{- $style := .Get "style" | default "neutral" }} +{{- $style := .Get "style" | default "transparent" }} {{- $title := .Get "title" | default ("Attachments-label" | T) }} {{- $sort := .Get "sort" | default "asc" }} -
-
{{ $title }}
-