Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions Website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" alt="GitHub" width="25" height="25"> <!-- GitHub Icon -->
</a>
</li>
<li>
<button id="toggle-dark-mode">
<i class="fas fa-moon"></i>
</button>
</li>
</ul>
</nav>
</header>
Expand Down
10 changes: 10 additions & 0 deletions Website/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,13 @@ document.addEventListener("DOMContentLoaded", function() {
}
});

const toggleDarkModeButton = document.getElementById('toggle-dark-mode');
const body = document.body;

toggleDarkModeButton.addEventListener('click', () => {
body.classList.toggle('dark-mode');
// Change icon based on dark mode status
const icon = toggleDarkModeButton.querySelector('i');
icon.classList.toggle('fa-moon');
icon.classList.toggle('fa-sun');
});
69 changes: 69 additions & 0 deletions Website/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -602,3 +602,72 @@ button#toggle-languages:hover {
opacity: 0.9;
}

/* Dark Mode Styles */
body.dark-mode {
background-color: #121245;
color: #f1f1f1;
}

.dark-mode .navbar {
background-color: #000;
}

.dark-mode .nav-links a {
color: #fff;
}

.dark-mode .welcome-title {
color: #fff;
}

.dark-mode .highlight {
color: #fff;
}

.dark-mode .stat-card {
background-color: #212148;
}

.dark-mode .stat-card h3 {
color: #fff;
}

.dark-mode .stat-card p {
color: rgb(255, 213, 98);
}

.dark-mode .stat-icon {
color: #fff;
}

.dark-mode .stat-card:hover {
background-color: #151537;
}

.dark-mode .stat-card:hover .stat-icon{
color: #fff;
}


#toggle-dark-mode {
background: none;
border: none;
color: #f1f1f1;
cursor: pointer;
font-size: 1.2em;
transition: color 0.3s ease;
}

.dark-mode .welcome-section a{
color: #cfd9e5;
}

#toggle-dark-mode i {
font-size: 1.5em;
}

#toggle-dark-mode:hover {
color: #fff;
}