0% found this document useful (0 votes)
2 views

Hsksndis

Wwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Hsksndis

Wwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

<!

DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Enhanced Diet Planner</title>
<style>
body {
font-family: Arial, sans-serif;
background: linear-gradient(to bottom right, #ffecd2, #fcb69f);
color: #333;
text-align: center;
margin: 0;
padding: 0;
}

header {
padding: 20px;
}

h1 {
font-size: 3em;
color: #222;
}

p{
font-size: 1.2em;
color: #555;
}

.container {
display: flex;
justify-content: center;
gap: 30px;
margin: 50px 0;
flex-wrap: wrap;
}

.card {
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
width: 300px;
}

.card:hover {
transform: translateY(-10px);
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

button {
padding: 10px 20px;
font-size: 1em;
color: white;
background-color: #ff6b6b;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}

button:hover {
background-color: #ff4757;
}

#dietPlan {
display: none;
padding: 20px;
background: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
margin: 20px auto;
width: 80%;
}

.back-btn {
display: block;
margin: 20px auto;
background-color: #48dbfb;
}

.progress-container {
display: flex;
justify-content: center;
gap: 30px;
margin-top: 10px;
}

.progress {
width: 90px;
height: 90px;
border-radius: 50%;
background: conic-gradient(#1dd1a1 calc(var(--value) * 1%), #dcdcdc 0);
display: flex;
align-items: center;
justify-content: center;
font-size: 0.9em;
font-weight: bold;
position: relative;
}

.progress span {
position: absolute;
}

footer {
margin-top: 50px;
padding: 20px;
background-color: #2f3542;
color: white;
}

ul {
text-align: left;
list-style: none;
padding: 0;
}

ul li {
font-size: 1.2em;
margin: 10px 0;
}

.grocery-list {
margin-top: 20px;
padding: 15px;
border: 1px solid #ccc;
border-radius: 10px;
background: #f4f4f4;
}

.recipe {
margin-top: 20px;
padding: 15px;
border: 1px solid #ccc;
border-radius: 10px;
background: #f9f9f9;
text-align: left;
}
</style>
</head>
<body>
<header>
<h1>Enhanced Diet Planner</h1>
<p>Choose your preferred diet and get a comprehensive meal plan with grocery lists and
nutrient tracking.</p>
</header>

<div class="container">
<div class="card" id="ketoCard">
<h2>Keto Diet</h2>
<p>Low-carb, high-fat meals to keep you in ketosis.</p>
<button onclick="showDiet('keto')">View Keto Meal Plan</button>
</div>

<div class="card" id="paleoCard">


<h2>Paleo Diet</h2>
<p>Whole foods, no grains, and no dairy.</p>
<button onclick="showDiet('paleo')">View Paleo Meal Plan</button>
</div>
</div>

<div id="dietPlan">
<button class="back-btn" onclick="goBack()">← Back</button>
<div id="planContent"></div>
</div>

<footer>
<p>© 2024 Enhanced Diet Planner. All Rights Reserved.</p>
</footer>

<script>
function showDiet(dietType) {
document.querySelector('.container').style.display = 'none';
document.getElementById('dietPlan').style.display = 'block';

const planContent = document.getElementById('planContent');

const plans = {
keto: {
meals: `
<h2>Keto Meal Plan</h2>
<ul>
<li><strong>Breakfast:</strong> Paneer Bhurji with Masala Omelette
${getNutritionCircles(15, 70, 15)}
<div class="recipe"><h4>Recipe:</h4> 100g paneer, 2 eggs, 1/2 onion, spices,
cooked in ghee.</div>
</li>
<li><strong>Lunch:</strong> Butter Chicken with Cauliflower Rice
${getNutritionCircles(10, 60, 30)}
<div class="recipe"><h4>Recipe:</h4> 200g chicken, 100g cauliflower rice, butter,
spices.</div>
</li>
</ul>
`,
grocery: `
<h3>Grocery List</h3>
<ul>
<li>200g Paneer</li>
<li>6 Eggs</li>
<li>150g Cauliflower Rice</li>
<li>250g Chicken</li>
<li>Butter (100g)</li>
</ul>
`
}
};

const plan = plans[dietType];


planContent.innerHTML = `
${plan.meals}
<div class="grocery-list">${plan.grocery}</div>
`;
}

function getNutritionCircles(carbs, protein, fat) {


return `
<div class="progress-container">
<div class="progress"
style="--value:${carbs}"><span>${carbs}%</span><br>Carbs</div>
<div class="progress"
style="--value:${protein}"><span>${protein}%</span><br>Protein</div>
<div class="progress" style="--value:${fat}"><span>${fat}%</span><br>Fat</div>
</div>
`;
}

function goBack() {
document.querySelector('.container').style.display = 'flex';
document.getElementById('dietPlan').style.display = 'none';
}
</script>

</body>
</html>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy