Skip to content

Commit

Permalink
Merge pull request #1509 from samarsajad/tips
Browse files Browse the repository at this point in the history
added nutrition page
  • Loading branch information
khushi-joshi-05 authored Jul 30, 2024
2 parents 1289aef + 0e7c1c8 commit a5b2829
Show file tree
Hide file tree
Showing 10 changed files with 1,370 additions and 0 deletions.
498 changes: 498 additions & 0 deletions Css-files/nutrition.css

Large diffs are not rendered by default.

778 changes: 778 additions & 0 deletions Html-files/nutrition.html

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions Html-files/nutrition.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//Themechange icon toggling behaviour
let themeToggleIcon = document.getElementById("theme-toggle-icon");

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";
} else {
themeToggleIcon.src = "../Images/navbar/moon.png";
}
});

//Services dropdown

const dropdownli = document.querySelector(".nav-item.dropdown");
const navlinka = document.querySelector('.nav-link.services');
const menu = document.querySelector('.dropdown .dropdown-menu');

dropdownli.addEventListener("mouseenter", () => {
navlinka.classList.add("show");
menu.classList.add("show");
navlinka.setAttribute('aria-expanded', 'true');
menu.setAttribute("data-bs-popper", 'static');
});

menu.addEventListener("mouseleave", () => {
menu.classList.remove("show");
navlinka.classList.remove("show");
navlinka.setAttribute('aria-expanded', 'false');
menu.removeAttribute("data-bs-popper");
dropdownli.addEventListener("mouseleave", () => {
menu.classList.remove("show");
navlinka.classList.remove("show");
navlinka.setAttribute('aria-expanded', 'false');
menu.removeAttribute("data-bs-popper");
})
});
Binary file added Images/nutrition/diary.webp
Binary file not shown.
Binary file added Images/nutrition/fatandoils.webp
Binary file not shown.
Binary file added Images/nutrition/fruits.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/nutrition/grains.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/nutrition/protein.webp
Binary file not shown.
Binary file added Images/nutrition/vegies.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
<i class="fa-solid fa-star"></i> Rate Us
</a>
</li>



</ul>
</div>
Expand Down Expand Up @@ -323,7 +325,60 @@ <h1 class="slider-title slider-reveal">
<br>
<br>

<button class="fixed-button" onclick="openNutrition()">Nutrition Tips</button>
<script>
function openNutrition() {
window.open('Html-files/nutrition.html', '_blank');
}
</script>
<style>

.fixed-button {
position: fixed;
margin-bottom: 25px;
margin-right: 100px;
bottom: 20px;
right: 20px;
width: 60px;
height: 60px;
font-size: 16px;
background-color: #CF2123;
color: white;
border: none;
border-radius: 50%;
cursor: pointer;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
font-size: 12px;
line-height: 1;
animation: bounce 1s infinite;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {
transform: translateY(0);
}
40% {
transform: translateY(-20px);
}
60% {
transform: translateY(-10px);
}
}

.fixed-button:hover {
background: linear-gradient(45deg, rgb(234, 16, 16), #f2a736);
}


.content {
height: 2000px;
background: linear-gradient(white, lightgray);

}
</style>

<section class="about_us pt-5">
<div class="hstack discount-rolling">
Expand Down Expand Up @@ -806,6 +861,7 @@ <h5 class="mb-3" style="margin-left: 70px;">See Also</h5>
<li class="nav-item">
<a class="nav-link" href="./Html-files/cart.html">Cart</a>
</li>

<li class="nav-item">
<a class="nav-link" href="/Html-files/contributor.html">Our Contributors</a>
</li>
Expand Down

0 comments on commit a5b2829

Please sign in to comment.