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

github.com/zwbetz-gh/cupper-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwbetz-gh <zwbetz@gmail.com>2021-01-10 22:36:21 +0300
committerzwbetz-gh <zwbetz@gmail.com>2021-01-10 22:36:21 +0300
commit1a3ed20f93392c95438566f1ef55115ffa3f3c5b (patch)
treeb9c7bbcebc89a521e0b0341e75f02a5c495e6eae
parent250f5e47e5c3d936705448c6904ebd0d71ef66c1 (diff)
config option to show theme switcher
-rw-r--r--exampleSite/config.yaml1
-rw-r--r--layouts/partials/footer.html4
-rwxr-xr-xtask_serve.sh5
3 files changed, 9 insertions, 1 deletions
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
index be49e63..4621b93 100644
--- a/exampleSite/config.yaml
+++ b/exampleSite/config.yaml
@@ -26,6 +26,7 @@ params:
katex: true
hideHeaderLinks: false
search: true
+ showThemeSwitcher: true
customCss:
- css/custom_01.css
- css/custom_02.css
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 492ba39..faec94f 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,5 +1,7 @@
<footer role="contentinfo">
- <div>
+ <div
+ {{ if eq .Site.Params.showThemeSwitcher false }}style="display: none;"{{ end }}
+ >
<label for="themer">
{{ T "dark_theme" }} <input type="checkbox" id="themer" class="vh">
<!-- Shows "on" or "off" -->
diff --git a/task_serve.sh b/task_serve.sh
new file mode 100755
index 0000000..80281fd
--- /dev/null
+++ b/task_serve.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+cd exampleSite
+hugo serve --themesDir ../..
+cd ..