feat: improve campus bike discovery and add independent live preview
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
/* Discovery tools reuse the existing porcelain / charcoal theme. */
|
||||
.discovery-toolbar { position:absolute; z-index:130; top:12px; left:12px; width:min(400px, calc(100% - 140px)); padding:10px; border:1px solid var(--ui-line-strong); border-radius:16px; background:var(--ui-surface); box-shadow:var(--ui-shadow-md); font-size:13px; }
|
||||
.place-search-wrap { position:relative; }
|
||||
.place-search-row { display:flex; align-items:center; gap:6px; }
|
||||
.place-search-row input { min-width:0; flex:1; width:100%; background:var(--ui-surface-raised); color:var(--ui-ink); border:1px solid var(--ui-line-strong); border-radius:9px; padding:10px; font-size:14px; }
|
||||
.discovery-toolbar button,.discovery-toolbar summary,.nearby-panel button,.location-status button,.theme-options button,.order-filters button,.order-load-more,.sub-rule button { min-height:44px; border:1px solid var(--ui-line-strong); border-radius:9px; padding:8px 10px; background:var(--ui-surface-raised); color:var(--ui-ink); font:inherit; cursor:pointer; }
|
||||
.discovery-actions { display:flex; gap:6px; align-items:center; margin-top:6px; }
|
||||
.discovery-actions > button { flex:1; white-space:nowrap; }
|
||||
.discovery-actions details > summary { list-style:none; display:flex; align-items:center; justify-content:center; }
|
||||
.discovery-actions details > summary::-webkit-details-marker { display:none; }
|
||||
.discovery-filter-fields { position:absolute; left:0; right:0; top:100%; margin-top:7px; padding:14px; background:var(--ui-surface); border:1px solid var(--ui-line-strong); border-radius:14px; box-shadow:var(--ui-shadow-md); display:grid; grid-template-columns:1fr 1fr; gap:12px; }
|
||||
.discovery-filter-fields label { display:flex; flex-direction:column; gap:7px; color:var(--ui-muted); }
|
||||
.discovery-filter-fields .checkbox-label { flex-direction:row; align-items:center; grid-column:1/-1; color:var(--ui-ink); min-height:36px; }
|
||||
.discovery-filter-fields select,.nearby-sort select,.order-filters input,.order-filters select { min-height:44px; width:100%; min-width:0; background:var(--ui-surface-raised); color:var(--ui-ink); border:1px solid var(--ui-line-strong); border-radius:8px; padding:7px; font:inherit; }
|
||||
.discovery-filter-fields input[type=checkbox] { width:20px; height:20px; }
|
||||
.discovery-origin { width:100%; text-align:left; border:0!important; background:transparent!important; color:var(--ui-muted)!important; padding:7px 2px 0!important; min-height:30px!important; font-size:12px!important; }
|
||||
.place-results { position:absolute; z-index:3; top:calc(100% + 6px); width:100%; max-height:280px; overflow-y:auto; border-radius:12px; border:1px solid var(--ui-line-strong); background:var(--ui-surface); box-shadow:var(--ui-shadow-md); }
|
||||
.place-results button { display:flex; justify-content:space-between; align-items:center; width:100%; border:0; border-radius:0; border-bottom:1px solid var(--ui-line); background:transparent; text-align:left; gap:12px; }
|
||||
.place-results small,.discovery-muted { color:var(--ui-muted); font-size:12px; }
|
||||
.favorite-places { display:flex; gap:6px; overflow-x:auto; scrollbar-width:thin; padding-top:6px; }
|
||||
.favorite-place { display:flex; flex:none; border:1px solid var(--ui-line); border-radius:9px; overflow:hidden; }
|
||||
.favorite-place button { border:0; border-radius:0; background:transparent; white-space:nowrap; min-height:36px; }
|
||||
.favorite-place button:last-child { min-width:36px; padding:6px; color:var(--ui-muted); }
|
||||
.nearby-panel { position:absolute; z-index:155; left:12px; bottom:12px; width:min(400px,calc(100% - 24px)); max-height:52%; display:flex; flex-direction:column; padding:14px; border:1px solid var(--ui-line-strong); border-radius:18px; background:var(--ui-surface); box-shadow:var(--ui-shadow-lg); font-size:13px; }
|
||||
[hidden] { display:none!important; }
|
||||
.nearby-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
|
||||
.nearby-heading h2 { font-size:17px; letter-spacing:-.3px; }
|
||||
.nearby-heading button { min-width:44px; }
|
||||
.nearby-summary { color:var(--ui-muted); padding:5px 0 10px; font-size:12px; line-height:1.6; }
|
||||
.nearby-sort { display:flex; align-items:center; gap:10px; padding-bottom:8px; }
|
||||
.nearby-sort select { width:auto; flex:1; }
|
||||
.nearby-list { overflow-y:auto; min-height:80px; overscroll-behavior:contain; }
|
||||
.nearby-row { display:flex; justify-content:space-between; width:100%; text-align:left; gap:12px; background:transparent!important; border-width:0 0 1px!important; border-radius:0!important; padding:12px 2px!important; }
|
||||
.nearby-row strong { font-size:15px; font-variant-numeric:tabular-nums; }
|
||||
.nearby-row-meta { display:block; margin-top:5px; color:var(--ui-muted); font-size:12px; }
|
||||
.nearby-row-end { display:flex; flex-direction:column; align-items:flex-end; gap:5px; color:var(--ui-muted); font-size:12px; }
|
||||
.vehicle-status { color:var(--ui-ink); font-weight:600; }
|
||||
.vehicle-status.available { color:var(--discovery-available,#237947); }
|
||||
.vehicle-status.lowbattery,.vehicle-status.locked { color:var(--discovery-warning,#9a5a08); }
|
||||
.discovery-empty { padding:15px 4px; line-height:1.8; color:var(--ui-muted); }
|
||||
.discovery-empty strong { color:var(--ui-ink); }
|
||||
.discovery-empty button { margin-top:10px; }
|
||||
.location-status { position:absolute; z-index:125; bottom:14px; left:50%; transform:translateX(-50%); width:min(400px,calc(100% - 130px)); padding:10px 12px; border:1px solid var(--ui-line-strong); border-radius:12px; background:var(--ui-surface); color:var(--ui-ink); box-shadow:var(--ui-shadow-sm); font-size:12px; line-height:1.6; }
|
||||
.location-status-actions { display:flex; gap:8px; margin-top:5px; }
|
||||
.stats-card { top:auto!important; bottom:14px; }
|
||||
.legend summary { cursor:pointer; min-height:32px; font-size:12px; color:var(--ui-muted); }
|
||||
.legend:not([open]) .legend-item { display:none; }
|
||||
.theme-options { display:flex; gap:8px; padding:12px 0; }
|
||||
.theme-options button { flex:1; }
|
||||
.theme-options button[aria-pressed=true] { background:var(--ui-solid); color:var(--ui-on-solid); }
|
||||
.order-filters { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:10px 0 14px; }
|
||||
.order-filters label { display:flex; flex-direction:column; gap:6px; color:var(--ui-muted); font-size:12px; min-width:0; }
|
||||
.order-filter-actions { display:flex; gap:8px; grid-column:1/-1; }
|
||||
.order-load-more { margin-top:12px; }
|
||||
.sub-rule { border-bottom:1px solid var(--ui-line); padding:12px 0; font-size:13px; line-height:1.7; }
|
||||
.sub-rule-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
|
||||
.sub-rule-meta,.sub-rule-result { color:var(--ui-muted); font-size:12px; margin-top:4px; }
|
||||
.sub-rule-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
|
||||
.sub-rule-actions button { min-height:40px; padding:6px 12px; }
|
||||
.sub-rule-actions .danger { color:var(--danger); }
|
||||
.sub-editor-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
|
||||
.sub-editor-heading button { min-height:40px; padding:6px 10px; border:1px solid var(--ui-line); border-radius:8px; background:var(--ui-surface); color:var(--ui-ink); }
|
||||
.preview-notice { display:flex; align-items:center; justify-content:space-between; padding:6px 16px; gap:12px; background:#f6edd6; color:#624608; font-size:12px; line-height:1.6; z-index:170; flex-shrink:0; }
|
||||
.preview-notice button,.preview-login { border:1px solid currentColor; border-radius:8px; padding:7px 12px; color:inherit; background:transparent; min-height:40px; cursor:pointer; }
|
||||
.preview-login { display:block; width:100%; margin-top:12px; color:var(--ui-ink); border-color:var(--ui-line-strong); }
|
||||
.preview-notice a { color:inherit; }
|
||||
.discovery-welcome { display:flex; gap:12px; padding:14px; margin:10px 0; background:var(--ui-surface-raised); border-radius:12px; color:var(--ui-muted); font-size:13px; line-height:1.7; }
|
||||
.discovery-welcome strong { color:var(--ui-ink); }
|
||||
.bike-card:not(.show) { visibility:hidden; pointer-events:none; }
|
||||
.bike-card.show { visibility:visible; }
|
||||
.auth-modal:not(.show),.qr-modal:not(.show),.unlock-confirm-modal:not(.show),.return-confirm-modal:not(.show),.token-expired-modal:not(.show),.lost-modal:not(.show),.return-modal:not(.show),.bell-modal:not(.show) { visibility:hidden; }
|
||||
html,body { overflow:clip; }
|
||||
body { animation:none!important; }
|
||||
.locate-btn.locate-fab { min-width:44px; min-height:44px; }
|
||||
.auth-close,.bike-card-close,.qr-close { min-width:44px; min-height:44px; }
|
||||
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
|
||||
button:disabled { cursor:wait; opacity:.65; }
|
||||
@media (max-width:768px) {
|
||||
.discovery-toolbar { width:calc(100% - 24px); padding:8px; }
|
||||
.legend { top:auto!important; bottom:74px!important; right:12px!important; padding:7px 10px!important; }
|
||||
.legend summary { min-height:30px; }
|
||||
.stats-card { bottom:12px; left:12px!important; }
|
||||
.location-status { bottom:65px; width:calc(100% - 24px); }
|
||||
.nearby-panel { max-height:56%; }
|
||||
.locate-btn.locate-fab { width:auto; height:44px; padding:8px 12px; bottom:92px; right:12px; }
|
||||
.locate-fab-label { display:inline!important; font-size:12px; }
|
||||
.favorite-places { max-height:46px; }
|
||||
.preview-notice { padding:5px 12px; }
|
||||
.preview-notice button { min-height:32px; padding:4px 8px; }
|
||||
}
|
||||
@media (prefers-reduced-motion:reduce) { .nearby-panel,.discovery-toolbar { transition:none; } }
|
||||
|
||||
.battery-unknown .battery-unit { display:none; }
|
||||
body:has(#nearby-panel:not([hidden])) .locate-fab { display:none; }
|
||||
.preview-notice > span { flex:1; }
|
||||
@media(max-width:768px){ .preview-notice { flex-wrap:wrap; gap:4px 8px; } .preview-notice > span { flex-basis:100%; } .preview-notice button { min-height:32px; } }
|
||||
@@ -0,0 +1,114 @@
|
||||
/* Explicit light / dark modes, selected before first paint. */
|
||||
:root[data-theme="light"] {
|
||||
--bg-primary: #ffffff;
|
||||
--bg-secondary: #f5f5f7;
|
||||
--bg-card: #ffffff;
|
||||
--text-primary: #1d1d1f;
|
||||
--text-secondary: #6e6e73;
|
||||
--text-tertiary: #86868b;
|
||||
--border-color: #e5e5ea;
|
||||
--accent-color: #0071e3;
|
||||
--accent-hover: #0077ed;
|
||||
--accent-soft: rgba(0, 113, 227, 0.10);
|
||||
--success: #34c759;
|
||||
--success-press: #2fb950;
|
||||
--warning: #ff9f0a;
|
||||
--danger: #ff3b30;
|
||||
--error-color: #ff3b30;
|
||||
--overlay: rgba(0, 0, 0, 0.45);
|
||||
--shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
|
||||
--shadow-md: 0 4px 20px rgba(0,0,0,0.12);
|
||||
--shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
|
||||
--shadow-up: 0 -4px 20px rgba(0,0,0,0.08);
|
||||
--radius-sm: 8px;
|
||||
--radius-md: 12px;
|
||||
--radius-lg: 16px;
|
||||
--radius-xl: 20px;
|
||||
--transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--ease-spring: cubic-bezier(0.34, 1.3, 0.5, 1);
|
||||
--ui-canvas: #f6f6f4;
|
||||
--ui-surface: #fbfbfa;
|
||||
--ui-surface-raised: #f0f0ee;
|
||||
--ui-ink: #171719;
|
||||
--ui-muted: #68686f;
|
||||
--ui-faint: #929299;
|
||||
--ui-line: rgba(23, 23, 25, .09);
|
||||
--ui-line-strong: rgba(23, 23, 25, .15);
|
||||
--ui-solid: #1c1c1f;
|
||||
--ui-on-solid: #f8f8f6;
|
||||
--ui-acrylic: color-mix(in srgb, var(--ui-surface) 68%, transparent);
|
||||
--ui-acrylic-soft: color-mix(in srgb, var(--ui-surface) 46%, transparent);
|
||||
--ui-header-acrylic: rgba(251, 251, 250, .64);
|
||||
--ui-overlay: rgba(12, 12, 14, .52);
|
||||
--ui-focus: rgba(23, 23, 25, .24);
|
||||
--ui-shadow-sm: 0 1px 2px rgba(18, 18, 20, .04), 0 8px 24px rgba(18, 18, 20, .05);
|
||||
--ui-shadow-md: 0 18px 52px rgba(18, 18, 20, .11);
|
||||
--ui-shadow-lg: 0 32px 90px rgba(18, 18, 20, .16);
|
||||
--ui-r-sm: 8px;
|
||||
--ui-r-md: 12px;
|
||||
--ui-r-lg: 16px;
|
||||
--ui-r-xl: 20px;
|
||||
--ui-r-2xl: 24px;
|
||||
--ui-ease: cubic-bezier(.16, 1, .3, 1);
|
||||
--ui-fast: 160ms;
|
||||
--ui-normal: 280ms;
|
||||
--discovery-available: #237947;
|
||||
--discovery-warning: #915807;
|
||||
}
|
||||
:root[data-theme="dark"] {
|
||||
--bg-primary: #000000;
|
||||
--bg-secondary: #1c1c1e;
|
||||
--bg-card: #2c2c2e;
|
||||
--text-primary: #f5f5f7;
|
||||
--text-secondary: #b0b0b7;
|
||||
--text-tertiary: #636366;
|
||||
--border-color: #38383a;
|
||||
--accent-color: #0a84ff;
|
||||
--accent-hover: #409cff;
|
||||
--accent-soft: rgba(10, 132, 255, 0.16);
|
||||
--success: #30d158;
|
||||
--success-press: #28bd4d;
|
||||
--warning: #ff9f0a;
|
||||
--danger: #ff453a;
|
||||
--error-color: #ff453a;
|
||||
--overlay: rgba(0, 0, 0, 0.6);
|
||||
--shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
|
||||
--shadow-md: 0 4px 20px rgba(0,0,0,0.4);
|
||||
--shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
|
||||
--shadow-up: 0 -4px 20px rgba(0,0,0,0.4);
|
||||
--radius-sm: 8px;
|
||||
--radius-md: 12px;
|
||||
--radius-lg: 16px;
|
||||
--radius-xl: 20px;
|
||||
--transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--ease-spring: cubic-bezier(0.34, 1.3, 0.5, 1);
|
||||
--ui-canvas: #101011;
|
||||
--ui-surface: #18181a;
|
||||
--ui-surface-raised: #222225;
|
||||
--ui-ink: #f1f1ef;
|
||||
--ui-muted: #b0b0b7;
|
||||
--ui-faint: #77777f;
|
||||
--ui-line: rgba(241, 241, 239, .09);
|
||||
--ui-line-strong: rgba(241, 241, 239, .16);
|
||||
--ui-solid: #eeeeec;
|
||||
--ui-on-solid: #151517;
|
||||
--ui-acrylic: color-mix(in srgb, var(--ui-surface) 68%, transparent);
|
||||
--ui-acrylic-soft: color-mix(in srgb, var(--ui-surface) 46%, transparent);
|
||||
--ui-header-acrylic: rgba(238, 238, 236, .07);
|
||||
--ui-overlay: rgba(3, 3, 4, .68);
|
||||
--ui-focus: rgba(241, 241, 239, .28);
|
||||
--ui-shadow-sm: 0 1px 2px rgba(2, 2, 3, .22), 0 10px 28px rgba(2, 2, 3, .18);
|
||||
--ui-shadow-md: 0 20px 56px rgba(2, 2, 3, .32);
|
||||
--ui-shadow-lg: 0 36px 100px rgba(2, 2, 3, .46);
|
||||
--ui-r-sm: 8px;
|
||||
--ui-r-md: 12px;
|
||||
--ui-r-lg: 16px;
|
||||
--ui-r-xl: 20px;
|
||||
--ui-r-2xl: 24px;
|
||||
--ui-ease: cubic-bezier(.16, 1, .3, 1);
|
||||
--ui-fast: 160ms;
|
||||
--ui-normal: 280ms;
|
||||
--discovery-available: #78d99e;
|
||||
--discovery-warning: #f3c57b;
|
||||
}
|
||||
:root[data-theme="dark"] .preview-notice { background:#352d1d; color:#f3cf85; }
|
||||
Reference in New Issue
Block a user