Update templates/menu.html
Browse files- templates/menu.html +199 -145
templates/menu.html
CHANGED
@@ -358,21 +358,23 @@
|
|
358 |
#softDrinkModal .modal-dialog {
|
359 |
max-width: 400px;
|
360 |
margin: 1.75rem auto;
|
|
|
361 |
}
|
362 |
#softDrinkModal .modal-content {
|
363 |
-
border-radius:
|
364 |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
365 |
background-color: #fff;
|
|
|
366 |
}
|
367 |
#softDrinkModal .modal-header {
|
368 |
background: linear-gradient(45deg, #FFA07A, #FFB347);
|
369 |
-
border-top-left-radius:
|
370 |
-
border-top-right-radius:
|
371 |
padding: 12px 15px;
|
372 |
border-bottom: none;
|
373 |
}
|
374 |
#softDrinkModal .modal-title {
|
375 |
-
font-size: 1.
|
376 |
font-weight: 600;
|
377 |
color: #fff;
|
378 |
}
|
@@ -381,38 +383,45 @@
|
|
381 |
text-align: center;
|
382 |
}
|
383 |
#softDrinkModal .modal-body img {
|
384 |
-
max-height:
|
385 |
width: 100%;
|
386 |
object-fit: cover;
|
387 |
border-radius: 8px;
|
388 |
margin-bottom: 15px;
|
|
|
389 |
}
|
390 |
#softDrinkModal .modal-body h5 {
|
391 |
-
font-size: 1.
|
392 |
font-weight: 600;
|
393 |
color: #333333;
|
394 |
margin-bottom: 10px;
|
395 |
}
|
396 |
#softDrinkModal .modal-body p {
|
397 |
-
font-size: 1.
|
398 |
font-weight: 500;
|
399 |
color: #000000;
|
400 |
margin-bottom: 20px;
|
401 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
#softDrinkModal .quantity-controls {
|
403 |
display: flex;
|
404 |
justify-content: center;
|
405 |
align-items: center;
|
406 |
-
gap:
|
407 |
margin-bottom: 20px;
|
408 |
}
|
409 |
#softDrinkModal .quantity-controls .btn {
|
410 |
-
width:
|
411 |
-
height:
|
412 |
border-radius: 50%;
|
413 |
padding: 0;
|
414 |
-
font-size: 1rem;
|
415 |
-
line-height:
|
416 |
text-align: center;
|
417 |
background-color: #e9ecef;
|
418 |
border: none;
|
@@ -428,12 +437,12 @@
|
|
428 |
}
|
429 |
#softDrinkModal .quantity-controls input {
|
430 |
width: 50px;
|
431 |
-
height:
|
432 |
text-align: center;
|
433 |
font-size: 1rem;
|
434 |
font-weight: 600;
|
435 |
border: 1px solid #ced4da;
|
436 |
-
border-radius:
|
437 |
background-color: #f8f9fa;
|
438 |
}
|
439 |
#softDrinkModal .modal-footer {
|
@@ -446,8 +455,8 @@
|
|
446 |
#softDrinkModal .modal-footer .btn-primary {
|
447 |
background-color: #0FAA39;
|
448 |
border-color: #0FAA39;
|
449 |
-
padding:
|
450 |
-
font-size: 1rem;
|
451 |
font-weight: 600;
|
452 |
border-radius: 8px;
|
453 |
transition: background-color 0.2s ease, transform 0.1s ease;
|
@@ -463,15 +472,15 @@
|
|
463 |
}
|
464 |
#softDrinkModal .modal-footer .quantity-controls-footer {
|
465 |
display: flex;
|
466 |
-
gap:
|
467 |
}
|
468 |
#softDrinkModal .modal-footer .quantity-controls-footer .btn {
|
469 |
-
width:
|
470 |
-
height:
|
471 |
border-radius: 50%;
|
472 |
padding: 0;
|
473 |
-
font-size: 1rem;
|
474 |
-
line-height:
|
475 |
text-align: center;
|
476 |
background-color: #e9ecef;
|
477 |
border: none;
|
@@ -485,6 +494,60 @@
|
|
485 |
#softDrinkModal .modal-footer .quantity-controls-footer .btn:active {
|
486 |
transform: scale(0.95);
|
487 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
@keyframes checkmark {
|
489 |
from { transform: scale(0); }
|
490 |
to { transform: scale(1); }
|
@@ -497,6 +560,10 @@
|
|
497 |
from { opacity: 0; transform: translateY(10px); }
|
498 |
to { opacity: 1; transform: translateY(0); }
|
499 |
}
|
|
|
|
|
|
|
|
|
500 |
form.text-center.mb-4 {
|
501 |
display: flex;
|
502 |
flex-direction: column;
|
@@ -626,31 +693,6 @@
|
|
626 |
.toggle-details:hover {
|
627 |
text-decoration: underline;
|
628 |
}
|
629 |
-
.category-buttons {
|
630 |
-
display: flex;
|
631 |
-
flex-wrap: wrap;
|
632 |
-
gap: 10px;
|
633 |
-
justify-content: center;
|
634 |
-
margin-top: 10px;
|
635 |
-
}
|
636 |
-
.category-button {
|
637 |
-
background-color: #fff;
|
638 |
-
border: 2px solid #0FAA39;
|
639 |
-
color: #0FAA39;
|
640 |
-
padding: 5px 15px;
|
641 |
-
border-radius: 20px;
|
642 |
-
font-size: 0.9rem;
|
643 |
-
cursor: pointer;
|
644 |
-
transition: background-color 0.3s, color 0.3s;
|
645 |
-
}
|
646 |
-
.category-button.selected {
|
647 |
-
background-color: #0FAA39;
|
648 |
-
color: #fff;
|
649 |
-
border-color: #0FAA39;
|
650 |
-
}
|
651 |
-
.category-button:hover {
|
652 |
-
background-color: #e6f4ea;
|
653 |
-
}
|
654 |
.quantity-selector {
|
655 |
display: flex;
|
656 |
align-items: center;
|
@@ -816,13 +858,6 @@
|
|
816 |
padding: 12px 16px;
|
817 |
font-size: 15px;
|
818 |
}
|
819 |
-
.category-buttons {
|
820 |
-
gap: 8px;
|
821 |
-
}
|
822 |
-
.category-button {
|
823 |
-
padding: 4px 12px;
|
824 |
-
font-size: 0.85rem;
|
825 |
-
}
|
826 |
.modal-dialog {
|
827 |
max-width: 90%;
|
828 |
margin: 10px auto;
|
@@ -970,23 +1005,23 @@
|
|
970 |
max-width: 90%;
|
971 |
}
|
972 |
#softDrinkModal .modal-content {
|
973 |
-
border-radius:
|
974 |
}
|
975 |
#softDrinkModal .modal-header {
|
976 |
padding: 10px 12px;
|
977 |
}
|
978 |
#softDrinkModal .modal-title {
|
979 |
-
font-size: 1.
|
980 |
}
|
981 |
#softDrinkModal .modal-body {
|
982 |
padding: 15px;
|
983 |
}
|
984 |
#softDrinkModal .modal-body img {
|
985 |
-
max-height:
|
986 |
-
margin-bottom:
|
987 |
}
|
988 |
#softDrinkModal .modal-body h5 {
|
989 |
-
font-size: 1.
|
990 |
margin-bottom: 8px;
|
991 |
}
|
992 |
#softDrinkModal .modal-body p {
|
@@ -994,28 +1029,52 @@
|
|
994 |
margin-bottom: 15px;
|
995 |
}
|
996 |
#softDrinkModal .quantity-controls .btn {
|
997 |
-
width:
|
998 |
-
height:
|
999 |
-
font-size:
|
1000 |
-
line-height:
|
1001 |
}
|
1002 |
#softDrinkModal .quantity-controls input {
|
1003 |
-
width:
|
1004 |
-
height:
|
1005 |
font-size: 0.9rem;
|
1006 |
}
|
1007 |
#softDrinkModal .modal-footer {
|
1008 |
padding: 10px;
|
1009 |
}
|
1010 |
#softDrinkModal .modal-footer .btn-primary {
|
1011 |
-
padding:
|
1012 |
-
font-size:
|
1013 |
}
|
1014 |
#softDrinkModal .modal-footer .quantity-controls-footer .btn {
|
1015 |
-
width:
|
1016 |
-
height:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1017 |
font-size: 0.9rem;
|
1018 |
-
|
|
|
|
|
1019 |
}
|
1020 |
}
|
1021 |
</style>
|
@@ -1039,15 +1098,22 @@
|
|
1039 |
</div>
|
1040 |
</div>
|
1041 |
|
1042 |
-
<form method="get" action="/menu" class="text-center mb-4" id="
|
1043 |
-
<label class="form-label fw-bold">
|
1044 |
-
<div class="
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1049 |
</div>
|
1050 |
-
<input type="hidden" name="category" id="selectedCategoryInput" value="{{ selected_category }}">
|
1051 |
</form>
|
1052 |
|
1053 |
<div class="container mt-4">
|
@@ -1098,7 +1164,7 @@
|
|
1098 |
<h5 class="card-title">{{ item.Name | default('Unnamed Item') }}</h5>
|
1099 |
<p class="card-text price">${{ item.Price__c | default('0.00') }}</p>
|
1100 |
</div>
|
1101 |
-
<div class="d-flex flex-column align-
|
1102 |
<div class="button-container"
|
1103 |
data-item-name="{{ item.Name | default('Unnamed Item') }}"
|
1104 |
data-item-price="{{ item.Price__c | default('0.00') }}"
|
@@ -1130,7 +1196,7 @@
|
|
1130 |
<h6>Description</h6>
|
1131 |
<p>{{ item.Description__c | default('No description available') }}</p>
|
1132 |
<h6>Ingredients</h6>
|
1133 |
-
<p>{{ item.
|
1134 |
<h6>Nutritional Info</h6>
|
1135 |
<p class="nutritional-info">{{ item.NutritionalInfo__c | default('Not available') }}</p>
|
1136 |
<h6>Allergens</h6>
|
@@ -1206,17 +1272,17 @@
|
|
1206 |
<p id="soft-drink-price"></p>
|
1207 |
</div>
|
1208 |
<div class="quantity-controls">
|
1209 |
-
<button type="button" class="btn" id="soft-drink-decrease">-</button>
|
1210 |
-
<input type="text" class="form-control text-center" id="soft-drink-quantity" value="1" readonly>
|
1211 |
-
<button type="button" class="btn" id="soft-drink-increase">+</button>
|
1212 |
</div>
|
1213 |
</div>
|
1214 |
<div class="modal-footer">
|
1215 |
<div class="quantity-controls-footer">
|
1216 |
-
<button type="button" class="btn" id="soft-drink-decrease-footer" onclick="updateSoftDrinkQuantity(-1)">-1</button>
|
1217 |
-
<button type="button" class="btn" id="soft-drink-increase-footer" onclick="updateSoftDrinkQuantity(1)">+1</button>
|
1218 |
</div>
|
1219 |
-
<button type="button" class="btn btn-primary" onclick="addSoftDrinkToCart()">Add to Cart</button>
|
1220 |
</div>
|
1221 |
</div>
|
1222 |
</div>
|
@@ -1316,7 +1382,7 @@
|
|
1316 |
const itemImage = buttonContainer.getAttribute('data-item-image');
|
1317 |
|
1318 |
document.getElementById('soft-drink-name').textContent = itemName;
|
1319 |
-
document.getElementById('soft-drink-price').textContent =
|
1320 |
document.getElementById('soft-drink-quantity').value = '1';
|
1321 |
document.getElementById('soft-drink-image').src = itemImage || '/static/placeholder.jpg';
|
1322 |
|
@@ -1543,6 +1609,34 @@
|
|
1543 |
isProcessingRequest = false;
|
1544 |
});
|
1545 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1546 |
document.addEventListener('DOMContentLoaded', function () {
|
1547 |
const avatarContainer = document.querySelector('.avatar-dropdown-container');
|
1548 |
const dropdownMenu = document.querySelector('.dropdown-menu');
|
@@ -1625,8 +1719,15 @@
|
|
1625 |
const video = entry.target;
|
1626 |
const src = video.getAttribute('data-src');
|
1627 |
if (src && !video.querySelector('source[src="' + src + '"]')) {
|
1628 |
-
const
|
1629 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1630 |
video.load();
|
1631 |
}
|
1632 |
video.classList.add('loaded');
|
@@ -1664,21 +1765,6 @@
|
|
1664 |
}
|
1665 |
});
|
1666 |
});
|
1667 |
-
const categoryButtons = document.querySelectorAll('.category-button');
|
1668 |
-
const categoryForm = document.getElementById('categoryForm');
|
1669 |
-
const selectedCategoryInput = document.getElementById('selectedCategoryInput');
|
1670 |
-
if (!selectedCategoryInput.value) {
|
1671 |
-
selectedCategoryInput.value = "All";
|
1672 |
-
document.querySelector('.category-button[data-category="All"]').classList.add('selected');
|
1673 |
-
}
|
1674 |
-
categoryButtons.forEach(button => {
|
1675 |
-
button.addEventListener('click', function () {
|
1676 |
-
categoryButtons.forEach(btn => btn.classList.remove('selected'));
|
1677 |
-
this.classList.add('selected');
|
1678 |
-
selectedCategoryInput.value = this.getAttribute('data-category');
|
1679 |
-
categoryForm.submit();
|
1680 |
-
});
|
1681 |
-
});
|
1682 |
const descriptionTextarea = document.getElementById('custom-dish-description');
|
1683 |
const descriptionSuggestions = document.getElementById('descriptionSuggestions');
|
1684 |
if (descriptionTextarea && descriptionSuggestions) {
|
@@ -1763,51 +1849,19 @@
|
|
1763 |
const increaseBtn = document.getElementById('increaseQuantity');
|
1764 |
const quantityInput = document.getElementById('quantityInput');
|
1765 |
decreaseBtn.addEventListener('click', function () {
|
1766 |
-
let
|
1767 |
-
|
1768 |
-
|
1769 |
-
quantityInput.value = currentQuantity;
|
1770 |
-
}
|
1771 |
});
|
1772 |
increaseBtn.addEventListener('click', function () {
|
1773 |
-
let
|
1774 |
-
|
1775 |
-
|
1776 |
-
quantityInput.value = currentQuantity;
|
1777 |
-
}
|
1778 |
-
});
|
1779 |
-
const softDrinkDecreaseBtn = document.getElementById('soft-drink-decrease');
|
1780 |
-
const softDrinkIncreaseBtn = document.getElementById('soft-drink-increase');
|
1781 |
-
const softDrinkQuantityInput = document.getElementById('soft-drink-quantity');
|
1782 |
-
softDrinkDecreaseBtn.addEventListener('click', function() {
|
1783 |
-
updateSoftDrinkQuantity(-1);
|
1784 |
});
|
1785 |
-
softDrinkIncreaseBtn.addEventListener('click', function() {
|
1786 |
-
updateSoftDrinkQuantity(1);
|
1787 |
-
});
|
1788 |
-
const micIcon = document.getElementById('micIcon');
|
1789 |
-
if ('SpeechRecognition' in window || 'webkitSpeechRecognition' in window) {
|
1790 |
-
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
1791 |
-
const recognition = new SpeechRecognition();
|
1792 |
-
recognition.lang = 'en-US';
|
1793 |
-
recognition.onstart = () => micIcon.classList.add('active');
|
1794 |
-
recognition.onresult = (event) => {
|
1795 |
-
const query = event.results[0][0].transcript.trim();
|
1796 |
-
localStorage.setItem('searchQuery', query);
|
1797 |
-
window.location.href = '/search';
|
1798 |
-
};
|
1799 |
-
recognition.onend = () => micIcon.classList.remove('active');
|
1800 |
-
recognition.onerror = (event) => {
|
1801 |
-
micIcon.classList.remove('active');
|
1802 |
-
console.error('Speech error:', event.error);
|
1803 |
-
};
|
1804 |
-
micIcon.addEventListener('click', () => {
|
1805 |
-
recognition.start();
|
1806 |
-
});
|
1807 |
-
} else {
|
1808 |
-
micIcon.style.display = 'none';
|
1809 |
-
}
|
1810 |
});
|
1811 |
</script>
|
1812 |
</body>
|
1813 |
-
</html>
|
|
|
|
|
|
|
|
358 |
#softDrinkModal .modal-dialog {
|
359 |
max-width: 400px;
|
360 |
margin: 1.75rem auto;
|
361 |
+
animation: fadeInModal 0.3s ease-out;
|
362 |
}
|
363 |
#softDrinkModal .modal-content {
|
364 |
+
border-radius: 12px;
|
365 |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
366 |
background-color: #fff;
|
367 |
+
overflow: hidden;
|
368 |
}
|
369 |
#softDrinkModal .modal-header {
|
370 |
background: linear-gradient(45deg, #FFA07A, #FFB347);
|
371 |
+
border-top-left-radius: 12px;
|
372 |
+
border-top-right-radius: 12px;
|
373 |
padding: 12px 15px;
|
374 |
border-bottom: none;
|
375 |
}
|
376 |
#softDrinkModal .modal-title {
|
377 |
+
font-size: 1.3rem;
|
378 |
font-weight: 600;
|
379 |
color: #fff;
|
380 |
}
|
|
|
383 |
text-align: center;
|
384 |
}
|
385 |
#softDrinkModal .modal-body img {
|
386 |
+
max-height: 160px;
|
387 |
width: 100%;
|
388 |
object-fit: cover;
|
389 |
border-radius: 8px;
|
390 |
margin-bottom: 15px;
|
391 |
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
392 |
}
|
393 |
#softDrinkModal .modal-body h5 {
|
394 |
+
font-size: 1.4rem;
|
395 |
font-weight: 600;
|
396 |
color: #333333;
|
397 |
margin-bottom: 10px;
|
398 |
}
|
399 |
#softDrinkModal .modal-body p {
|
400 |
+
font-size: 1.2rem;
|
401 |
font-weight: 500;
|
402 |
color: #000000;
|
403 |
margin-bottom: 20px;
|
404 |
}
|
405 |
+
#softDrinkModal .modal-body p::before {
|
406 |
+
content: '$';
|
407 |
+
color: #FFA07A;
|
408 |
+
font-weight: 600;
|
409 |
+
margin-right: 2px;
|
410 |
+
}
|
411 |
#softDrinkModal .quantity-controls {
|
412 |
display: flex;
|
413 |
justify-content: center;
|
414 |
align-items: center;
|
415 |
+
gap: 12px;
|
416 |
margin-bottom: 20px;
|
417 |
}
|
418 |
#softDrinkModal .quantity-controls .btn {
|
419 |
+
width: 32px;
|
420 |
+
height: 32px;
|
421 |
border-radius: 50%;
|
422 |
padding: 0;
|
423 |
+
font-size: 1.1rem;
|
424 |
+
line-height: 32px;
|
425 |
text-align: center;
|
426 |
background-color: #e9ecef;
|
427 |
border: none;
|
|
|
437 |
}
|
438 |
#softDrinkModal .quantity-controls input {
|
439 |
width: 50px;
|
440 |
+
height: 32px;
|
441 |
text-align: center;
|
442 |
font-size: 1rem;
|
443 |
font-weight: 600;
|
444 |
border: 1px solid #ced4da;
|
445 |
+
border-radius: 6px;
|
446 |
background-color: #f8f9fa;
|
447 |
}
|
448 |
#softDrinkModal .modal-footer {
|
|
|
455 |
#softDrinkModal .modal-footer .btn-primary {
|
456 |
background-color: #0FAA39;
|
457 |
border-color: #0FAA39;
|
458 |
+
padding: 12px 30px;
|
459 |
+
font-size: 1.1rem;
|
460 |
font-weight: 600;
|
461 |
border-radius: 8px;
|
462 |
transition: background-color 0.2s ease, transform 0.1s ease;
|
|
|
472 |
}
|
473 |
#softDrinkModal .modal-footer .quantity-controls-footer {
|
474 |
display: flex;
|
475 |
+
gap: 12px;
|
476 |
}
|
477 |
#softDrinkModal .modal-footer .quantity-controls-footer .btn {
|
478 |
+
width: 32px;
|
479 |
+
height: 32px;
|
480 |
border-radius: 50%;
|
481 |
padding: 0;
|
482 |
+
font-size: 1.1rem;
|
483 |
+
line-height: 32px;
|
484 |
text-align: center;
|
485 |
background-color: #e9ecef;
|
486 |
border: none;
|
|
|
494 |
#softDrinkModal .modal-footer .quantity-controls-footer .btn:active {
|
495 |
transform: scale(0.95);
|
496 |
}
|
497 |
+
/* Toggle Styling */
|
498 |
+
.toggle-container {
|
499 |
+
display: inline-flex;
|
500 |
+
align-items: center;
|
501 |
+
margin: 0 15px;
|
502 |
+
gap: 8px;
|
503 |
+
}
|
504 |
+
.custom-toggle {
|
505 |
+
-webkit-appearance: none;
|
506 |
+
-moz-appearance: none;
|
507 |
+
appearance: none;
|
508 |
+
width: 40px;
|
509 |
+
height: 20px;
|
510 |
+
background: #e9ecef;
|
511 |
+
border-radius: 20px;
|
512 |
+
position: relative;
|
513 |
+
cursor: pointer;
|
514 |
+
outline: none;
|
515 |
+
transition: background-color 0.2s ease;
|
516 |
+
}
|
517 |
+
.custom-toggle:checked {
|
518 |
+
background: #0FAA39;
|
519 |
+
}
|
520 |
+
.custom-toggle::before {
|
521 |
+
content: '';
|
522 |
+
position: absolute;
|
523 |
+
width: 16px;
|
524 |
+
height: 16px;
|
525 |
+
border-radius: 50%;
|
526 |
+
background: #fff;
|
527 |
+
top: 2px;
|
528 |
+
left: 2px;
|
529 |
+
transition: transform 0.2s ease;
|
530 |
+
}
|
531 |
+
.custom-toggle:checked::before {
|
532 |
+
transform: translateX(20px);
|
533 |
+
}
|
534 |
+
.toggle-container label {
|
535 |
+
font-size: 1rem;
|
536 |
+
font-weight: 500;
|
537 |
+
color: #333;
|
538 |
+
cursor: pointer;
|
539 |
+
}
|
540 |
+
#filter-form {
|
541 |
+
display: flex;
|
542 |
+
flex-direction: column;
|
543 |
+
align-items: center;
|
544 |
+
gap: 10px;
|
545 |
+
margin-bottom: 20px;
|
546 |
+
}
|
547 |
+
#filter-form .form-label {
|
548 |
+
font-size: 1.2rem;
|
549 |
+
color: #333;
|
550 |
+
}
|
551 |
@keyframes checkmark {
|
552 |
from { transform: scale(0); }
|
553 |
to { transform: scale(1); }
|
|
|
560 |
from { opacity: 0; transform: translateY(10px); }
|
561 |
to { opacity: 1; transform: translateY(0); }
|
562 |
}
|
563 |
+
@keyframes fadeInModal {
|
564 |
+
from { opacity: 0; transform: translateY(-20px); }
|
565 |
+
to { opacity: 1; transform: translateY(0); }
|
566 |
+
}
|
567 |
form.text-center.mb-4 {
|
568 |
display: flex;
|
569 |
flex-direction: column;
|
|
|
693 |
.toggle-details:hover {
|
694 |
text-decoration: underline;
|
695 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
.quantity-selector {
|
697 |
display: flex;
|
698 |
align-items: center;
|
|
|
858 |
padding: 12px 16px;
|
859 |
font-size: 15px;
|
860 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
861 |
.modal-dialog {
|
862 |
max-width: 90%;
|
863 |
margin: 10px auto;
|
|
|
1005 |
max-width: 90%;
|
1006 |
}
|
1007 |
#softDrinkModal .modal-content {
|
1008 |
+
border-radius: 10px;
|
1009 |
}
|
1010 |
#softDrinkModal .modal-header {
|
1011 |
padding: 10px 12px;
|
1012 |
}
|
1013 |
#softDrinkModal .modal-title {
|
1014 |
+
font-size: 1.2rem;
|
1015 |
}
|
1016 |
#softDrinkModal .modal-body {
|
1017 |
padding: 15px;
|
1018 |
}
|
1019 |
#softDrinkModal .modal-body img {
|
1020 |
+
max-height: 130px;
|
1021 |
+
margin-bottom: 12px;
|
1022 |
}
|
1023 |
#softDrinkModal .modal-body h5 {
|
1024 |
+
font-size: 1.2rem;
|
1025 |
margin-bottom: 8px;
|
1026 |
}
|
1027 |
#softDrinkModal .modal-body p {
|
|
|
1029 |
margin-bottom: 15px;
|
1030 |
}
|
1031 |
#softDrinkModal .quantity-controls .btn {
|
1032 |
+
width: 28px;
|
1033 |
+
height: 28px;
|
1034 |
+
font-size: 1rem;
|
1035 |
+
line-height: 28px;
|
1036 |
}
|
1037 |
#softDrinkModal .quantity-controls input {
|
1038 |
+
width: 45px;
|
1039 |
+
height: 28px;
|
1040 |
font-size: 0.9rem;
|
1041 |
}
|
1042 |
#softDrinkModal .modal-footer {
|
1043 |
padding: 10px;
|
1044 |
}
|
1045 |
#softDrinkModal .modal-footer .btn-primary {
|
1046 |
+
padding: 10px 25px;
|
1047 |
+
font-size: 1rem;
|
1048 |
}
|
1049 |
#softDrinkModal .modal-footer .quantity-controls-footer .btn {
|
1050 |
+
width: 28px;
|
1051 |
+
height: 28px;
|
1052 |
+
font-size: 1rem;
|
1053 |
+
line-height: 28px;
|
1054 |
+
}
|
1055 |
+
/* Mobile-Specific Toggle Styles */
|
1056 |
+
.toggle-container {
|
1057 |
+
margin: 0 10px;
|
1058 |
+
gap: 6px;
|
1059 |
+
}
|
1060 |
+
.custom-toggle {
|
1061 |
+
width: 36px;
|
1062 |
+
height: 18px;
|
1063 |
+
}
|
1064 |
+
.custom-toggle::before {
|
1065 |
+
width: 14px;
|
1066 |
+
height: 14px;
|
1067 |
+
top: 2px;
|
1068 |
+
left: 2px;
|
1069 |
+
}
|
1070 |
+
.custom-toggle:checked::before {
|
1071 |
+
transform: translateX(18px);
|
1072 |
+
}
|
1073 |
+
.toggle-container label {
|
1074 |
font-size: 0.9rem;
|
1075 |
+
}
|
1076 |
+
#filter-form .form-label {
|
1077 |
+
font-size: 1.1rem;
|
1078 |
}
|
1079 |
}
|
1080 |
</style>
|
|
|
1098 |
</div>
|
1099 |
</div>
|
1100 |
|
1101 |
+
<form method="get" action="/menu" class="text-center mb-4" id="filter-form">
|
1102 |
+
<label class="form-label fw-bold">Filters:</label>
|
1103 |
+
<div class="toggle-container">
|
1104 |
+
<!-- Veg Only Toggle -->
|
1105 |
+
<input type="checkbox" id="veg-toggle" name="veg"
|
1106 |
+
{% if selected_category == "Veg" %}checked{% endif %}
|
1107 |
+
class="custom-toggle" onchange="handleToggle('veg')">
|
1108 |
+
<label for="veg-toggle">Veg</label>
|
1109 |
+
</div>
|
1110 |
+
<div class="toggle-container">
|
1111 |
+
<!-- Customized Dish Toggle -->
|
1112 |
+
<input type="radio" id="category-CustomizedDish" name="category" value="Customized Dish"
|
1113 |
+
{% if selected_category == "Customized Dish" %}checked{% endif %}
|
1114 |
+
class="custom-toggle" onchange="handleToggle('custom')">
|
1115 |
+
<label for="category-CustomizedDish">Customized Dish</label>
|
1116 |
</div>
|
|
|
1117 |
</form>
|
1118 |
|
1119 |
<div class="container mt-4">
|
|
|
1164 |
<h5 class="card-title">{{ item.Name | default('Unnamed Item') }}</h5>
|
1165 |
<p class="card-text price">${{ item.Price__c | default('0.00') }}</p>
|
1166 |
</div>
|
1167 |
+
<div class="d-flex flex-column align-items-center justify-content-center">
|
1168 |
<div class="button-container"
|
1169 |
data-item-name="{{ item.Name | default('Unnamed Item') }}"
|
1170 |
data-item-price="{{ item.Price__c | default('0.00') }}"
|
|
|
1196 |
<h6>Description</h6>
|
1197 |
<p>{{ item.Description__c | default('No description available') }}</p>
|
1198 |
<h6>Ingredients</h6>
|
1199 |
+
<p>{{ item.Ingredientsinfo__c | default('Not specified') }}</p>
|
1200 |
<h6>Nutritional Info</h6>
|
1201 |
<p class="nutritional-info">{{ item.NutritionalInfo__c | default('Not available') }}</p>
|
1202 |
<h6>Allergens</h6>
|
|
|
1272 |
<p id="soft-drink-price"></p>
|
1273 |
</div>
|
1274 |
<div class="quantity-controls">
|
1275 |
+
<button type="button" class="btn" id="soft-drink-decrease" onclick="updateSoftDrinkQuantity(-1)" aria-label="Decrease quantity by 1">-</button>
|
1276 |
+
<input type="text" class="form-control text-center" id="soft-drink-quantity" value="1" readonly aria-label="Selected quantity">
|
1277 |
+
<button type="button" class="btn" id="soft-drink-increase" onclick="updateSoftDrinkQuantity(1)" aria-label="Increase quantity by 1">+</button>
|
1278 |
</div>
|
1279 |
</div>
|
1280 |
<div class="modal-footer">
|
1281 |
<div class="quantity-controls-footer">
|
1282 |
+
<button type="button" class="btn" id="soft-drink-decrease-footer" onclick="updateSoftDrinkQuantity(-1)" aria-label="Decrease quantity by 1">-1</button>
|
1283 |
+
<button type="button" class="btn" id="soft-drink-increase-footer" onclick="updateSoftDrinkQuantity(1)" aria-label="Increase quantity by 1">+1</button>
|
1284 |
</div>
|
1285 |
+
<button type="button" class="btn btn-primary" onclick="addSoftDrinkToCart()" aria-label="Add soft drink to cart">Add to Cart</button>
|
1286 |
</div>
|
1287 |
</div>
|
1288 |
</div>
|
|
|
1382 |
const itemImage = buttonContainer.getAttribute('data-item-image');
|
1383 |
|
1384 |
document.getElementById('soft-drink-name').textContent = itemName;
|
1385 |
+
document.getElementById('soft-drink-price').textContent = `${itemPrice}`;
|
1386 |
document.getElementById('soft-drink-quantity').value = '1';
|
1387 |
document.getElementById('soft-drink-image').src = itemImage || '/static/placeholder.jpg';
|
1388 |
|
|
|
1609 |
isProcessingRequest = false;
|
1610 |
});
|
1611 |
}
|
1612 |
+
function handleToggle(source) {
|
1613 |
+
const form = document.getElementById("filter-form");
|
1614 |
+
const veg = document.getElementById("veg-toggle");
|
1615 |
+
const custom = document.getElementById("category-CustomizedDish");
|
1616 |
+
|
1617 |
+
if (source === 'veg') {
|
1618 |
+
// If Veg is being turned ON, turn OFF Customized Dish
|
1619 |
+
if (veg.checked) {
|
1620 |
+
custom.checked = false;
|
1621 |
+
}
|
1622 |
+
} else if (source === 'custom') {
|
1623 |
+
// If Customized Dish is being turned ON, turn OFF Veg
|
1624 |
+
if (custom.checked) {
|
1625 |
+
veg.checked = false;
|
1626 |
+
}
|
1627 |
+
}
|
1628 |
+
|
1629 |
+
// If Customized Dish is turned OFF manually, check Veg toggle and show all items if Veg is also off
|
1630 |
+
if (!custom.checked) {
|
1631 |
+
// If both are off, show all items
|
1632 |
+
if (!veg.checked) {
|
1633 |
+
document.getElementById('category-CustomizedDish').checked = false; // Ensure Customized Dish is OFF
|
1634 |
+
}
|
1635 |
+
}
|
1636 |
+
|
1637 |
+
// Submit form after toggling
|
1638 |
+
form.submit();
|
1639 |
+
}
|
1640 |
document.addEventListener('DOMContentLoaded', function () {
|
1641 |
const avatarContainer = document.querySelector('.avatar-dropdown-container');
|
1642 |
const dropdownMenu = document.querySelector('.dropdown-menu');
|
|
|
1719 |
const video = entry.target;
|
1720 |
const src = video.getAttribute('data-src');
|
1721 |
if (src && !video.querySelector('source[src="' + src + '"]')) {
|
1722 |
+
const nextSibling = video.nextElementSibling;
|
1723 |
+
if (nextSibling && nextSibling.tagName === 'SOURCE') {
|
1724 |
+
nextSibling.src = src;
|
1725 |
+
} else {
|
1726 |
+
const source = video.querySelector('source');
|
1727 |
+
if (source) {
|
1728 |
+
source.src = src;
|
1729 |
+
}
|
1730 |
+
}
|
1731 |
video.load();
|
1732 |
}
|
1733 |
video.classList.add('loaded');
|
|
|
1765 |
}
|
1766 |
});
|
1767 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1768 |
const descriptionTextarea = document.getElementById('custom-dish-description');
|
1769 |
const descriptionSuggestions = document.getElementById('descriptionSuggestions');
|
1770 |
if (descriptionTextarea && descriptionSuggestions) {
|
|
|
1849 |
const increaseBtn = document.getElementById('increaseQuantity');
|
1850 |
const quantityInput = document.getElementById('quantityInput');
|
1851 |
decreaseBtn.addEventListener('click', function () {
|
1852 |
+
let quantity = parseInt(quantityInput.value) || 1;
|
1853 |
+
quantity = Math.max(1, quantity - 1);
|
1854 |
+
quantityInput.value = quantity;
|
|
|
|
|
1855 |
});
|
1856 |
increaseBtn.addEventListener('click', function () {
|
1857 |
+
let quantity = parseInt(quantityInput.value) || 1;
|
1858 |
+
quantity += 1;
|
1859 |
+
quantityInput.value = quantity;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1860 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1861 |
});
|
1862 |
</script>
|
1863 |
</body>
|
1864 |
+
</html>
|
1865 |
+
|
1866 |
+
|
1867 |
+
|