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

+16 -1
View File
@@ -2,6 +2,19 @@
<html lang="th">
<head>
<meta charset="utf-8" />
<script>
/* ใส่คลาส fx-motion ก่อนวาดเฟรมแรก เพื่อไม่ให้เนื้อหากะพริบ
(JS ปิด หรือผู้ใช้ตั้ง reduced-motion → ไม่ใส่คลาส → เนื้อหาเห็นปกติทันที) */
(function () {
try {
if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
document.documentElement.classList.add("fx-motion");
}
} catch (e) {
/* ถ้า matchMedia ใช้ไม่ได้ ก็ไม่ต้องมีอนิเมชัน */
}
})();
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>โปรเจคอดิเรกของเรา</title>
<meta
@@ -9,7 +22,7 @@
content="รายชื่อโปรเจคอดิเรกของเรา เลือกโปรเจคที่อยากดูได้เลย ทุกเว็บใช้ SSL ฟรีต่ออายุอัตโนมัติ"
/>
<meta name="theme-color" content="#8A4722" />
<meta name="app-version" content="2026.11.19.1" />
<meta name="app-version" content="2026.11.19.2" />
<link rel="manifest" href="manifest.json" />
<link rel="icon" type="image/png" sizes="192x192" href="icons/icon-192.png" />
<link rel="icon" type="image/png" sizes="64x64" href="icons/favicon-64.png" />
@@ -19,9 +32,11 @@
<link rel="stylesheet" href="assets/css/theme.css" />
<link rel="stylesheet" href="assets/css/home.css" />
<link rel="stylesheet" href="assets/css/admin.css" />
<link rel="stylesheet" href="assets/css/motion.css" />
<script type="module" src="ui/app.js"></script>
</head>
<body>
<div class="scroll-progress" aria-hidden="true"><span class="scroll-progress__bar"></span></div>
<a class="skip-link" href="#main">ข้ามไปที่เนื้อหาหลัก</a>
<header class="site-header">