Skip to content

Commit

Permalink
Dark-mode of Three pages added
Browse files Browse the repository at this point in the history
  • Loading branch information
sau-mili committed Aug 5, 2024
1 parent 17e0587 commit fd8bf48
Show file tree
Hide file tree
Showing 3 changed files with 189 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Adventure.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,41 @@
right: 1rem;
}
}

body.dark-mode .each{
background-color: #ffffffab;

border: 1px solid #ffffff;
}

body.dark-mode .each h5{
color:#0c4581;
}

body.dark-mode .trip__details{
background-color: #0a0035;
}
body.dark-mode .trip__details p{
color:#caf9ff;
}
body.dark-mode .price span{
color:#dbdbdb;
}
body.dark-mode .price{
color:#dbdbdb;
}
body.dark-mode .info .tags i{
color:#8cc0ff;
}

body.dark-mode .trip__details button{
background-color: #cfe4fb;
}

body.dark-mode .trip__details button:hover{
background-color: transparent;
}

</style>

<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet" />
Expand Down
77 changes: 77 additions & 0 deletions Cultural_Exp.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,59 @@
opacity: 1;
}
}
/* Dark mode feature */
body.dark-mode{
--secondary-color:#0e1525;
--btn-border: red;
}
body.dark-mode {
background-color: var(--secondary-color);
}

body.dark-mode .nav-container {
background-color: #343a40;
}

body.dark-mode .section__container {
background-color: #002152;
color: #ffffff;
}


body.dark-mode .each{
background-color: #ffffffab;

border: 1px solid #ffffff;
}

body.dark-mode .each h5{
color:#0c4581;
}

body.dark-mode .trip__details{
background-color: #0a0035;
}
body.dark-mode .trip__details p{
color:#caf9ff;
}
body.dark-mode .price span{
color:#dbdbdb;
}
body.dark-mode .price{
color:#dbdbdb;
}
body.dark-mode .info .tags i{
color:#8cc0ff;
}

body.dark-mode .trip__details button{
background-color: #cfe4fb;
}

body.dark-mode .trip__details button:hover{
background-color: transparent;
}

</style>

<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet" />
Expand Down Expand Up @@ -851,6 +904,30 @@ <h4>Contact Us</h4>
}
}
</script>
<script>
document.addEventListener('DOMContentLoaded', () => {
const toggleCheckbox = document.getElementById('themeToggle');
const body = document.body;

// Load saved dark mode preference from localStorage
if (localStorage.getItem('dark-mode') === 'enabled') {
body.classList.add('dark-mode');
toggleCheckbox.checked = true;
} else {
toggleCheckbox.checked = false;
}

toggleCheckbox.addEventListener('change', () => {
if (toggleCheckbox.checked) {
body.classList.add('dark-mode');
localStorage.setItem('dark-mode', 'enabled');
} else {
body.classList.remove('dark-mode');
localStorage.setItem('dark-mode', 'disabled');
}
});
});
</script>
<script src="./Image-Gallery/script.js"></script>

</html>
77 changes: 77 additions & 0 deletions HoneyMoon.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,59 @@
opacity: 1;
}
}
/* Dark mode feature */
body.dark-mode{
--secondary-color:#0e1525;
--btn-border: red;
}
body.dark-mode {
background-color: var(--secondary-color);
}

body.dark-mode .nav-container {
background-color: #343a40;
}

body.dark-mode .section__container {
background-color: #002152;
color: #ffffff;
}


body.dark-mode .each{
background-color: #ffffffab;

border: 1px solid #ffffff;
}

body.dark-mode .each h5{
color:#0c4581;
}

body.dark-mode .trip__details{
background-color: #0a0035;
}
body.dark-mode .trip__details p{
color:#caf9ff;
}
body.dark-mode .price span{
color:#dbdbdb;
}
body.dark-mode .price{
color:#dbdbdb;
}
body.dark-mode .info .tags i{
color:#8cc0ff;
}

body.dark-mode .trip__details button{
background-color: #cfe4fb;
}

body.dark-mode .trip__details button:hover{
background-color: transparent;
}

</style>

<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet" />
Expand Down Expand Up @@ -817,5 +870,29 @@ <h4>Contact Us</h4>
}
</script>
<script src="./Image-Gallery/script.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
const toggleCheckbox = document.getElementById('themeToggle');
const body = document.body;

// Load saved dark mode preference from localStorage
if (localStorage.getItem('dark-mode') === 'enabled') {
body.classList.add('dark-mode');
toggleCheckbox.checked = true;
} else {
toggleCheckbox.checked = false;
}

toggleCheckbox.addEventListener('change', () => {
if (toggleCheckbox.checked) {
body.classList.add('dark-mode');
localStorage.setItem('dark-mode', 'enabled');
} else {
body.classList.remove('dark-mode');
localStorage.setItem('dark-mode', 'disabled');
}
});
});
</script>

</html>

0 comments on commit fd8bf48

Please sign in to comment.