Skip to content

Commit

Permalink
Merge pull request #1569 from rashi0409/rtb
Browse files Browse the repository at this point in the history
Food-ordering-website-mode modification
  • Loading branch information
sunny0625 authored Aug 9, 2024
2 parents afadacc + 68bbb19 commit 875f362
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Html-files/RateUs.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<div class="order-0 ml-auto p-2">
<img
class="nav-link"
src="../Images/navbar/sun.png"
src="../Images/navbar/moon.png"
id="theme-toggle-icon"
alt="theme toggler button"
/>
Expand Down
2 changes: 1 addition & 1 deletion Html-files/cart.html
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
</ul>
</div>
<div class="order-0 ml-auto p-2">
<img class="nav-link" src="../Images/navbar/sun.png" id="theme-toggle-icon" alt="theme toggler button">
<img class="nav-link" src="../Images/navbar/moon.png" id="theme-toggle-icon" alt="theme toggler button">
</div>
<div class="collapse navbar-collapse hamburgeritems enddiv order-3 ">
<ul class="navbar-nav end-links">
Expand Down
2 changes: 1 addition & 1 deletion Html-files/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
<div class="order-0 ml-auto p-2">
<img
class="nav-link"
src="../Images/navbar/sun.png"
src="../Images/navbar/moon.png"
id="theme-toggle-icon"
alt="theme toggler button"
/>
Expand Down
2 changes: 1 addition & 1 deletion Html-files/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
</ul>
</div>
<div class="order-0 ml-auto p-2">
<img class="nav-link" src="../Images/navbar/sun.png" id="theme-toggle-icon" alt="theme toggler button">
<img class="nav-link" src="../Images/navbar/moon.png" id="theme-toggle-icon" alt="theme toggler button">
</div>
<div class="collapse navbar-collapse hamburgeritems enddiv order-3 ">
<ul class="navbar-nav end-links">
Expand Down
5 changes: 5 additions & 0 deletions Html-files/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,14 @@
</ul>
</div>
<div class="order-0 ml-auto p-2">

<img class="nav-link" src="../Images/navbar/moon.png" id="theme-toggle-icon" alt="theme toggler button">
</div>

<img class="nav-link" src="../Images/navbar/sun.png" id="theme-toggle-icon" alt="theme toggler button">
</div>


<div class="collapse navbar-collapse hamburgeritems enddiv order-3">
<ul class="navbar-nav end-links">
<li class="nav-item">
Expand Down
2 changes: 1 addition & 1 deletion Html-files/offers.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
<div class="order-0 ml-auto p-2">
<img
class="nav-link"
src="../Images/navbar/sun.png"
src="../Images/navbar/moon.png"
id="theme-toggle-icon"
alt="theme toggler button"
/>
Expand Down
2 changes: 1 addition & 1 deletion Html-files/services.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
</ul>
</div>
<div class="order-0 ml-auto p-2">
<img class="nav-link" src="../Images/navbar/sun.png" id="theme-toggle-icon" alt="theme toggler button" />
<img class="nav-link" src="../Images/navbar/moon.png" id="theme-toggle-icon" alt="theme toggler button" />
</div>
<div class="collapse navbar-collapse hamburgeritems enddiv order-3">
<ul class="navbar-nav end-links">
Expand Down
2 changes: 1 addition & 1 deletion Html-files/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
</ul>
</div>
<div class="order-0 ml-auto p-2">
<img class="nav-link" src="../Images/navbar/sun.png" id="theme-toggle-icon" alt="theme toggler button">
<img class="nav-link" src="../Images/navbar/moon.png" id="theme-toggle-icon" alt="theme toggler button">
</div>
<div class="collapse navbar-collapse hamburgeritems enddiv order-3 ">
<ul class="navbar-nav end-links">
Expand Down
Binary file modified Images/navbar/moon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Images/navbar/sun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,14 +289,18 @@
</div>
<!-- Theme Toggle Icon -->


<img class="nav-link" src="./Images/navbar/moon.png" id="theme-toggle-icon" alt="theme toggler button">

<span class="slider" style="width: 40px; height: 20px; display: none;"></span>


<div id="sun-moon-mode-toggler" class="toggle-container" >
<input type="checkbox" id="themeToggle" class="switch-checkbox" onclick="toggleTheme()">
<label id="themeChangeToggle" class="theme-switch" for="themeToggle">
<div class="toggle-button">
<span class="light-mode-icon"><img src="images/sun.svg" style = "display: block;"></span>
<span class="dark-mode-icon"><img src="images/moon.svg"style = "display: block;"></span>
<span class="light-mode-icon"><img src="Images/navbar/sun.png" style = "display: block;"></span>
<span class="dark-mode-icon"><img src="Images/navbar/moon.png"style = "display: block;"></span>
</div>
</label>
</div>
Expand Down
14 changes: 14 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,17 @@ function displayVisitorCount() {
}
document.addEventListener('DOMContentLoaded', displayVisitorCount);

//Themechange icon toggling behaviour
let themeToggleIcon = document.getElementById("theme-toggle-icon");
let themeToggleLogo = document.getElementById("theme-toggle-logo");
themeToggleIcon.addEventListener("click", function () {
document.body.classList.toggle("dark-theme");
document.body.classList.toggle(":root")
if (document.body.classList.contains("dark-theme")) {
themeToggleIcon.src = "Images/navbar/sun.png";
themeToggleLogo.src = "Images/logo/Logo-Dark.png";
} else {
themeToggleIcon.src = "Images/navbar/moon.png";
themeToggleLogo.src="Images/logo/Logo-Light.png";
}
});
4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1187,8 +1187,8 @@ font-size: 24px;

}
.faq-container {
padding:20px;
}
padding: 20px;
}
.faq-container h1 {
font-size: 2rem;
}
Expand Down

0 comments on commit 875f362

Please sign in to comment.