Spaces:
Runtime error
Runtime error
Update templates/menu.html
Browse files- templates/menu.html +90 -32
templates/menu.html
CHANGED
@@ -1,32 +1,90 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Menu</title>
|
7 |
+
<!-- Bootstrap CSS -->
|
8 |
+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
9 |
+
<style>
|
10 |
+
body {
|
11 |
+
font-family: Arial, sans-serif;
|
12 |
+
background-color: #f8f9fa;
|
13 |
+
margin: 0;
|
14 |
+
padding: 0;
|
15 |
+
}
|
16 |
+
|
17 |
+
.container {
|
18 |
+
max-width: 900px;
|
19 |
+
}
|
20 |
+
|
21 |
+
.menu-card {
|
22 |
+
max-width: 350px;
|
23 |
+
border-radius: 15px;
|
24 |
+
overflow: hidden;
|
25 |
+
background-color: #fff;
|
26 |
+
margin: auto;
|
27 |
+
}
|
28 |
+
|
29 |
+
.menu-image {
|
30 |
+
height: 200px;
|
31 |
+
width: 100%;
|
32 |
+
object-fit: cover;
|
33 |
+
border-radius: 15px 15px 0 0;
|
34 |
+
}
|
35 |
+
|
36 |
+
.card-title {
|
37 |
+
font-size: 1.2rem;
|
38 |
+
font-weight: bold;
|
39 |
+
}
|
40 |
+
|
41 |
+
.card-text {
|
42 |
+
font-size: 1rem;
|
43 |
+
color: #6c757d;
|
44 |
+
}
|
45 |
+
|
46 |
+
.btn-primary {
|
47 |
+
font-size: 0.9rem;
|
48 |
+
border-radius: 20px;
|
49 |
+
width: 100px;
|
50 |
+
}
|
51 |
+
</style>
|
52 |
+
</head>
|
53 |
+
<body>
|
54 |
+
<div class="container mt-4">
|
55 |
+
<h1 class="text-center">Menu</h1>
|
56 |
+
|
57 |
+
<!-- Filter Section -->
|
58 |
+
<form method="get" action="/menu" class="text-center mb-4">
|
59 |
+
<label for="category" class="form-label fw-bold">Filter by Category:</label>
|
60 |
+
<select id="category" name="category" class="form-select" onchange="this.form.submit()">
|
61 |
+
<option value="All" {% if selected_category == 'All' %}selected{% endif %}>All</option>
|
62 |
+
{% for category in categories %}
|
63 |
+
<option value="{{ category }}" {% if selected_category == category %}selected{% endif %}>
|
64 |
+
{{ category }}
|
65 |
+
</option>
|
66 |
+
{% endfor %}
|
67 |
+
</select>
|
68 |
+
</form>
|
69 |
+
|
70 |
+
<!-- Menu Items -->
|
71 |
+
<div class="row">
|
72 |
+
{% for item in food_items %}
|
73 |
+
<div class="col-md-6 mb-4">
|
74 |
+
<div class="card menu-card">
|
75 |
+
<img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
|
76 |
+
<div class="card-body">
|
77 |
+
<h5 class="card-title">{{ item.Name }}</h5>
|
78 |
+
<p class="card-text">${{ item.Price__c }}</p>
|
79 |
+
<p class="card-text"><small class="text-muted">{{ item.Category__c }}</small></p>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
{% endfor %}
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
<!-- Bootstrap JS -->
|
88 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
89 |
+
</body>
|
90 |
+
</html>
|