Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +235 -293
templates/menu.html
CHANGED
|
@@ -8,249 +8,249 @@
|
|
| 8 |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 9 |
<style>
|
| 10 |
body {
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
}
|
| 16 |
-
.container {
|
| 17 |
-
|
| 18 |
-
}
|
| 19 |
-
.menu-card {
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
}
|
| 26 |
-
.menu-image {
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
}
|
| 32 |
-
.card-title {
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
}
|
| 36 |
-
.card-text {
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
}
|
| 40 |
-
.btn-primary {
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
}
|
| 47 |
-
.btn-primary:hover {
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
}
|
| 51 |
-
.btn-primary:active,
|
| 52 |
-
.btn-primary:focus {
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
}
|
| 57 |
-
.view-cart-container {
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
}
|
| 63 |
-
.view-cart-button {
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
}
|
| 76 |
-
.view-cart-button:hover {
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
}
|
| 80 |
-
.avatar-dropdown-container {
|
| 81 |
-
|
| 82 |
-
}
|
| 83 |
-
.avatar-icon {
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
}
|
| 96 |
-
.dropdown-menu {
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
}
|
| 106 |
-
.avatar-dropdown-container:hover .dropdown-menu {
|
| 107 |
-
|
| 108 |
-
}
|
| 109 |
-
.dropdown-menu .dropdown-item {
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
}
|
| 116 |
-
.dropdown-menu .dropdown-item:last-child {
|
| 117 |
-
|
| 118 |
-
}
|
| 119 |
-
.dropdown-menu .dropdown-item:hover {
|
| 120 |
-
|
| 121 |
-
}
|
| 122 |
-
.fixed-search-container {
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
}
|
| 135 |
-
/* Ensure the category filter dropdown does not overlap */
|
| 136 |
-
form.text-center.mb-4 {
|
| 137 |
-
|
| 138 |
-
}
|
| 139 |
-
/* Ensure the container has enough margin so nothing is overlapped */
|
| 140 |
-
.container {
|
| 141 |
-
|
| 142 |
-
}
|
| 143 |
-
.fixed-top-bar {
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
}
|
| 157 |
|
| 158 |
-
.search-bar-container {
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
}
|
| 164 |
|
| 165 |
-
.search-bar-container input {
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
}
|
| 172 |
|
| 173 |
-
/* Style for customization sections */
|
| 174 |
-
.addon-section {
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
}
|
| 181 |
-
/* Customization section title */
|
| 182 |
-
.addon-section h6 {
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
}
|
| 188 |
-
/* Style for add-on checkboxes */
|
| 189 |
-
.addon-section .form-check {
|
| 190 |
-
|
| 191 |
-
}
|
| 192 |
|
| 193 |
-
/* Category Filter with Custom Radio Buttons */
|
| 194 |
-
form.text-center.mb-4 {
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
}
|
| 199 |
|
| 200 |
-
.form-check {
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
}
|
| 205 |
|
| 206 |
-
.form-check-inline {
|
| 207 |
-
|
| 208 |
-
}
|
| 209 |
|
| 210 |
-
.form-check-label {
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
}
|
| 214 |
|
| 215 |
-
.custom-radio {
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
}
|
| 228 |
|
| 229 |
-
.custom-radio:checked {
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
}
|
| 233 |
|
| 234 |
-
.custom-radio:checked::after {
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
}
|
| 244 |
|
| 245 |
-
.custom-radio:hover {
|
| 246 |
-
|
| 247 |
-
}
|
| 248 |
|
| 249 |
-
/* Optional: Style the labels */
|
| 250 |
-
.form-check-label {
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
}
|
| 254 |
</style>
|
| 255 |
</head>
|
| 256 |
<body>
|
|
@@ -293,7 +293,6 @@ form.text-center.mb-4 {
|
|
| 293 |
<div class="container mt-4">
|
| 294 |
<h1 class="text-center">Menu</h1>
|
| 295 |
|
| 296 |
-
|
| 297 |
<!-- Category Filter with Custom Radio Buttons -->
|
| 298 |
<form method="get" action="/menu" class="text-center mb-4">
|
| 299 |
<label class="form-label fw-bold">Select a Category:</label>
|
|
@@ -308,7 +307,7 @@ form.text-center.mb-4 {
|
|
| 308 |
<label class="form-check-label" for="category-CustomizedDish">Customized Dish</label>
|
| 309 |
</div>
|
| 310 |
</form>
|
| 311 |
-
|
| 312 |
<!-- Display text boxes for Customized Dish -->
|
| 313 |
{% if selected_category == "Customized Dish" %}
|
| 314 |
<div id="custom-dish-form" class="mt-4">
|
|
@@ -327,10 +326,6 @@ form.text-center.mb-4 {
|
|
| 327 |
</div>
|
| 328 |
{% else %}
|
| 329 |
|
| 330 |
-
<div class="fixed-search-container">
|
| 331 |
-
<input type="text" id="searchBar" class="form-control" placeholder="Search items or sections..." onkeyup="filterMenu()">
|
| 332 |
-
</div>
|
| 333 |
-
|
| 334 |
<!-- Show menu items only when Customized Dish is not selected -->
|
| 335 |
<div class="container mt-4">
|
| 336 |
<h1 class="text-center">Menu</h1>
|
|
@@ -369,47 +364,7 @@ form.text-center.mb-4 {
|
|
| 369 |
</div>
|
| 370 |
|
| 371 |
<!-- Bootstrap JS -->
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
<!-- Modal for Item Details -->
|
| 376 |
-
<div class="modal fade" id="itemModal" tabindex="-1" aria-labelledby="itemModalLabel" aria-hidden="true">
|
| 377 |
-
<div class="modal-dialog modal-dialog-centered">
|
| 378 |
-
<div class="modal-content">
|
| 379 |
-
<div class="modal-header">
|
| 380 |
-
<h5 class="modal-title" id="itemModalLabel">Item Details</h5>
|
| 381 |
-
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| 382 |
-
</div>
|
| 383 |
-
<div class="modal-body">
|
| 384 |
-
<!-- Item Image -->
|
| 385 |
-
<img id="modal-img" class="img-fluid rounded mb-3 d-block mx-auto" alt="Item Image" style="max-height: 200px; object-fit: cover;">
|
| 386 |
-
<!-- Item Name -->
|
| 387 |
-
<h5 id="modal-name" class="fw-bold text-center"></h5>
|
| 388 |
-
<!-- Item Price -->
|
| 389 |
-
<p id="modal-price" class="text-muted text-center"></p>
|
| 390 |
-
<!-- Item Description -->
|
| 391 |
-
<p id="modal-description" class="text-secondary"></p>
|
| 392 |
-
<!-- Add-ons -->
|
| 393 |
-
<div id="modal-addons" class="modal-addons mt-4">
|
| 394 |
-
<h6>Customization Options</h6>
|
| 395 |
-
<div id="addons-list" class="addons-container">Loading customization options...</div>
|
| 396 |
-
</div>
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
<div class="mt-4">
|
| 400 |
-
<h6>Custom Request</h6>
|
| 401 |
-
<textarea id="modal-instructions" class="form-control" placeholder="Enter any special instructions here..."></textarea>
|
| 402 |
-
</div>
|
| 403 |
-
<span id="modal-section" data-section="" data-category="" style="display: none;"></span>
|
| 404 |
-
|
| 405 |
-
</div>
|
| 406 |
-
<div class="modal-footer">
|
| 407 |
-
<button type="button" class="btn btn-primary" onclick="addToCartFromModal()">Add to Cart</button>
|
| 408 |
-
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
| 409 |
-
</div>
|
| 410 |
-
</div>
|
| 411 |
-
</div>
|
| 412 |
-
</div>
|
| 413 |
|
| 414 |
<!-- JavaScript -->
|
| 415 |
<script>
|
|
@@ -467,6 +422,7 @@ form.text-center.mb-4 {
|
|
| 467 |
document.getElementById('addons-list').innerHTML = '<p>Error loading customization options.</p>';
|
| 468 |
});
|
| 469 |
}
|
|
|
|
| 470 |
function filterMenu() {
|
| 471 |
let input = document.getElementById('searchBar').value.toLowerCase();
|
| 472 |
let sections = document.querySelectorAll('h3'); // Select section headers
|
|
@@ -495,6 +451,7 @@ form.text-center.mb-4 {
|
|
| 495 |
}
|
| 496 |
});
|
| 497 |
}
|
|
|
|
| 498 |
function addToCartFromModal() {
|
| 499 |
const itemName = document.getElementById('modal-name').innerText;
|
| 500 |
const itemPrice = parseFloat(document.getElementById('modal-price').innerText.replace('$', ''));
|
|
@@ -546,21 +503,6 @@ form.text-center.mb-4 {
|
|
| 546 |
alert('An error occurred while adding the item to the cart.');
|
| 547 |
});
|
| 548 |
}
|
| 549 |
-
// Function to round reward points to a single digit
|
| 550 |
-
function roundRewardPoints() {
|
| 551 |
-
let rewardPointsElement = document.getElementById('reward-points');
|
| 552 |
-
let rewardPoints = parseFloat(rewardPointsElement.innerText);
|
| 553 |
-
|
| 554 |
-
if (!isNaN(rewardPoints)) {
|
| 555 |
-
rewardPointsElement.innerText = rewardPoints.toFixed(1); // Rounds to 1 decimal place
|
| 556 |
-
}
|
| 557 |
-
}
|
| 558 |
-
// Run the function when the page loads
|
| 559 |
-
window.onload = roundRewardPoints;
|
| 560 |
-
|
| 561 |
</script>
|
| 562 |
-
|
| 563 |
-
<!-- Bootstrap JS -->
|
| 564 |
-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
| 565 |
</body>
|
| 566 |
</html>
|
|
|
|
| 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: #ffffff; /* Updated background color */
|
| 13 |
+
margin: 0;
|
| 14 |
+
padding: 0;
|
| 15 |
+
}
|
| 16 |
+
.container {
|
| 17 |
+
max-width: 900px;
|
| 18 |
+
}
|
| 19 |
+
.menu-card {
|
| 20 |
+
max-width: 350px;
|
| 21 |
+
border-radius: 15px;
|
| 22 |
+
overflow: hidden;
|
| 23 |
+
background-color: #fff;
|
| 24 |
+
margin: auto;
|
| 25 |
+
}
|
| 26 |
+
.menu-image {
|
| 27 |
+
height: 200px;
|
| 28 |
+
width: 100%;
|
| 29 |
+
object-fit: cover;
|
| 30 |
+
border-radius: 15px 15px 0 0;
|
| 31 |
+
}
|
| 32 |
+
.card-title {
|
| 33 |
+
font-size: 1.2rem;
|
| 34 |
+
font-weight: bold;
|
| 35 |
+
}
|
| 36 |
+
.card-text {
|
| 37 |
+
font-size: 1rem;
|
| 38 |
+
color: #6c757d;
|
| 39 |
+
}
|
| 40 |
+
.btn-primary {
|
| 41 |
+
font-size: 0.9rem;
|
| 42 |
+
border-radius: 20px;
|
| 43 |
+
width: 100px;
|
| 44 |
+
background-color: #ff6b35; /* Updated button background color */
|
| 45 |
+
border-color: #28a745;
|
| 46 |
+
}
|
| 47 |
+
.btn-primary:hover {
|
| 48 |
+
background-color: #4a5d68;
|
| 49 |
+
border-color: #1e7e34;
|
| 50 |
+
}
|
| 51 |
+
.btn-primary:active,
|
| 52 |
+
.btn-primary:focus {
|
| 53 |
+
background-color: #4a5d68;
|
| 54 |
+
border-color: #1e7e34;
|
| 55 |
+
box-shadow: none;
|
| 56 |
+
}
|
| 57 |
+
.view-cart-container {
|
| 58 |
+
position: fixed;
|
| 59 |
+
bottom: 20px;
|
| 60 |
+
right: 20px;
|
| 61 |
+
z-index: 999;
|
| 62 |
+
}
|
| 63 |
+
.view-cart-button {
|
| 64 |
+
background-color: #ff6b35; /* Updated View Cart button background color */
|
| 65 |
+
color: #fff;
|
| 66 |
+
padding: 10px 20px;
|
| 67 |
+
border-radius: 50px;
|
| 68 |
+
font-size: 1rem;
|
| 69 |
+
font-weight: bold;
|
| 70 |
+
text-decoration: none;
|
| 71 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
| 72 |
+
display: flex;
|
| 73 |
+
align-items: center;
|
| 74 |
+
justify-content: center;
|
| 75 |
+
}
|
| 76 |
+
.view-cart-button:hover {
|
| 77 |
+
background-color: #e25a2a; /* Slightly darker shade for hover effect */
|
| 78 |
+
text-decoration: none;
|
| 79 |
+
}
|
| 80 |
+
.avatar-dropdown-container {
|
| 81 |
+
position: relative;
|
| 82 |
+
}
|
| 83 |
+
.avatar-icon {
|
| 84 |
+
width: 40px;
|
| 85 |
+
height: 40px;
|
| 86 |
+
border-radius: 50%;
|
| 87 |
+
background-color: #5bbfc1;
|
| 88 |
+
cursor: pointer;
|
| 89 |
+
display: flex;
|
| 90 |
+
align-items: center;
|
| 91 |
+
justify-content: center;
|
| 92 |
+
color: white;
|
| 93 |
+
font-size: 20px;
|
| 94 |
+
font-weight: bold;
|
| 95 |
+
}
|
| 96 |
+
.dropdown-menu {
|
| 97 |
+
position: absolute;
|
| 98 |
+
right: 0;
|
| 99 |
+
top: 100%;
|
| 100 |
+
background-color: #fff;
|
| 101 |
+
border-radius: 5px;
|
| 102 |
+
width: 200px; /* Adjust width as needed */
|
| 103 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
| 104 |
+
display: none;
|
| 105 |
+
}
|
| 106 |
+
.avatar-dropdown-container:hover .dropdown-menu {
|
| 107 |
+
display: block;
|
| 108 |
+
}
|
| 109 |
+
.dropdown-menu .dropdown-item {
|
| 110 |
+
padding: 10px 15px;
|
| 111 |
+
text-decoration: none;
|
| 112 |
+
color: #333;
|
| 113 |
+
border-bottom: 1px solid #ddd;
|
| 114 |
+
display: block; /* Make each item stack vertically */
|
| 115 |
+
}
|
| 116 |
+
.dropdown-menu .dropdown-item:last-child {
|
| 117 |
+
border-bottom: none; /* Remove the bottom border from the last item */
|
| 118 |
+
}
|
| 119 |
+
.dropdown-menu .dropdown-item:hover {
|
| 120 |
+
background-color: #f1f1f1;
|
| 121 |
+
}
|
| 122 |
+
.fixed-search-container {
|
| 123 |
+
position: absolute;
|
| 124 |
+
top: 90px; /* Move it slightly lower */
|
| 125 |
+
left: 50%;
|
| 126 |
+
transform: translateX(-50%);
|
| 127 |
+
width: 80%;
|
| 128 |
+
max-width: 600px;
|
| 129 |
+
z-index: 999; /* Keep it above content */
|
| 130 |
+
background-color: white;
|
| 131 |
+
padding: 10px;
|
| 132 |
+
border-radius: 25px;
|
| 133 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
| 134 |
+
}
|
| 135 |
+
/* Ensure the category filter dropdown does not overlap */
|
| 136 |
+
form.text-center.mb-4 {
|
| 137 |
+
margin-top: 120px !important; /* Increase spacing below search bar */
|
| 138 |
+
}
|
| 139 |
+
/* Ensure the container has enough margin so nothing is overlapped */
|
| 140 |
+
.container {
|
| 141 |
+
margin-top: 180px; /* Adjust spacing based on navbar and search bar */
|
| 142 |
+
}
|
| 143 |
+
.fixed-top-bar {
|
| 144 |
+
position: fixed;
|
| 145 |
+
top: 0;
|
| 146 |
+
left: 0;
|
| 147 |
+
width: 100%;
|
| 148 |
+
height: 44px;
|
| 149 |
+
z-index: 1000; /* Ensures it stays on top of other elements */
|
| 150 |
+
background-color: #FF6B35; /* Updated header background */
|
| 151 |
+
color: white;
|
| 152 |
+
padding: 15px;
|
| 153 |
+
display: flex;
|
| 154 |
+
justify-content: space-between;
|
| 155 |
+
align-items: center;
|
| 156 |
+
}
|
| 157 |
|
| 158 |
+
.search-bar-container {
|
| 159 |
+
margin-left: 20px;
|
| 160 |
+
margin-right: 20px;
|
| 161 |
+
flex: 1;
|
| 162 |
+
max-width: 400px;
|
| 163 |
+
}
|
| 164 |
|
| 165 |
+
.search-bar-container input {
|
| 166 |
+
width: 100%;
|
| 167 |
+
padding: 5px;
|
| 168 |
+
font-size: 16px;
|
| 169 |
+
border-radius: 20px;
|
| 170 |
+
border: none;
|
| 171 |
+
}
|
| 172 |
|
| 173 |
+
/* Style for customization sections */
|
| 174 |
+
.addon-section {
|
| 175 |
+
background-color: #f8f9fa; /* Light gray background */
|
| 176 |
+
border: 2px solid #ff6b35; /* Border color */
|
| 177 |
+
border-radius: 8px;
|
| 178 |
+
padding: 12px;
|
| 179 |
+
margin-bottom: 15px; /* Spacing between sections */
|
| 180 |
+
}
|
| 181 |
+
/* Customization section title */
|
| 182 |
+
.addon-section h6 {
|
| 183 |
+
margin-bottom: 10px;
|
| 184 |
+
font-size: 1.1rem;
|
| 185 |
+
font-weight: bold;
|
| 186 |
+
color: #333;
|
| 187 |
+
}
|
| 188 |
+
/* Style for add-on checkboxes */
|
| 189 |
+
.addon-section .form-check {
|
| 190 |
+
margin-left: 10px;
|
| 191 |
+
}
|
| 192 |
|
| 193 |
+
/* Category Filter with Custom Radio Buttons */
|
| 194 |
+
form.text-center.mb-4 {
|
| 195 |
+
display: flex;
|
| 196 |
+
flex-direction: column;
|
| 197 |
+
align-items: center;
|
| 198 |
+
}
|
| 199 |
|
| 200 |
+
.form-check {
|
| 201 |
+
display: inline-block;
|
| 202 |
+
margin-right: 15px;
|
| 203 |
+
margin-bottom: 10px; /* Add space between buttons */
|
| 204 |
+
}
|
| 205 |
|
| 206 |
+
.form-check-inline {
|
| 207 |
+
margin-right: 10px;
|
| 208 |
+
}
|
| 209 |
|
| 210 |
+
.form-check-label {
|
| 211 |
+
font-size: 16px;
|
| 212 |
+
margin-left: 8px; /* Space between radio button and label */
|
| 213 |
+
}
|
| 214 |
|
| 215 |
+
.custom-radio {
|
| 216 |
+
appearance: none;
|
| 217 |
+
-webkit-appearance: none;
|
| 218 |
+
-moz-appearance: none;
|
| 219 |
+
width: 18px;
|
| 220 |
+
height: 18px;
|
| 221 |
+
border: 2px solid #333;
|
| 222 |
+
border-radius: 50%;
|
| 223 |
+
margin-right: 10px; /* Increased spacing between button and label */
|
| 224 |
+
outline: none;
|
| 225 |
+
cursor: pointer;
|
| 226 |
+
position: relative;
|
| 227 |
+
}
|
| 228 |
|
| 229 |
+
.custom-radio:checked {
|
| 230 |
+
background-color: #007bff;
|
| 231 |
+
border-color: #007bff;
|
| 232 |
+
}
|
| 233 |
|
| 234 |
+
.custom-radio:checked::after {
|
| 235 |
+
content: '';
|
| 236 |
+
position: absolute;
|
| 237 |
+
top: 4px;
|
| 238 |
+
left: 4px;
|
| 239 |
+
width: 8px;
|
| 240 |
+
height: 8px;
|
| 241 |
+
background-color: #fff;
|
| 242 |
+
border-radius: 50%;
|
| 243 |
+
}
|
| 244 |
|
| 245 |
+
.custom-radio:hover {
|
| 246 |
+
border-color: #007bff;
|
| 247 |
+
}
|
| 248 |
|
| 249 |
+
/* Optional: Style the labels */
|
| 250 |
+
.form-check-label {
|
| 251 |
+
font-size: 16px;
|
| 252 |
+
margin-left: 8px; /* Space between the radio button and the label */
|
| 253 |
+
}
|
| 254 |
</style>
|
| 255 |
</head>
|
| 256 |
<body>
|
|
|
|
| 293 |
<div class="container mt-4">
|
| 294 |
<h1 class="text-center">Menu</h1>
|
| 295 |
|
|
|
|
| 296 |
<!-- Category Filter with Custom Radio Buttons -->
|
| 297 |
<form method="get" action="/menu" class="text-center mb-4">
|
| 298 |
<label class="form-label fw-bold">Select a Category:</label>
|
|
|
|
| 307 |
<label class="form-check-label" for="category-CustomizedDish">Customized Dish</label>
|
| 308 |
</div>
|
| 309 |
</form>
|
| 310 |
+
|
| 311 |
<!-- Display text boxes for Customized Dish -->
|
| 312 |
{% if selected_category == "Customized Dish" %}
|
| 313 |
<div id="custom-dish-form" class="mt-4">
|
|
|
|
| 326 |
</div>
|
| 327 |
{% else %}
|
| 328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
<!-- Show menu items only when Customized Dish is not selected -->
|
| 330 |
<div class="container mt-4">
|
| 331 |
<h1 class="text-center">Menu</h1>
|
|
|
|
| 364 |
</div>
|
| 365 |
|
| 366 |
<!-- Bootstrap JS -->
|
| 367 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
|
| 369 |
<!-- JavaScript -->
|
| 370 |
<script>
|
|
|
|
| 422 |
document.getElementById('addons-list').innerHTML = '<p>Error loading customization options.</p>';
|
| 423 |
});
|
| 424 |
}
|
| 425 |
+
|
| 426 |
function filterMenu() {
|
| 427 |
let input = document.getElementById('searchBar').value.toLowerCase();
|
| 428 |
let sections = document.querySelectorAll('h3'); // Select section headers
|
|
|
|
| 451 |
}
|
| 452 |
});
|
| 453 |
}
|
| 454 |
+
|
| 455 |
function addToCartFromModal() {
|
| 456 |
const itemName = document.getElementById('modal-name').innerText;
|
| 457 |
const itemPrice = parseFloat(document.getElementById('modal-price').innerText.replace('$', ''));
|
|
|
|
| 503 |
alert('An error occurred while adding the item to the cart.');
|
| 504 |
});
|
| 505 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 506 |
</script>
|
|
|
|
|
|
|
|
|
|
| 507 |
</body>
|
| 508 |
</html>
|