Spaces:
Build error
Build error
Update templates/menu.html
Browse files416 unmodified lines41741841942042142266 unmodified lines489490491492493494439 unmodified lines934935936937938939416 unmodified linesfont-size: 12px;padding: 0 5px;}@media (max-width: 576px) {.fixed-top-bar {height: 60px;66 unmodified linesheight: 20px;font-size: 10px;}}</style></head>439 unmodified linesaddonsTitle.style.display = 'block';}fetch(`/api/addons?item_name=${encodeURIComponent(name)}&item_section=${encodeURIComponent(section)}`).then(response => response.json()).then(data => {416 unmodified lines41741841942042142242342442542642742842943043143243343443543643743843944044144244344444544666 unmodified lines513514515516517518519520521522439 unmodified lines962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008416 unmodified linesfont-size: 12px;padding: 0 5px;}/* Added styles for scrollable modal body */.modal-body {max-height: 60vh; /* Set a maximum height for the modal body */overflow-y: auto; /* Enable vertical scrolling */padding: 15px; /* Ensure padding for content */}.modal-dialog {max-height: 90vh; /* Limit the modal height to 90% of the viewport */}/* Style the scrollbar for better aesthetics */.modal-body::-webkit-scrollbar {width: 8px;}.modal-body::-webkit-scrollbar-track {background: #f1f1f1;border-radius: 10px;}.modal-body::-webkit-scrollbar-thumb {background: #0FAA39;border-radius: 10px;}.modal-body::-webkit-scrollbar-thumb:hover {background: #0D9232;}@media (max-width: 576px) {.fixed-top-bar {height: 60px;66 unmodified linesheight: 20px;font-size: 10px;}/* Adjust modal body height for smaller screens */.modal-body {max-height: 50vh;}}</style></head>439 unmodified linesaddonsTitle.style.display = 'block';}// Simulate additional content for testing scrollingconst addonsList = document.getElementById('addons-list');addonsList.innerHTML = '';// Add dummy content to force scrolling (for testing)const dummySections = [{ name: "Beverages", options: ["Sprite ($3)", "Thums Up ($3)", "Virgin Mojito ($3)", "Lemonade ($3)", "Blue Lagoon Mocktail ($3)"] },{ name: "Sauces", options: ["Mint Chutney", "Tomato Sauce"] },{ name: "Extra Toppings", options: ["Cheese ($2)", "Olives ($1)", "Jalapenos ($1)", "Mushrooms ($2)", "Peppers ($1)"] },{ name: "Sides", options: ["Fries ($3)", "Salad ($2)", "Garlic Bread ($3)", "Onion Rings ($2)", "Coleslaw ($2)"] },{ name: "Desserts", options: ["Ice Cream ($3)", "Brownie ($3)", "Cheesecake ($4)", "Gulab Jamun ($3)", "Rasmalai ($4)"] }];dummySections.forEach(addon => {const sectionDiv = document.createElement('div');sectionDiv.classList.add('addon-section');sectionDiv.setAttribute('data-addon-name', addon.name);const title = document.createElement('h6');title.innerText = addon.name;sectionDiv.appendChild(title);const optionsContainer = document.createElement('div');addon.options.forEach((option, index) => {const optionId = `addon-${addon.name.replace(/\s+/g, '')}-${index}`;const listItem = document.createElement('div');listItem.classList.add('form-check');listItem.innerHTML = `<input type="checkbox" class="form-check-input addon-option" id="${optionId}" value="${option}"data-name="${option}" data-group="${addon.name}" data-price="0"><label class="form-check-label" for="${optionId}">${option}</label>`;optionsContainer.appendChild(listItem);});sectionDiv.appendChild(optionsContainer);addonsList.appendChild(sectionDiv);});fetch(`/api/addons?item_name=${encodeURIComponent(name)}&item_section=${encodeURIComponent(section)}`).then(response => response.json()).then(data => {
templates/menu.html+69