Spaces:
Sleeping
Sleeping
Update app.py
Browse files91 unmodified lines9293949596971 unmodified line9910010110210310418 unmodified lines12312412512612712812912 unmodified lines14214314414514614714891 unmodified lines{"name": "Extra Onion & Lemon", "price": "$2.00"}]# JavaScript for popup modalpopup_js = """<script>1 unmodified lineconst popup = document.getElementById("custom-popup");const overlay = document.getElementById("overlay");popup.innerHTML = `<img src="${image}" alt="${name}" style="width: 200px; height: auto; border-radius: 10px; margin-bottom: 10px;"><h3 style="margin-top: 10px;">${name}</h3><p>${description}</p>18 unmodified lines</div><button onclick="closePopup()" style="margin-top: 20px; padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer;">Add to Cart</button><button onclick="closePopup()" style="margin-top: 20px; margin-left: 10px; padding: 10px 20px; background-color: #28a745; color: white; border: none; border-radius: 5px; cursor: pointer;">Close</button>`;popup.style.display = "block";overlay.style.display = "block";12 unmodified linespopup_html = """<div id="overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; z-index: 999;"></div><div id="custom-popup"style="position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50%; max-width: 400px; background: white; padding: 20px; border-radius: 10px; box-shadow: 0px 4px 6px rgba(0,0,0,0.1); display: none; z-index: 1000; text-align: center;"></div>"""91 unmodified lines929394959697981 unmodified line10010110210310410510618 unmodified lines12512612712812913012 unmodified lines14314414514614714814991 unmodified lines{"name": "Extra Onion & Lemon", "price": "$2.00"}]# JavaScript for popup modal# JavaScript for popup modalpopup_js = """<script>1 unmodified lineconst popup = document.getElementById("custom-popup");const overlay = document.getElementById("overlay");popup.innerHTML = `<span onclick="closePopup()" style="position: absolute; top: 10px; right: 10px; font-size: 20px; font-weight: bold; cursor: pointer;">×</span><img src="${image}" alt="${name}" style="width: 200px; height: auto; border-radius: 10px; margin-bottom: 10px;"><h3 style="margin-top: 10px;">${name}</h3><p>${description}</p>18 unmodified lines</div><button onclick="closePopup()" style="margin-top: 20px; padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer;">Add to Cart</button>`;popup.style.display = "block";overlay.style.display = "block";12 unmodified linespopup_html = """<div id="overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; z-index: 999;"></div><div id="custom-popup"style="position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50%; max-width: 400px; background: white; padding: 20px; border-radius: 10px; box-shadow: 0px 4px 6px rgba(0,0,0,0.1); display: none; z-index: 1000; text-align: center; position: relative;"></div>"""
app.py+3-2