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

github.com/huyb1991/hugo-lamp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuy Nguyen <huyb.1991@gmail.com>2020-07-01 17:52:27 +0300
committerHuy Nguyen <huyb.1991@gmail.com>2020-07-01 17:52:27 +0300
commit640837ae8b7261152cfdd9ee2e8dab294b3c44c8 (patch)
tree766c7cba8cf3a8a42f7649f53b12ed2b951daf2b
parent8d8255134df56b1052d3e632496dfdcab35ea369 (diff)
Add btn to toggle dark/light mode
-rw-r--r--layouts/partials/header.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index ad2c832..dee2d8a 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -23,5 +23,12 @@
</ul>
</nav>
+ <button
+ [text]="darkMode ? 'Light Mode' : 'Dark Mode'"
+ on="tap:AMP.setState({darkMode: !darkMode})"
+ >
+ Dark Mode
+ </button>
+
{{ partial "social.html" . }}
</header>