Skip to content

Commit

Permalink
Merge pull request #1229 from ANKeshri/feat/dark-mode-in-membership-page
Browse files Browse the repository at this point in the history
feat: dark mode in membership page
  • Loading branch information
apu52 authored Jul 29, 2024
2 parents b4204e5 + af4ec32 commit ddda4f8
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 3 deletions.
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
78 changes: 75 additions & 3 deletions pricing/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,8 @@ header {
padding-top: 12px;
padding-bottom: 12px;
width: auto;
background-color: transparent;
border: 2px solid slateblue;
color: red;
background-color: #6a5acd;
color:white;
font-weight: 500;
font-size: 14px;
letter-spacing: 2px;
Expand Down Expand Up @@ -555,4 +554,77 @@ 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{
--secondary-color: #0e1525;
--btn-border: red;
}
/* Dark Mode Styles */
body.dark-mode {
background-color:#002152;
color: #ffffff;
}

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

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

body.dark-mode .btn {
background-color: red;
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: black;
border: 1px solid black;
box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

body.dark-mode .wrapper .table .price-section {
background-color: black;
}

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

0 comments on commit ddda4f8

Please sign in to comment.