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

feat: dark mode in membership page #1229

Merged
merged 5 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
20 changes: 20 additions & 0 deletions pricing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,26 @@
list.classList.toggle('activeHamburger');
})
</script>
<script>
document.addEventListener('DOMContentLoaded', () => {
const themeToggle = document.getElementById('themeToggle');

// Check for saved theme in localStorage
if (localStorage.getItem('theme') === 'dark') {
document.body.classList.add('dark-mode');
themeToggle.checked = true;
}

themeToggle.addEventListener('change', () => {
if (themeToggle.checked) {
document.body.classList.add('dark-mode');
localStorage.setItem('theme', 'dark');
} else {
document.body.classList.remove('dark-mode');
localStorage.setItem('theme', 'light');
}
});
});
</script>

</body>
Expand Down
69 changes: 69 additions & 0 deletions pricing/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -555,4 +555,73 @@ header img {

}

}
.dark-theme {
--secondary-color: #0e1525;
--text-dark: #ffffff;
--arr-light: white;
--body-light: #0e1525;
--img-color: red;
--head-text: red;
--btn-border: red;
--btn-color: #fdbb2dbf;
--footer-text-color: #ffffff;
}
/* Dark Mode Styles */
body.dark-mode {
background-color: #121212;
color: #ffffff;
}

body.dark-mode .nav-container {
background-color: #1e1e1e;
}

body.dark-mode .navLinks li a {
color: #ffffff;
}

body.dark-mode .btn {
background-color: #333333;
color: #ffffff;
}

body.dark-mode .wrapper .table {
background-color: #1e1e1e;
border: 1px solid #444444;
}

body.dark-mode .wrapper .table .price-section {
background-color: #2e2e2e;
}

body.dark-mode .wrapper .table .purchase-btn button {
background-color: #333333;
color: #ffffff;
}

/* Additional styles */
.hamburger .line {
background-color: #000000;
}

body.dark-mode .hamburger .line {
background-color: #ffffff;
}
body.dark-mode .table .package-name::before{
background: #1e1e1e;
}
body.dark-mode .wrapper .table {
background-color: #1e1e1e;
border: 1px solid #444444;
box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

body.dark-mode .wrapper .table .price-section {
background-color: #2e2e2e;
}

body.dark-mode .wrapper .table .purchase-btn button {
background-color: #333333;
color: #ffffff;
}
Loading