Improve mobile responsive layout, add mobile stage switcher & collapsible filter bar
This commit is contained in:
1 parent
49e3134758
commit
b7c5f79d26
3 files changed
+363
-13
No files matched your search
@@ -213,8 +213,10 @@ function renderKanbanBoard() {
|
||||
for (const st of statuses) {
|
||||
const colEl = document.getElementById(`col-${st}`);
|
||||
const countEl = document.getElementById(`count-${st}`);
|
||||
const mcountEl = document.getElementById(`mcount-${st}`);
|
||||
const list = state.ideas.filter((i) => i.status === st);
|
||||
if (countEl) countEl.textContent = list.length;
|
||||
if (mcountEl) mcountEl.textContent = list.length;
|
||||
if (!colEl) continue;
|
||||
|
||||
if (list.length === 0) {
|
||||
@@ -1525,6 +1527,21 @@ function bindGlobalEvents() {
|
||||
});
|
||||
|
||||
// Global Filters
|
||||
document.getElementById("btn-mobile-filter-toggle")?.addEventListener("click", () => {
|
||||
const bar = document.getElementById("global-filter-bar");
|
||||
bar?.classList.toggle("mobile-filters-open");
|
||||
});
|
||||
|
||||
document.querySelectorAll("#mobile-stage-switcher .stage-tab").forEach((tab) => {
|
||||
tab.addEventListener("click", () => {
|
||||
const stage = tab.dataset.mobileStage;
|
||||
document.querySelectorAll("#mobile-stage-switcher .stage-tab").forEach((t) =>
|
||||
t.classList.toggle("active", t === tab)
|
||||
);
|
||||
document.getElementById("kanban-board")?.setAttribute("data-mobile-active-stage", stage);
|
||||
});
|
||||
});
|
||||
|
||||
document.getElementById("filter-search")?.addEventListener("input", (e) => {
|
||||
state.filters.search = e.target.value;
|
||||
loadIdeas();
|
||||
|
||||
Reference in new issue
Block a user