Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +21 -31
templates/index.html
CHANGED
|
@@ -1,39 +1,29 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
</div>
|
| 16 |
-
<
|
| 17 |
-
<img src="images/onion-pakoda.jpg" alt="Onion Pakoda" class="food-image" data-item="Onion Pakoda">
|
| 18 |
-
<p>Onion Pakoda - $10</p>
|
| 19 |
-
<button class="add-button" data-item="Onion Pakoda">Add</button>
|
| 20 |
-
</div>
|
| 21 |
-
<!-- Add more items here -->
|
| 22 |
-
</div>
|
| 23 |
-
|
| 24 |
-
<!-- Modal -->
|
| 25 |
-
<div id="suggestion-modal" class="modal">
|
| 26 |
-
<div class="modal-content">
|
| 27 |
-
<span class="close-button">×</span>
|
| 28 |
-
<h3 id="selected-item"></h3>
|
| 29 |
-
<p>Suggested Combinations:</p>
|
| 30 |
-
<ul id="suggestion-list"></ul>
|
| 31 |
-
<label for="quantity">Quantity:</label>
|
| 32 |
-
<input type="number" id="quantity" value="1" min="1">
|
| 33 |
-
<button id="add-to-cart-button">Add to Cart</button>
|
| 34 |
-
</div>
|
| 35 |
-
</div>
|
| 36 |
-
|
| 37 |
-
<script src="script.js"></script>
|
| 38 |
</body>
|
| 39 |
</html>
|
|
|
|
| 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>Dynamic Food Menu</title>
|
| 7 |
+
<link rel="stylesheet" href="/static/style.css">
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
+
<header>
|
| 11 |
+
<h1>Dynamic Food Menu</h1>
|
| 12 |
+
<a href="/cart" class="cart-link">View Cart</a>
|
| 13 |
+
</header>
|
| 14 |
+
<div id="menu-container">
|
| 15 |
+
{% for item in menu %}
|
| 16 |
+
<div class="menu-item">
|
| 17 |
+
<img src="{{ item['image'] }}" alt="{{ item['name'] }}" class="menu-image">
|
| 18 |
+
<div class="menu-details">
|
| 19 |
+
<h3>{{ item['name'] }} - ${{ item['price'] }}</h3>
|
| 20 |
+
<p>{{ item['description'] }}</p>
|
| 21 |
+
<input type="number" value="1" min="1" id="quantity-{{ item['name'] }}">
|
| 22 |
+
<button class="add-button" onclick="addToCart('{{ item['name'] }}')">Add</button>
|
| 23 |
+
</div>
|
| 24 |
+
</div>
|
| 25 |
+
{% endfor %}
|
| 26 |
</div>
|
| 27 |
+
<script src="/static/script.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
</body>
|
| 29 |
</html>
|