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
@@ -3,6 +3,7 @@
|
||||
import { hydrateIcons, toast } from "./ui.js";
|
||||
import { loadProjects, normalizeData } from "./data.js";
|
||||
import { defineRoutes, markActiveNav, onRouteChange, startRouter } from "./router.js";
|
||||
import { countUpInside, initMotion, initReveal } from "./motion.js";
|
||||
import { homeView } from "./views/home.js";
|
||||
import { adminView } from "./views/admin.js";
|
||||
import "./pwa.js";
|
||||
@@ -51,6 +52,8 @@ function renderRoute({ path, view }) {
|
||||
document.title = TITLES[path] || TITLES["/"];
|
||||
window.scrollTo({ top: 0, behavior: "auto" });
|
||||
main.focus({ preventScroll: true });
|
||||
initReveal(main);
|
||||
countUpInside(main);
|
||||
}
|
||||
|
||||
function updateChrome() {
|
||||
@@ -83,6 +86,7 @@ function skeleton() {
|
||||
|
||||
async function boot() {
|
||||
hydrateIcons();
|
||||
initMotion();
|
||||
skeleton();
|
||||
const result = await loadProjects();
|
||||
state.data = result.data;
|
||||
|
||||
Reference in new issue
Block a user