Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIXES ISSUE #477 : [Feature Request]: DARK MODE NOT FUNCTIONING #480

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,6 @@
</div>
</header>



<div class="content" id="main-content" >
<h1>Welcome to the Ambulance Monitoring System</h1>
<div class="grid">
Expand Down Expand Up @@ -653,7 +651,7 @@ <h3 style="font-size: 1.5rem; margin-bottom: 10px; color: #2980b9;">Subscribe to
">↑</button>
</div>
</footer>

<script>
// Back to Top Button functionality
document.addEventListener('DOMContentLoaded', function() {
Expand Down Expand Up @@ -729,6 +727,19 @@ <h3 style="font-size: 1.5rem; margin-bottom: 10px; color: #2980b9;">Subscribe to
document.getElementById("emailInput").value = '';
});
</script>

<script>
// Dark Mode Funcationality
const darkModeButton = document.getElementById('dark-mode-button');

// Add event listener for toggle functionality
darkModeButton.addEventListener('click', () => {
document.body.classList.toggle('dark-mode'); // Toggle dark mode

// Toggle icon between moon and sun
const icon = darkModeButton.querySelector('i');
icon.classList.toggle('fa-moon');
icon.classList.toggle('fa-sun');
});
</script>
</body>
</html>