From cc310283e46e47cdbd4569c44be42d3e82f4ebad Mon Sep 17 00:00:00 2001 From: wuyanwanwu <104009119+wuyanwanwu@users.noreply.github.com.> Date: Thu, 13 Aug 2026 22:15:26 +0800 Subject: [PATCH] Improve mobile responsive layout --- web/public/styles.css | 76 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/web/public/styles.css b/web/public/styles.css index 07a2e2b..8bfed93 100644 --- a/web/public/styles.css +++ b/web/public/styles.css @@ -12,7 +12,7 @@ } * { box-sizing: border-box; } -body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.55; } +body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.55; } a { color: inherit; text-decoration: none; } button, input, select { font: inherit; } button { cursor: pointer; } @@ -75,7 +75,7 @@ select { padding: 0 9px; } .article { padding: 16px 0; border-bottom: 1px solid #edf1ee; } .article-meta { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 10px; } .tag { display: inline-block; padding: 3px 7px; border-radius: 5px; color: var(--green); background: #e8f2ea; font-weight: 700; } -.article h3 { margin: 7px 0 5px; font-size: 15px; line-height: 1.4; } +.article h3 { margin: 7px 0 5px; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; } .article h3 a:hover { color: var(--orange); } .article p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; } .empty-state { padding: 64px 24px; text-align: center; border: 1px dashed #cbdad0; border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.56); } @@ -84,5 +84,73 @@ select { padding: 0 9px; } .footer { display: flex; justify-content: space-between; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 28px; color: #94a49e; font-size: 10px; letter-spacing: .1em; } .page-heading { margin: 8px 0 31px; }.page-heading h1 { margin: 9px 0 4px; font-size: 42px; letter-spacing: -.06em; }.page-heading p { margin: 0; color: var(--muted); font-size: 14px; } .settings-shell { padding-top: 46px; }.token-card { display: grid; grid-template-columns: 1fr minmax(310px, 430px); gap: 20px; align-items: center; padding: 22px 25px; margin-bottom: 18px; }.token-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }.token-controls { display: flex; gap: 8px; }.token-controls input, .form-card input[type="email"], .form-card input[type="text"], .form-card input[type="time"] { min-width: 0; width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--ink); background: #fbfcfb; }.token-controls input:focus, .form-card input:focus { border-color: #8ebda0; box-shadow: 0 0 0 3px #e8f2eb; }.settings-grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: 18px; }.form-card, .recipients-card { padding: 24px; }.card-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }.form-card form > label, .form-row label { display: block; margin-bottom: 15px; color: var(--ink); font-size: 12px; font-weight: 700; }.form-card label input { display: block; margin-top: 6px; }.optional, .picker-label span { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 400; }.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.check-line { display: flex !important; gap: 8px; align-items: center; font-weight: 600 !important; }.check-line input { accent-color: var(--green); }.module-picker { padding: 14px; border-radius: 11px; background: #f4f8f4; }.picker-label { margin-bottom: 9px; font-size: 12px; font-weight: 700; }.module-options { display: flex; flex-wrap: wrap; gap: 7px; }.module-option { position: relative; }.module-option input { position: absolute; opacity: 0; }.module-option span { display: block; padding: 7px 9px; border: 1px solid #d5e4d8; border-radius: 7px; color: #5d7169; background: #fff; font-size: 11px; cursor: pointer; }.module-option input:checked + span { border-color: #9bc7a8; color: var(--green-dark); background: #dcefe0; font-weight: 700; }.text-button { border: 0; color: var(--green); background: transparent; font-size: 12px; }.hidden { display: none !important; }.form-message { min-height: 18px; margin-top: 9px; color: var(--muted); font-size: 11px; }.form-message.error { color: #b74d37; }.form-message.success { color: var(--green); }.count-pill { min-width: 25px; padding: 3px 8px; border-radius: 20px; color: var(--green); background: #e6f1e8; font-size: 11px; text-align: center; }.recipient-list { display: grid; gap: 10px; }.recipient-item { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf1ee; }.recipient-item:last-child { border-bottom: 0; }.recipient-email { font-size: 13px; font-weight: 700; }.recipient-sub { margin-top: 4px; color: var(--muted); font-size: 11px; }.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }.chip { padding: 3px 6px; border-radius: 5px; color: var(--green); background: #edf5ee; font-size: 10px; }.recipient-actions { display: flex; align-items: center; gap: 7px; }.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; }.icon-button:hover { color: var(--green); border-color: #9bc7a8; }.icon-button.delete:hover { color: #bd523c; border-color: #e9b0a1; } -@media (max-width: 840px) { .hero { min-height: auto; flex-direction: column; }.hero-side { align-self: flex-start; padding: 14px 0 0; border-left: 0; border-top: 1px solid rgba(207,231,217,.24); width: 100%; }.toolbar { align-items: flex-start; flex-direction: column; margin-top: 15px; }.filters { width: 100%; justify-content: flex-start; flex-wrap: wrap; }.search-box { flex: 1; width: auto; }.settings-grid { grid-template-columns: 1fr; }.token-card { grid-template-columns: 1fr; }.article-grid { grid-template-columns: 1fr; } } -@media (max-width: 540px) { .topbar { height: 66px; padding: 0 18px; }.nav-link { padding: 8px; font-size: 11px; }.shell { width: calc(100% - 28px); padding-top: 30px; }.hero { padding: 24px 22px 26px; border-radius: 20px; }.hero h1 { font-size: 39px; }.summary-grid { gap: 7px; }.stat-card { padding: 13px 12px; }.stat-card strong { font-size: 22px; }.stat-card small { font-size: 9px; }.report-card { padding: 20px 17px; }.report-top { flex-direction: column; gap: 9px; }.footer { width: calc(100% - 28px); }.page-heading h1 { font-size: 35px; }.token-card, .form-card, .recipients-card { padding: 19px; }.token-controls { flex-direction: column; } } +@media (max-width: 840px) { + .hero { min-height: auto; flex-direction: column; } + .hero-side { align-self: flex-start; width: 100%; padding: 14px 0 0; border-top: 1px solid rgba(207,231,217,.24); border-left: 0; } + .toolbar { align-items: flex-start; flex-direction: column; margin-top: 15px; } + .filters { width: 100%; justify-content: flex-start; flex-wrap: wrap; } + .search-box { flex: 1 1 260px; width: auto; } + .settings-grid { grid-template-columns: 1fr; } + .token-card { grid-template-columns: 1fr; } + .article-grid { grid-template-columns: 1fr; } +} + +@media (max-width: 540px) { + .topbar { height: 66px; padding: 0 14px; } + .brand { gap: 8px; min-width: 0; } + .brand-mark { flex: 0 0 auto; } + .brand strong { font-size: 12px; } + .brand small { font-size: 9px; letter-spacing: .06em; } + nav { flex: 0 0 auto; gap: 2px; } + .nav-link { min-height: 44px; padding: 11px 8px; font-size: 11px; } + + .shell { width: calc(100% - 24px); padding: 24px 0 52px; } + .hero { gap: 22px; padding: 23px 19px 25px; border-radius: 18px; } + .hero::after { right: -170px; } + .hero h1 { margin-top: 12px; font-size: clamp(34px, 11vw, 42px); } + .hero p { font-size: 13px; } + .today-date { font-size: 18px; } + + .toolbar { gap: 16px; padding: 18px 15px; } + .filters { display: grid; grid-template-columns: 1fr; gap: 10px; } + .search-box, .date-box, .filters select, .filters .button { width: 100%; min-height: 44px; } + .search-box { flex: none; } + .date-box input { width: 100%; } + .filters select, .search-box input, .date-box input { font-size: 16px; } + + .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 22px; } + .stat-card { min-width: 0; padding: 14px 12px; } + .stat-card:last-child { grid-column: 1 / -1; } + .stat-card strong { font-size: 23px; } + .stat-card small { font-size: 9px; } + + .report-card { padding: 19px 15px; } + .report-top { flex-direction: column; gap: 9px; } + .report-card h2 { font-size: 20px; overflow-wrap: anywhere; } + .article { padding: 17px 0; } + .article-meta { flex-wrap: wrap; row-gap: 4px; } + .article h3 { font-size: 16px; } + .article p { font-size: 13px; -webkit-line-clamp: 4; } + + .footer { align-items: flex-start; flex-direction: column; gap: 5px; width: calc(100% - 24px); } + .page-heading { margin-bottom: 23px; } + .page-heading h1 { font-size: 34px; } + .settings-shell { padding-top: 28px; } + .token-card, .form-card, .recipients-card { padding: 18px 15px; } + .token-controls { flex-direction: column; } + .token-controls input, .form-card input[type="email"], .form-card input[type="text"], .form-card input[type="time"] { min-height: 44px; font-size: 16px; } + .token-controls .button, .full-button { min-height: 44px; } + .form-row { grid-template-columns: 1fr; gap: 0; } + .module-option span { min-height: 38px; padding: 9px 10px; } + .recipient-item { align-items: flex-start; flex-direction: column; } + .recipient-item > div:first-child { min-width: 0; width: 100%; } + .recipient-email, .recipient-sub { overflow-wrap: anywhere; } + .recipient-actions { align-self: stretch; justify-content: flex-end; } + .icon-button { width: 44px; height: 44px; } +} + +@media (max-width: 360px) { + .brand small { display: none; } + .summary-grid { grid-template-columns: 1fr; } + .stat-card:last-child { grid-column: auto; } +}