Skip to content

Commit fea5f28

Browse files
authored
fix: stick footer to bottom on short pages (closes #58) (#59)
Use flex column layout on <main> with min-h-screen so the footer always stays at the bottom of the viewport. On long pages the footer scrolls naturally after the content. - Add flex flex-col to <main className="min-h-screen"> - Add flex-1 w-full to the main content wrapper div Signed-off-by: Ai-chan-0411 (藍) <aoikabu12@gmail.com>
1 parent 50e3ec2 commit fea5f28

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default function HomePage() {
6565
console.log("Swapped users", data);
6666
};
6767
return (
68-
<main className="min-h-screen">
68+
<main className="min-h-screen flex flex-col">
6969
{" "}
7070
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
7171
<div className="container flex h-16 max-w-7xl items-center justify-between m-auto px-4">
@@ -74,10 +74,10 @@ export default function HomePage() {
7474
DevImpact
7575
</span>
7676
</div>
77-
77+
7878
</div>
7979
</header>
80-
<div className="max-w-6xl mx-auto px-4 py-10 space-y-6">
80+
<div className="flex-1 max-w-6xl mx-auto px-4 py-10 space-y-6 w-full">
8181
<CompareForm
8282
onSubmit={handleCompare}
8383
loading={loading}

0 commit comments

Comments
 (0)