start of tag based search
This commit is contained in:
parent
afa2f4c578
commit
cd09c12826
@ -180,6 +180,11 @@ div.maincontent{
|
|||||||
margin: 1px;
|
margin: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tags .searched {
|
||||||
|
background: #fff600;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
.tooltip .tooltiptext {
|
.tooltip .tooltiptext {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
@ -52,3 +52,17 @@ function removeClass(element, name) {
|
|||||||
}
|
}
|
||||||
element.className = arr1.join(" ");
|
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);
|
||||||
|
});
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
<title>Autonomous Practices X Distribusi-Verse</title>
|
<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/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/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="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="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')}}">
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='icons/favicon-32x32.png')}}">
|
||||||
|
@ -24,4 +24,5 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<input id="tagsearch" type="text" placeholder="Search..">
|
||||||
{% endblock menu %}
|
{% endblock menu %}
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{% for name, distribusi in distribusies.items() %}
|
{% for name, distribusi in distribusies.items() %}
|
||||||
<li class='distribusi filter {{ distribusi["term"] }} {{ distribusi["year"] }} {{ distribusi["course"] }}'>
|
<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"] %}
|
{% for tag in distribusi["tags"] %}
|
||||||
<span class="tags">{{tag}}</span>
|
<span class="tags">{{tag}}</span>
|
||||||
{% endfor%}
|
{% endfor%}
|
||||||
|
Loading…
Reference in New Issue
Block a user