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

Allinged toggle button for dark mode #3427

Closed
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
48 changes: 22 additions & 26 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,7 @@


/* Position the toggle button to the right */
.switch-container {
position: absolute;
right: 10rem; /* Adjust this value to move the button more to the right */
top: 1.5rem; /* Adjust this value to move the button vertically */
}


/* For responsiveness */
@media (max-width: 99rem) {
Expand Down Expand Up @@ -1698,12 +1694,7 @@


/* Position the toggle button to the right */
.switch-container {
position: absolute;
right: 10rem; /* Adjust this value to move the button more to the right */
top: 1.5rem; /* Adjust this value to move the button vertically */
}


/* For responsiveness */
@media (max-width: 99rem) {
.switch-container {
Expand Down Expand Up @@ -2293,9 +2284,7 @@
.vis-h{
opacity: 0;
}
.switch-container {
right: 7rem !important;
}

}
@media only screen and (max-width:990px){
.header{
Expand Down Expand Up @@ -3194,17 +3183,33 @@

<li class="navbar-item">
<a href="audiobook.html" onclick="lenis.scrollTo('audiobooks')" class="navbar-link" data-nav-link>
<i class="ri-bar-chart-fill"></i> Audio<br> Books
Audio<br> Books
</a>
</li>


<!--this li is added to align the darkmode toggle button -->
<li style="width: 100px;">
</li>
<li >
<div class="switch-container" >
<input type="checkbox" id="switch" class="switch-checkbox">
<label for="switch" class="switch-label">
<div class="switch-button">
<span class="material-icons sun-icon">wb_sunny </span>
<span class="material-icons moon-icon">brightness_2</span>
</div>
</label>
</div>
</div>
</li>
<li>
<div class="action">
<div class="profile" onclick="menuToggle();">
<img id="profile-avatar" src="./assets/images/avatar1.jpg" />
</div>
<div class="menu">
<h3>XYZ<br /><span>Book Lover</span></h3>

<ul>
<li>
<img src="./assets/images/user.jpg" /><a href="/profile.html">My profile</a>
Expand Down Expand Up @@ -3377,16 +3382,7 @@ <h1>Logout Account</h1>

window.addEventListener("scroll", onScroll);
</script>
<div class="switch-container" style="top: 1.5rem;">
<input type="checkbox" id="switch" class="switch-checkbox">
<label for="switch" class="switch-label">
<div class="switch-button">
<span class="material-icons sun-icon">wb_sunny </span>
<span class="material-icons moon-icon">brightness_2</span>
</div>
</label>
</div>
</div>

</div>
</header>
<link rel="stylesheet" href="assets/css/refresher.css">
Expand Down