mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-05 20:15:31 -04:00
b2416ff0db
- Replace single `<ViewTransition>` wrapper in layout with `FadeTransition` and `DirectionalTransition` components applied per page - Add `components/page-transition.tsx` with reusable transition wrappers - Expand view transition CSS with named classes: fade, slide, nav-forward/back, morph, text-morph, scale — all driven by CSS custom property durations - Use React `<ViewTransition name=... share="text-morph">` for shared note title element between list and detail views - Wrap comments suspense boundary with enter/exit slide transitions - Add `persistent-nav` and `persistent-footer` view-transition-name groups to keep chrome static during navigation - Fix reduced-motion override to target delay and duration instead of `animation: none` - Add tracking-tight and letter-spacing tweaks to home page typography
30 lines
572 B
TypeScript
30 lines
572 B
TypeScript
import Link from "next/link";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
const PageTitle = ({
|
|
canonical,
|
|
className,
|
|
children,
|
|
...rest
|
|
}: React.ComponentProps<"h1"> & {
|
|
canonical: string;
|
|
}) => (
|
|
<h1
|
|
className={cn(
|
|
"not-prose mt-0 mb-6 text-left text-2xl font-medium tracking-tight lowercase",
|
|
className,
|
|
)}
|
|
{...rest}
|
|
>
|
|
<Link
|
|
href={canonical}
|
|
className="text-foreground before:text-muted-foreground no-underline before:tracking-wider before:content-['./']"
|
|
>
|
|
{children}
|
|
</Link>
|
|
</h1>
|
|
);
|
|
|
|
export { PageTitle };
|