Make blog generic template for anyone

This commit is contained in:
Cassidy Williams committed 2024-05-09 23:46:25 -05:00
1 parent 29bd249a37
commit 342f889e57
116 files changed
+141 -5777

No files matched your search

+1 -7
View File
@@ -1,12 +1,6 @@
---
export interface Props extends astroHTML.JSX.AnchorHTMLAttributes {}
const { href, class: className, ...props } = Astro.props as Props;
const { href, class: className, ...props } = Astro.props;
let isActive = href === Astro.url.pathname;
if (Astro.url.pathname.startsWith("/post/")) {
isActive = true;
}
---
<a href={href} class:list={[className, { active: isActive }]} {...props}>