From d278f9144bca929ffac2ed8a5a1247bcf5e75a70 Mon Sep 17 00:00:00 2001 From: Zichao Lin Date: Sun, 5 Jul 2026 16:37:36 +0800 Subject: [PATCH] fix(ui): badge sizing, button alignment, country XX format, date-only fields --- app/static/style.css | 11 ++++++----- app/templates/postcard_form.html | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/static/style.css b/app/static/style.css index 83a2d3d..637797a 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -46,14 +46,15 @@ input:focus, select:focus { outline: none; border-color: var(--primary); box-sha input[type="text"] + label, input[type="password"] + label, input[type="datetime-local"] + label, select + label { margin-top: 1.1rem; } .form-card { background: var(--card-bg); padding: 1.5rem; border-radius: 8px; border: 1px solid var(--border); } .form-actions { display: flex; gap: .75rem; margin-top: 1.25rem; } +.form-card button[type="submit"] { margin-top: 1.25rem; } .form-row { display: flex; gap: .5rem; align-items: center; } -.form-row input[type="text"], .form-row select { flex: 1; width: auto; } +.form-row input[type="text"], .form-row select { flex: 1; width: auto; min-width: 0; } .form-row .btn { white-space: nowrap; flex-shrink: 0; } +.filter-bar .form-row select { flex: 0 0 auto; width: auto; } .inline-form { margin-bottom: 1.25rem; } /* Buttons */ -button[type="submit"] { margin-top: 1.25rem; } -.btn { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; font-size: .9rem; text-align: center; } +.btn { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; font-size: .9rem; text-align: center; white-space: nowrap; } .btn:hover { background: var(--bg); text-decoration: none; } .btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); } .btn-primary:hover { background: var(--primary-hover); } @@ -90,10 +91,10 @@ code { background: var(--bg); padding: .15rem .4rem; border-radius: 4px; font-si .postcard-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); text-decoration: none; } .thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; } .thumb.placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 1.5rem; } -.postcard-info { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; } +.postcard-info { display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; } /* Badge */ -.badge { display: inline-block; padding: .15rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 600; color: #fff; white-space: nowrap; } +.badge { display: inline-block; padding: .1rem .4rem; border-radius: 999px; font-size: .7rem; font-weight: 600; color: #fff; white-space: nowrap; line-height: 1.4; } .badge-sent { background: var(--sent); } .badge-delivered { background: var(--delivered); } .badge-received { background: var(--received); } diff --git a/app/templates/postcard_form.html b/app/templates/postcard_form.html index 76d6978..20945d3 100644 --- a/app/templates/postcard_form.html +++ b/app/templates/postcard_form.html @@ -19,7 +19,7 @@ - +