This commit is contained in:
David Wu
2017-12-20 01:56:48 +01:00
parent 8614241e73
commit d5683fd8ab

View File

@ -23,13 +23,10 @@
<link rel="stylesheet" href="prism.css">
</head>
<script>
function search() {
var input, filter, i;
input = document.querySelector('#searchInput');
filter = input.value.toUpperCase();
tags = Array.from(document.querySelector('#snippetListDrawer').getElementsByTagName('a'));
tags.forEach(x => {x.getAttribute("href").toUpperCase().indexOf(filter) > -1 ? x.style.display = "" : x.style.display = "none"});
document.addEventListener("load", alert("Attention! This site is only a fork of the original project demonstrating the newest changes made by myself. The original project can be found by clicking on the logo."));
function search(query) {
var tags = Array.from(document.querySelector('#snippetListDrawer').getElementsByTagName('a'));
tags.forEach(x => {x.getAttribute("href").toUpperCase().indexOf(query) > -1 ? x.style.display = "" : x.style.display = "none"});
}
</script>
<body>
@ -42,7 +39,7 @@
<div class="row" style="height: calc(100vh - 5.875rem);overflow: hidden;">
<input id="doc-drawer-checkbox" class="drawer" value="on" type="checkbox">
<nav id="snippetListDrawer" class="col-md-4 col-lg-3" style="border-top: 0">
<input type="text" id="searchInput" onkeyup="search()" placeholder="Search for snippet..">
<input type="text" id="searchInput" onkeyup="search(this.value.toUpperCase())" placeholder="Search for snippet..">
<label for="doc-drawer-checkbox" class="button drawer-close"></label>
<!-- <div><input style="width: 100%; margin: 0px;" placeholder="Search..." id="search-bar" oninput="search()" type="search"></div> -->