Spaces:
Build error
Build error
Update app.py
Browse files132 unmodified lines1331341351361371381391401411421431441451461471481491501511521531541551561571581591601614 unmodified lines166167168169170171172173174132 unmodified linesalert("You cannot add more items after finalizing your order.");return;}const modal = document.getElementById('modal');modal.style.display = 'block'; // Display the modalmodal.style.position = 'fixed';// Reduce modal height for better displaymodal.style.height = '50%'; // Adjust height to 50% of the viewportmodal.style.overflowY = 'auto'; // Add scrolling if content overflowsif (window.innerWidth <= 768) {// Mobile: Use touch Y positionmodal.style.width = '90%';modal.style.top = `${event.touches ? event.touches[0].screenY : event.clientY - modal.offsetHeight / 2}px`;} else {// Laptop: Use mouse Y position without 7%modal.style.width = '30%';const adjustedY = event.clientY - modal.offsetHeight / 2; // Center based on modal heightmodal.style.top = `${adjustedY}px`;}modal.style.left = '50%';modal.style.transform = 'translate(-50%, 0)'; // Adjust transform to exclude vertical centering// Set modal contentdocument.getElementById('modal-image').src = image;document.getElementById('modal-name').innerText = name;4 unmodified linesconst extrasInputs = document.querySelectorAll('input[name="biryani-extra"]');extrasInputs.forEach(input => input.checked = false);document.getElementById('quantity').value = 1;document.getElementById('special-instructions').value = '';}function closeModal() {document.getElementById('modal').style.display = 'none';}132 unmodified lines1331341351361371381391401411421431441451461471481491501511521531541551564 unmodified lines161162163164165166167168169170132 unmodified linesalert("You cannot add more items after finalizing your order.");return;}const modal = document.getElementById('modal');modal.style.display = 'block';modal.style.position = 'fixed';if (window.innerWidth <= 768) {// Mobile: Use touch Y positionmodal.style.width = '90%';modal.style.top = `${event.touches ? event.touches[0].screenY : event.clientY}px`;} else {// Laptop: Use mouse Y position + 7% of the screen heightmodal.style.width = '30%';const adjustedY = event.clientY + (window.innerHeight * 0.01);modal.style.top = `${adjustedY}px`;}modal.style.left = '50%';modal.style.transform = 'translate(-50%, -50%)';// Set modal contentdocument.getElementById('modal-image').src = image;document.getElementById('modal-name').innerText = name;4 unmodified linesconst extrasInputs = document.querySelectorAll('input[name="biryani-extra"]');extrasInputs.forEach(input => input.checked = false);document.getElementById('quantity').value = 1;document.getElementById('special-instructions').value = '';}function closeModal() {document.getElementById('modal').style.display = 'none';}
app.py+9-13