feat(app): JSON-driven theaters, admin CRUD with login, hidden flag, image upload, PWA
This commit is contained in:
1 parent
44823a5b90
commit
5fdd78acc6
22 files changed
+2668
-108
No files matched your search
+21
-1
@@ -9,7 +9,6 @@ that direction: once filled in, read and preserve them on every build; while
|
||||
they are still empty, the first substantial UI pass fills them in.
|
||||
|
||||
## Non-negotiable: impress by default
|
||||
|
||||
When this app is still a blank canvas, every app generated from this template
|
||||
must look **spectacular on first load**, even when the build prompt gives no
|
||||
design direction. "Looks like a clean, intentional product" is the floor, not
|
||||
@@ -65,3 +64,24 @@ Surface And Page Boundaries so the surfaces are wired correctly.
|
||||
- Density comes from data, not prose. Subtract explanatory chrome; never
|
||||
subtract the visual craft that makes the app impressive.
|
||||
- Compare against real products in the chosen mode, not against the starter.
|
||||
|
||||
## AlterFlixHub — ของจริงที่ใช้อยู่ (อัปเดต 2026-10-27)
|
||||
|
||||
**แบรนด์:** แดง #8F0808, พื้นดำ #0D0D0D, การ์ด #1B1B1B, เส้นขอบ #2A2A2A/#332B2B
|
||||
โลโก้ฟอนต์ Jersey 15 (มีเฉพาะชื่อแบรนด์) · เนื้อหาไทยใช้ Inter + Noto Sans Thai
|
||||
|
||||
**หน้าเว็บ**
|
||||
- `/` หน้าแรก: hero + ช่องค้นหา + การ์ดโรงหนัง (การ์ดมีรูป = รูปปก + gradient ทับให้ตัวหนังสืออ่านออก)
|
||||
- `/cinema/:slug` รายละเอียด: รูปใหญ่ + ป้ายหมวด + ข้อมูลเดินทาง/ติดต่อ/สิ่งอำนวยความสะดวก + "โรงหนังอิสระอื่นๆ"
|
||||
- `/admin` หลังบ้าน (ต้องล็อกอินที่ `/admin/login`): ฟอร์มแก้ข้อมูล, อัปโหลดรูป, ปุ่มซ่อน/แสดง, ลบโรง
|
||||
- `/single` เก็บหน้าเวอร์ชันเดิม (single-page + detail sheet) ไว้เทียบ
|
||||
|
||||
**สถานะการซ่อน:** `hidden: true` ใน JSON = ไม่ขึ้นหน้าแรก/ตัวนับ แต่เปิดด้วย URL ตรงได้ และขึ้นป้าย "ซ่อนจากหน้าแรก" ที่หน้ารายละเอียด
|
||||
|
||||
**รูปโรงหนัง:** เก็บไฟล์จริงที่ `public/images/theaters/` ผ่าน `/admin/image` (JPG/PNG/WebP/AVIF ≤ 6 MB)
|
||||
ใช้ `object-cover` + กันที่ด้วย aspect ratio (การ์ด 3:4 / รูปใหญ่ 269:202) → ไม่เกิด layout shift
|
||||
รูปการ์ดใช้ `loading="lazy"` (อยู่ใต้ fold) รูปใหญ่หน้ารายละเอียดโหลดทันที
|
||||
|
||||
**คอนทราสต์ที่วัดแล้ว (WCAG)**: #B3B3B3/#111 = 8.9:1 · #e0b357/#2a1f00 = 8.4:1 · #ff9a9a/#111 = 9.4:1 · ขาว/#8F0808 = 9.1:1 — ผ่าน AA ทั้งหมด
|
||||
|
||||
**PWA:** `public/sw.js` (network-first หน้าเว็บ + `/data/`, cache-first assets, ข้าม `/_agent-native/`), bump `CACHE_VERSION` เมื่อแก้ asset, manifest ผูก `/icon-192.svg` + `/icon-512.svg`
|
||||
Reference in new issue
Block a user