feat(home): cinematic rounded home page with integrated hero
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped

Home is now a floating rounded window: an integrated header over full-bleed artwork, a large featured title with actions, and a Trending now rail that switches the hero. Existing home sections continue below in the same frame.
This commit is contained in:
1xDed committed 2026-11-27 18:42:19 +03:00
1 parent affbd00157
commit d5c1bfac64
9 files changed
+873 -489

No files matched your search

+16 -1
View File
@@ -52,6 +52,7 @@ const OverlayScrollbar = () => {
document.body.classList.add("has-overlay-scrollbar");
let frame = 0;
let measureTimer = 0;
let lastShow = 0;
const setVisible = (visible: boolean) => {
@@ -90,10 +91,12 @@ const OverlayScrollbar = () => {
// Expensive path: runs on mount and when page/window geometry changes.
const measure = () => {
// Use the header height rather than its viewport position: the
// header scrolls with the page, but the track must stay put.
const header = document.querySelector("header");
const insetTop = Math.max(
0,
Math.round(header?.getBoundingClientRect().bottom ?? 0) + 4,
Math.round(header?.getBoundingClientRect().height ?? 0) + 6,
);
const trackHeight = Math.max(0, window.innerHeight - insetTop - 6);
const topStyle = `${insetTop}px`;
@@ -139,8 +142,19 @@ const OverlayScrollbar = () => {
if (frame) return;
frame = window.requestAnimationFrame(() => {
frame = 0;
window.clearTimeout(measureTimer);
measure();
});
// Animation frames stop in an occluded window, but the page can
// still grow (route/data changes). Refresh geometry on a timer too.
window.clearTimeout(measureTimer);
measureTimer = window.setTimeout(() => {
if (frame) {
window.cancelAnimationFrame(frame);
frame = 0;
}
measure();
}, 250);
};
const onScroll = () => {
@@ -214,6 +228,7 @@ const OverlayScrollbar = () => {
return () => {
window.clearTimeout(hideTimer.current);
window.clearTimeout(measureTimer);
if (frame) window.cancelAnimationFrame(frame);
scroller.removeEventListener("scroll", onScroll);
window.removeEventListener("resize", onResize);