From 578125c65990664816647359acb4b6ba0f1ff28b Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Mon, 27 Apr 2020 20:22:22 +0200 Subject: [PATCH 01/11] Properly indent comments --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 019047b..c6aa550 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ baseurl = "https://yourdoma.in" # The base url of your Hugo website title = "Title" # The title of your website author = "Author" # The author of the website language = "fr" -theme = "idunn" # The Hugo theme +theme = "idunn" # The Hugo theme ``` ### Description From 2aaf20406d98c3da3a3e41a66a6625e1574f4295 Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Mon, 27 Apr 2020 21:39:46 +0200 Subject: [PATCH 02/11] Add option to set colors in config file --- CHANGELOG.md | 6 ++++++ README.md | 6 ++++-- layouts/_default/baseof.html | 16 ++++++++++++---- layouts/partials/footer.html | 8 ++------ static/css/base.css | 15 ++++++++------- 5 files changed, 32 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36a33b9..30a0c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +* Option to set color variables in config.toml. Options are: + * **font**, general font color, default to *black*; + * **background**, general background color, default to *white*; + * **main**, theme color, used for footer among others, default to *grey*; + * **font_above**, used for font above *main* color, default to *white*. ## [1.0.0] - 2020-04-27 ### Added diff --git a/README.md b/README.md index c6aa550..d149ffc 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,10 @@ It is possible to basicaly change some colors: ```toml [params.colors] - main = "green" # Color of the footer - alt_text = "black" # Color of the text above 'main' color + font = "black" # General font color, default to black + background = "white" # General background color, default to white + main = "grey" # Theme color, used for footer among others, default to grey + font_above = "white" # Used for font above *main* color, default to white ``` ### Custom CSS diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 006eb53..eaad61f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,11 +1,19 @@ {{- partial "head.html" . -}} - +{{ if .Site.Params.colors }} + +{{ end }} - {{- partial "header.html" . -}} - {{- block "main" . }}{{- end }} - {{- partial "footer.html" . -}} + {{- partial "header.html" . -}} + {{- block "main" . }}{{- end }} + {{- partial "footer.html" . -}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 59e05c6..d76eea8 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,13 +1,10 @@