พอร์ต UI จาก web-at-transit-mock เข้า Next.js + data sync เข้า Postgres/SeaweedFS
- 8 หน้า (home/stops/routes/stop/check/blog/about/credits) แปลง partials → React component ตรง mock
- ตรรกะพอร์ตเป็น src/lib/ui/*.ts (mount()) + runtime/PageRuntime
- CSS: base + pages/*.css import ต่อ route (คงลำดับ cascade ของ mock)
- asset/content: public/{image,resource/data,content,locales,vendor}
- แก้ path รูปไทล์พาร์ทเนอร์ (.image → /image) + fallback absolute
- ลบ UI เดิมที่ไม่ตรง mock (expanded/stops details/old components/globals.css)
- script/sync_data_to_postgres.mjs + sync_images_to_storage.mjs (dry-run/--apply, backup)
- docs/UI-PORT.md + DESIGN.md + README
This commit is contained in:
1 parent
24187fc3b7
commit
138a3d15d8
300 files changed
+20213
-1978
No files matched your search
@@ -0,0 +1,119 @@
|
||||
/* Ported from checkSchedule.html <style> block */
|
||||
/* ============================================================
|
||||
checkSchedule (#/check) — redesign ให้ใช้ภาษาดีไซน์เดียวกับหน้าแรก
|
||||
------------------------------------------------------------
|
||||
hero / selector / summary / zone ใช้ class จาก index.html shell
|
||||
(ประกาศใน <head> แล้ว) → ไม่ต้องนิยามใหม่
|
||||
เฉพาะส่วนเฉพาะหน้า (lead + schedule cards) ค่อยเติมตรงนี้
|
||||
============================================================ */
|
||||
|
||||
.mu-hero-lead {
|
||||
margin: 14px auto 0;
|
||||
max-width: 640px;
|
||||
color: #5b3b71;
|
||||
font-size: .95rem;
|
||||
}
|
||||
|
||||
.mu-summary-grid { gap: 14px; }
|
||||
|
||||
/* --- ตารางเวลา: การ์ดสไตล์ index (gradient header + เนื้อขาว) --- */
|
||||
.mu-schedule-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
}
|
||||
.mu-stop-card {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 14px rgba(20, 40, 90, .06);
|
||||
transition: transform .15s ease, box-shadow .15s ease;
|
||||
}
|
||||
.mu-stop-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 10px 24px rgba(20, 40, 90, .1);
|
||||
}
|
||||
.mu-stop-card summary { list-style: none; cursor: pointer; }
|
||||
.mu-stop-card summary::-webkit-details-marker { display: none; }
|
||||
|
||||
/* header การ์ด = gradient block ตามโทนสีเดียวกับ index zone tints */
|
||||
.mu-stop-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 14px 16px;
|
||||
color: #fff;
|
||||
}
|
||||
.mu-stop-head.tone-purple { background: linear-gradient(135deg, #7a4cc0 0%, #b07ce0 100%); }
|
||||
.mu-stop-head.tone-sky { background: linear-gradient(135deg, #3071b8 0%, #6ea7e8 100%); }
|
||||
.mu-stop-head.tone-mint { background: linear-gradient(135deg, #1f8765 0%, #51c39c 100%); }
|
||||
.mu-stop-head.tone-pink { background: linear-gradient(135deg, #bb3a78 0%, #f08bb9 100%); }
|
||||
|
||||
.mu-stop-kind {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 5px 12px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, .24);
|
||||
font-size: .74rem;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.mu-stop-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
||||
.mu-stop-title strong { font-size: 1rem; font-weight: 800; }
|
||||
.mu-stop-title small { font-size: .78rem; opacity: .85; }
|
||||
.mu-stop-chevron { font-size: 1.2rem; opacity: .9; transition: transform .2s ease; }
|
||||
.mu-stop-card[open] > summary .mu-stop-chevron { transform: rotate(180deg); }
|
||||
|
||||
.mu-stop-body { padding: 16px; }
|
||||
.mu-stop-sub { font-weight: 700; color: #1f2a44; margin: 0 0 10px; font-size: .9rem; }
|
||||
.mu-direction-tag {
|
||||
background: #7a4cc0;
|
||||
color: #fff;
|
||||
border-radius: 999px;
|
||||
padding: 3px 10px;
|
||||
font-size: .72rem;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.mu-time-grid { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.mu-time-chip {
|
||||
padding: 6px 12px;
|
||||
border-radius: 10px;
|
||||
background: #f1f4fb;
|
||||
color: #2b2f42;
|
||||
font-weight: 700;
|
||||
font-size: .85rem;
|
||||
border: 1px solid #e6eaf3;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.mu-time-chip.next {
|
||||
background: linear-gradient(135deg, #a855f7, #7c3aed);
|
||||
color: #fff;
|
||||
border-color: transparent;
|
||||
box-shadow: 0 4px 10px rgba(124, 58, 237, .25);
|
||||
}
|
||||
|
||||
.mu-schedule-note {
|
||||
color: #9a3b6e;
|
||||
font-size: .82rem;
|
||||
margin: 12px 0 0;
|
||||
padding: 8px 12px;
|
||||
background: #fff5f9;
|
||||
border-left: 3px solid #bb3a78;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
.mu-inline-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
|
||||
|
||||
.mu-schedule { padding: 4px 0 48px; }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.mu-summary-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
|
||||
}
|
||||
Reference in new issue
Block a user