1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
import Link from "next/link";
import { RiTwitterXLine } from "react-icons/ri";
import { FaGithub } from "react-icons/fa6";
import Image from "next/image";
import { DEFAULT_LOGO_URL } from "@/site/brand";
import { SOCIAL_LINKS } from "@/site/social";
import { capitalizeFirstLetter } from "@/utils/string";
type Category = "resources" | "company";
interface FooterLink {
label: string;
href: string;
}
interface LinkCategory {
category: Category;
links: FooterLink[];
}
const linkCategories: LinkCategory[] = [
{
category: "resources",
links: [
{ label: "Roadmap", href: "/roadmap" },
{ label: "Privacy", href: "/privacy" },
{ label: "Terms of use", href: "/terms" },
],
},
{
category: "company",
links: [
{ label: "Contributors", href: "/contributors" },
{ label: "Sponsors", href: "/sponsors" },
{ label: "Brand", href: "/brand" },
{ label: "About", href: `${SOCIAL_LINKS.github}/blob/main/README.md` },
],
},
];
export function Footer() {
return (
<footer className="bg-background border-t">
<div className="mx-auto max-w-5xl px-8 py-10">
<div className="mb-8 grid grid-cols-1 gap-12 md:grid-cols-2">
{/* Brand Section */}
<div className="max-w-sm md:col-span-1">
<div className="mb-4 flex items-center justify-start gap-2">
<Image
src={DEFAULT_LOGO_URL}
alt="OpenCut"
width={24}
height={24}
className="invert dark:invert-0"
/>
<span className="text-lg font-bold">OpenCut</span>
</div>
<p className="text-muted-foreground mb-5 text-sm md:text-left">
The privacy-first video editor that feels simple to use.
</p>
<div className="flex justify-start gap-3">
<Link
href={SOCIAL_LINKS.github}
className="text-muted-foreground hover:text-foreground transition-colors"
target="_blank"
rel="noopener noreferrer"
>
<FaGithub className="size-5" />
</Link>
<Link
href={SOCIAL_LINKS.x}
className="text-muted-foreground hover:text-foreground transition-colors"
target="_blank"
rel="noopener noreferrer"
>
<RiTwitterXLine className="size-5" />
</Link>
</div>
</div>
<div className="flex items-start justify-start gap-12 py-2">
{linkCategories.map(({ category, links: categoryLinks }) => (
<div key={category} className="flex flex-col gap-2">
<h3 className="text-foreground font-semibold">
{capitalizeFirstLetter({ string: category })}
</h3>
<ul className="space-y-2 text-sm">
{categoryLinks.map((link) => (
<li key={link.href}>
<Link
href={link.href}
className="text-muted-foreground hover:text-foreground transition-colors"
target={
link.href.startsWith("http") ? "_blank" : undefined
}
rel={
link.href.startsWith("http")
? "noopener noreferrer"
: undefined
}
>
{link.label}
</Link>
</li>
))}
</ul>
</div>
))}
</div>
</div>
{/* Bottom Section */}
<div className="flex flex-col items-start justify-between gap-4 pt-2 md:flex-row">
<div className="text-muted-foreground flex items-center gap-4 text-sm">
<span>
© {new Date().getFullYear()} OpenCut, All Rights Reserved
</span>
</div>
</div>
</div>
</footer>
);
}
|