Skip to content

Commit 09b1bb8

Browse files
committed
chore: updated image overlay sizing
1 parent e8b35b7 commit 09b1bb8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/pages/test.astro

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ import "../styles/global.css";
3535
</head>
3636
<body x-data="{ scrollPosition: 0, mobileMenuOpen: false }" @scroll.window="scrollPosition = window.scrollY" class="bg-white" :class="{ 'no-scroll': mobileMenuOpen }">
3737
<!-- Black background section with relative positioning -->
38-
<div class="relative bg-black w-full pb-40 overflow-hidden">
38+
<div class="relative bg-black w-full sm:pb-40 overflow-hidden">
3939
<!-- Text overlay as background texture with parallax effect -->
4040
<div class="absolute inset-0 w-full h-full overflow-hidden">
4141
<div
42-
class="text-darker-gray text-[50vw] sm:text-[25vw] font-black font-display leading-[0.9] text-center uppercase absolute top-1/2 left-1/2 w-[150%] select-none"
42+
class="text-darker-gray text-[33vw] sm:text-[25vw] font-black font-display leading-[0.9] text-center uppercase absolute top-1/2 left-1/2 w-[150%] select-none"
4343
x-bind:style="'transform: translate(-50%, -50%) rotate(45deg) translateY(' + scrollPosition * 0.6 + 'px)'"
4444
>
4545
Some blog entry headline thats quite long
@@ -49,8 +49,8 @@ import "../styles/global.css";
4949

5050
<!-- Red blob with horizontal parallax effect - positioned directly in the header -->'
5151
<div class="absolute top-0 bottom-0 left-0 right-0">
52-
<div class="max-w-screen-xl mx-auto h-full flex justify-end items-end">
53-
<img src="/images/example.png" class=" select-none h-[80%]" x-bind:style="'transform: translateY(' + scrollPosition * 0.67 + 'px)'"/>
52+
<div class="max-w-[68rem] mx-auto h-full flex justify-end items-end ">
53+
<img src="/images/example.png" class=" select-none h-[67%] sm:h-[87%]" x-bind:style="'transform: translateY(' + scrollPosition * 0.67 + 'px)'"/>
5454
</div>
5555
</div>
5656

@@ -79,9 +79,9 @@ import "../styles/global.css";
7979
</div>
8080

8181
<!-- Headline with same padding as content -->
82-
<div class="relative z-10 text-center text-white max-w-screen-md mx-auto px-8 sm:px-20">
83-
<div class="py-15 sm:py-20">
84-
<h1 class="text-4xl sm:text-6xl font-bold font-display leading-tight text-stroke">
82+
<div class="relative z-10 text-white max-w-screen-md mx-auto px-8 sm:px-20">
83+
<div class="py-15 sm:py-20 pr-25">
84+
<h1 class="text-4xl sm:text-6xl font-bold font-display leading-tight">
8585
Some blog entry headline that's quite long
8686
</h1>
8787
</div>
@@ -119,7 +119,7 @@ import "../styles/global.css";
119119
</div>
120120

121121
<!-- Content Box with responsive padding -->
122-
<div class="max-w-screen-md mx-auto bg-white text-black p-8 sm:p-20 -mt-40 relative z-10">
122+
<div class="max-w-screen-md mx-auto bg-white text-black p-8 sm:p-20 -mt-5 sm:-mt-40 relative z-10">
123123
<p class="mb-6">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor.</p>
124124

125125
<p class="mb-6">Ut aliquam sollicitudin iaculis. Praesent ac semper ante. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus eget tempor dolor.</p>

0 commit comments

Comments
 (0)