Fixed navbar current page in blog posts
When in blog post the current page on navbar is highlighting now blog (previously was none, since url != /blog nor /)
This commit is contained in:
@ -6,26 +6,15 @@ import MainLayout from "./MainLayout.astro";
|
||||
|
||||
type Props = CollectionEntry<"blog">["data"];
|
||||
|
||||
const { title, description, publishDate, language } =
|
||||
Astro.props;
|
||||
const { title, description, language } = Astro.props;
|
||||
---
|
||||
|
||||
<MainLayout
|
||||
title={title}
|
||||
description={description}
|
||||
publishDate={publishDate}
|
||||
lang={language}
|
||||
>
|
||||
<article>
|
||||
<div class="prose">
|
||||
<div class="title">
|
||||
<div class="date">
|
||||
<FormattedDate date={publishDate} />
|
||||
</div>
|
||||
<h1>{title}</h1>
|
||||
<hr />
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
</article>
|
||||
</MainLayout>
|
||||
<SinglePage>
|
||||
<slot />
|
||||
</SinglePage>
|
||||
</MainLayout>
|
||||
|
Reference in New Issue
Block a user