diff options
author | lberki <lberki@users.noreply.github.com> | 2022-05-05 12:12:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 12:12:10 +0300 |
commit | 776f966edfbc33120d61edef0e65ddcdba44263a (patch) | |
tree | 43b753af14fbcfa2cbdba373139bda0397a5804a /layouts | |
parent | c95051b93d756d5653ebe36a8f5f2d556b3843a0 (diff) |
Add dark mode
See #65
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 1 | ||||
-rw-r--r-- | layouts/partials/darkmode.html | 3 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 |
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()"> + ◐ <!-- 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> |