forked from javalsai/website
dark/light mode toggle
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
<header>
|
||||
<nav>
|
||||
<ul class="row-ul">
|
||||
<li><a href="/">home</a></li>
|
||||
<li><a href="https://git.javalsai.dynv6.net/">gitea</a></li>
|
||||
<li><a href="/tools">tools</a></li>
|
||||
<li><a href="/notes">notes</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav>
|
||||
<ul class="row-ul">
|
||||
<li><a href="/">home</a></li>
|
||||
<li><a href="https://git.javalsai.dynv6.net/">gitea</a></li>
|
||||
<li><a href="/tools">tools</a></li>
|
||||
<li><a href="/notes">notes</a></li>
|
||||
<button class="theme-toggle-button" onclick="light_mode()"><img class="theme-toggle-image" height="12px" margin="0px" /></button>
|
||||
</ul>
|
||||
</nav>
|
||||
<script>
|
||||
function light_mode() {
|
||||
var element = document.body;
|
||||
element.classList.toggle("light-mode");
|
||||
}
|
||||
</script>
|
||||
</header>
|
||||
|
Reference in New Issue
Block a user