Add new QR card layout documentation and updates

- Introduced new QR card layout as of October 9, 2026.
- Updated `PassengerQr.tsx` and QR styles, including camera/phone icons.
- Confirmed successful TypeScript and Vite builds; tests for QR decoding passed.
- Detailed specifications for various display resolutions and configurations.
- Included animations and accessibility considerations for reduced motion preferences.
- Added example images for visual reference.
This commit is contained in:
2026-10-09 03:21:59 +03:00
parent bc95d0c122
commit 1e3a911055
9 changed files with 107 additions and 19 deletions

View File

@@ -136,14 +136,83 @@ h1 { font-size: clamp(30px, 3.8vw, 76px); letter-spacing: -.05em; line-height: 1
.weather-attribution { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: clamp(12px, .8vw, 17px); color: var(--muted); }
.weather-attribution a { color: inherit; text-underline-offset: 3px; }
.weather-now-label, .weather-hour-rain { display: none; }
.qr-info { align-items: center; text-align: center; }
.qr-info h3 { width: 100%; }
.qr-content { flex: 1 1 0; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.qr-paper { display: block; flex-shrink: 0; padding: 8px; border: 1px solid var(--outline); border-radius: 24px; background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.passenger-qr { width: clamp(108px, calc(100cqh - 175px), 248px); max-width: 100%; aspect-ratio: 1; }
.qr-description { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-description p { font-size: clamp(16px, 1.25vw, 24px); line-height: 1.3; margin: 0; }
.passenger-link { display: flex; align-items: center; gap: 9px; color: var(--accent); text-decoration: none; font-size: clamp(17px, 1.4vw, 27px); }
.qr-info { text-align: left; container-name: qr-card; }
.qr-content { flex: 1 1 0; min-height: 0; width: 100%; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(16px, 2cqw, 36px); }
.qr-stage { position: relative; isolation: isolate; min-width: 0; min-height: 0; display: grid; place-items: center; padding: clamp(16px, 2cqw, 32px); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 24px; background: color-mix(in srgb, var(--accent) 8%, var(--background)); overflow: hidden; container-type: size; }
.qr-route-backdrop { position: absolute; inset: 0; overflow: hidden; z-index: -1; }
.qr-route-art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; color: var(--accent); opacity: .22; transform: rotate(-12deg) scale(1.3); }
.qr-route-art path { fill: none; stroke: currentColor; stroke-width: 3; stroke-dasharray: 3 12; stroke-linecap: round; animation: qr-route-flow 12s linear infinite; }
.qr-route-art circle { fill: var(--background); stroke: currentColor; stroke-width: 3; }
.qr-stage-corner { position: absolute; right: 14px; top: 14px; color: var(--accent); }
.qr-paper { display: block; position: relative; z-index: 1; width: min(100cqw, 100cqh, 440px); aspect-ratio: 1; flex-shrink: 0; padding: 8px; border: 1px solid var(--outline); border-radius: 24px; background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.passenger-qr { width: 100%; height: 100%; aspect-ratio: 1; }
.qr-description { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: clamp(8px, 1cqw, 18px) 0; }
.qr-eyebrow { display: block; color: var(--accent); font-size: clamp(12px, 1.4cqw, 20px); letter-spacing: .12em; margin-bottom: 12px; }
.qr-stop { margin: 0; font-size: clamp(26px, 4.3cqw, 70px); line-height: 1.08; letter-spacing: -.04em; font-weight: 600; overflow-wrap: anywhere; }
.qr-info .qr-summary { font-size: clamp(18px, 2.2cqw, 32px); line-height: 1.3; margin: 14px 0 0; }
.qr-steps { margin: 0; padding: 0; display: grid; gap: clamp(12px, 1.5cqw, 22px); list-style: none; }
.qr-steps li { display: flex; align-items: center; gap: 14px; }
.qr-step-icon { display: grid; place-items: center; width: clamp(42px, 5cqw, 68px); height: clamp(42px, 5cqw, 68px); color: var(--accent); border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--accent) 5%, var(--background)); flex-shrink: 0; }
.qr-steps li > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 9px; }
.qr-step-number { font-size: clamp(12px, 1.4cqw, 20px); color: var(--accent); align-self: center; }
.qr-steps strong { font-size: clamp(17px, 2cqw, 29px); font-weight: 550; line-height: 1.15; }
.qr-step-detail { grid-column: 2; color: var(--muted); font-size: clamp(13px, 1.5cqw, 21px); }
.passenger-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--accent); text-decoration: none; font-size: clamp(18px, 2.1cqw, 30px); font-weight: 550; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--background)); border-radius: 16px; padding: 14px 18px; }
.passenger-link span { min-width: 0; overflow-wrap: anywhere; }
@keyframes qr-route-flow { to { stroke-dashoffset: -150; } }
@container qr-card (max-width: 600px) {
.qr-content { display: flex; flex-direction: column; gap: 12px; }
.qr-stage { flex: 1 1 0; min-height: 0; padding: 12px; border-radius: 20px; }
.qr-stage-corner { display: none; }
.qr-paper { max-width: 100%; border-radius: 20px; padding: 6px; }
.qr-description { padding: 0; gap: 12px; flex-shrink: 0; }
.qr-eyebrow { font-size: 11px; margin-bottom: 6px; }
.qr-stop { font-size: clamp(22px, 6cqw, 30px); }
.qr-info .qr-summary, .qr-step-detail { display: none; }
.qr-steps { gap: 8px; }
.qr-steps li { gap: 9px; }
.qr-step-icon { width: 30px; height: 30px; border: 0; border-radius: 9px; }
.qr-step-icon svg { width: 24px; height: 24px; }
.qr-steps strong { font-size: 15px; }
.qr-step-number { font-size: 11px; }
.passenger-link { font-size: 18px; padding: 10px 12px; border-radius: 12px; }
}
@container qr-card (min-width: 601px) and (max-height: 420px) {
.qr-description { gap: 12px; padding: 0; }
.qr-eyebrow, .qr-step-detail { display: none; }
.qr-stop { font-size: clamp(26px, 3.5cqw, 40px); }
.qr-info .qr-summary { font-size: 18px; margin-top: 10px; }
.qr-steps { gap: 10px; }
.qr-step-icon { width: 42px; height: 42px; }
.qr-steps strong { font-size: 20px; }
.passenger-link { font-size: 22px; padding: 10px 14px; }
}
@container qr-card (min-width: 601px) and (max-height: 320px) {
.qr-description { gap: 10px; padding: 0; }
.qr-eyebrow, .qr-info .qr-summary, .qr-step-detail { display: none; }
.qr-stop { font-size: clamp(26px, 3.5cqw, 40px); }
.qr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qr-steps li { gap: 8px; }
.qr-step-icon { width: 36px; height: 36px; border: 0; }
.qr-step-icon svg { width: 28px; height: 28px; }
.qr-steps li > div { display: flex; flex-direction: column; gap: 3px; }
.qr-steps strong { font-size: 17px; }
.qr-step-number { align-self: flex-start; font-size: 12px; }
.passenger-link { font-size: 22px; padding: 10px 14px; }
}
@container qr-card (max-width: 600px) and (max-height: 380px) {
.qr-content { display: flex; flex-direction: column; }
.qr-stage { padding: 10px; }
.qr-paper { padding: 5px; border-radius: 16px; }
.qr-intro, .qr-steps li:nth-child(2) { display: none; }
.qr-description { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.qr-step-number { display: none; }
.qr-steps li > div { display: block; }
.qr-step-icon { display: none; }
.qr-steps strong { font-size: 14px; }
.passenger-link { font-size: 14px; padding: 8px; gap: 4px; }
.passenger-link svg { width: 18px; height: 18px; }
}
.info-screen[data-compact='true'] .info-grid { grid-template-columns: minmax(0, 1fr); }
.info-screen[data-compact='true'] .information-tabs { display: flex; }
.info-screen[data-compact='true'] .info-card:not([data-active='true']) { display: none; }
@@ -280,10 +349,6 @@ h1 { font-size: clamp(30px, 3.8vw, 76px); letter-spacing: -.05em; line-height: 1
.info-screen[data-compact='true'] .weather-hours strong { font-size: clamp(26px, 3.5cqw, 48px); }
.info-screen[data-compact='true'] .weather-hour-rain { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 4px; font-size: clamp(12px, 1.5cqw, 20px); color: var(--secondary); }
.info-screen[data-compact='true'] .precipitation-chance { text-align: center; font-size: 17px; }
.info-screen[data-compact='true'] .qr-content { flex-direction: row; gap: 40px; }
.info-screen[data-compact='true'] .passenger-qr { width: clamp(110px, calc(100cqh - 85px), 230px); }
.info-screen[data-compact='true'] .qr-description { align-items: flex-start; text-align: left; }
.info-screen[data-compact='true'] .qr-description p { font-size: clamp(22px, 2.5vw, 32px); }
}
@media (max-width: 1100px) {
.brand-word { display: none; }
@@ -433,9 +498,6 @@ h1 { font-size: clamp(30px, 3.8vw, 76px); letter-spacing: -.05em; line-height: 1
.precipitation-chance { margin-top: 8px; }
.weather-attribution { padding-top: 8px; font-size: 10px; }
.weather-info { padding: 16px; }
.passenger-qr { width: clamp(108px, calc(100cqh - 130px), 190px); }
.qr-content { gap: 14px; }
.qr-description { gap: 9px; }
}
::view-transition { pointer-events: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; }
@@ -446,6 +508,7 @@ h1 { font-size: clamp(30px, 3.8vw, 76px); letter-spacing: -.05em; line-height: 1
.destination-old { visibility: hidden; }
.destination-current { transform: none !important; }
.route-track { animation: none !important; }
.qr-route-art path { animation: none !important; }
.route-lane { transform: none; overflow: auto; }
.route-group:nth-child(2) { display: none; }
}