File size: 1,724 Bytes
a259bcd
 
 
 
 
 
c6854f1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a259bcd
 
 
 
 
 
 
 
 
 
 
 
c6854f1
a259bcd
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<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>