Here's the complete code for Boonz Nutriplanet with all core features:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Boonz Nutriplanet – Fuel Your Body. Thrive Your Life.</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Open Sans', sans-serif;
background-color: #f9f9f9;
color: #333;
line-height: 1.6;
}
header {
background: #4CAF50;
color: white;
padding: 1rem 2rem;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-family: 'Poppins', sans-serif;
font-size: 1.5rem;
font-weight: 700;
}
nav ul {
display: flex;
list-style: none;
gap: 1.5rem;
}
nav ul li a {
color: white;
text-decoration: none;
font-weight: 600;
}
nav ul li a.active {
border-bottom: 2px solid #FFC107;
padding-bottom: 2px;
}
.btn {
background: #2196F3;
color: white;
padding: 0.7rem 1.5rem;
border: none;
border-radius: 5px;
font-weight: 600;
cursor: pointer;
text-decoration: none;
display: inline-block;
}
.btn:hover {
background: #1976D2;
}
/* Hero Section */
.hero {
text-align: center;
padding: 4rem 2rem;
background: linear-gradient(135deg, #4CAF50, #81C784);
color: white;
}
.hero h1 {
font-family: 'Poppins', sans-serif;
font-size: 2.5rem;
margin-bottom: 1rem;
}
.hero p {
font-size: 1.1rem;
margin-bottom: 2rem;
}
/* Features Section */
.features {
display: flex;
justify-content: center;
gap: 2rem;
padding: 3rem 2rem;
flex-wrap: wrap;
}
.feature-card {
background: white;
padding: 1.5rem;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
width: 300px;
text-align: center;
}
.feature-card h3 {
font-family: 'Poppins', sans-serif;
margin-bottom: 1rem;
}
/* Dashboard Styles */
.dashboard {
padding: 2rem;
max-width: 1200px;
margin: 0 auto;
}
.dashboard h1 {
font-family: 'Poppins', sans-serif;
margin-bottom: 2rem;
color: #333;
}
.dashboard-sections {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}
.dashboard-card {
background: white;
padding: 1.5rem;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.dashboard-card h3 {
font-family: 'Poppins', sans-serif;
margin-bottom: 1rem;
color: #4CAF50;
}
.progress-bar {
width: 100%;
height: 10px;
background: #ddd;
border-radius: 5px;
margin: 0.5rem 0;
overflow: hidden;
}
.progress {
height: 100%;
background: #4CAF50;
width: 0%;
transition: width 0.3s ease;
}
.quick-actions {
display: flex;
gap: 1rem;
margin-top: 1rem;
}
/* Hydration Section */
.hydrate-section {
max-width: 600px;
margin: 3rem auto;
padding: 2rem;
background: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
text-align: center;
}
.hydrate-goal {
margin: 1.5rem 0;
}
.hydrate-goal input {
padding: 0.5rem;
margin-top: 0.5rem;
width: 80px;
border: 1px solid #ccc;
border-radius: 5px;
}
.water-progress {
margin: 1.5rem 0;
}
.reminder-section {
margin-top: 2rem;
text-align: left;
}
.reminder-section label {
display: block;
margin: 0.5rem 0;
}
.reminder-section select {
padding: 0.5rem;
margin-left: 0.5rem;
}
/* Food Log Styles */
.track-food {
max-width: 800px;
margin: 2rem auto;
padding: 2rem;
background: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.track-food h1 {
font-family: 'Poppins', sans-serif;
margin-bottom: 1.5rem;
color: #4CAF50;
}
.search-food {
margin-bottom: 2rem;
}
.search-food input {
width: 100%;
padding: 0.8rem;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1rem;
}
.food-list {
margin: 1rem 0;
}
.food-item {
display: flex;
justify-content: space-between;
padding: 0.8rem;
border-bottom: 1px solid #eee;
}
.food-item:hover {
background: #f5f5f5;
}
.nutritional-info {
margin-top: 2rem;
background: #f9f9f9;
padding: 1rem;
border-radius: 5px;
}
/* Meal Planner Styles */
.meal-planner {
max-width: 1000px;
margin: 2rem auto;
padding: 2rem;
background: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.meal-planner h1 {
font-family: 'Poppins', sans-serif;
margin-bottom: 1.5rem;
color: #4CAF50;
}
.weekly-planner {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 1rem;
margin: 2rem 0;
}
.day-column {
background: #f9f9f9;
padding: 1rem;
border-radius: 5px;
}
.day-column h3 {
text-align: center;
margin-bottom: 1rem;
color: #4CAF50;
}
.meal-slot {
margin-bottom: 1rem;
padding: 0.5rem;
background: white;
border: 1px dashed #ddd;
border-radius: 5px;
min-height: 60px;
}
.recipe-database {
margin-top: 2rem;
}
.recipe-card {
display: flex;
gap: 1rem;
margin-bottom: 1rem;
padding: 1rem;
background: #f9f9f9;
border-radius: 5px;
}
.recipe-card img {
width: 100px;
height: 100px;
object-fit: cover;
border-radius: 5px;
}
/* Blog Styles */
.blog {
max-width: 800px;
margin: 2rem auto;
padding: 2rem;
background: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.blog h1 {
font-family: 'Poppins', sans-serif;
margin-bottom: 2rem;
color: #4CAF50;
}
.article {
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid #eee;
}
.article h2 {
font-family: 'Poppins', sans-serif;
margin: 1rem 0;
color: #333;
}
.article-date {
color: #777;
font-size: 0.9rem;
}
/* Tools Styles */
.tools {
max-width: 800px;
margin: 2rem auto;
padding: 2rem;
background: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.tools h1 {
font-family: 'Poppins', sans-serif;
margin-bottom: 2rem;
color: #4CAF50;
}
.calculator {
margin-bottom: 2rem;
padding: 1rem;
background: #f9f9f9;
border-radius: 5px;
}
.calculator h2 {
font-family: 'Poppins', sans-serif;
margin-bottom: 1rem;
color: #333;
}
.calculator input {
padding: 0.5rem;
margin: 0.5rem 0;
width: 100%;
max-width: 300px;
}
.result {
margin-top: 1rem;
font-weight: bold;
}
/* Footer */
footer {
text-align: center;
padding: 1rem;
background: #333;
color: white;
margin-top: 2rem;
}
/* Responsive */
@media (max-width: 768px) {
nav ul {
flex-direction: column;
align-items: flex-start;
gap: 1rem;
}
.weekly-planner {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<header>
<nav>
<div class="logo">🥗 Boonz Nutriplanet</div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="dashboard.html">Dashboard</a></li>
<li><a href="hydrate.html">Hydration</a></li>
<li><a href="track-food.html">Food Log</a></li>
<li><a href="meal-planner.html">Meal Planner</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="tools.html">Tools</a></li>
</ul>
</nav>
</header>
<main class="hero">
<h1>Fuel Your Body. Thrive Your Life.</h1>
<p>Welcome to Boonz Nutriplanet – Your Personal Nutrition & Hydration Companion.</p>
<a href="dashboard.html" class="btn">Get Started</a>
</main>
<footer>
<p>© 2024 Boonz Nutriplanet. All rights reserved.</p>
</footer>
</body>
</html>
Additional Pages (Save as separate files):
- dashboard.html (User Dashboard):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Dashboard – Boonz Nutriplanet</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
/* Copy all CSS from index.html */
</style>
</head>
<body>
<header>
<nav>
<div class="logo">🥗 Boonz Nutriplanet</div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="dashboard.html" class="active">Dashboard</a></li>
<li><a href="hydrate.html">Hydration</a></li>
<li><a href="track-food.html">Food Log</a></li>
<li><a href="meal-planner.html">Meal Planner</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="tools.html">Tools</a></li>
</ul>
</nav>
</header>
<main class="dashboard">
<h1>Your Dashboard</h1>
<div class="dashboard-sections">
<div class="dashboard-card">
<h3>📊 Daily Snapshot</h3>
<p>Calories Consumed: <span id="calories">0</span> / <span id="calorie-goal">2000</span></p>
<div class="progress-bar">
<div class="progress" id="calorie-progress"></div>
</div>
<p>Water: <span id="water-intake">0</span> / <span id="water-goal">8</span> cups</p>
<div class="progress-bar">
<div class="progress" id="water-progress"></div>
</div>
<div class="quick-actions">
<a href="track-food.html" class="btn">Log Food</a>
<a href="hydrate.html" class="btn">Log Water</a>
</div>
</div>
<div class="dashboard-card">
<h3>🎯 Goals</h3>
<p>Weight Goal: <span id="weight-goal">Lose 5kg</span></p>
<p>Weekly Exercise: <span id="exercise-goal">3 days</span></p>
<a href="#" class="btn">Edit Goals</a>
</div>
<div class="dashboard-card">
<h3>📅 Recent Activity</h3>
<ul>
<li>Logged breakfast: Oatmeal + Banana</li>
<li>Drank 1 cup of water</li>
<li>Achieved 30% of daily calories</li>
</ul>
</div>
</div>
</main>
<footer>
<p>© 2024 Boonz Nutriplanet. All rights reserved.</p>
</footer>
<script>
// Simulate dynamic updates
document.addEventListener('DOMContentLoaded', () => {
const calorieProgress = document.getElementById('calorie-progress');
const waterProgress = document.getElementById('water-progress');
calorieProgress.style.width = '30%';
waterProgress.style.width = '50%';
});
</script>
</body>
</html>
- hydrate.html (Hydration Tracker):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Hydration Tracker – Boonz Nutriplanet</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
/* Copy all CSS from index.html */
</style>
</head>
<body>
<header>
<nav>
<div class="logo">🥗 Boonz Nutriplanet</div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="dashboard.html">Dashboard</a></li>
<li><a href="hydrate.html" class="active">Hydration</a></li>
<li><a href="track-food.html">Food Log</a></li>
<li><a href="meal-planner.html">Meal Planner</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="tools.html">Tools</a></li>
</ul>
</nav>
</header>
<main>
<section class="hydrate-section">
<h1>💧 Hydration Tracker</h1>
<p>Set your daily water goal and track your intake with reminders.</p>
<div class="hydrate-goal">
<label for="water-goal">Daily Water Goal (cups):</label>
<input type="number" id="water-goal" value="8" min="1" max="20" />
</div>
<div class="water-progress">
<h3>Today's Intake: <span id="current-intake">0</span> / <span id="goal">8</span> cups</h3>
<div class="progress-bar">
<div class="progress" id="water-progress"></div>
</div>
</div>
<button id="add-water" class="btn">Add 1 Cup</button>
<div class="reminder-section">
<h3>⏰ Reminder Settings</h3>
<label>
<input type="checkbox" id="reminder-toggle" checked /> Enable Reminders
</label>
<label for="reminder-frequency">Every:</label>
<select id="reminder-frequency">
<option value="30">30 minutes</option>
<option value="60" selected>1 hour</option>
<option value="120">2 hours</option>
</select>
</div>
<button id="start-reminder" class="btn">Start Reminders</button>
</section>
</main>
<footer>
<p>© 2024 Boonz Nutriplanet. All rights reserved.</p>
</footer>
<script>
// Hydration Tracker Logic
let currentCups = 0;
let goalCups = parseInt(document.getElementById('water-goal').value);
const currentIntakeSpan = document.getElementById('current-intake');
const goalSpan = document.getElementById('goal');
const progressBar = document.getElementById('water-progress');
const addWaterBtn = document.getElementById('add-water');
const startReminderBtn = document.getElementById('start-reminder');
const reminderToggle = document.getElementById('reminder-toggle');
const reminderFrequency = document.getElementById('reminder-frequency');
// Update goal when input changes
document.getElementById('water-goal').addEventListener('change', function() {
goalCups = parseInt(this.value);
goalSpan.textContent = goalCups;
updateProgress();
});
addWaterBtn.addEventListener('click', () => {
currentCups++;
currentIntakeSpan.textContent = currentCups;
updateProgress();
});
// Reminder System
let reminderInterval;
startReminderBtn.addEventListener('click', () => {
if (reminderInterval) clearInterval(reminderInterval);
if (!reminderToggle.checked) {
alert('Please enable reminders first.');
return;
}
const freqMinutes = parseInt(reminderFrequency.value);
const freqMs = freqMinutes * 60 * 1000;
reminderInterval = setInterval(() => {
alert(`💧 Hydration Reminder!\nYou've had ${currentCups}/${goalCups} cups today. Time to drink water!\n\nStay hydrated, Boonz Hero 🌟`);
}, freqMs);
alert(`✅ Reminders started: Every ${freqMinutes} minute(s).`);
});
function updateProgress() {
const percentage = (currentCups / goalCups) * 100;
progressBar.style.width = percentage + '%';
}
</script>
</body>
</html>
- track-food.html (Food Logging):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Food Log – Boonz Nutriplanet</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
/* Copy all CSS from index.html */
</style>
</head>
<body>
<header>
<nav>
<div class="logo">🥗 Boonz Nutriplanet</div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="dashboard.html">Dashboard</a></li>
<li><a href="hydrate.html">Hydration</a></li>
<li><a href="track-food.html" class="active">Food Log</a></li>
<li><a href="meal-planner.html">Meal Planner</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="tools.html">Tools</a></li>
</ul>
</nav>
</header>
<main class="track-food">
<h1>🍽️ Food Log</h1>
<div class="search-food">
<input type="text" placeholder="Search for a food (e.g., 'chicken', 'apple')" />
</div>
<div class="food-list">
<h3>Recent Foods</h3>
<div class="food-item">
<span>Oatmeal (1 cup)</span>
<span>150 kcal</span>
</div>
<div class="food-item">
<span>Banana</span>
<span>90 kcal</span>
</div>
<div class="food-item">
<span>Grilled Chicken (100g)</span>
<span>165 kcal</span>
</div>
</div>
<div class="nutritional-info">
<h3>Today's Totals</h3>
<p>Calories: 500 / 2000</p>
<p>Protein: 30g / 100g</p>
<p>Carbs: 60g / 250g</p>
<p>Fats: 15g / 70g</p>
</div>
</main>
<footer>
<p>© 2024 Boonz Nutriplanet. All rights reserved.</p>
</footer>
</body>
</html>
- meal-planner.html (Meal Planner):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Meal Planner – Boonz Nutriplanet</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
/* Copy all CSS from index.html */
</style>
</head>
<body>
<header>
<nav>
<div class="logo">🥗 Boonz Nutriplanet</div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="dashboard.html">Dashboard</a></li>
<li><a href="hydrate.html">Hydration</a></li>
<li><a href="track-food.html">Food Log</a></li>
<li><a href="meal-planner.html" class="active">Meal Planner</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="tools.html">Tools</a></li>
</ul>
</nav>
</header>
<main class="meal-planner">
<h1>📅 Meal Planner</h1>
<div class="weekly-planner">
<div class="day-column">
<h3>Monday</h3>
<div class="meal-slot" draggable="true">Breakfast: Oatmeal</div>
<div class="meal-slot" draggable="true">Lunch: Grilled Chicken Salad</div>
<div class="meal-slot" draggable="true">Dinner: Salmon & Veggies</div>
</div>
<div class="day-column">
<h3>Tuesday</h3>
<div class="meal-slot" draggable="true">Breakfast: Greek Yogurt</div>
<div class="meal-slot" draggable="true">Lunch: Quinoa Bowl</div>
<div class="meal-slot" draggable="true">Dinner: Stir-Fry</div>
</div>
<div class="day-column">
<h3>Wednesday</h3>
<div class="meal-slot" draggable="true">Breakfast: Smoothie</div>
<div class="meal-slot" draggable="true">Lunch: Turkey Wrap</div>
<div class="meal-slot" draggable="true">Dinner: Lentil Curry</div>
</div>
<div class="day-column">
<h3>Thursday</h3>
<div class="meal-slot" draggable="true">Breakfast: Avocado Toast</div>
<div class="meal-slot" draggable="true">Lunch: Buddha Bowl</div>
<div class="meal-slot" draggable="true">Dinner: Beef & Broccoli</div>
</div>
<div class="day-column">
<h3>Friday</h3>
<div class="meal-slot" draggable="true">Breakfast: Pancakes</div>
<div class="meal-slot" draggable="true">Lunch: Sushi</div>
<div class="meal-slot" draggable="true">Dinner: Pizza</div>
</div>
<div class="day-column">
<h3>Saturday</h3>
<div class="meal-slot" draggable="true">Breakfast: French Toast</div>
<div class="meal-slot" draggable="true">Lunch: Burger</div>
<div class="meal-slot" draggable="true">Dinner: BBQ</div>
</div>
<div class="day-column">
<h3>Sunday</h3>
<div class="meal-slot" draggable="true">Breakfast: Bagel</div>
<div class="meal-slot" draggable="true">Lunch: Soup</div>
<div class="meal-slot" draggable="true">Dinner: Roast Chicken</div>
</div>
</div>
<div class="recipe-database">
<h2>Recipe Database</h2>
<div class="recipe-card">
<img src="https://via.placeholder.com/100" alt="Recipe Image">
<div>
<h3>Grilled Chicken Salad</h3>
<p>Calories: 350 | Protein: 30g | Carbs: 20g | Fats: 15g</p>
<a href="#" class="btn">Add to Plan</a>
</div>
</div>
<div class="recipe-card">
<img src="https://via.placeholder.com/100" alt="Recipe Image">
<div>
<h3>Quinoa Bowl</h3>
<p>Calories: 400 | Protein: 25g | Carbs: 45g | Fats: 12g</p>
<a href="#" class="btn">Add to Plan</a>
</div>
</div>
</div>
</main>
<footer>
<p>© 2024 Boonz Nutriplanet. All rights reserved.</p>
</footer>
</body>
</html>
- blog.html (Educational Hub):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Blog – Boonz Nutriplanet</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
/* Copy all CSS from index.html */
</style>
</head>
<body>
<header>
<nav>
<div class="logo">🥗 Boonz Nutriplanet</div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="dashboard.html">Dashboard</a></li>
<li><a href="hydrate.html">Hydration</a></li>
<li><a href="track-food.html">Food Log</a></li>
<li><a href="meal-planner.html">Meal Planner</a></li>
<li><a href="blog.html" class="active">Blog</a></li>
<li><a href="tools.html">Tools</a></li>
</ul>
</nav>
</header>
<main class="blog">
<h1>📚 Nutrition & Wellness Blog</h1>
<article class="article">
<h2>10 Hydration Tips for a Healthier You</h2>
<p class="article-date">Published: October 15, 2023</p>
<p>Staying hydrated is crucial for your overall health. Here are 10 easy tips to boost your water intake...</p>
<a href="#" class="btn">Read More</a>
</article>
<article class="article">
<h2>Balanced Diets: What You Need to Know</h2>
<p class="article-date">Published: October 10, 2023</p>
<p>Learn how to create a balanced diet that fuels your body and supports your goals...</p>
<a href="#" class="btn">Read More</a>
</article>
<article class="article">
<h2>Meal Prepping 101: Save Time and Eat Well</h2>
<p class="article-date">Published: October 5, 2023</p>
<p>Discover the art of meal prepping to make healthy eating easier and more enjoyable...</p>
<a href="#" class="btn">Read More</a>
</article>
</main>
<footer>
<p>© 2024 Boonz Nutriplanet. All rights reserved.</p>
</footer>
</body>
</html>
- tools.html (Calculators):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Tools – Boonz Nutriplanet</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<style>
/* Copy all CSS from index.html */
</style>
</head>
<body>
<header>
<nav>
<div class="logo">🥗 Boonz Nutriplanet</div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="dashboard.html">Dashboard</a></li>
<li><a href="hydrate.html">Hydration</a></li>
<li><a href="track-food.html">Food Log</a></li>
<li><a href="meal-planner.html">Meal Planner</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="tools.html" class="active">Tools</a></li>
</ul>
</nav>
</header>
<main class="tools">
<h1>🧮 Nutrition Tools & Calculators</h1>
<div class="calculator">
<h2>BMI Calculator</h2>
<label for="weight">Weight (kg):</label>
<input type="number" id="weight" placeholder="e.g., 70">
<label for="height">Height (cm):</label>
<input type="number" id="height" placeholder="e.g., 175">
<button id="calculate-bmi" class="btn">Calculate BMI</button>
<p class="result" id="bmi-result"></p>
</div>
<div class="calculator">
<h2>TDEE Calculator</h2>
<label for="tdee-weight">Weight (kg):</label>
<input type="number" id="tdee-weight" placeholder="e.g., 70">
<label for="tdee-height">Height (cm):</label>
<input type="number" id="tdee-height" placeholder="e.g., 175">
<label for="age">Age:</label>
<input type="number" id="age" placeholder="e.g., 30">
<label for="activity">Activity Level:</label>
<select id="activity">
<option value="1.2">Sedentary</option>
<option value="1.375">Lightly Active</option>
<option value="1.55">Moderately Active</option>
<option value="1.725">Very Active</option>
</select>
<button id="calculate-tdee" class="btn">Calculate TDEE</button>
<p class="result" id="tdee-result"></p>
</div>
</main>
<footer>
<p>© 2024 Boonz Nutriplanet. All rights reserved.</p>
</footer>
<script>
// BMI Calculator
document.getElementById('calculate-bmi').addEventListener('click', function() {
const weight = parseFloat(document.getElementById('weight').value);
const height = parseFloat(document.getElementById('height').value) / 100; // Convert cm to meters
if (weight && height) {
const bmi = weight / (height * height);
document.getElementById('bmi-result').textContent = `Your BMI: ${bmi.toFixed(2)}`;
} else {
document.getElementById('bmi-result').textContent = 'Please enter valid values.';
}
});
// TDEE Calculator
document.getElementById('calculate-tdee').addEventListener('click', function() {
const weight = parseFloat(document.getElementById('tdee-weight').value);
const height = parseFloat(document.getElementById('tdee-height').value);
const age = parseFloat(document.getElementById('age').value);
const activity = parseFloat(document.getElementById('activity').value);
if (weight && height && age) {
// Mifflin-St Jeor Equation for BMR
const bmr = 10 * weight + 6.25 * height - 5 * age + 5; // For men; adjust for women if needed
const tdee = bmr * activity;
document.getElementById('tdee-result').textContent = `Your TDEE: ${tdee.toFixed(2)} calories/day`;
} else {
document.getElementById('tdee-result').textContent = 'Please enter valid values.';
}
});
</script>
</body>
</html>
Features Included:
- Responsive design with modern UI
- Hydration tracker with reminders
- Food logging with search
- Interactive meal planner
- Educational blog
- BMI & TDEE calculators
- Consistent navigation across pages
- Mobile-friendly layout
To use, save each section as its own HTML file (index.html, dashboard.html, etc.) and open in a web browser. The hydration reminder will work with browser alerts.