Spaces:
Sleeping
Sleeping
Update templates/menu_page.html
Browse files- templates/menu_page.html +18 -13
templates/menu_page.html
CHANGED
|
@@ -22,7 +22,7 @@
|
|
| 22 |
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
|
| 23 |
text-align: center;
|
| 24 |
width: 80%;
|
| 25 |
-
max-width:
|
| 26 |
}
|
| 27 |
h1 {
|
| 28 |
color: #333;
|
|
@@ -49,23 +49,28 @@
|
|
| 49 |
margin-top: 10px;
|
| 50 |
color: #666;
|
| 51 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
.menu-item {
|
| 53 |
-
display: flex;
|
| 54 |
-
flex-direction: column;
|
| 55 |
-
align-items: center;
|
| 56 |
-
margin-bottom: 20px;
|
| 57 |
-
padding: 15px;
|
| 58 |
-
border: 1px solid #ddd;
|
| 59 |
-
border-radius: 8px;
|
| 60 |
background-color: #f9f9f9;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
}
|
| 62 |
.menu-item h3 {
|
| 63 |
-
font-size: 1.
|
| 64 |
color: #333;
|
|
|
|
| 65 |
}
|
| 66 |
.menu-item p {
|
| 67 |
font-size: 1rem;
|
| 68 |
color: #555;
|
|
|
|
| 69 |
}
|
| 70 |
.order-btn {
|
| 71 |
background-color: #28a745;
|
|
@@ -85,7 +90,7 @@
|
|
| 85 |
|
| 86 |
<div class="container">
|
| 87 |
<h1>Welcome to the Menu</h1>
|
| 88 |
-
<div id="menu-items">
|
| 89 |
<!-- Menu items will be populated here dynamically -->
|
| 90 |
</div>
|
| 91 |
|
|
@@ -114,9 +119,9 @@
|
|
| 114 |
menuItemDiv.classList.add('menu-item');
|
| 115 |
menuItemDiv.innerHTML = `
|
| 116 |
<h3>${item.name}</h3>
|
| 117 |
-
<p>Price
|
| 118 |
-
<p>Ingredients
|
| 119 |
-
<p>Category
|
| 120 |
<button class="order-btn" data-item="${item.name}">Order</button>
|
| 121 |
`;
|
| 122 |
menuItemsContainer.appendChild(menuItemDiv); // Add item to the container
|
|
|
|
| 22 |
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
|
| 23 |
text-align: center;
|
| 24 |
width: 80%;
|
| 25 |
+
max-width: 900px;
|
| 26 |
}
|
| 27 |
h1 {
|
| 28 |
color: #333;
|
|
|
|
| 49 |
margin-top: 10px;
|
| 50 |
color: #666;
|
| 51 |
}
|
| 52 |
+
.menu-items-container {
|
| 53 |
+
display: grid;
|
| 54 |
+
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
| 55 |
+
gap: 20px;
|
| 56 |
+
margin-top: 20px;
|
| 57 |
+
}
|
| 58 |
.menu-item {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
background-color: #f9f9f9;
|
| 60 |
+
padding: 20px;
|
| 61 |
+
border-radius: 10px;
|
| 62 |
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
| 63 |
+
text-align: left;
|
| 64 |
}
|
| 65 |
.menu-item h3 {
|
| 66 |
+
font-size: 1.8rem;
|
| 67 |
color: #333;
|
| 68 |
+
margin-bottom: 10px;
|
| 69 |
}
|
| 70 |
.menu-item p {
|
| 71 |
font-size: 1rem;
|
| 72 |
color: #555;
|
| 73 |
+
margin: 5px 0;
|
| 74 |
}
|
| 75 |
.order-btn {
|
| 76 |
background-color: #28a745;
|
|
|
|
| 90 |
|
| 91 |
<div class="container">
|
| 92 |
<h1>Welcome to the Menu</h1>
|
| 93 |
+
<div id="menu-items" class="menu-items-container">
|
| 94 |
<!-- Menu items will be populated here dynamically -->
|
| 95 |
</div>
|
| 96 |
|
|
|
|
| 119 |
menuItemDiv.classList.add('menu-item');
|
| 120 |
menuItemDiv.innerHTML = `
|
| 121 |
<h3>${item.name}</h3>
|
| 122 |
+
<p><strong>Price:</strong> $${item.price}</p>
|
| 123 |
+
<p><strong>Ingredients:</strong> ${item.ingredients}</p>
|
| 124 |
+
<p><strong>Category:</strong> ${item.category}</p>
|
| 125 |
<button class="order-btn" data-item="${item.name}">Order</button>
|
| 126 |
`;
|
| 127 |
menuItemsContainer.appendChild(menuItemDiv); // Add item to the container
|