File size: 2,867 Bytes
37473e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Menu</title>
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f8f9fa;
            margin: 0;
            padding: 0;
        }

        .container {
            max-width: 900px;
        }

        .menu-card {
            max-width: 350px;
            border-radius: 15px;
            overflow: hidden;
            background-color: #fff;
            margin: auto;
        }

        .menu-image {
            height: 200px;
            width: 100%;
            object-fit: cover;
            border-radius: 15px 15px 0 0;
        }

        .card-title {
            font-size: 1.2rem;
            font-weight: bold;
        }

        .card-text {
            font-size: 1rem;
            color: #6c757d;
        }

        .btn-primary {
            font-size: 0.9rem;
            border-radius: 20px;
            width: 100px;
        }
    </style>
</head>
<body>
    <div class="container mt-4">
        <h1 class="text-center">Menu</h1>

        <!-- Filter Section -->
        <form method="get" action="/menu" class="text-center mb-4">
            <label for="category" class="form-label fw-bold">Filter by Category:</label>
            <select id="category" name="category" class="form-select" 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>

        <!-- Menu Items -->
        <div class="row">
            {% for item in food_items %}
            <div class="col-md-6 mb-4">
                <div class="card menu-card">
                    <img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
                    <div class="card-body">
                        <h5 class="card-title">{{ item.Name }}</h5>
                        <p class="card-text">${{ item.Price__c }}</p>
                        <p class="card-text"><small class="text-muted">{{ item.Category__c }}</small></p>
                    </div>
                </div>
            </div>
            {% endfor %}
        </div>
    </div>

    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>