geethareddy's picture
Update templates/menu.html
37473e9 verified
raw
history blame
2.87 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Menu</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f8f9fa;
margin: 0;
padding: 0;
}
.container {
max-width: 900px;
}
.menu-card {
max-width: 350px;
border-radius: 15px;
overflow: hidden;
background-color: #fff;
margin: auto;
}
.menu-image {
height: 200px;
width: 100%;
object-fit: cover;
border-radius: 15px 15px 0 0;
}
.card-title {
font-size: 1.2rem;
font-weight: bold;
}
.card-text {
font-size: 1rem;
color: #6c757d;
}
.btn-primary {
font-size: 0.9rem;
border-radius: 20px;
width: 100px;
}
</style>
</head>
<body>
<div class="container mt-4">
<h1 class="text-center">Menu</h1>
<!-- Filter Section -->
<form method="get" action="/menu" class="text-center mb-4">
<label for="category" class="form-label fw-bold">Filter by Category:</label>
<select id="category" name="category" class="form-select" onchange="this.form.submit()">
<option value="All" {% if selected_category == 'All' %}selected{% endif %}>All</option>
{% for category in categories %}
<option value="{{ category }}" {% if selected_category == category %}selected{% endif %}>
{{ category }}
</option>
{% endfor %}
</select>
</form>
<!-- Menu Items -->
<div class="row">
{% for item in food_items %}
<div class="col-md-6 mb-4">
<div class="card menu-card">
<img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
<div class="card-body">
<h5 class="card-title">{{ item.Name }}</h5>
<p class="card-text">${{ item.Price__c }}</p>
<p class="card-text"><small class="text-muted">{{ item.Category__c }}</small></p>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>