From d9cb12b4d0dd44a6a29db68322f181a93139d526 Mon Sep 17 00:00:00 2001 From: AsherThomasBabu Date: Tue, 24 Aug 2021 11:47:33 +0530 Subject: [PATCH 1/7] added toggle switch as partial --- layouts/partials/toggle.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 layouts/partials/toggle.html diff --git a/layouts/partials/toggle.html b/layouts/partials/toggle.html new file mode 100644 index 0000000..8b8e56d --- /dev/null +++ b/layouts/partials/toggle.html @@ -0,0 +1,16 @@ +
+
+
+
+ +
+
+ +
+
+
+ +
+
\ No newline at end of file From 870ab7ee607ac7efc0791148131abb248ce8c7dc Mon Sep 17 00:00:00 2001 From: AsherThomasBabu Date: Tue, 24 Aug 2021 11:48:30 +0530 Subject: [PATCH 2/7] inline css styling added for toggle switch --- layouts/partials/toggle.html | 108 ++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/layouts/partials/toggle.html b/layouts/partials/toggle.html index 8b8e56d..e484d6c 100644 --- a/layouts/partials/toggle.html +++ b/layouts/partials/toggle.html @@ -13,4 +13,110 @@
- \ No newline at end of file + + + \ No newline at end of file From fe07668bc3ea0f249a40df4b25ce1a56a6150378 Mon Sep 17 00:00:00 2001 From: AsherThomasBabu Date: Tue, 24 Aug 2021 11:49:17 +0530 Subject: [PATCH 3/7] inline js added for switch functionality --- layouts/partials/toggle.html | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/layouts/partials/toggle.html b/layouts/partials/toggle.html index e484d6c..cc2cdde 100644 --- a/layouts/partials/toggle.html +++ b/layouts/partials/toggle.html @@ -118,5 +118,33 @@ .js-toggle:active .js-toggle-thumb { box-shadow: 0px 0px 5px 5px rgb(255, 167, 196); } + - \ No newline at end of file + \ No newline at end of file From 9a3065608d3e4a85aedd9c24f5c0916348e9c709 Mon Sep 17 00:00:00 2001 From: AsherThomasBabu Date: Tue, 24 Aug 2021 11:50:16 +0530 Subject: [PATCH 4/7] add toggle partial as nav element in header.html --- layouts/partials/header.html | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 layouts/partials/header.html diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..dff1bdc --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,55 @@ +{{ "" | safeHTML }} + +{{ "" | safeHTML }} \ No newline at end of file From 3592eb1adc1dcc2a3f5ea078937b9f1d24b657cf Mon Sep 17 00:00:00 2001 From: AsherThomasBabu Date: Tue, 24 Aug 2021 11:50:38 +0530 Subject: [PATCH 5/7] remove svg bg and adjust spacing --- layouts/index.html | 137 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 layouts/index.html diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..a32604f --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,137 @@ +{{ define "main" }} + + +
+ + + + +
+
+
+
+
+ {{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") }} + {{ range $paginator.Pages }} + {{ .Render "article" }} + {{ end }} + +
+ {{"" | safeHTML }} + {{ $paginator := .Paginator }} + + {{ $adjacent_links := 2 }} + + {{ $max_links := (add (mul $adjacent_links 2) 1) }} + + {{ $lower_limit := (add $adjacent_links 1) }} + + {{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }} + + {{ if gt $paginator.TotalPages 1 }} + + {{ end }} + {{"" | safeHTML }} +
+
+
+
+
+
+ + + +{{ if .Site.Params.cta.enable }} +
+
+
+
+
+
+ ...
+
+

{{ .Site.Params.cta.title | markdownify }}

+

{{ .Site.Params.cta.description | markdownify }}

+ {{ if .Site.Params.cta.button.enable }} + {{ .Site.Params.cta.button.label }} + {{ end }} +
+
+
+
+
+
+{{ end }} + + +{{ end }} \ No newline at end of file From a18f7135067266734fc5541a43eb72ac2517090f Mon Sep 17 00:00:00 2001 From: AsherThomasBabu Date: Tue, 24 Aug 2021 11:52:20 +0530 Subject: [PATCH 6/7] added css for dark-mode --- layouts/partials/toggle.html | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/layouts/partials/toggle.html b/layouts/partials/toggle.html index cc2cdde..8004735 100644 --- a/layouts/partials/toggle.html +++ b/layouts/partials/toggle.html @@ -118,6 +118,57 @@ .js-toggle:active .js-toggle-thumb { box-shadow: 0px 0px 5px 5px rgb(255, 167, 196); } + + body.dark-mode { + background: rgb(45, 45, 45); + color: #f5f5f5; + } + + body.dark-mode h1, + body.dark-mode h2, + body.dark-mode h3, + body.dark-mode h4, + body.dark-mode h5 { + color: #ef878f; + } + + body.dark-mode li.nav-item a.nav-link, + html body.dark-mode header.fixed-top.navigation div.container { + background-color: rgb(45, 45, 45) !important; + color: #f5f5f5 !important; + } + + body.dark-mode button#searchOpen.search-btn { + color: #f5f5f5; + } + + body.dark-mode header.fixed-top.navigation.nav-bg { + background-color: rgb(45, 45, 45); + } + + body.dark-mode div.bg-white { + background-color: rgb(45, 45, 45) !important; + } + + body.dark-mode li.page-item a { + background-color: rgb(45, 45, 45); + } + + body.dark-mode li.page-item a.page-item.active { + background-color: #ef878f !important; + } + + body.dark-mode footer, + body.dark-mode footer a { + color: #f5f5f5 !important; + background-color: rgb(45, 45, 45) !important; + } + + body.dark-mode blockquote, + body.dark-mode blockquote p { + background-color: rgb(45, 45, 45); + color: grey; + }