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

github.com/EmielH/tale-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlberki <lberki@users.noreply.github.com>2022-05-05 12:12:10 +0300
committerGitHub <noreply@github.com>2022-05-05 12:12:10 +0300
commit776f966edfbc33120d61edef0e65ddcdba44263a (patch)
tree43b753af14fbcfa2cbdba373139bda0397a5804a /layouts
parentc95051b93d756d5653ebe36a8f5f2d556b3843a0 (diff)
Add dark modeHEADmaster
Add dark mode See #65
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html1
-rw-r--r--layouts/partials/darkmode.html3
-rw-r--r--layouts/partials/head.html2
3 files changed, 6 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 866a593..4bf1dc8 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -3,6 +3,7 @@
{{ partial "head.html" . }}
<body>
{{ partial "header.html" . }}
+ {{ partial "darkmode.html" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }}
</body>
diff --git a/layouts/partials/darkmode.html b/layouts/partials/darkmode.html
new file mode 100644
index 0000000..1016b53
--- /dev/null
+++ b/layouts/partials/darkmode.html
@@ -0,0 +1,3 @@
+<div id="darkModeToggle" onclick="toggleDarkMode()">
+ &#9680; <!-- Circle with left half black -->
+</div>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index fe10a91..0d9b512 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -30,4 +30,6 @@
<!-- RSS -->
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
+
+ <script src="{{ "js/darkmode.js" | relURL }}"></script>
</head>