mirror of
https://github.com/andwati/andwati-nextgen.git
synced 2026-11-27 06:28:47 +00:00
Rebuild site in Tailwind to match adammaj.com layout with andwati content
- Port adammaj.com layout, sidebar and 3D bookshelf from Chakra to Tailwind v4, matched to measured pixel values - Pages: About, Writing, Reading (bookshelf), Portfolio; content exported to markdown with YAML frontmatter, KaTeX math, callouts and YouTube embeds - Shiki (github-light) code highlighting via rehype-pretty-code - SEO: per-page metadata and canonicals, JSON-LD, generated OG images, sitemap, robots, RSS/JSON feeds, llms.txt - Umami analytics via PUBLIC_UMAMI_SCRIPT_URL / PUBLIC_UMAMI_WEBSITE_ID - Prettier + cspell for content, husky/lint-staged pre-commit hook - Multi-stage Dockerfile (Node 24, pnpm, standalone output) for Dokploy - Remove unused Chakra, emotion, framer-motion, posthog, next-seo and MDX deps
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
export function NavLink({
|
||||
href,
|
||||
className = "",
|
||||
children,
|
||||
}: {
|
||||
href: string;
|
||||
className?: string;
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const pathname = usePathname();
|
||||
const active = href === "/" ? pathname === "/" : pathname.startsWith(href);
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className={`${active ? "text-black" : "text-[#718096]"} hover:text-black ${className}`}
|
||||
>
|
||||
{children}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user