Spaces:
Runtime error
Runtime error
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Menu</title> | |
| <script> | |
| document.addEventListener("DOMContentLoaded", function () { | |
| // Play welcome message when the page loads | |
| setTimeout(() => { | |
| let welcomeMessage = new SpeechSynthesisUtterance("Welcome to the menu page"); | |
| window.speechSynthesis.speak(welcomeMessage); | |
| }, 500); | |
| // Play category selection message after 2 seconds | |
| setTimeout(() => { | |
| let categoryMessage = new SpeechSynthesisUtterance("Choose a preference: All, Vegetarian, Non-Veg, Guilt-Free"); | |
| window.speechSynthesis.speak(categoryMessage); | |
| }, 2500); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <h1>Menu</h1> | |
| <form method="get" action="/menu"> | |
| <label for="category">Filter by Category:</label> | |
| <select name="category" id="category" onchange="this.form.submit()"> | |
| <option value="All" {% if selected_category == 'All' %}selected{% endif %}>All</option> | |
| {% for category in categories %} | |
| <option value="{{ category }}" {% if selected_category == category %}selected{% endif %}>{{ category }}</option> | |
| {% endfor %} | |
| </select> | |
| </form> | |
| <ul> | |
| {% for item in food_items %} | |
| <li> | |
| <strong>{{ item.Name }}</strong> - ${{ item.Price__c }}<br> | |
| <img src="{{ item.Image1__c }}" alt="{{ item.Name }}" width="100"><br> | |
| <p>{{ item.Description__c }}</p> | |
| </li> | |
| {% endfor %} | |
| </ul> | |
| </body> | |
| </html> | |