mirror of
https://github.com/sstent/foodplanner.git
synced 2026-01-25 19:21:37 +00:00
75 lines
2.6 KiB
HTML
75 lines
2.6 KiB
HTML
<!-- templates/base.html -->
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Meal Planner</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<style>
|
|
.nav-tabs .nav-link.active {
|
|
background-color: #0d6efd;
|
|
color: white;
|
|
}
|
|
.nutrition-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
gap: 10px;
|
|
margin: 10px 0;
|
|
}
|
|
.nutrition-item {
|
|
text-align: center;
|
|
padding: 8px;
|
|
background-color: #f8f9fa;
|
|
border-radius: 4px;
|
|
}
|
|
.person-toggle {
|
|
position: absolute;
|
|
top: 10px;
|
|
right: 20px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container-fluid">
|
|
<div class="person-toggle">
|
|
<select id="personSelect" class="form-select" onchange="switchPerson()">
|
|
<option value="Person A" {% if person == "Person A" %}selected{% endif %}>Person A</option>
|
|
<option value="Person B" {% if person == "Person B" %}selected{% endif %}>Person B</option>
|
|
</select>
|
|
</div>
|
|
|
|
<h1 class="mt-3 mb-4">Meal Planner</h1>
|
|
|
|
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link" onclick="location.href='/foods'">Foods</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link" onclick="location.href='/meals'">Meals</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link" onclick="location.href='/plan'">Plan A</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link" onclick="location.href='/detailed'">Detailed Planner</button>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tab-content mt-3">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script>
|
|
function switchPerson() {
|
|
const person = document.getElementById('personSelect').value;
|
|
const currentUrl = new URL(window.location);
|
|
currentUrl.searchParams.set('person', person);
|
|
window.location.href = currentUrl.toString();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|