This is an automated email from the ASF dual-hosted git repository. tn pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tooling-atr-experiments.git
The following commit(s) were added to refs/heads/main by this push: new 1b0c8b6 add filter mechanism for PMC directory 1b0c8b6 is described below commit 1b0c8b6029efa55686126adffee514877728c302 Author: Thomas Neidhart <t...@apache.org> AuthorDate: Tue Feb 18 14:34:36 2025 +0100 add filter mechanism for PMC directory --- atr/templates/pmc-directory.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/atr/templates/pmc-directory.html b/atr/templates/pmc-directory.html index 5aa1249..65f7f14 100644 --- a/atr/templates/pmc-directory.html +++ b/atr/templates/pmc-directory.html @@ -71,6 +71,11 @@ <h1>Project Management Committees</h1> <p class="intro">Current Apache PMCs and their releases:</p> + <input type="text" + id="pmc-filter" + onkeydown="if (event.key == 'Enter'){ filter() }" /> + <button type="button" onclick="filter()">Filter</button> + <div class="pmc-grid"> {% for pmc in pmcs %} <div class="pmc-card"> @@ -93,3 +98,23 @@ {% endfor %} </div> {% endblock content %} + +{% block javascripts %} + super() + <script> + function filter() { + e = document.getElementById("pmc-filter"); + pmc_filter = e.value; + cards = document.getElementsByClassName("pmc-card"); + for (let card of cards) { + name_element = card.getElementsByClassName("pmc-name"); + name = name_element[0].innerHTML; + if (pmc_filter && !name.startsWith(pmc_filter)) { + card.hidden = true; + } else { + card.hidden = false; + } + } + } + </script> +{% endblock javascripts %} --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tooling.apache.org For additional commands, e-mail: dev-h...@tooling.apache.org