Skip to content

Commit a15dd09

Browse files
committed
fix layout overflow and header width alignment
1 parent c838244 commit a15dd09

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎src/components/Header.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SITE } from "@consts";
55
---
66

77
<header>
8-
<Container>
8+
<div class="mx-auto max-w-5xl px-5">
99
<div class="flex flex-wrap gap-y-2 justify-between">
1010
<Link href="/" underline={false}>
1111
<div class="font-semibold">
@@ -30,5 +30,5 @@ import { SITE } from "@consts";
3030
</Link>
3131
</nav>
3232
</div>
33-
</Container>
33+
</div>
3434
</header>

‎src/pages/index.astro‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const work = await Promise.all(
2929
---
3030

3131
<PageLayout title={HOME.TITLE} description={HOME.DESCRIPTION}>
32-
<div class="mx-auto max-w-5xl px-5">
33-
<div class="grid grid-cols-1 md:grid-cols-[240px_1fr] gap-12 md:gap-16">
32+
<div class="mx-auto max-w-5xl px-5 overflow-x-hidden">
33+
<div class="grid grid-cols-1 md:grid-cols-[220px_1fr] gap-10 md:gap-14">
3434

3535
<!-- LEFT COLUMN — sticky sidebar -->
3636
<aside class="md:sticky md:top-24 md:self-start md:h-[calc(100vh-8rem)] md:overflow-y-auto md:pb-8 space-y-8 animate">
@@ -97,7 +97,7 @@ const work = await Promise.all(
9797
</aside>
9898

9999
<!-- RIGHT COLUMN — scrollable content -->
100-
<main class="space-y-20 py-2">
100+
<main class="min-w-0 space-y-20 py-2">
101101

102102
<!-- About -->
103103
<section class="space-y-4">

‎src/styles/global.css‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ body {
2121
@apply flex flex-col;
2222
@apply bg-stone-100 dark:bg-stone-900;
2323
@apply text-black/50 dark:text-white/75;
24+
overflow-x: hidden;
2425
}
2526

2627
header {

0 commit comments

Comments
 (0)