fix(home): flush top and side edges of the cinema frame
Continuous Integration / build_web (push) Failing after 1s
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
Continuous Integration / build_web (push) Failing after 1s
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
The home frame now reaches the top, left and right window edges, with the bottom inset kept. The macOS header clears the traffic lights, the left arrow no longer overlaps the copy, and the hero rail reserves space from the bar's real visibility instead of its lingering DOM node.
This commit is contained in:
1 parent
0f80d4db4e
commit
5aaa3435da
4 files changed
+39
-46
No files matched your search
@@ -3,7 +3,7 @@
|
|||||||
/* Cinematic home hero: full-bleed artwork, integrated type, bottom rail. */
|
/* Cinematic home hero: full-bleed artwork, integrated type, bottom rail. */
|
||||||
.cinema-hero {
|
.cinema-hero {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: calc(100vh - 32px);
|
height: calc(100vh - 16px);
|
||||||
min-height: 620px;
|
min-height: 620px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
@@ -241,10 +241,6 @@
|
|||||||
background-color 0.2s ease,
|
background-color 0.2s ease,
|
||||||
color 0.2s ease;
|
color 0.2s ease;
|
||||||
|
|
||||||
&.left {
|
|
||||||
left: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.right {
|
&.right {
|
||||||
right: 1.25rem;
|
right: 1.25rem;
|
||||||
}
|
}
|
||||||
@@ -408,23 +404,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Reserve room for the floating player bar so the rail is never covered. */
|
/* Reserve room for the floating player bar so the rail is never covered. */
|
||||||
body:has(.audio-player) .cinema-trending {
|
body.has-player-bar .cinema-trending {
|
||||||
padding-bottom: 116px;
|
padding-bottom: 116px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* With the player bar visible the hero has less vertical room, so keep the
|
/* With the player bar visible the hero has less vertical room, so keep the
|
||||||
copy compact instead of pushing it under the header. */
|
copy compact instead of pushing it under the header. */
|
||||||
body:has(.audio-player) .cinema-hero .hero-carousel-text {
|
body.has-player-bar .cinema-hero .hero-carousel-text {
|
||||||
font-size: clamp(2.1rem, 3.6vw, 4rem) !important;
|
font-size: clamp(2.1rem, 3.6vw, 4rem) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body:has(.audio-player) .cinema-hero .hero-carousel-overview {
|
body.has-player-bar .cinema-hero .hero-carousel-overview {
|
||||||
-webkit-line-clamp: 3;
|
-webkit-line-clamp: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1100px) {
|
@media (max-width: 1100px) {
|
||||||
.cinema-hero {
|
.cinema-hero {
|
||||||
height: calc(100vh - 32px);
|
height: calc(100vh - 16px);
|
||||||
min-height: 560px;
|
min-height: 560px;
|
||||||
|
|
||||||
.hero-carousel-detail {
|
.hero-carousel-detail {
|
||||||
@@ -447,10 +443,6 @@ body:has(.audio-player) .cinema-hero .hero-carousel-overview {
|
|||||||
padding-left: 2rem;
|
padding-left: 2rem;
|
||||||
padding-right: 2rem;
|
padding-right: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cinema-arrow.left {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,7 +450,7 @@ body:has(.audio-player) .cinema-hero .hero-carousel-overview {
|
|||||||
secondary copy instead of pushing the headline under the header. */
|
secondary copy instead of pushing the headline under the header. */
|
||||||
@media (max-height: 760px) {
|
@media (max-height: 760px) {
|
||||||
.cinema-hero {
|
.cinema-hero {
|
||||||
height: calc(100vh - 32px);
|
height: calc(100vh - 16px);
|
||||||
min-height: 540px;
|
min-height: 540px;
|
||||||
|
|
||||||
.hero-carousel-detail {
|
.hero-carousel-detail {
|
||||||
|
|||||||
@@ -79,12 +79,6 @@ const Carousel = ({
|
|||||||
setCurrentSlide((prev) => (prev + 1) % total);
|
setCurrentSlide((prev) => (prev + 1) % total);
|
||||||
}, [total, setDirection]);
|
}, [total, setDirection]);
|
||||||
|
|
||||||
const previous = useCallback(() => {
|
|
||||||
if (total < 2) return;
|
|
||||||
setDirection("left");
|
|
||||||
setCurrentSlide((prev) => (prev - 1 + total) % total);
|
|
||||||
}, [total, setDirection]);
|
|
||||||
|
|
||||||
// Autoplay; pauses while the pointer is over the hero.
|
// Autoplay; pauses while the pointer is over the hero.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isPaused || total < 2) return;
|
if (isPaused || total < 2) return;
|
||||||
@@ -110,24 +104,14 @@ const Carousel = ({
|
|||||||
<MemoizedCarouselSlide key={currentItem.Id} item={currentItem} />
|
<MemoizedCarouselSlide key={currentItem.Id} item={currentItem} />
|
||||||
|
|
||||||
{total > 1 && (
|
{total > 1 && (
|
||||||
<>
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
className="cinema-arrow right"
|
||||||
className="cinema-arrow left"
|
onClick={next}
|
||||||
onClick={previous}
|
aria-label="Next"
|
||||||
aria-label="Previous"
|
>
|
||||||
>
|
<span className="material-symbols-rounded">chevron_right</span>
|
||||||
<span className="material-symbols-rounded">chevron_left</span>
|
</button>
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="cinema-arrow right"
|
|
||||||
onClick={next}
|
|
||||||
aria-label="Next"
|
|
||||||
>
|
|
||||||
<span className="material-symbols-rounded">chevron_right</span>
|
|
||||||
</button>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="cinema-trending">
|
<div className="cinema-trending">
|
||||||
|
|||||||
@@ -161,6 +161,15 @@ const AudioPlayer = () => {
|
|||||||
if (display) setSelectedRemoteId(null);
|
if (display) setSelectedRemoteId(null);
|
||||||
}, [display, item?.Id]);
|
}, [display, item?.Id]);
|
||||||
|
|
||||||
|
// Layout hooks (home hero rail) reserve space for the bar. Use explicit
|
||||||
|
// visibility rather than the DOM: during the exit animation the element is
|
||||||
|
// still mounted but already off-screen.
|
||||||
|
useEffect(() => {
|
||||||
|
const visible = barVisible && location.pathname !== "/player/audio";
|
||||||
|
document.body.classList.toggle("has-player-bar", visible);
|
||||||
|
return () => document.body.classList.remove("has-player-bar");
|
||||||
|
}, [barVisible, location.pathname]);
|
||||||
|
|
||||||
// Sync local audio element.
|
// Sync local audio element.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (display) {
|
if (display) {
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
/* Home page: a floating, rounded "cinema window" with an integrated header. */
|
/* Home page: a full-bleed cinema window with an integrated header. */
|
||||||
.home-cinema {
|
.home-cinema {
|
||||||
--home-trending-space: 200px;
|
--home-trending-space: 200px;
|
||||||
|
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 16px;
|
padding: 0 0 16px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #05060a;
|
background: #05060a;
|
||||||
}
|
}
|
||||||
|
|
||||||
body:has(.audio-player) .home-cinema {
|
body.has-player-bar .home-cinema {
|
||||||
--home-trending-space: 316px;
|
--home-trending-space: 316px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-frame {
|
.home-frame {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
min-height: calc(100vh - 32px);
|
min-height: calc(100vh - 16px);
|
||||||
border: 1px solid rgb(255 255 255 / 0.07);
|
border: 0;
|
||||||
border-radius: 28px;
|
border-bottom: 1px solid rgb(255 255 255 / 0.07);
|
||||||
|
border-radius: 0 0 28px 28px;
|
||||||
background: #08090d;
|
background: #08090d;
|
||||||
box-shadow: 0 28px 70px rgb(0 0 0 / 0.45);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Header floating over the hero artwork. */
|
/* Header floating over the hero artwork. */
|
||||||
@@ -49,6 +49,14 @@ body:has(.audio-player) .home-cinema {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Keep the menu clear of the macOS traffic lights now that the frame
|
||||||
|
// reaches the window edges.
|
||||||
|
html.is-macos & {
|
||||||
|
&-left {
|
||||||
|
padding-left: 64px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&-logo {
|
&-logo {
|
||||||
font-family: "Tilt Neon", "Plus Jakarta Sans Variable", sans-serif;
|
font-family: "Tilt Neon", "Plus Jakarta Sans Variable", sans-serif;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
@@ -125,7 +133,7 @@ body:has(.audio-player) .home-cinema {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body:has(.audio-player) .home-sections {
|
body.has-player-bar .home-sections {
|
||||||
padding-bottom: 10rem;
|
padding-bottom: 10rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user