From 6a9e9e129a46f1b6ebdc7622dcf0519b7a582d4e Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 4 Oct 2020 20:43:24 +0530 Subject: theme-switch-button: init feature (#15) * thanks to https://feathericons.com for svgs * can be disabled in site config Params: disableThemeToggle : true --- layouts/partials/footer.html | 20 +++++++++++++++++++- layouts/partials/header.html | 38 +++++++++++++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 4 deletions(-) (limited to 'layouts') diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index ff5cdd5..edf86ac 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -44,4 +44,22 @@ function menu_on_scroll() { localStorage.setItem("menu-scroll-position", document.getElementById('menu').scrollLeft); } - \ No newline at end of file + +{{- if not .Site.Params.disableThemeToggle }} + +{{- else -}} + + +{{- end }} \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index d102a86..fce0b61 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,14 +1,46 @@ {{- if eq .Site.Params.defaultTheme "auto" }} {{- end }}