Skip to content

Commit d8d7c1f

Browse files
CopilotoBusk
andcommitted
Add footer with popular package links and navigation
Co-authored-by: oBusk <13413409+oBusk@users.noreply.github.com>
1 parent eda3f69 commit d8d7c1f

1 file changed

Lines changed: 71 additions & 2 deletions

File tree

src/app/_layout/Footer.tsx

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,84 @@
1+
import Link from "next/link";
12
import { forwardRef, type HTMLAttributes } from "react";
23
import { cx } from "^/lib/cva";
34

45
interface FooterProps extends HTMLAttributes<HTMLDivElement> {}
56

7+
const popularPackages = [
8+
"react",
9+
"next",
10+
"vue",
11+
"typescript",
12+
"express",
13+
"lodash",
14+
"axios",
15+
];
16+
617
const Footer = forwardRef<HTMLDivElement, FooterProps>(
718
({ className, ...props }, ref) => (
819
<footer
9-
className={cx("flex contain-content", className)}
20+
className={cx(
21+
"flex flex-col gap-6 border-t border-border py-8",
22+
className,
23+
)}
1024
{...props}
1125
ref={ref}
12-
/>
26+
>
27+
<div className="mx-auto w-full max-w-7xl px-4">
28+
{/* Popular Packages Section */}
29+
<div className="mb-6">
30+
<h3 className="mb-3 text-sm font-semibold uppercase tracking-wider text-muted-foreground">
31+
Popular Packages
32+
</h3>
33+
<div className="flex flex-wrap gap-3">
34+
{popularPackages.map((pkg) => (
35+
<Link
36+
key={pkg}
37+
href={`/${pkg}`}
38+
className="rounded-md border border-border bg-card px-3 py-1.5 text-sm text-foreground transition-colors hover:bg-accent hover:text-accent-foreground"
39+
>
40+
{pkg}
41+
</Link>
42+
))}
43+
</div>
44+
</div>
45+
46+
{/* Footer Links */}
47+
<div className="flex flex-col gap-4 border-t border-border pt-6 sm:flex-row sm:items-center sm:justify-between">
48+
<div className="flex flex-wrap gap-4 text-sm text-muted-foreground">
49+
<Link
50+
href="/-/about"
51+
className="hover:text-foreground hover:underline"
52+
>
53+
About
54+
</Link>
55+
<Link
56+
href="/-/about/api"
57+
className="hover:text-foreground hover:underline"
58+
>
59+
API
60+
</Link>
61+
<Link
62+
href="/-/about/source-trust"
63+
className="hover:text-foreground hover:underline"
64+
>
65+
Source Trust
66+
</Link>
67+
<a
68+
href="https://github.com/oBusk/npm-diff.app"
69+
target="_blank"
70+
rel="noopener noreferrer"
71+
className="hover:text-foreground hover:underline"
72+
>
73+
GitHub
74+
</a>
75+
</div>
76+
<div className="text-sm text-muted-foreground">
77+
© 2026 npm-diff.app
78+
</div>
79+
</div>
80+
</div>
81+
</footer>
1382
),
1483
);
1584
Footer.displayName = "Footer";

0 commit comments

Comments
 (0)