Skip to content

Commit 64fba04

Browse files
Added publication search
1 parent ab77e77 commit 64fba04

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

static/js/publications.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
appendGroup("Year", years, "year");
6666
appendGroup("Topic", tags, "tag");
6767

68+
6869
function appendGroup(label, values, axis) {
6970
if (!values.length) return;
7071
const g = document.createElement("div");
@@ -73,6 +74,8 @@
7374
h.className = "publication-facet-label";
7475
h.textContent = label;
7576
g.appendChild(h);
77+
const btns = document.createElement("div");
78+
btns.className = "publication-facet-group-buttons";
7679
values.forEach(v => {
7780
const btn = document.createElement("button");
7881
btn.type = "button";
@@ -81,8 +84,9 @@
8184
btn.dataset.value = v;
8285
btn.textContent = v;
8386
btn.addEventListener("click", () => toggleFilter(axis, v));
84-
g.appendChild(btn);
87+
btns.appendChild(btn);
8588
});
89+
g.appendChild(btns);
8690
$filters.appendChild(g);
8791
}
8892

0 commit comments

Comments
 (0)