diff options
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/staff.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tmpl/staff.html b/tmpl/staff.html index 5d79b4c..f6e62ca 100644 --- a/tmpl/staff.html +++ b/tmpl/staff.html @@ -118,6 +118,17 @@ {{- end }} </table> </div> + <script> + document.addEventListener("DOMContentLoaded", () => { + const search = document.getElementById("search") + search.addEventListener("input", () => { + const s = search.value.toLowerCase().trim().normalize('NFD') + document.querySelectorAll(".courseitem").forEach(c => { + c.hidden = (!c.textContent.toLowerCase().normalize('NFD').includes(s)) && (s.length > 0) + }) + }) + }) + </script> </body> </html> {{- end -}} |