File size: 4,884 Bytes
cfd7e45
6cca62e
cfd7e45
6cca62e
 
cfd7e45
6cca62e
 
5808600
4dbc5a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cfd7e45
 
346957f
4dbc5a3
 
 
 
 
 
 
 
 
 
 
 
 
 
53c7c69
4dbc5a3
 
 
00fc9cd
d9ea887
b35554e
53c7c69
 
89dc310
4dbc5a3
1b3135e
4dbc5a3
 
 
 
 
4841ad9
 
4dbc5a3
 
 
 
 
346957f
4dbc5a3
346957f
4dbc5a3
5ac8a7d
4dbc5a3
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!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/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #fdf4e3;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
        }
        .container {
            max-width: 900px;
        }
        .menu-card {
            max-width: 350px;
            border-radius: 15px;
            overflow: hidden;
            background-color: #fff;
            margin: auto;
            display: flex;
            flex-direction: column;
        }
        .menu-image {
            height: 200px;
            width: 100%;
            object-fit: fill;
            border-radius: 15px 15px 0 0;
        }
        .card-title {
            font-size: 1.2rem;
            font-weight: bold;
            margin: 10px 0;
        }
        .card-text {
            font-size: 1rem;
            color: #6c757d;
        }
        .btn-primary {
            font-size: 13px;
            font-weight: bold;
            border-radius: 5px;
            width: 100px;
            background-color: #0FAA39;
            border-color: #0FAA39;
        }
        .btn-primary:hover {
            background-color: #0FAA39;
            border-color: #0FAA39;
        }
        .btn-primary:active,
        .btn-primary:focus {
            background-color: #0FAA39;
            border-color: #ffffff;
            box-shadow: none;
        }
        .menu-section-container {
            position: relative;
            margin-bottom: 50px;
        }
        .menu-items-container {
            max-height: 350px;
            overflow-y: hidden;
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding-right: 20px;
            transition: transform 0.3s ease;
        }
        .menu-card {
            background-color: #fff;
            padding: 10px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
        }
        .menu-image {
            width: 100%;
            height: 200px;
            object-fit: cover;
            border-radius: 8px;
        }
        .scroll-buttons {
            position: absolute;
            top: 50%;
            right: 10px;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .scroll-buttons button {
            background-color: #0FAA39;
            color: white;
            border: none;
            padding: 10px;
            cursor: pointer;
            font-size: 20px;
            border-radius: 50%;
        }
        .scroll-buttons button:hover {
            background-color: #109835;
        }
    </style>
</head>
<body>

<div class="container mt-4">
    <h1 class="text-center">Menu</h1>

    <div class="menu-section-container">
        <h3>Best Sellers</h3>
        <div class="menu-items-container" id="menuItemsContainer">
            {% for item in ordered_menu['Best Sellers'] %}
                <div class="menu-card">
                    <img src="{{ item.Image1__c }}" class="menu-image" alt="{{ item.Name }}">
                    <h5 class="card-title">{{ item.Name }}</h5>
                    <p class="card-price">${{ item.Price__c }}</p>
                    <button class="btn btn-primary">Add</button>
                </div>
            {% endfor %}
        </div>
        <div class="scroll-buttons">
            <button class="scroll-up" onclick="scrollUp()">&#x2191;</button>
            <button class="scroll-down" onclick="scrollDown()">&#x2193;</button>
        </div>
    </div>

</div>

<script>
    let scrollPosition = 0;

    function scrollUp() {
        const container = document.getElementById('menuItemsContainer');
        const itemHeight = container.children[0].offsetHeight + 10;
        scrollPosition = Math.max(scrollPosition - itemHeight, 0);
        container.style.transform = `translateY(-${scrollPosition}px)`;
    }

    function scrollDown() {
        const container = document.getElementById('menuItemsContainer');
        const itemHeight = container.children[0].offsetHeight + 10;
        scrollPosition = Math.min(scrollPosition + itemHeight, container.scrollHeight);
        container.style.transform = `translateY(-${scrollPosition}px)`;
    }
</script>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>