Browse Source

start of tag based search

current_wdka_release
crunk 3 years ago
parent
commit
cd09c12826
  1. 5
      verse/static/css/style.css
  2. 14
      verse/static/js/dropdown.js
  3. 1
      verse/templates/base.html
  4. 1
      verse/templates/filtermenu.html
  5. 2
      verse/templates/index.html

5
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;

14
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);
});

1
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')}}">

1
verse/templates/filtermenu.html

@ -24,4 +24,5 @@
{% endfor %}
</div>
</div>
<input id="tagsearch" type="text" placeholder="Search..">
{% endblock menu %}

2
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%}

Loading…
Cancel
Save