diff --git a/data/themes/coffee.toml b/data/themes/coffee.toml index d76d5359..cf6f51f3 100644 --- a/data/themes/coffee.toml +++ b/data/themes/coffee.toml @@ -15,6 +15,7 @@ menu_text = "rgba(255,255,255,0.6)" menu_text_active = "rgba(255,255,255,1)" menu_title = "#fff" -# Home sections +# Backgrounds +background = "hsla(16, 24%, 85%, 1)" home_section_odd = "hsla(16, 24%, 85%, 1)" home_section_even = "hsla(16, 24%, 80%, 1)" diff --git a/layouts/partials/css/academic.css b/layouts/partials/css/academic.css index 76b48753..577a6353 100644 --- a/layouts/partials/css/academic.css +++ b/layouts/partials/css/academic.css @@ -37,6 +37,7 @@ body { font-size: 1rem; line-height: inherit; color: inherit; + background-color: {{ .Get "background" }}; margin-top: 71px; /* Offset body content by navbar height. */ padding-top: 0; counter-reset: captions; @@ -1312,7 +1313,6 @@ div.alert a:hover { **************************************************/ body.dark { - background-color: rgb(40, 42, 54); color: rgb(248, 248, 242); } diff --git a/layouts/partials/css/parse_theme.css b/layouts/partials/css/parse_theme.css index 8e5c5bf2..ed351b1f 100644 --- a/layouts/partials/css/parse_theme.css +++ b/layouts/partials/css/parse_theme.css @@ -21,6 +21,14 @@ {{- $scr.Set "light" $theme.light -}} + {{ if $theme.background }} + {{- $scr.Set "background" $theme.background -}} + {{ else if $theme.light }} + {{- $scr.Set "background" "#fff" -}} + {{ else }} + {{- $scr.Set "background" "rgb(40, 42, 54)" -}} + {{ end }} + {{- $scr.Set "primary" $theme.primary -}} {{- $scr.Set "primary_light" $theme.primary_light -}} {{- $scr.Set "primary_dark" $theme.primary_dark -}}