From 34702581dd9993ce9793f86c1aae60f1ef4643e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Avijit=20=F0=9F=9A=80?= <526avijit@gmail.com> Date: Fri, 4 Jun 2021 14:45:49 +0200 Subject: [PATCH] Add dark light theme toggle functionality --- exampleSite/config.toml | 4 +- themes/gokarna/layouts/_default/baseof.html | 2 +- themes/gokarna/layouts/partials/header.html | 13 +++- themes/gokarna/static/css/main.css | 71 +++++++++------------ themes/gokarna/static/js/main.js | 40 ++++++++---- 5 files changed, 71 insertions(+), 59 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e9def91..0fc1c02 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -33,12 +33,12 @@ pygmentsCodeFencesGuessSyntax = true [[menu.main]] identifier = "linkedin" - pre = "" + pre = "" url = "/a/" weight = 5 [[menu.main]] identifier = "github" - pre = "" + pre = "" url = "/b/" weight = 6 diff --git a/themes/gokarna/layouts/_default/baseof.html b/themes/gokarna/layouts/_default/baseof.html index 5f8e2ec..d863ec6 100644 --- a/themes/gokarna/layouts/_default/baseof.html +++ b/themes/gokarna/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . -}}
{{- partial "header.html" . -}} diff --git a/themes/gokarna/layouts/partials/header.html b/themes/gokarna/layouts/partials/header.html index 3739fb1..f39154e 100644 --- a/themes/gokarna/layouts/partials/header.html +++ b/themes/gokarna/layouts/partials/header.html @@ -1,4 +1,4 @@ -