feat(nav): point post and tag links at /blog
This commit is contained in:
@@ -5,8 +5,8 @@ import { usePathname } from "next/navigation";
|
||||
import { m } from "motion/react";
|
||||
|
||||
const navLinks = [
|
||||
{ label: "Home", href: "/" },
|
||||
{ label: "Posts", href: "/posts/" },
|
||||
{ label: "Portfolio", href: "/" },
|
||||
{ label: "Field Notes", href: "/blog/" },
|
||||
];
|
||||
|
||||
export function Header() {
|
||||
|
||||
@@ -17,7 +17,7 @@ export function PostCard({ slug, title, date, excerpt, tags = [], author, readin
|
||||
viewport={{ once: true, amount: 0.2 }}
|
||||
className="group relative scroll-mt-20 rounded-2xl border border-border/90 bg-canvas p-5 shadow-card transition-[background-color,border-color,box-shadow] duration-200 ease-out hover:border-ink/25 hover:bg-surface/40 hover:shadow-card-hover dark:hover:border-ink/35 sm:p-7"
|
||||
>
|
||||
<Link href={`/posts/${slug}/`} className="block">
|
||||
<Link href={`/blog/${slug}/`} className="block">
|
||||
{coverImage && (
|
||||
<div className="mb-5 overflow-hidden rounded-xl border border-border/80 bg-surface">
|
||||
<img
|
||||
@@ -45,7 +45,7 @@ export function PostCard({ slug, title, date, excerpt, tags = [], author, readin
|
||||
{tags && tags.length > 0 && (
|
||||
<div className="mt-5 flex flex-wrap gap-2">
|
||||
{tags.slice(0, 3).map((tag) => (
|
||||
<Link key={tag} href={`/tags/${tagToSlug(tag)}/`} className="rounded-full border border-border bg-surface/70 px-3 py-1 text-xs text-ink-soft transition-colors duration-200 hover:border-accent/60 hover:text-accent focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent">
|
||||
<Link key={tag} href={`/blog/tags/${tagToSlug(tag)}/`} className="rounded-full border border-border bg-surface/70 px-3 py-1 text-xs text-ink-soft transition-colors duration-200 hover:border-accent/60 hover:text-accent focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent">
|
||||
{tag}
|
||||
</Link>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user