Skip to content

Commit

Permalink
Use fixed instead of sticky for NavBar, adjust margin-top on layout…
Browse files Browse the repository at this point in the history
… and pages (#125)
  • Loading branch information
AVGVSTVS96 authored Apr 2, 2024
1 parent 8f52189 commit e7e43fb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/NavBar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { ...attrs } = Astro.props;
---

<div
class="navbar-container sticky top-0 z-10 mb-8 w-full border-b border-border bg-background"
class="navbar-container fixed top-0 z-10 mb-8 w-full border-b border-border bg-background"
{...attrs}>
<div
class="h-1 w-full bg-gradient-to-r from-accent-300 via-accent-500 to-accent-400">
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const { description, title } = Astro.props;
</head>
<body class="flex min-h-screen w-dvw flex-col items-center">
<NavBar />
<main class="flex-grow">
<main class="mt-20 flex-grow">
<slot />
</main>
<Footer />
Expand Down
4 changes: 2 additions & 2 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Card from '@components/Card.astro';
---

<MainLayout title="About Me" description="Bassim Shahidy's personal website">
<body>
<section class="mt-4">
<Card
title="My First Astro Website"
subtitle="Styled with Tailwind CSS"
Expand All @@ -31,5 +31,5 @@ import Card from '@components/Card.astro';
>.
</p>
</Card>
</body>
</section>
</MainLayout>
2 changes: 1 addition & 1 deletion src/pages/blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import MainLayout from '../layouts/MainLayout.astro';
---

<MainLayout title="Blog" description="Blog posts by Bassim Shahidy">
<div class="container flex flex-col items-center">
<div class="container mt-4 flex flex-col items-center">
<div class="mx-4 w-fit">
<h1 class="h1 mb-4">Blog Posts</h1>
<BlogIndex class="sm:w-[560px] md:w-[720px] lg:w-[860px]" />
Expand Down

0 comments on commit e7e43fb

Please sign in to comment.