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:
1 parent
c00bc62272
commit
2950295690
10 files changed
+503
-12
No files matched your search
+6
-3
@@ -1,6 +1,7 @@
|
||||
/* views/admin.js — หลังบ้าน: แก้ชื่อ/คำอธิบาย/ลิงก์ แล้วเผยแพร่หรือดาวน์โหลด JSON */
|
||||
|
||||
import { escapeHtml, icon, isEmail, normalizeUrl, toast, debounce } from "../ui.js";
|
||||
import { initReveal } from "../motion.js";
|
||||
import {
|
||||
clearDraft,
|
||||
createProject,
|
||||
@@ -90,7 +91,7 @@ export function adminView(ctx) {
|
||||
<span data-status-extra></span>
|
||||
</div>
|
||||
|
||||
<section class="panel" aria-labelledby="site-panel-title">
|
||||
<section class="panel" data-reveal="fade" aria-labelledby="site-panel-title">
|
||||
<div class="panel__head">
|
||||
<h2 class="panel__title" id="site-panel-title">ข้อความบนหน้าเว็บ</h2>
|
||||
</div>
|
||||
@@ -120,7 +121,7 @@ export function adminView(ctx) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="panel" aria-labelledby="projects-panel-title">
|
||||
<section class="panel" data-reveal="fade" aria-labelledby="projects-panel-title">
|
||||
<div class="panel__head">
|
||||
<h2 class="panel__title" id="projects-panel-title">
|
||||
รายชื่อโปรเจค (<span data-project-count>${draft.projects.length}</span>)
|
||||
@@ -134,7 +135,7 @@ export function adminView(ctx) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="panel" aria-labelledby="publish-panel-title">
|
||||
<section class="panel" data-reveal="fade" aria-labelledby="publish-panel-title">
|
||||
<div class="panel__head">
|
||||
<h2 class="panel__title" id="publish-panel-title">ช่องทางบันทึก</h2>
|
||||
</div>
|
||||
@@ -184,6 +185,8 @@ export function adminView(ctx) {
|
||||
}
|
||||
refreshDirty();
|
||||
checkApi();
|
||||
// เรียกซ้ำได้เสมอ เพราะ mount() ถูกเรียกใหม่หลังกด “ทิ้งการแก้ไข”
|
||||
initReveal(root);
|
||||
}
|
||||
|
||||
function bindSiteFields() {
|
||||
|
||||
Reference in new issue
Block a user