Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/funkydan2/hugo-kiera.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralfredocambera <acambera@nearsoft.com>2020-07-30 18:23:25 +0300
committeralfredocambera <acambera@nearsoft.com>2020-07-30 18:23:25 +0300
commitdf65ecfdaae4565bc46a86b372a4c9877a0642a2 (patch)
treec07934dacc8acd7e9c56f7a3631744446c840a3c
parent3f840a95b6b240081e53e81078d6b87aa93d1c88 (diff)
Adds a parameter to disable dark-style.css
The parameter is disable by default
-rw-r--r--README.md1
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/partials/header_includes.html4
-rw-r--r--static/css/styles_withou_dark_mode.css1
4 files changed, 7 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9bf2c92..9b55ca9 100644
--- a/README.md
+++ b/README.md
@@ -105,6 +105,7 @@ googleAnalytics = "" #Google Analytics ID
[params]
tagline = "the tagline for this website"
customCSS = [] #Optional Customised CSS
+ disableDarkModeCSS = false # disables css style for users using dark-mode
```
### Main Menu
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 2604235..278e60b 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -37,6 +37,7 @@ pygmentsCodeFences = true
#commentAutoload = true #This mean reader don't need click, disqus comment autoload
#mathjax = true #Enable display of mathematics using mathjax (LaTeX syntax)
#google_fonts = ["Staatliches"] # Adds additional google fonts
+ #disableDarkModeCSS = false # disables css style for users using dark-mode
# uncomment to enable the Tags link on the main toolbar
# [[menu.main]]
diff --git a/layouts/partials/header_includes.html b/layouts/partials/header_includes.html
index c11e0f4..905061b 100644
--- a/layouts/partials/header_includes.html
+++ b/layouts/partials/header_includes.html
@@ -16,7 +16,11 @@
{{ else}}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Slab|Ruda" />
{{ end }}
+ {{ if .Site.Params.disableDarkModeCSS }}
+ <link rel="stylesheet" type="text/css" href="{{ "css/styles_withou_dark_mode.css" | relURL}}" />
+ {{ else}}
<link rel="stylesheet" type="text/css" href="{{ "css/styles.css" | relURL}}" />
+ {{- end -}}
{{- range .Site.Params.customCSS -}}
<link rel='stylesheet' href='{{ . | absURL }}'>
{{- end -}}
diff --git a/static/css/styles_withou_dark_mode.css b/static/css/styles_withou_dark_mode.css
new file mode 100644
index 0000000..17f7c6f
--- /dev/null
+++ b/static/css/styles_withou_dark_mode.css
@@ -0,0 +1 @@
+@import url(./styles-light.css);