mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
Add search functionality to public corpora page
This commit is contained in:
parent
f056a15ba8
commit
65c907a990
@ -9,12 +9,10 @@
|
||||
<h1 id="title"><i class="nopaque-icons" style="font-size: inherit;">I</i>Corpora</h1>
|
||||
</div>
|
||||
<div class="white" style="padding: 0 15px; border-radius: 20px;">
|
||||
<form>
|
||||
<div class="input-field">
|
||||
<i class="material-icons prefix">search</i>
|
||||
<input id="search" placeholder="Find public corpora" type="text">
|
||||
</div>
|
||||
</form>
|
||||
<div class="input-field">
|
||||
<i class="material-icons prefix">search</i>
|
||||
<input id="public-corpora-search" placeholder="Find public corpora" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -38,7 +36,9 @@
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script>
|
||||
let publicCorporaSearchElement = document.querySelector('#public-corpora-search');
|
||||
let corpusList = CorpusList.getInstance(document.querySelector('#corpora .corpus-list .list'));
|
||||
publicCorporaSearchElement.addEventListener('keyup', function() {corpusList.listjs.search(this.value);});
|
||||
corpusList._init({{ corpora|tojson }});
|
||||
</script>
|
||||
{% endblock scripts %}
|
||||
|
Loading…
Reference in New Issue
Block a user