Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +184 -160
templates/menu.html
CHANGED
|
@@ -236,7 +236,7 @@
|
|
| 236 |
.mic-icon.active {
|
| 237 |
color: #007bff;
|
| 238 |
}
|
| 239 |
-
/*
|
| 240 |
.addon-section {
|
| 241 |
background-color: #fff;
|
| 242 |
border-radius: 10px;
|
|
@@ -354,6 +354,137 @@
|
|
| 354 |
border-radius: 50%;
|
| 355 |
animation: spin 1s linear infinite;
|
| 356 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
@keyframes checkmark {
|
| 358 |
from { transform: scale(0); }
|
| 359 |
to { transform: scale(1); }
|
|
@@ -644,106 +775,6 @@
|
|
| 644 |
font-size: 12px;
|
| 645 |
margin-left: 8px;
|
| 646 |
}
|
| 647 |
-
/* Soft Drinks Modal Styles */
|
| 648 |
-
#softDrinkModal .modal-content {
|
| 649 |
-
border-radius: 10px;
|
| 650 |
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
| 651 |
-
animation: fadeIn 0.3s ease-in;
|
| 652 |
-
}
|
| 653 |
-
#softDrinkModal .modal-header {
|
| 654 |
-
background: linear-gradient(45deg, #FFA07A, #FFB347);
|
| 655 |
-
color: white;
|
| 656 |
-
border-top-left-radius: 10px;
|
| 657 |
-
border-top-right-radius: 10px;
|
| 658 |
-
padding: 12px 15px;
|
| 659 |
-
}
|
| 660 |
-
#softDrinkModal .modal-title {
|
| 661 |
-
font-size: 1.2rem;
|
| 662 |
-
font-weight: 600;
|
| 663 |
-
}
|
| 664 |
-
#softDrinkModal .modal-body {
|
| 665 |
-
padding: 20px;
|
| 666 |
-
text-align: center;
|
| 667 |
-
background-color: #fff;
|
| 668 |
-
}
|
| 669 |
-
#softDrinkModal #soft-drink-img {
|
| 670 |
-
max-height: 150px;
|
| 671 |
-
width: 100%;
|
| 672 |
-
max-width: 150px;
|
| 673 |
-
object-fit: cover;
|
| 674 |
-
border-radius: 8px;
|
| 675 |
-
margin: 0 auto 15px;
|
| 676 |
-
display: block;
|
| 677 |
-
}
|
| 678 |
-
#softDrinkModal #soft-drink-name {
|
| 679 |
-
font-size: 1.5rem;
|
| 680 |
-
font-weight: 600;
|
| 681 |
-
color: #333333;
|
| 682 |
-
margin-bottom: 5px;
|
| 683 |
-
}
|
| 684 |
-
#softDrinkModal #soft-drink-price {
|
| 685 |
-
font-size: 1.1rem;
|
| 686 |
-
font-weight: 500;
|
| 687 |
-
color: #000000;
|
| 688 |
-
margin-bottom: 20px;
|
| 689 |
-
}
|
| 690 |
-
#softDrinkModal .quantity-selector {
|
| 691 |
-
display: flex;
|
| 692 |
-
justify-content: center;
|
| 693 |
-
align-items: center;
|
| 694 |
-
gap: 10px;
|
| 695 |
-
margin-bottom: 20px;
|
| 696 |
-
}
|
| 697 |
-
#softDrinkModal .quantity-selector .btn {
|
| 698 |
-
width: 40px;
|
| 699 |
-
height: 40px;
|
| 700 |
-
font-size: 1rem;
|
| 701 |
-
line-height: 40px;
|
| 702 |
-
border-radius: 8px;
|
| 703 |
-
background-color: #f8f9fa;
|
| 704 |
-
border: 1px solid #ced4da;
|
| 705 |
-
color: #333;
|
| 706 |
-
transition: background-color 0.2s ease, transform 0.1s ease;
|
| 707 |
-
}
|
| 708 |
-
#softDrinkModal .quantity-selector .btn:hover {
|
| 709 |
-
background-color: #e6f4ea;
|
| 710 |
-
transform: scale(1.05);
|
| 711 |
-
}
|
| 712 |
-
#softDrinkModal .quantity-selector .btn:active {
|
| 713 |
-
transform: scale(0.95);
|
| 714 |
-
}
|
| 715 |
-
#softDrinkModal .quantity-selector input {
|
| 716 |
-
width: 60px;
|
| 717 |
-
height: 40px;
|
| 718 |
-
text-align: center;
|
| 719 |
-
font-size: 1rem;
|
| 720 |
-
font-weight: bold;
|
| 721 |
-
border-radius: 8px;
|
| 722 |
-
border: 1px solid #ced4da;
|
| 723 |
-
background-color: #fff;
|
| 724 |
-
}
|
| 725 |
-
#softDrinkModal .modal-footer {
|
| 726 |
-
justify-content: center;
|
| 727 |
-
padding: 15px;
|
| 728 |
-
border-top: none;
|
| 729 |
-
}
|
| 730 |
-
#softDrinkModal .modal-footer .btn-primary {
|
| 731 |
-
width: 150px;
|
| 732 |
-
height: 45px;
|
| 733 |
-
font-size: 1rem;
|
| 734 |
-
border-radius: 8px;
|
| 735 |
-
background-color: #0FAA39;
|
| 736 |
-
border-color: #0FAA39;
|
| 737 |
-
transition: background-color 0.2s ease, transform 0.1s ease;
|
| 738 |
-
}
|
| 739 |
-
#softDrinkModal .modal-footer .btn-primary:hover {
|
| 740 |
-
background-color: #0D9232;
|
| 741 |
-
transform: scale(1.05);
|
| 742 |
-
}
|
| 743 |
-
#softDrinkModal .modal-footer .btn-primary:active {
|
| 744 |
-
background-color: #0B7A29;
|
| 745 |
-
transform: scale(0.95);
|
| 746 |
-
}
|
| 747 |
/* Mobile-Specific Styles */
|
| 748 |
@media (max-width: 576px) {
|
| 749 |
.fixed-top-bar {
|
|
@@ -793,37 +824,37 @@
|
|
| 793 |
font-size: 0.85rem;
|
| 794 |
}
|
| 795 |
.modal-dialog {
|
| 796 |
-
max-width:
|
| 797 |
-
margin:
|
| 798 |
}
|
| 799 |
.modal-header {
|
| 800 |
-
padding:
|
| 801 |
}
|
| 802 |
.modal-title {
|
| 803 |
font-size: 14px;
|
| 804 |
}
|
| 805 |
.modal-body {
|
| 806 |
max-height: 50vh;
|
| 807 |
-
padding:
|
| 808 |
}
|
| 809 |
.modal-body #modal-img {
|
| 810 |
max-height: 150px;
|
| 811 |
width: 100%;
|
| 812 |
max-width: 150px;
|
| 813 |
-
margin: 0 auto
|
| 814 |
display: block;
|
| 815 |
}
|
| 816 |
.modal-body #modal-name {
|
| 817 |
font-size: 18px;
|
| 818 |
-
margin-bottom:
|
| 819 |
}
|
| 820 |
.modal-body #modal-price {
|
| 821 |
font-size: 14px;
|
| 822 |
-
margin-bottom:
|
| 823 |
}
|
| 824 |
.modal-body #modal-description {
|
| 825 |
font-size: 12px;
|
| 826 |
-
margin-bottom:
|
| 827 |
}
|
| 828 |
.modal-body .nutritional-info {
|
| 829 |
font-size: 10px;
|
|
@@ -835,7 +866,7 @@
|
|
| 835 |
margin-bottom: 10px;
|
| 836 |
}
|
| 837 |
.modal-footer {
|
| 838 |
-
padding:
|
| 839 |
}
|
| 840 |
.modal-footer .btn {
|
| 841 |
height: 30px;
|
|
@@ -935,6 +966,9 @@
|
|
| 935 |
font-size: 0.8rem;
|
| 936 |
}
|
| 937 |
/* Mobile-Specific Soft Drinks Modal Styles */
|
|
|
|
|
|
|
|
|
|
| 938 |
#softDrinkModal .modal-content {
|
| 939 |
border-radius: 8px;
|
| 940 |
}
|
|
@@ -942,41 +976,46 @@
|
|
| 942 |
padding: 10px 12px;
|
| 943 |
}
|
| 944 |
#softDrinkModal .modal-title {
|
| 945 |
-
font-size: 1rem;
|
| 946 |
}
|
| 947 |
#softDrinkModal .modal-body {
|
| 948 |
padding: 15px;
|
| 949 |
}
|
| 950 |
-
#softDrinkModal
|
| 951 |
max-height: 120px;
|
| 952 |
-
max-width: 120px;
|
| 953 |
margin-bottom: 10px;
|
| 954 |
}
|
| 955 |
-
#softDrinkModal
|
| 956 |
-
font-size: 1.
|
|
|
|
| 957 |
}
|
| 958 |
-
#softDrinkModal
|
| 959 |
font-size: 1rem;
|
| 960 |
margin-bottom: 15px;
|
| 961 |
}
|
| 962 |
-
#softDrinkModal .quantity-
|
| 963 |
-
width:
|
| 964 |
-
height:
|
| 965 |
font-size: 0.9rem;
|
| 966 |
-
line-height:
|
| 967 |
-
border-radius: 6px;
|
| 968 |
}
|
| 969 |
-
#softDrinkModal .quantity-
|
| 970 |
-
width:
|
| 971 |
-
height:
|
| 972 |
font-size: 0.9rem;
|
| 973 |
-
|
|
|
|
|
|
|
| 974 |
}
|
| 975 |
#softDrinkModal .modal-footer .btn-primary {
|
| 976 |
-
|
| 977 |
-
height: 40px;
|
| 978 |
font-size: 0.9rem;
|
| 979 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 980 |
}
|
| 981 |
}
|
| 982 |
</style>
|
|
@@ -1161,18 +1200,22 @@
|
|
| 1161 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| 1162 |
</div>
|
| 1163 |
<div class="modal-body">
|
| 1164 |
-
<img id="soft-drink-
|
| 1165 |
<div class="text-center mb-3">
|
| 1166 |
<h5 id="soft-drink-name"></h5>
|
| 1167 |
<p id="soft-drink-price"></p>
|
| 1168 |
</div>
|
| 1169 |
-
<div class="quantity-
|
| 1170 |
-
<button type="button" class="btn
|
| 1171 |
<input type="text" class="form-control text-center" id="soft-drink-quantity" value="1" readonly>
|
| 1172 |
-
<button type="button" class="btn
|
| 1173 |
</div>
|
| 1174 |
</div>
|
| 1175 |
<div class="modal-footer">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1176 |
<button type="button" class="btn btn-primary" onclick="addSoftDrinkToCart()">Add to Cart</button>
|
| 1177 |
</div>
|
| 1178 |
</div>
|
|
@@ -1259,6 +1302,12 @@
|
|
| 1259 |
const totalPrice = baseItemPrice + totalAddOnPrice;
|
| 1260 |
document.getElementById('modal-price').innerText = `$${totalPrice.toFixed(2)}`;
|
| 1261 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1262 |
function showSoftDrinkModal(button) {
|
| 1263 |
currentSoftDrinkButton = button;
|
| 1264 |
const buttonContainer = button.closest('.button-container');
|
|
@@ -1269,7 +1318,7 @@
|
|
| 1269 |
document.getElementById('soft-drink-name').textContent = itemName;
|
| 1270 |
document.getElementById('soft-drink-price').textContent = `$${itemPrice}`;
|
| 1271 |
document.getElementById('soft-drink-quantity').value = '1';
|
| 1272 |
-
document.getElementById('soft-drink-
|
| 1273 |
|
| 1274 |
const modal = new bootstrap.Modal(document.getElementById('softDrinkModal'));
|
| 1275 |
modal.show();
|
|
@@ -1395,7 +1444,6 @@
|
|
| 1395 |
addonsList.appendChild(sectionDiv);
|
| 1396 |
});
|
| 1397 |
|
| 1398 |
-
// Add collapsible behavior
|
| 1399 |
const addonSections = addonsList.querySelectorAll('.addon-section');
|
| 1400 |
addonSections.forEach(section => {
|
| 1401 |
const title = section.querySelector('h6');
|
|
@@ -1406,12 +1454,10 @@
|
|
| 1406 |
});
|
| 1407 |
});
|
| 1408 |
|
| 1409 |
-
// Update price on addon selection
|
| 1410 |
document.querySelectorAll('.addon-option').forEach(checkbox => {
|
| 1411 |
checkbox.addEventListener('change', updateModalPrice);
|
| 1412 |
});
|
| 1413 |
|
| 1414 |
-
// Handle single-select groups
|
| 1415 |
document.querySelectorAll('.addon-option').forEach(checkbox => {
|
| 1416 |
checkbox.addEventListener('change', function () {
|
| 1417 |
const groupName = this.getAttribute('data-group');
|
|
@@ -1498,7 +1544,6 @@
|
|
| 1498 |
});
|
| 1499 |
}
|
| 1500 |
document.addEventListener('DOMContentLoaded', function () {
|
| 1501 |
-
// Avatar Dropdown
|
| 1502 |
const avatarContainer = document.querySelector('.avatar-dropdown-container');
|
| 1503 |
const dropdownMenu = document.querySelector('.dropdown-menu');
|
| 1504 |
avatarContainer.addEventListener('click', function (event) {
|
|
@@ -1516,12 +1561,10 @@
|
|
| 1516 |
dropdownMenu.style.display = 'none';
|
| 1517 |
});
|
| 1518 |
});
|
| 1519 |
-
// Navigate to search page on search bar click
|
| 1520 |
const searchBar = document.getElementById('searchBar');
|
| 1521 |
searchBar.addEventListener('click', function () {
|
| 1522 |
window.location.href = '/search';
|
| 1523 |
});
|
| 1524 |
-
// Auto-open modal for selected item
|
| 1525 |
const selectedItem = localStorage.getItem('selectedItem');
|
| 1526 |
if (selectedItem) {
|
| 1527 |
try {
|
|
@@ -1562,7 +1605,6 @@
|
|
| 1562 |
}
|
| 1563 |
localStorage.removeItem('selectedItem');
|
| 1564 |
}
|
| 1565 |
-
// Lazy Loading for Cards and Videos
|
| 1566 |
const menuCards = document.querySelectorAll('.menu-card');
|
| 1567 |
const menuVideos = document.querySelectorAll('.menu-video');
|
| 1568 |
const cardObserver = new IntersectionObserver((entries, observer) => {
|
|
@@ -1598,7 +1640,6 @@
|
|
| 1598 |
});
|
| 1599 |
menuCards.forEach(card => cardObserver.observe(card));
|
| 1600 |
menuVideos.forEach(video => videoObserver.observe(video));
|
| 1601 |
-
// Toggle Details
|
| 1602 |
const toggleLinks = document.querySelectorAll('.toggle-details');
|
| 1603 |
toggleLinks.forEach(link => {
|
| 1604 |
link.addEventListener('click', function () {
|
|
@@ -1623,7 +1664,6 @@
|
|
| 1623 |
}
|
| 1624 |
});
|
| 1625 |
});
|
| 1626 |
-
// Category Selection
|
| 1627 |
const categoryButtons = document.querySelectorAll('.category-button');
|
| 1628 |
const categoryForm = document.getElementById('categoryForm');
|
| 1629 |
const selectedCategoryInput = document.getElementById('selectedCategoryInput');
|
|
@@ -1639,7 +1679,6 @@
|
|
| 1639 |
categoryForm.submit();
|
| 1640 |
});
|
| 1641 |
});
|
| 1642 |
-
// Custom Dish Form Suggestions
|
| 1643 |
const descriptionTextarea = document.getElementById('custom-dish-description');
|
| 1644 |
const descriptionSuggestions = document.getElementById('descriptionSuggestions');
|
| 1645 |
if (descriptionTextarea && descriptionSuggestions) {
|
|
@@ -1693,7 +1732,6 @@
|
|
| 1693 |
}
|
| 1694 |
});
|
| 1695 |
}
|
| 1696 |
-
// Fetch Cart
|
| 1697 |
fetch('/cart/get')
|
| 1698 |
.then(response => {
|
| 1699 |
if (!response.ok) {
|
|
@@ -1715,14 +1753,12 @@
|
|
| 1715 |
const cart = getCartLocalStorage();
|
| 1716 |
updateCartUI(cart);
|
| 1717 |
});
|
| 1718 |
-
// Preload Videos
|
| 1719 |
const preloadedVideos = document.querySelectorAll('link[rel="preload"][as="video"]');
|
| 1720 |
preloadedVideos.forEach(link => {
|
| 1721 |
const video = document.createElement('video');
|
| 1722 |
video.src = link.href;
|
| 1723 |
video.preload = 'auto';
|
| 1724 |
});
|
| 1725 |
-
// Quantity Controls for Item Modal
|
| 1726 |
const decreaseBtn = document.getElementById('decreaseQuantity');
|
| 1727 |
const increaseBtn = document.getElementById('increaseQuantity');
|
| 1728 |
const quantityInput = document.getElementById('quantityInput');
|
|
@@ -1740,27 +1776,15 @@
|
|
| 1740 |
quantityInput.value = currentQuantity;
|
| 1741 |
}
|
| 1742 |
});
|
| 1743 |
-
// Soft Drinks Modal Quantity Controls
|
| 1744 |
const softDrinkDecreaseBtn = document.getElementById('soft-drink-decrease');
|
| 1745 |
const softDrinkIncreaseBtn = document.getElementById('soft-drink-increase');
|
| 1746 |
const softDrinkQuantityInput = document.getElementById('soft-drink-quantity');
|
| 1747 |
-
|
| 1748 |
softDrinkDecreaseBtn.addEventListener('click', function() {
|
| 1749 |
-
|
| 1750 |
-
if (currentQuantity > 1) {
|
| 1751 |
-
currentQuantity--;
|
| 1752 |
-
softDrinkQuantityInput.value = currentQuantity;
|
| 1753 |
-
}
|
| 1754 |
});
|
| 1755 |
-
|
| 1756 |
softDrinkIncreaseBtn.addEventListener('click', function() {
|
| 1757 |
-
|
| 1758 |
-
if (currentQuantity < 500) {
|
| 1759 |
-
currentQuantity++;
|
| 1760 |
-
softDrinkQuantityInput.value = currentQuantity;
|
| 1761 |
-
}
|
| 1762 |
});
|
| 1763 |
-
// Voice Recognition
|
| 1764 |
const micIcon = document.getElementById('micIcon');
|
| 1765 |
if ('SpeechRecognition' in window || 'webkitSpeechRecognition' in window) {
|
| 1766 |
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
|
|
|
| 236 |
.mic-icon.active {
|
| 237 |
color: #007bff;
|
| 238 |
}
|
| 239 |
+
/* Addon Section */
|
| 240 |
.addon-section {
|
| 241 |
background-color: #fff;
|
| 242 |
border-radius: 10px;
|
|
|
|
| 354 |
border-radius: 50%;
|
| 355 |
animation: spin 1s linear infinite;
|
| 356 |
}
|
| 357 |
+
/* Soft Drinks Modal Styling */
|
| 358 |
+
#softDrinkModal .modal-dialog {
|
| 359 |
+
max-width: 400px;
|
| 360 |
+
margin: 1.75rem auto;
|
| 361 |
+
}
|
| 362 |
+
#softDrinkModal .modal-content {
|
| 363 |
+
border-radius: 10px;
|
| 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: 10px;
|
| 370 |
+
border-top-right-radius: 10px;
|
| 371 |
+
padding: 12px 15px;
|
| 372 |
+
border-bottom: none;
|
| 373 |
+
}
|
| 374 |
+
#softDrinkModal .modal-title {
|
| 375 |
+
font-size: 1.25rem;
|
| 376 |
+
font-weight: 600;
|
| 377 |
+
color: #fff;
|
| 378 |
+
}
|
| 379 |
+
#softDrinkModal .modal-body {
|
| 380 |
+
padding: 20px;
|
| 381 |
+
text-align: center;
|
| 382 |
+
}
|
| 383 |
+
#softDrinkModal .modal-body img {
|
| 384 |
+
max-height: 150px;
|
| 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.3rem;
|
| 392 |
+
font-weight: 600;
|
| 393 |
+
color: #333333;
|
| 394 |
+
margin-bottom: 10px;
|
| 395 |
+
}
|
| 396 |
+
#softDrinkModal .modal-body p {
|
| 397 |
+
font-size: 1.1rem;
|
| 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: 10px;
|
| 407 |
+
margin-bottom: 20px;
|
| 408 |
+
}
|
| 409 |
+
#softDrinkModal .quantity-controls .btn {
|
| 410 |
+
width: 30px;
|
| 411 |
+
height: 30px;
|
| 412 |
+
border-radius: 50%;
|
| 413 |
+
padding: 0;
|
| 414 |
+
font-size: 1rem;
|
| 415 |
+
line-height: 30px;
|
| 416 |
+
text-align: center;
|
| 417 |
+
background-color: #e9ecef;
|
| 418 |
+
border: none;
|
| 419 |
+
color: #333;
|
| 420 |
+
transition: background-color 0.2s ease, transform 0.1s ease;
|
| 421 |
+
}
|
| 422 |
+
#softDrinkModal .quantity-controls .btn:hover {
|
| 423 |
+
background-color: #d1d4d7;
|
| 424 |
+
transform: scale(1.1);
|
| 425 |
+
}
|
| 426 |
+
#softDrinkModal .quantity-controls .btn:active {
|
| 427 |
+
transform: scale(0.95);
|
| 428 |
+
}
|
| 429 |
+
#softDrinkModal .quantity-controls input {
|
| 430 |
+
width: 50px;
|
| 431 |
+
height: 30px;
|
| 432 |
+
text-align: center;
|
| 433 |
+
font-size: 1rem;
|
| 434 |
+
font-weight: 600;
|
| 435 |
+
border: 1px solid #ced4da;
|
| 436 |
+
border-radius: 5px;
|
| 437 |
+
background-color: #f8f9fa;
|
| 438 |
+
}
|
| 439 |
+
#softDrinkModal .modal-footer {
|
| 440 |
+
padding: 15px;
|
| 441 |
+
border-top: none;
|
| 442 |
+
display: flex;
|
| 443 |
+
justify-content: space-between;
|
| 444 |
+
align-items: center;
|
| 445 |
+
}
|
| 446 |
+
#softDrinkModal .modal-footer .btn-primary {
|
| 447 |
+
background-color: #0FAA39;
|
| 448 |
+
border-color: #0FAA39;
|
| 449 |
+
padding: 10px 25px;
|
| 450 |
+
font-size: 1rem;
|
| 451 |
+
font-weight: 600;
|
| 452 |
+
border-radius: 8px;
|
| 453 |
+
transition: background-color 0.2s ease, transform 0.1s ease;
|
| 454 |
+
width: auto;
|
| 455 |
+
}
|
| 456 |
+
#softDrinkModal .modal-footer .btn-primary:hover {
|
| 457 |
+
background-color: #0D9232;
|
| 458 |
+
transform: scale(1.05);
|
| 459 |
+
}
|
| 460 |
+
#softDrinkModal .modal-footer .btn-primary:active {
|
| 461 |
+
background-color: #0B7A29;
|
| 462 |
+
transform: scale(0.98);
|
| 463 |
+
}
|
| 464 |
+
#softDrinkModal .modal-footer .quantity-controls-footer {
|
| 465 |
+
display: flex;
|
| 466 |
+
gap: 10px;
|
| 467 |
+
}
|
| 468 |
+
#softDrinkModal .modal-footer .quantity-controls-footer .btn {
|
| 469 |
+
width: 30px;
|
| 470 |
+
height: 30px;
|
| 471 |
+
border-radius: 50%;
|
| 472 |
+
padding: 0;
|
| 473 |
+
font-size: 1rem;
|
| 474 |
+
line-height: 30px;
|
| 475 |
+
text-align: center;
|
| 476 |
+
background-color: #e9ecef;
|
| 477 |
+
border: none;
|
| 478 |
+
color: #333;
|
| 479 |
+
transition: background-color 0.2s ease, transform 0.1s ease;
|
| 480 |
+
}
|
| 481 |
+
#softDrinkModal .modal-footer .quantity-controls-footer .btn:hover {
|
| 482 |
+
background-color: #d1d4d7;
|
| 483 |
+
transform: scale(1.1);
|
| 484 |
+
}
|
| 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); }
|
|
|
|
| 775 |
font-size: 12px;
|
| 776 |
margin-left: 8px;
|
| 777 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 778 |
/* Mobile-Specific Styles */
|
| 779 |
@media (max-width: 576px) {
|
| 780 |
.fixed-top-bar {
|
|
|
|
| 824 |
font-size: 0.85rem;
|
| 825 |
}
|
| 826 |
.modal-dialog {
|
| 827 |
+
max-width: 90%;
|
| 828 |
+
margin: 10px auto;
|
| 829 |
}
|
| 830 |
.modal-header {
|
| 831 |
+
padding: 8px 12px;
|
| 832 |
}
|
| 833 |
.modal-title {
|
| 834 |
font-size: 14px;
|
| 835 |
}
|
| 836 |
.modal-body {
|
| 837 |
max-height: 50vh;
|
| 838 |
+
padding: 12px;
|
| 839 |
}
|
| 840 |
.modal-body #modal-img {
|
| 841 |
max-height: 150px;
|
| 842 |
width: 100%;
|
| 843 |
max-width: 150px;
|
| 844 |
+
margin: 0 auto 8px;
|
| 845 |
display: block;
|
| 846 |
}
|
| 847 |
.modal-body #modal-name {
|
| 848 |
font-size: 18px;
|
| 849 |
+
margin-bottom: 5px;
|
| 850 |
}
|
| 851 |
.modal-body #modal-price {
|
| 852 |
font-size: 14px;
|
| 853 |
+
margin-bottom: 8px;
|
| 854 |
}
|
| 855 |
.modal-body #modal-description {
|
| 856 |
font-size: 12px;
|
| 857 |
+
margin-bottom: 10px;
|
| 858 |
}
|
| 859 |
.modal-body .nutritional-info {
|
| 860 |
font-size: 10px;
|
|
|
|
| 866 |
margin-bottom: 10px;
|
| 867 |
}
|
| 868 |
.modal-footer {
|
| 869 |
+
padding: 8px;
|
| 870 |
}
|
| 871 |
.modal-footer .btn {
|
| 872 |
height: 30px;
|
|
|
|
| 966 |
font-size: 0.8rem;
|
| 967 |
}
|
| 968 |
/* Mobile-Specific Soft Drinks Modal Styles */
|
| 969 |
+
#softDrinkModal .modal-dialog {
|
| 970 |
+
max-width: 90%;
|
| 971 |
+
}
|
| 972 |
#softDrinkModal .modal-content {
|
| 973 |
border-radius: 8px;
|
| 974 |
}
|
|
|
|
| 976 |
padding: 10px 12px;
|
| 977 |
}
|
| 978 |
#softDrinkModal .modal-title {
|
| 979 |
+
font-size: 1.1rem;
|
| 980 |
}
|
| 981 |
#softDrinkModal .modal-body {
|
| 982 |
padding: 15px;
|
| 983 |
}
|
| 984 |
+
#softDrinkModal .modal-body img {
|
| 985 |
max-height: 120px;
|
|
|
|
| 986 |
margin-bottom: 10px;
|
| 987 |
}
|
| 988 |
+
#softDrinkModal .modal-body h5 {
|
| 989 |
+
font-size: 1.1rem;
|
| 990 |
+
margin-bottom: 8px;
|
| 991 |
}
|
| 992 |
+
#softDrinkModal .modal-body p {
|
| 993 |
font-size: 1rem;
|
| 994 |
margin-bottom: 15px;
|
| 995 |
}
|
| 996 |
+
#softDrinkModal .quantity-controls .btn {
|
| 997 |
+
width: 25px;
|
| 998 |
+
height: 25px;
|
| 999 |
font-size: 0.9rem;
|
| 1000 |
+
line-height: 25px;
|
|
|
|
| 1001 |
}
|
| 1002 |
+
#softDrinkModal .quantity-controls input {
|
| 1003 |
+
width: 40px;
|
| 1004 |
+
height: 25px;
|
| 1005 |
font-size: 0.9rem;
|
| 1006 |
+
}
|
| 1007 |
+
#softDrinkModal .modal-footer {
|
| 1008 |
+
padding: 10px;
|
| 1009 |
}
|
| 1010 |
#softDrinkModal .modal-footer .btn-primary {
|
| 1011 |
+
padding: 8px 20px;
|
|
|
|
| 1012 |
font-size: 0.9rem;
|
| 1013 |
+
}
|
| 1014 |
+
#softDrinkModal .modal-footer .quantity-controls-footer .btn {
|
| 1015 |
+
width: 25px;
|
| 1016 |
+
height: 25px;
|
| 1017 |
+
font-size: 0.9rem;
|
| 1018 |
+
line-height: 25px;
|
| 1019 |
}
|
| 1020 |
}
|
| 1021 |
</style>
|
|
|
|
| 1200 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| 1201 |
</div>
|
| 1202 |
<div class="modal-body">
|
| 1203 |
+
<img id="soft-drink-image" class="img-fluid rounded mb-3 d-block mx-auto" alt="Soft Drink Image">
|
| 1204 |
<div class="text-center mb-3">
|
| 1205 |
<h5 id="soft-drink-name"></h5>
|
| 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>
|
|
|
|
| 1302 |
const totalPrice = baseItemPrice + totalAddOnPrice;
|
| 1303 |
document.getElementById('modal-price').innerText = `$${totalPrice.toFixed(2)}`;
|
| 1304 |
}
|
| 1305 |
+
function updateSoftDrinkQuantity(delta) {
|
| 1306 |
+
const quantityInput = document.getElementById('soft-drink-quantity');
|
| 1307 |
+
let currentQuantity = parseInt(quantityInput.value) || 1;
|
| 1308 |
+
currentQuantity = Math.max(1, currentQuantity + delta);
|
| 1309 |
+
quantityInput.value = currentQuantity;
|
| 1310 |
+
}
|
| 1311 |
function showSoftDrinkModal(button) {
|
| 1312 |
currentSoftDrinkButton = button;
|
| 1313 |
const buttonContainer = button.closest('.button-container');
|
|
|
|
| 1318 |
document.getElementById('soft-drink-name').textContent = itemName;
|
| 1319 |
document.getElementById('soft-drink-price').textContent = `$${itemPrice}`;
|
| 1320 |
document.getElementById('soft-drink-quantity').value = '1';
|
| 1321 |
+
document.getElementById('soft-drink-image').src = itemImage || '/static/placeholder.jpg';
|
| 1322 |
|
| 1323 |
const modal = new bootstrap.Modal(document.getElementById('softDrinkModal'));
|
| 1324 |
modal.show();
|
|
|
|
| 1444 |
addonsList.appendChild(sectionDiv);
|
| 1445 |
});
|
| 1446 |
|
|
|
|
| 1447 |
const addonSections = addonsList.querySelectorAll('.addon-section');
|
| 1448 |
addonSections.forEach(section => {
|
| 1449 |
const title = section.querySelector('h6');
|
|
|
|
| 1454 |
});
|
| 1455 |
});
|
| 1456 |
|
|
|
|
| 1457 |
document.querySelectorAll('.addon-option').forEach(checkbox => {
|
| 1458 |
checkbox.addEventListener('change', updateModalPrice);
|
| 1459 |
});
|
| 1460 |
|
|
|
|
| 1461 |
document.querySelectorAll('.addon-option').forEach(checkbox => {
|
| 1462 |
checkbox.addEventListener('change', function () {
|
| 1463 |
const groupName = this.getAttribute('data-group');
|
|
|
|
| 1544 |
});
|
| 1545 |
}
|
| 1546 |
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
| 1547 |
const avatarContainer = document.querySelector('.avatar-dropdown-container');
|
| 1548 |
const dropdownMenu = document.querySelector('.dropdown-menu');
|
| 1549 |
avatarContainer.addEventListener('click', function (event) {
|
|
|
|
| 1561 |
dropdownMenu.style.display = 'none';
|
| 1562 |
});
|
| 1563 |
});
|
|
|
|
| 1564 |
const searchBar = document.getElementById('searchBar');
|
| 1565 |
searchBar.addEventListener('click', function () {
|
| 1566 |
window.location.href = '/search';
|
| 1567 |
});
|
|
|
|
| 1568 |
const selectedItem = localStorage.getItem('selectedItem');
|
| 1569 |
if (selectedItem) {
|
| 1570 |
try {
|
|
|
|
| 1605 |
}
|
| 1606 |
localStorage.removeItem('selectedItem');
|
| 1607 |
}
|
|
|
|
| 1608 |
const menuCards = document.querySelectorAll('.menu-card');
|
| 1609 |
const menuVideos = document.querySelectorAll('.menu-video');
|
| 1610 |
const cardObserver = new IntersectionObserver((entries, observer) => {
|
|
|
|
| 1640 |
});
|
| 1641 |
menuCards.forEach(card => cardObserver.observe(card));
|
| 1642 |
menuVideos.forEach(video => videoObserver.observe(video));
|
|
|
|
| 1643 |
const toggleLinks = document.querySelectorAll('.toggle-details');
|
| 1644 |
toggleLinks.forEach(link => {
|
| 1645 |
link.addEventListener('click', function () {
|
|
|
|
| 1664 |
}
|
| 1665 |
});
|
| 1666 |
});
|
|
|
|
| 1667 |
const categoryButtons = document.querySelectorAll('.category-button');
|
| 1668 |
const categoryForm = document.getElementById('categoryForm');
|
| 1669 |
const selectedCategoryInput = document.getElementById('selectedCategoryInput');
|
|
|
|
| 1679 |
categoryForm.submit();
|
| 1680 |
});
|
| 1681 |
});
|
|
|
|
| 1682 |
const descriptionTextarea = document.getElementById('custom-dish-description');
|
| 1683 |
const descriptionSuggestions = document.getElementById('descriptionSuggestions');
|
| 1684 |
if (descriptionTextarea && descriptionSuggestions) {
|
|
|
|
| 1732 |
}
|
| 1733 |
});
|
| 1734 |
}
|
|
|
|
| 1735 |
fetch('/cart/get')
|
| 1736 |
.then(response => {
|
| 1737 |
if (!response.ok) {
|
|
|
|
| 1753 |
const cart = getCartLocalStorage();
|
| 1754 |
updateCartUI(cart);
|
| 1755 |
});
|
|
|
|
| 1756 |
const preloadedVideos = document.querySelectorAll('link[rel="preload"][as="video"]');
|
| 1757 |
preloadedVideos.forEach(link => {
|
| 1758 |
const video = document.createElement('video');
|
| 1759 |
video.src = link.href;
|
| 1760 |
video.preload = 'auto';
|
| 1761 |
});
|
|
|
|
| 1762 |
const decreaseBtn = document.getElementById('decreaseQuantity');
|
| 1763 |
const increaseBtn = document.getElementById('increaseQuantity');
|
| 1764 |
const quantityInput = document.getElementById('quantityInput');
|
|
|
|
| 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;
|