From 4d396a3582b009c03b9c903549b1e9312f8707d1 Mon Sep 17 00:00:00 2001 From: Sulthan Zaki Date: Mon, 27 Jul 2026 13:06:11 +0700 Subject: [PATCH] feat(web): archived and finished tabs with per-card status controls --- backend/static/style.css | 13 ++++++-- backend/templates/app.html | 6 ++++ backend/templates/card.html | 42 ++++++++++++++++++++++++++ backend/templates/list.html | 4 +++ backend/web_test.go | 59 +++++++++++++++++++++++++++++++++++-- 5 files changed, 120 insertions(+), 4 deletions(-) diff --git a/backend/static/style.css b/backend/static/style.css index c385c49..f7d2f93 100644 --- a/backend/static/style.css +++ b/backend/static/style.css @@ -131,10 +131,19 @@ button, .primary, [role="tab"] { .search:focus-visible { outline: 2px solid var(--accent); } -.tabs { display: flex; gap: 8px; margin-bottom: 16px; } +/* Five buttons no longer divide a phone's width legibly, so the row scrolls + sideways instead of squeezing. The scrollbar is hidden: on mobile there is + none anyway, and on desktop it would sit under the tab labels. */ +.tabs { + display: flex; gap: 8px; margin-bottom: 16px; + overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; +} +.tabs::-webkit-scrollbar { display: none; } .tabs [role="tab"] { - flex: 1; + flex: 1 0 auto; + padding-inline: 14px; + white-space: nowrap; display: grid; place-items: center; background: var(--surface); diff --git a/backend/templates/app.html b/backend/templates/app.html index dcbaed4..1726355 100644 --- a/backend/templates/app.html +++ b/backend/templates/app.html @@ -31,6 +31,12 @@ Favourites + Archived + Finished {{if .Recent}} diff --git a/backend/templates/card.html b/backend/templates/card.html index 8278ca9..63293b8 100644 --- a/backend/templates/card.html +++ b/backend/templates/card.html @@ -38,6 +38,48 @@ + {{if eq .Status "finished"}} + + {{else}} + {{if eq .Status "archived"}} + + {{else}} + + {{end}} + + {{end}}