feat(motion): scroll-reveal and cinematic entrance animations

- motion.css / motion.js: reveal-on-scroll (IntersectionObserver), hero word-by-word
  entrance, drifting warm orbs, sheen on primary CTA, section underline sweep,
  scroll progress bar, count-up numbers
- content never hidden unless <html>.fx-motion: JS off or reduced-motion shows everything
- hover lift moved to the translate property so reveal keyframes cannot override it
- re-call initReveal after grid re-render and admin re-mount; SW precache + VERSION bump
- docs: DESIGN.md §9 motion contract, AGENTS.md pitfalls
This commit is contained in:
Bkk1234 committed 2026-11-19 01:10:27 +07:00
1 parent c00bc62272
commit 2950295690
10 files changed
+503 -12

No files matched your search

+1
View File
@@ -77,3 +77,4 @@ curl -s localhost:8090/api/projects | head -5
- `PUT api/projects` เขียนทับทั้งไฟล์: ส่งข้อมูลที่ normalize แล้วเท่านั้น ไม่งั้นคีย์จะหาย
- กดเผยแพร่ซ้ำโดยไม่แก้อะไรจะได้ commit ใหม่ (เพราะ `updated_at` เปลี่ยน) — ปกติ ไม่ใช่บั๊ก
- ถ้าเปิดเว็บด้วย `python -m http.server` API จะ 404 → หน้าหลังบ้านจะขึ้นสถานะ “เปิดแบบไฟล์นิ่ง” และใช้ดาวน์โหลด JSON แทน
- **Motion**: ทุกครั้งที่สร้าง DOM ใหม่ (กรองคำค้นหา, `mount()` ของ admin) ต้องเรียก `initReveal(...)` ใหม่ ไม่งั้น element ค้าง `opacity: 0`; hover ยกการ์ดต้องใช้ `translate` ไม่ใช่ `transform`; ถ้าวัดผลในแท็บเบื้องหลัง IO/rAF จะไม่ทำงาน ให้ `Page.bringToFront` ก่อนสรุปว่าโค้ดพัง (รายละเอียดใน `DESIGN.md` §9)