Update templates/search.html
Browse files- templates/search.html +73 -68
templates/search.html
CHANGED
@@ -26,20 +26,44 @@
|
|
26 |
color: white;
|
27 |
padding: 15px;
|
28 |
display: flex;
|
29 |
-
justify-content: space-between;
|
30 |
align-items: center;
|
31 |
z-index: 1000;
|
32 |
}
|
33 |
-
.
|
|
|
|
|
|
|
|
|
|
|
34 |
position: absolute;
|
35 |
-
left:
|
36 |
top: 50%;
|
37 |
transform: translateY(-50%);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
display: flex;
|
39 |
align-items: center;
|
40 |
width: 300px;
|
41 |
-
max-width:
|
42 |
-
|
43 |
}
|
44 |
.search-bar-container input {
|
45 |
width: 100%;
|
@@ -66,7 +90,7 @@
|
|
66 |
}
|
67 |
.autocomplete-suggestions {
|
68 |
position: absolute;
|
69 |
-
|
70 |
left: 0;
|
71 |
width: 100%;
|
72 |
max-height: 200px;
|
@@ -90,6 +114,7 @@
|
|
90 |
.container {
|
91 |
max-width: 900px;
|
92 |
margin-top: 20px;
|
|
|
93 |
}
|
94 |
.menu-card {
|
95 |
max-width: 350px;
|
@@ -132,92 +157,65 @@
|
|
132 |
justify-content: center;
|
133 |
padding: 0;
|
134 |
}
|
135 |
-
/*
|
136 |
-
.
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
background-color: #FFA500;
|
142 |
-
color: white;
|
143 |
-
border: none;
|
144 |
-
border-radius: 50%;
|
145 |
-
width: 30px;
|
146 |
-
height: 30px;
|
147 |
-
display: flex;
|
148 |
-
align-items: center;
|
149 |
-
justify-content: center;
|
150 |
-
font-size: 18px;
|
151 |
-
cursor: pointer;
|
152 |
-
z-index: 1001;
|
153 |
-
}
|
154 |
-
/* Small modal for mobile view */
|
155 |
-
.modal-dialog-small {
|
156 |
-
max-width: 100%;
|
157 |
-
width: 90vw; /* 90% of viewport width */
|
158 |
-
margin: 0 auto;
|
159 |
-
position: fixed;
|
160 |
-
top: 50%;
|
161 |
-
left: 50%;
|
162 |
-
transform: translate(-50%, -50%);
|
163 |
-
}
|
164 |
-
.modal-content {
|
165 |
-
border-radius: 15px;
|
166 |
-
background-color: #fdf4e3;
|
167 |
-
max-height: 90vh; /* 90% of viewport height */
|
168 |
-
overflow-y: auto;
|
169 |
}
|
170 |
-
.modal-
|
|
|
171 |
border: none;
|
172 |
-
|
|
|
173 |
}
|
174 |
.modal-body {
|
|
|
|
|
|
|
|
|
175 |
padding: 15px;
|
|
|
|
|
|
|
|
|
176 |
}
|
177 |
.addon-section {
|
178 |
background-color: #fff;
|
179 |
border: 2px solid #ffa500;
|
180 |
border-radius: 8px;
|
181 |
-
padding:
|
182 |
-
margin-bottom:
|
183 |
}
|
184 |
.addon-section h6 {
|
185 |
-
margin-bottom:
|
186 |
-
font-size: 1rem;
|
187 |
font-weight: bold;
|
188 |
color: #333;
|
189 |
}
|
190 |
.form-check {
|
191 |
-
margin-bottom:
|
192 |
}
|
193 |
.form-check-input {
|
194 |
-
margin-right:
|
195 |
}
|
196 |
.quantity-controls {
|
197 |
display: flex;
|
198 |
align-items: center;
|
199 |
-
gap:
|
200 |
}
|
201 |
.quantity-controls input {
|
202 |
-
width:
|
203 |
text-align: center;
|
204 |
-
font-size: 14px;
|
205 |
-
}
|
206 |
-
.modal-footer .btn-primary {
|
207 |
-
width: auto;
|
208 |
-
padding: 8px 15px;
|
209 |
-
height: 35px;
|
210 |
}
|
211 |
</style>
|
212 |
</head>
|
213 |
<body>
|
214 |
<div class="fixed-top-bar">
|
215 |
-
<
|
216 |
-
|
217 |
-
<
|
218 |
-
<i class="bi bi-search search-icon"></i>
|
219 |
-
<i class="bi bi-mic mic-icon" id="micIcon"></i>
|
220 |
-
<div id="autocompleteSuggestions" class="autocomplete-suggestions"></div>
|
221 |
</div>
|
222 |
</div>
|
223 |
|
@@ -256,16 +254,23 @@
|
|
256 |
</div>
|
257 |
</div>
|
258 |
|
259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
<div class="modal fade" id="itemModal" tabindex="-1" aria-labelledby="itemModalLabel" aria-hidden="true">
|
261 |
-
<div class="modal-dialog modal-
|
262 |
<div class="modal-content">
|
263 |
<div class="modal-header">
|
264 |
<h5 class="modal-title" id="itemModalLabel">Item Details</h5>
|
265 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
266 |
</div>
|
267 |
<div class="modal-body">
|
268 |
-
<img id="modal-img" class="img-fluid rounded mb-3 d-block mx-auto" alt="Item Image" style="max-height:
|
269 |
<h5 id="modal-name" class="fw-bold text-center"></h5>
|
270 |
<p id="modal-price" class="text-muted text-center"></p>
|
271 |
<p id="modal-description" class="text-secondary text-center"></p>
|
@@ -274,13 +279,13 @@
|
|
274 |
<strong>Nutrition:</strong> <span id="modal-nutrition"></span><br>
|
275 |
<strong>Allergens:</strong> <span id="modal-allergens"></span>
|
276 |
</div>
|
277 |
-
<div id="modal-addons" class="modal-addons mt-
|
278 |
<h6 class="text-center">Customization Options</h6>
|
279 |
<div id="addons-list" class="addons-container">Loading customization options...</div>
|
280 |
</div>
|
281 |
-
<div class="mt-
|
282 |
<h6 class="text-center">Custom Request</h6>
|
283 |
-
<textarea id="modal-instructions" class="form-control" placeholder="Enter any special instructions here..."
|
284 |
</div>
|
285 |
<span id="modal-section" data-section="" data-category="" data-is-menu-item="" style="display: none;"></span>
|
286 |
</div>
|
|
|
26 |
color: white;
|
27 |
padding: 15px;
|
28 |
display: flex;
|
|
|
29 |
align-items: center;
|
30 |
z-index: 1000;
|
31 |
}
|
32 |
+
.orange-label {
|
33 |
+
background-color: #FFA500;
|
34 |
+
padding: 5px 10px;
|
35 |
+
border-radius: 5px;
|
36 |
+
display: flex;
|
37 |
+
align-items: center;
|
38 |
position: absolute;
|
39 |
+
left: 10px;
|
40 |
top: 50%;
|
41 |
transform: translateY(-50%);
|
42 |
+
}
|
43 |
+
.back-button {
|
44 |
+
background-color: black;
|
45 |
+
color: white;
|
46 |
+
border: none;
|
47 |
+
border-radius: 50%;
|
48 |
+
width: 25px;
|
49 |
+
height: 25px;
|
50 |
+
display: flex;
|
51 |
+
align-items: center;
|
52 |
+
justify-content: center;
|
53 |
+
font-size: 16px;
|
54 |
+
cursor: pointer;
|
55 |
+
margin-right: 10px;
|
56 |
+
}
|
57 |
+
.search-bar-container {
|
58 |
+
position: fixed;
|
59 |
+
bottom: 10px;
|
60 |
+
left: 50%;
|
61 |
+
transform: translateX(-50%);
|
62 |
display: flex;
|
63 |
align-items: center;
|
64 |
width: 300px;
|
65 |
+
max-width: 90%;
|
66 |
+
z-index: 1000;
|
67 |
}
|
68 |
.search-bar-container input {
|
69 |
width: 100%;
|
|
|
90 |
}
|
91 |
.autocomplete-suggestions {
|
92 |
position: absolute;
|
93 |
+
bottom: 100%;
|
94 |
left: 0;
|
95 |
width: 100%;
|
96 |
max-height: 200px;
|
|
|
114 |
.container {
|
115 |
max-width: 900px;
|
116 |
margin-top: 20px;
|
117 |
+
margin-bottom: 70px; /* Space for fixed search bar */
|
118 |
}
|
119 |
.menu-card {
|
120 |
max-width: 350px;
|
|
|
157 |
justify-content: center;
|
158 |
padding: 0;
|
159 |
}
|
160 |
+
/* Modal styling from menu.html */
|
161 |
+
.modal-fullscreen {
|
162 |
+
width: 100vw;
|
163 |
+
max-width: none;
|
164 |
+
height: 100%;
|
165 |
+
margin: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
}
|
167 |
+
.modal-fullscreen .modal-content {
|
168 |
+
height: 100%;
|
169 |
border: none;
|
170 |
+
border-radius: 0;
|
171 |
+
background-color: #fdf4e3;
|
172 |
}
|
173 |
.modal-body {
|
174 |
+
padding: 20px;
|
175 |
+
overflow-y: auto;
|
176 |
+
}
|
177 |
+
.modal-footer {
|
178 |
padding: 15px;
|
179 |
+
display: flex;
|
180 |
+
justify-content: space-between;
|
181 |
+
align-items: center;
|
182 |
+
border-top: none;
|
183 |
}
|
184 |
.addon-section {
|
185 |
background-color: #fff;
|
186 |
border: 2px solid #ffa500;
|
187 |
border-radius: 8px;
|
188 |
+
padding: 12px;
|
189 |
+
margin-bottom: 15px;
|
190 |
}
|
191 |
.addon-section h6 {
|
192 |
+
margin-bottom: 10px;
|
193 |
+
font-size: 1.1rem;
|
194 |
font-weight: bold;
|
195 |
color: #333;
|
196 |
}
|
197 |
.form-check {
|
198 |
+
margin-bottom: 8px;
|
199 |
}
|
200 |
.form-check-input {
|
201 |
+
margin-right: 10px;
|
202 |
}
|
203 |
.quantity-controls {
|
204 |
display: flex;
|
205 |
align-items: center;
|
206 |
+
gap: 10px;
|
207 |
}
|
208 |
.quantity-controls input {
|
209 |
+
width: 50px;
|
210 |
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
}
|
212 |
</style>
|
213 |
</head>
|
214 |
<body>
|
215 |
<div class="fixed-top-bar">
|
216 |
+
<div class="orange-label">
|
217 |
+
<button class="back-button" onclick="window.location.href='/menu'"><</button>
|
218 |
+
<span>Search</span>
|
|
|
|
|
|
|
219 |
</div>
|
220 |
</div>
|
221 |
|
|
|
254 |
</div>
|
255 |
</div>
|
256 |
|
257 |
+
<div class="search-bar-container">
|
258 |
+
<input type="text" id="searchBar" class="form-control" placeholder="Search items or sections..." autocomplete="off">
|
259 |
+
<i class="bi bi-search search-icon"></i>
|
260 |
+
<i class="bi bi-mic mic-icon" id="micIcon"></i>
|
261 |
+
<div id="autocompleteSuggestions" class="autocomplete-suggestions"></div>
|
262 |
+
</div>
|
263 |
+
|
264 |
+
<!-- Item Modal (Exact replica from menu.html) -->
|
265 |
<div class="modal fade" id="itemModal" tabindex="-1" aria-labelledby="itemModalLabel" aria-hidden="true">
|
266 |
+
<div class="modal-dialog modal-fullscreen">
|
267 |
<div class="modal-content">
|
268 |
<div class="modal-header">
|
269 |
<h5 class="modal-title" id="itemModalLabel">Item Details</h5>
|
270 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
271 |
</div>
|
272 |
<div class="modal-body">
|
273 |
+
<img id="modal-img" class="img-fluid rounded mb-3 d-block mx-auto" alt="Item Image" style="max-height: 200px; object-fit: cover;">
|
274 |
<h5 id="modal-name" class="fw-bold text-center"></h5>
|
275 |
<p id="modal-price" class="text-muted text-center"></p>
|
276 |
<p id="modal-description" class="text-secondary text-center"></p>
|
|
|
279 |
<strong>Nutrition:</strong> <span id="modal-nutrition"></span><br>
|
280 |
<strong>Allergens:</strong> <span id="modal-allergens"></span>
|
281 |
</div>
|
282 |
+
<div id="modal-addons" class="modal-addons mt-4">
|
283 |
<h6 class="text-center">Customization Options</h6>
|
284 |
<div id="addons-list" class="addons-container">Loading customization options...</div>
|
285 |
</div>
|
286 |
+
<div class="mt-4">
|
287 |
<h6 class="text-center">Custom Request</h6>
|
288 |
+
<textarea id="modal-instructions" class="form-control" placeholder="Enter any special instructions here..."></textarea>
|
289 |
</div>
|
290 |
<span id="modal-section" data-section="" data-category="" data-is-menu-item="" style="display: none;"></span>
|
291 |
</div>
|