-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.html
109 lines (93 loc) · 2.53 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
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
box-sizing: border-box;
}
#myInput {
background-image: url('/css/searchicon.png');
background-position: 10px 12px;
background-repeat: no-repeat;
width: 100%;
font-size: 16px;
padding: 12px 20px 12px 40px;
border: 1px solid #ddd;
margin-bottom: 12px;
margin-left: 33.5%;
}
#myUL {
list-style-type: none;
padding: 0;
margin: 0;
}
#myUL li a {
border: 1px solid #ddd;
margin-top: -1px; /* Prevent double borders */
background-color: #f6f6f6;
padding: 12px;
text-decoration: none;
font-size: 18px;
color: black;
display: block;
width: 35%;
border-radius: 20px;
margin-left: 33.5%;
}
#myUL li a:hover:not(.header) {
background-color: #eee;
}
.a {margin-left: 45%;
background-color: transparent;
height: 55px;
width: 170px;
-webkit-text-fill-color: white;
font-size: 20px;
font-family: sans-serif;
border-color: white;
border-radius: 100px;
}
.a:hover {
background-color:ghostwhite;
-webkit-text-fill-color: black;
cursor: pointer;
}
</style>
<title>
Search
</title>
</head><div class="b">
<body background="bg_3.jpg" style="background-position: center; background-size: cover;"></div>
<img src="generatedtext (1).png" style="margin-left: 12%;">
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for names " title="Type in a name and try opening Shivam"
style="width:35%;border-radius:20px; margin-top: 50px;">
<ul id="myUL">
<li><a href="https://shivag4321.wixsite.com/shivam" target="blank">Shivam</a></li>
<li><a href="#" target="blank">Mahak</a></li>
<li><a href="#">Agnes</a></li>
<li><a href="#">Bob</a></li>
<li><a href="#">Calvin</a></li>
<li><a href="#">Christina</a></li>
<li><a href="#">Cindy</a></li>
</ul><br><br>
<a href="filters.html" ><button div class="a" >ADD FILTERS</button></a>
<script>
function myFunction() {
var input, filter, ul, li, a, i, txtValue;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
ul = document.getElementById("myUL");
li = ul.getElementsByTagName("li");
for (i = 0; i < li.length; i++) {
a = li[i].getElementsByTagName("a")[0];
txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
} else {
li[i].style.display = "none";
}
}
}
</script>
</body>
</html>