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
1 change: 0 additions & 1 deletion Website/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,6 @@ h1 {
.code-of-conduct-button a:hover {
background-color: #0acbf7;
}
=======

/* Section Styles */
.github-section {
Expand Down
2 changes: 1 addition & 1 deletion Website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
</a>
</li>
<li>
<button id="toggle-dark-mode">
<button id="toggle-dark-mode" title="Use Ctrl+Q to toggle themes easily">
<i class="fas fa-moon"></i>
</button>
</li>
Expand Down
12 changes: 11 additions & 1 deletion Website/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ if (savedTheme) {
applyTheme('light');
}

toggleDarkModeButton.addEventListener('click', () => {
function toggleTheme(){
body.classList.toggle('dark-mode');

const icon = toggleDarkModeButton.querySelector('i');
Expand All @@ -379,7 +379,17 @@ toggleDarkModeButton.addEventListener('click', () => {
// saving the theme=light in localStorage
localStorage.setItem('theme', 'light');
}
}
toggleDarkModeButton.addEventListener('click', toggleTheme);

document.addEventListener('keydown', function (event) {
// Check if the 'Q' key is pressed along with the 'Ctrl' key
if (event.ctrlKey && (event.key === 'q' || event.key === 'Q')) {
event.preventDefault(); // Prevent the default action (if any)
toggleTheme(); // Call the function to toggle the theme
}
});

function hamburger() {
const line = document.getElementById("line");
const navLinks = document.querySelector(".nav-links");
Expand Down
Loading