-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
73 lines (71 loc) · 2.22 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>URL Filter</title>
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
font-family: Arial, sans-serif;
}
#searchInput {
width: 300px;
padding: 10px;
margin: 20px 0;
border-radius: 5px;
border: 1px solid #ccc;
}
#urlContainer {
height: 80%;
width: 300px;
overflow-y: auto;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
#urlList {
list-style-type: none;
padding: 0;
margin: 0;
}
#urlList li {
margin: 5px 0;
padding: 10px;
border-radius: 5px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
</style>
</head>
<body>
<input type="text" id="searchInput" placeholder="Type to filter URLs..." onkeyup="filterURLs()">
<div id="urlContainer">
<ul id="urlList">
<li><a href="https://pmav99.github.io/static/CFL-schism.html">CFL-schism.html</a></li>
<li><a href="https://pmav99.github.io/static/ERA5-meluxina.html">ERA5-meluxina.html</a></li>
<li><a href="https://pmav99.github.io/static/stofs2d_stations.html">stofs2d_stations.html</a></li>
</ul>
</div>
<script>
function filterURLs() {
var input = document.getElementById('searchInput');
var filter = input.value.toUpperCase();
var ul = document.getElementById("urlList");
var li = ul.getElementsByTagName('li');
for (var i = 0; i < li.length; i++) {
var a = li[i].getElementsByTagName('a')[0];
var txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
} else {
li[i].style.display = "none";
}
}
}
</script>
</body>
</html>