Dark mode ?

This commit is contained in:
2023-05-15 16:13:18 -04:00
parent b9a7e7a2dd
commit bca7ae0a8c
5 changed files with 373 additions and 10 deletions

View File

@@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" href="stylesheet.css">
<link rel="stylesheet" href="/static/css/darkmode.css">
<title>*DEV* CAIU VCard Creator *DEV*</title>
<script>
document.addEventListener('DOMContentLoaded', function () {
@@ -40,6 +41,24 @@
<input type="file" accept="image/png" class="nav-align" id="existingFile" name="existingFile">
<button class="btn btn-primary nav-align" id="getFileDataBtn">Edit</button>
</div>
<div class="nav-container">
<label for="theme" class="theme nav-align">
<span class="toggle-wrap">
<input id="theme" class="toggle" type="checkbox" role="switch" name="theme" value="dark">
<span class="icon">
<span class="icon-part"></span>
<span class="icon-part"></span>
<span class="icon-part"></span>
<span class="icon-part"></span>
<span class="icon-part"></span>
<span class="icon-part"></span>
<span class="icon-part"></span>
<span class="icon-part"></span>
<span class="icon-part"></span>
</span>
</span>
</label>
</div>
</nav>
<main class="page contact-page">
@@ -104,6 +123,7 @@
document.getElementById("checkBackendButton").addEventListener("click", checkBackend, false);
document.getElementById("getFileDataBtn").addEventListener("click", loadFromExistingCard, false);
document.getElementById("formSubmit").addEventListener("click", submitForm, false);
document.getElementById("theme").addEventListener("click", toggleDarkMode, false);
</script>
</body>
</html>