Spaces:
Runtime error
Runtime error
Update templates/menu.html (#3)
Browse files- Update templates/menu.html (7f4b5ae2d439f2c2514581d81fb6a289fd4e69e6)
Co-authored-by: Surendra <nagasurendra@users.noreply.huggingface.co>
- templates/menu.html +19 -79
templates/menu.html
CHANGED
|
@@ -4,87 +4,27 @@
|
|
| 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/bootstrap@5.3.0-alpha1/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 |
-
<
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
<
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 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 |
-
</
|
| 85 |
-
</
|
| 86 |
-
|
| 87 |
-
<
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
</body>
|
| 90 |
</html>
|
|
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Menu</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
</head>
|
| 8 |
<body>
|
| 9 |
+
<h1>Menu</h1>
|
| 10 |
+
<form method="get" action="/menu">
|
| 11 |
+
<label for="category">Filter by Category:</label>
|
| 12 |
+
<select name="category" id="category" onchange="this.form.submit()">
|
| 13 |
+
<option value="All" {% if selected_category == 'All' %}selected{% endif %}>All</option>
|
| 14 |
+
{% for category in categories %}
|
| 15 |
+
<option value="{{ category }}" {% if selected_category == category %}selected{% endif %}>{{ category }}</option>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
{% endfor %}
|
| 17 |
+
</select>
|
| 18 |
+
</form>
|
| 19 |
+
|
| 20 |
+
<ul>
|
| 21 |
+
{% for item in food_items %}
|
| 22 |
+
<li>
|
| 23 |
+
<strong>{{ item.Name }}</strong> - ${{ item.Price__c }}<br>
|
| 24 |
+
<img src="{{ item.Image1__c }}" alt="{{ item.Name }}" width="100"><br>
|
| 25 |
+
<p>{{ item.Description__c }}</p>
|
| 26 |
+
</li>
|
| 27 |
+
{% endfor %}
|
| 28 |
+
</ul>
|
| 29 |
</body>
|
| 30 |
</html>
|