diff --git a/verse/static/css/style.css b/verse/static/css/style.css index c685a19..87f37bc 100644 --- a/verse/static/css/style.css +++ b/verse/static/css/style.css @@ -180,6 +180,11 @@ div.maincontent{ margin: 1px; } +.tags .searched { + background: #fff600; + color: black; +} + .tooltip .tooltiptext { visibility: hidden; width: 120px; diff --git a/verse/static/js/dropdown.js b/verse/static/js/dropdown.js index 5660c00..8db74cb 100644 --- a/verse/static/js/dropdown.js +++ b/verse/static/js/dropdown.js @@ -52,3 +52,17 @@ function removeClass(element, name) { } element.className = arr1.join(" "); } + + +let searchInput = document.getElementById('tagsearch'); +let timeout = null; +// Listen for keystroke events +searchInput.addEventListener('keyup', function (e) { + // Clear the timeout if it has already been set. + clearTimeout(timeout); + + // Make a new timeout set to go off in 1000ms (1 second) + timeout = setTimeout(function () { + console.log('Input Value:', searchInput.value); + }, 1000); +}); diff --git a/verse/templates/base.html b/verse/templates/base.html index b4c7186..93102fb 100644 --- a/verse/templates/base.html +++ b/verse/templates/base.html @@ -6,7 +6,6 @@ <title>Autonomous Practices X Distribusi-Verse</title> <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css')}}"> <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/selector.css')}}"> - <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/tags.css')}}"> <link rel="shortcut icon" href="{{ url_for('static', filename='icons/favicon.ico') }}"> <link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='icons/apple-touch-icon.png')}}"> <link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='icons/favicon-32x32.png')}}"> diff --git a/verse/templates/filtermenu.html b/verse/templates/filtermenu.html index dd623c0..c84abb7 100644 --- a/verse/templates/filtermenu.html +++ b/verse/templates/filtermenu.html @@ -24,4 +24,5 @@ {% endfor %} </div> </div> + <input id="tagsearch" type="text" placeholder="Search.."> {% endblock menu %} diff --git a/verse/templates/index.html b/verse/templates/index.html index d7dd0ed..7d5d08e 100644 --- a/verse/templates/index.html +++ b/verse/templates/index.html @@ -46,7 +46,7 @@ <ul> {% for name, distribusi in distribusies.items() %} <li class='distribusi filter {{ distribusi["term"] }} {{ distribusi["year"] }} {{ distribusi["course"] }}'> - {{distribusi["useremail"]}}: <a href='stash/{{name}}/index.html'>{{name}}</a> + <a href='stash/{{name}}/index.html'>{{distribusi["useremail"]}}:{{name}}</a> {% for tag in distribusi["tags"] %} <span class="tags">{{tag}}</span> {% endfor%}