We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab77e77 commit 64fba04Copy full SHA for 64fba04
1 file changed
static/js/publications.js
@@ -65,6 +65,7 @@
65
appendGroup("Year", years, "year");
66
appendGroup("Topic", tags, "tag");
67
68
+
69
function appendGroup(label, values, axis) {
70
if (!values.length) return;
71
const g = document.createElement("div");
@@ -73,6 +74,8 @@
73
74
h.className = "publication-facet-label";
75
h.textContent = label;
76
g.appendChild(h);
77
+ const btns = document.createElement("div");
78
+ btns.className = "publication-facet-group-buttons";
79
values.forEach(v => {
80
const btn = document.createElement("button");
81
btn.type = "button";
@@ -81,8 +84,9 @@
84
btn.dataset.value = v;
82
85
btn.textContent = v;
83
86
btn.addEventListener("click", () => toggleFilter(axis, v));
- g.appendChild(btn);
87
+ btns.appendChild(btn);
88
});
89
+ g.appendChild(btns);
90
$filters.appendChild(g);
91
}
92
0 commit comments