-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.html
497 lines (459 loc) · 16 KB
/
search.html
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.flexbox-container {
display: flex;
flex-wrap: wrap;
}
.flexbox-header {
display: flex;
height: 130px !important;
align-items: center;
justify-content: center;
width: 1000px !important;
background-image: url(./giggio.png);
}
.flexbox-searchContainer {
display: flex;
align-items: center;
justify-content: center;
border: 0px solid black;
height: 130px !important;
}
.flexbox-searchbar {
border: 0px solid black;
height: 70px !important;
}
.flexbox-item {
display: flex;
flex-wrap: wrap;
height: 220px !important;
margin: 5px;
border: 0px solid #333;
background-color: white;
}
.flexbox-photo {
display: flex;
height: 185px;
width: 100%;
justify-content: center;
background-color: white;
}
.flexbox-caption {
display: flex;
width: 100%;
height: 20px !important;
flex-direction: row;
justify-content: left;
align-items: center;
/* margin: 3px; */
/* border: 0px solid #333; */
font-family: Graphik Light, Helvetica, sans-serif;
font-size: 0.72em;
}
.flexbox-site {
width: 100%;
height: 15px !important;
/* border: 0px solid #333; */
background-color: white;
font-size: 0.65em;
}
* {
box-sizing: border-box;
}
body {
font: 16px Arial;
}
/*the container must be positioned relative:*/
.autocomplete {
position: relative;
display: inline-block;
}
input {
border: 0px solid transparent;
background-color: #f1f2f2;
color: #202124;
padding: 15px;
font-size: 15px;
}
input[type=text] {
background-color: #303134;
width: 100%;
}
input[type=submit] {
background-color: DodgerBlue;
color: #f1f2f2;
cursor: pointer;
}
.autocomplete-items {
position: absolute;
border: 0px solid #303134;
color: #3c4043;
border-bottom: none;
border-top: none;
z-index: 99;
/*position the autocomplete items to be the same width as the container:*/
top: 100%;
left: 0;
right: 60px;
}
.autocomplete-items div {
padding: 10px;
cursor: pointer;
background-color: #f1f2f2;
border-bottom: 0px solid #303134;
border-left: 0px solid #303134;
border-right: 0px solid #303134;
}
/*when hovering an item:*/
.autocomplete-items div:hover {
background-color: gray;
}
/*when navigating through the items using the arrow keys:*/
.autocomplete-active {
background-color: gray !important;
color: #ffffff;
}
/* This is the new styling for the bar*/
.form {
display: flex;
flex-direction: row;
}
.search-field {
width: 90%;
padding: 10px 15px 10px 15px;
border: none;
outline: none;
}
.search-button {
background: transparent;
border: none;
outline: 1px;
margin-left: -33px;
}
.search-button img {
width: 20px;
height: 20px;
object-fit: cover;
}
/* clears the ‘X’ from Chrome */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { display: none; }
</style>
</head>
<body style="background-color: white;">
<div class="flexbox-header">
<div class="flexbox-searchContainer">
<div class="flexbox-searchbar">
<form action="" autocomplete="off" class="form">
<div class="autocomplete" style="width:600px;">
<input id="myInput" type="search" placeholder="Search" class="search-field" >
<!-- <input id="myInput" type="text" name="myCountry" placeholder="Search"> -->
<button type="submit" class="search-button" onclick="document.location = 'https://htmlpreview.github.io/?https://raw.githubusercontent.com/JaredVogt/anv/main/output_white.html'; return false">
<img src="search_white.png">
</button>
</div>
</div>
</form>
</div>
</div>
<div class="flexbox-container">
<!-- between thiese lines -->
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/164947758-17d278b9-8a5d-4f29-8585-631055385b75.png width=139>
</div>
<div class="flexbox-caption">The Woman Erased from...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/165337578-17ef0983-c884-4157-beec-19c82593a40f.png width=138>
</div>
<div class="flexbox-caption">Sonja Richard's email...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 253px;">
<div class="flexbox-photo"><img src=./photos/165416827-4cb4e7b9-3920-4089-9bdf-e436b04c972d.png width=253>
</div>
<div class="flexbox-caption">Look into my right eye
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/164947808-a4e143dd-9765-42d0-b262-af4beae5bba9.png width=137>
</div>
<div class="flexbox-caption">Sonja J Richards and ...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 226px;">
<div class="flexbox-photo"><img src=./photos/165416896-ef2f3d3b-4c85-443d-a287-b701464c45f2.png width=226>
</div>
<div class="flexbox-caption">Photobomb! Look closely
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 276px;">
<div class="flexbox-photo"><img src=./photos/164947788-a014ca38-7f32-405a-829a-60630a4dd02a.png width=276>
</div>
<div class="flexbox-caption">Summer with Woofy, 2022, Little Rock
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 257px;">
<div class="flexbox-photo"><img src=./photos/165557316-5198cf04-6a4a-46ae-bd2d-987097a9738d.png width=257>
</div>
<div class="flexbox-caption">Outside after dinner.. Where's my car?
</div>
<div class="flexbox-site">more.that
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/166127790-2ebe7f56-08bc-4e7c-bb8c-8d871d980690.png width=81>
</div>
<div class="flexbox-caption">Fun times on the swam...
</div>
<div class="flexbox-site">more.that
</div>
</div>
<div class="flexbox-item" style="width: 287px;">
<div class="flexbox-photo"><img src=./photos/165613330-6a5ccf8b-4906-4534-9135-5b190e19ceb0.png width=287>
</div>
<div class="flexbox-caption">My first car… kidding!
</div>
<div class="flexbox-site">http://www.dca.io
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/164947799-c07019b7-d631-4f9c-8780-51bd77295fae.png width=138>
</div>
<div class="flexbox-caption">Comfort, softness, wa...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 276px;">
<div class="flexbox-photo"><img src=./photos/164947820-ed4a8b36-cfbc-4966-893a-d5292cf49616.png width=276>
</div>
<div class="flexbox-caption">Art gala… yes, we bid on the anthropomorp...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 252px;">
<div class="flexbox-photo"><img src=./photos/165416925-34af03b3-ddfa-48c9-a639-9825207bf9de.png width=252>
</div>
<div class="flexbox-caption">Sonja J Richards and modern bathroom ...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/164947782-d93520f8-53b6-4f71-8d5c-e68d4fa3283a.png width=122>
</div>
<div class="flexbox-caption">The time I spent the ...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/166127793-2685927b-8bac-44e8-8c0b-6aaf439f5e4b.png width=105>
</div>
<div class="flexbox-caption">Out by the swamp…
</div>
<div class="flexbox-site">more.that
</div>
</div>
<div class="flexbox-item" style="width: 250px;">
<div class="flexbox-photo"><img src=./photos/166126199-7bce5d93-a901-4356-87a4-75f6627d122c.png width=250>
</div>
<div class="flexbox-caption">First annual Beaverstone Bay Cornhole
</div>
<div class="flexbox-site">http://www.dca.io
</div>
</div>
<div class="flexbox-item" style="width: 178px;">
<div class="flexbox-photo"><img src=./photos/166127903-f2d49d86-84f6-4458-a4f1-c91ef45e84b4.png width=178>
</div>
<div class="flexbox-caption">Turtles all the way down
</div>
<div class="flexbox-site">more.that
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/164947777-e0ffdab5-d8c0-42f3-bd9f-8aeb5c20de1e.png width=137>
</div>
<div class="flexbox-caption">Why is there a rubber...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 249px;">
<div class="flexbox-photo"><img src=./photos/166126211-52a57e9d-cc28-4e64-8afd-677250f04978.png width=249>
</div>
<div class="flexbox-caption">Pat, on ice…
</div>
<div class="flexbox-site">http://www.dca.io
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/164947589-d107ee85-ed10-46b9-8e9b-ba884b6d6585.png width=136>
</div>
<div class="flexbox-caption">Fourth anniversay - f...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/164947618-d419f03a-2f20-4229-8522-330769f06c41.png width=138>
</div>
<div class="flexbox-caption">Another four years wi...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 152px;">
<div class="flexbox-photo"><img src=./photos/165557057-8d7d86fa-c7ad-4111-9d52-8a6602b35ef3.png width=152>
</div>
<div class="flexbox-caption">Face palm emoji?
</div>
<div class="flexbox-site">more.that
</div>
</div>
<div class="flexbox-item" style="width: 306px;">
<div class="flexbox-photo"><img src=./photos/165416833-604f5947-3abf-49d6-972a-8987e749165c.png width=306>
</div>
<div class="flexbox-caption">Over yonder… something outside the window
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<div class="flexbox-item" style="width: 150px;">
<div class="flexbox-photo"><img src=./photos/164947732-3e81f07f-872e-4a7b-bf97-8d5d45a864c3.png width=138>
</div>
<div class="flexbox-caption">Does corduroy ever go...
</div>
<div class="flexbox-site">this.that.com
</div>
</div>
<!-- between thiese lines -->
</div>
<!-- everything below this is the script for the autocomplete -->
<script>
function autocomplete(inp, arr) {
/*the autocomplete function takes two arguments,
the text field element and an array of possible autocompleted values:*/
var currentFocus;
/*execute a function when someone writes in the text field:*/
inp.addEventListener("input", function(e) {
var a, b, i, val = this.value;
/*close any already open lists of autocompleted values*/
closeAllLists();
if (!val) { return false;}
currentFocus = -1;
/*create a DIV element that will contain the items (values):*/
a = document.createElement("DIV");
a.setAttribute("id", this.id + "autocomplete-list");
a.setAttribute("class", "autocomplete-items");
/*append the DIV element as a child of the autocomplete container:*/
this.parentNode.appendChild(a);
/*for each item in the array...*/
for (i = 0; i < arr.length; i++) {
/*check if the item starts with the same letters as the text field value:*/
if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
/*create a DIV element for each matching element:*/
b = document.createElement("DIV");
/*make the matching letters bold:*/
b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
b.innerHTML += arr[i].substr(val.length);
/*insert a input field that will hold the current array item's value:*/
b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
/*execute a function when someone clicks on the item value (DIV element):*/
b.addEventListener("click", function(e) {
/*insert the value for the autocomplete text field:*/
inp.value = this.getElementsByTagName("input")[0].value;
/*close the list of autocompleted values,
(or any other open lists of autocompleted values:*/
closeAllLists();
});
a.appendChild(b);
}
}
});
/*execute a function presses a key on the keyboard:*/
inp.addEventListener("keydown", function(e) {
var x = document.getElementById(this.id + "autocomplete-list");
if (x) x = x.getElementsByTagName("div");
if (e.keyCode == 40) {
/*If the arrow DOWN key is pressed,
increase the currentFocus variable:*/
currentFocus++;
/*and and make the current item more visible:*/
addActive(x);
} else if (e.keyCode == 38) { //up
/*If the arrow UP key is pressed,
decrease the currentFocus variable:*/
currentFocus--;
/*and and make the current item more visible:*/
addActive(x);
} else if (e.keyCode == 13) {
/*If the ENTER key is pressed, prevent the form from being submitted,*/
e.preventDefault();
if (currentFocus > -1) {
/*and simulate a click on the "active" item:*/
if (x) x[currentFocus].click();
}
}
});
function addActive(x) {
/*a function to classify an item as "active":*/
if (!x) return false;
/*start by removing the "active" class on all items:*/
removeActive(x);
if (currentFocus >= x.length) currentFocus = 0;
if (currentFocus < 0) currentFocus = (x.length - 1);
/*add class "autocomplete-active":*/
x[currentFocus].classList.add("autocomplete-active");
}
function removeActive(x) {
/*a function to remove the "active" class from all autocomplete items:*/
for (var i = 0; i < x.length; i++) {
x[i].classList.remove("autocomplete-active");
}
}
function closeAllLists(elmnt) {
/*close all autocomplete lists in the document,
except the one passed as an argument:*/
var x = document.getElementsByClassName("autocomplete-items");
for (var i = 0; i < x.length; i++) {
if (elmnt != x[i] && elmnt != inp) {
x[i].parentNode.removeChild(x[i]);
}
}
}
/*execute a function when someone clicks in the document:*/
document.addEventListener("click", function (e) {
closeAllLists(e.target);
});
}
/*An array containing all the country names in the world:*/
var countries = ['Sonja J Richards', 'Sonja J Richards Architect', 'Sonja J Richards - Little Rock', 'Seriously twisted pretzels', 'See how she runs', 'So you wanna be a millionaire', 'Son of a bitch, get me a drink']
/*initiate the autocomplete function on the "myInput" element, and pass along the countries array as possible autocomplete values:*/
autocomplete(document.getElementById("myInput"), countries);
</script>
</body>
</html>