fix: polish remote access and responsive UI

This commit is contained in:
benya
2026-07-22 23:18:09 +03:00
parent 15b5b7f792
commit ee2fb0a6c9
7 changed files with 298 additions and 29 deletions
+35
View File
@@ -0,0 +1,35 @@
(() => {
const landing = document.querySelector(".landing-view");
if (!landing) return;
const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const revealTargets = [
...landing.querySelectorAll(
".landing-features article, .landing-partners-copy, .partner-logo, .landing-security > *, .landing-login-section > *, .landing-footer > *",
),
];
landing.classList.add("motion-ready");
revealTargets.forEach((element, index) => {
element.classList.add("landing-reveal");
element.style.setProperty("--reveal-order", String(index % 3));
});
if (reducedMotion || !("IntersectionObserver" in window)) {
revealTargets.forEach((element) => element.classList.add("is-revealed"));
return;
}
const observer = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (!entry.isIntersecting) continue;
entry.target.classList.add("is-revealed");
observer.unobserve(entry.target);
}
},
{ rootMargin: "0px 0px -8%", threshold: 0.12 },
);
revealTargets.forEach((element) => observer.observe(element));
})();