Skip to content

Commit 49f4793

Browse files
committed
fix: hero section sizing
1 parent 1055aee commit 49f4793

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/components/Navigation.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Icon } from "astro-icon/components";
1111
<div class="text-2xl font-bold">LOGO</div>
1212
<div class="flex justify-end">
1313
<!-- Desktop Navigation -->
14-
<div class="hidden sm:flex items-center space-x-8">
14+
<div class="hidden md:flex items-center space-x-8">
1515
<a href="#" class="hover:text-gray-300">Blog</a>
1616
<a href="#" class="hover:text-gray-300">Snippets</a>
1717
<a href="#" class="hover:text-gray-300">Projects</a>
@@ -34,7 +34,7 @@ import { Icon } from "astro-icon/components";
3434
</button>
3535
<!-- Mobile Hamburger Button -->
3636
<button
37-
class="sm:hidden text-white focus:outline-none ml-8"
37+
class="md:hidden text-white focus:outline-none ml-8"
3838
@click="mobileMenuOpen = true"
3939
>
4040
<Icon name="hamburger" size="24" />

src/layouts/BlogLayout.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ const { title, backgroundText } = Astro.props as Props;
4949
<Navigation />
5050
<NavigationPlaceholder />
5151
<ParallaxTextOverlay text={backgroundText} slot="background" />
52-
<slot name="hero" />
52+
<div class="sm:pt-10 pb-8 px-8 sm:px-20 text-white">
53+
<slot name="hero" />
54+
</div>
5355
</div>
5456
<MobileMenu />
5557
<slot />

src/pages/blog/[id].astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const { Content, headings } = await render(post);
2020
title={post.data.title as string}
2121
backgroundText={post.data.title as string}
2222
>
23-
<div slot="hero" class="pt-10 pb-8 text-center text-white">
24-
<h1 class="text-4xl lg:text-6xl font-bold font-display leading-tight">
23+
<div slot="hero" class="pt-10 pb-8 sm:text-center text-white">
24+
<h1 class="text-4xl sm:text-6xl font-bold font-display leading-tight">
2525
{post.data.title}
2626
</h1>
2727
{
@@ -33,7 +33,7 @@ const { Content, headings } = await render(post);
3333
}
3434
{
3535
post.data?.tags && (
36-
<Tags class="mt-4 -ml-4 sm:ml-0">
36+
<Tags class="mt-4 -ml-3 sm:ml-0">
3737
{post.data.tags.map((tag) => (
3838
<TagLink href={`/tags/${tag.toLowerCase()}`} text={tag} />
3939
))}

0 commit comments

Comments
 (0)