-
Notifications
You must be signed in to change notification settings - Fork 188
Expand file tree
/
Copy pathFooter.jsx
More file actions
304 lines (285 loc) · 8.81 KB
/
Footer.jsx
File metadata and controls
304 lines (285 loc) · 8.81 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
"use client";
import { usePathname } from "@/hooks/usePathname";
import { Button } from "@/components/Button";
import routes from "@/generated/routes.json";
import clsx from "clsx";
import imgLogo from "@/images/rivet-logos/icon-white.svg";
import imgYC from "@/images/logos/yc.svg";
import imgA16z from "@/images/logos/a16z.svg";
import {
Icon,
faBluesky,
faDiscord,
faGithub,
faLinkedin,
faTwitter,
faYoutube,
} from "@rivet-gg/icons";
const footer = {
product: [
{ name: "Actors", href: "/docs/actors" },
{ name: "agentOS", href: "/agent-os" },
{ name: "agentOS Pricing", href: "/agent-os/pricing" },
{ name: "Sandbox Agent SDK", href: "https://sandboxagent.dev" },
{ name: "Secure Exec SDK", href: "https://secureexec.dev" },
{ name: "Cloud Pricing", href: "/cloud#pricing" },
{ name: "Talk to an engineer", href: "/talk-to-an-engineer" },
{ name: "Sales", href: "/sales" },
],
devs: [
{ name: "Documentation", href: "/docs/actors" },
// { name: "Integrations", href: "/integrations" },
// { name: "API Reference", href: "/docs/api" },
{ name: "Changelog", href: "/changelog" },
{ name: "Status Page", href: "https://rivet.betteruptime.com/" },
],
resources: [
{ name: "Cookbooks", href: "/cookbook" },
{ name: "Blog", href: "/blog" },
{ name: "YC & Speedrun Deal", href: "/startups" },
{ name: "Open-Source Friends", href: "/oss-friends" },
{ name: "Press Kit", href: "https://releases.rivet.dev/press-kit.zip" },
],
legal: [
{ name: "Terms", href: "/terms" },
{ name: "Privacy Policy", href: "/privacy" },
{ name: "Acceptable Use", href: "/acceptable-use" },
],
social: [
{
name: "Discord",
href: "https://discord.gg/aXYfyNxYVn",
icon: faDiscord,
},
{
name: "Twitter",
href: "https://x.com/rivet_dev",
icon: faTwitter,
},
{
name: "Bluesky",
href: "https://bsky.app/profile/rivet.dev",
icon: faBluesky,
},
{
name: "GitHub",
href: "https://github.com/rivet-dev",
icon: faGithub,
},
{
name: "YouTube",
href: "https://www.youtube.com/@rivet-dev",
icon: faYoutube,
},
{
name: "LinkedIn",
href: "https://www.linkedin.com/company/72072261/",
icon: faLinkedin,
},
],
};
function PageLink({ label, page, previous = false }) {
const title = routes.pages[page.href]?.title ?? page.title ?? label;
return (
<>
<Button
href={page.href}
aria-label={`${label}: ${page.title}`}
variant="secondary"
arrow={previous ? "left" : "right"}
>
{title}
</Button>
</>
);
}
export function PageNextPrevious({ navigation }) {
const pathname = usePathname();
const allPages = navigation.sidebar.groups.flatMap((group) => group.pages);
const currentPageIndex = allPages.findIndex(
(page) => page.href === pathname,
);
if (currentPageIndex === -1) {
return null;
}
const previousPage = allPages[currentPageIndex - 1];
const nextPage = allPages[currentPageIndex + 1];
if (!previousPage && !nextPage) {
return null;
}
return (
<div className={clsx("mb-4 flex", "mx-auto max-w-5xl")}>
{previousPage && (
<div className="flex flex-col items-start gap-3">
<PageLink label="Previous" page={previousPage} previous />
</div>
)}
{nextPage && (
<div className="ml-auto flex flex-col items-end gap-3">
<PageLink label="Next" page={nextPage} />
</div>
)}
</div>
);
}
function SmallPrint() {
return (
<div className="mx-auto max-w-7xl w-full py-16 selection:bg-[#FF4500]/30 selection:text-orange-200">
<div className="grid grid-cols-1 min-[440px]:grid-cols-2 gap-8 md:grid-cols-4 lg:grid-cols-5">
{/* Brand column */}
<div className="col-span-1 min-[440px]:col-span-2 md:col-span-4 lg:col-span-1 space-y-6">
<img className="h-8 w-8" src={imgLogo.src} alt="Rivet" />
<p className="text-sm text-zinc-500">
Infrastructure for the agentic era
</p>
<div className="flex gap-4">
{footer.social.map((item) => (
<a
key={item.name}
href={item.href}
className="text-zinc-600 hover:text-white transition-colors"
>
<span className="sr-only">{item.name}</span>
<Icon icon={item.icon} aria-hidden="true" />
</a>
))}
</div>
</div>
{/* Product */}
<div>
<h3 className="text-xs font-medium uppercase tracking-wider text-zinc-500 mb-4">Product</h3>
<ul className="space-y-3">
{footer.product.map((item) => (
<li key={item.name}>
<a
href={item.href}
target={item.target}
className="text-sm text-zinc-400 hover:text-white transition-colors"
>
{item.name}
</a>
</li>
))}
</ul>
</div>
{/* Developers */}
<div>
<h3 className="text-xs font-medium uppercase tracking-wider text-zinc-500 mb-4">Developers</h3>
<ul className="space-y-3">
{footer.devs.map((item) => (
<li key={item.name}>
<a
href={item.href}
target={item.target}
className="text-sm text-zinc-400 hover:text-white transition-colors"
>
{item.name}
</a>
</li>
))}
</ul>
</div>
{/* Resources */}
<div>
<h3 className="text-xs font-medium uppercase tracking-wider text-zinc-500 mb-4">Resources</h3>
<ul className="space-y-3">
{footer.resources.map((item) => (
<li key={item.name}>
<a
href={item.href}
target={item.newTab ? "_blank" : null}
className="text-sm text-zinc-400 hover:text-white transition-colors"
>
{item.name}
</a>
</li>
))}
</ul>
</div>
{/* Legal */}
<div>
<h3 className="text-xs font-medium uppercase tracking-wider text-zinc-500 mb-4">Legal</h3>
<ul className="space-y-3">
{footer.legal.map((item) => (
<li key={item.name}>
<a
href={item.href}
className="text-sm text-zinc-400 hover:text-white transition-colors"
>
{item.name}
</a>
</li>
))}
</ul>
</div>
</div>
{/* Investor badges */}
<div className="mt-12 flex flex-col min-[440px]:flex-row flex-wrap items-start min-[440px]:items-center gap-4">
<span className="text-xs text-zinc-600">Backed by</span>
<div className="flex flex-wrap items-center gap-2">
<div className="flex items-center gap-2 rounded-full border border-white/10 px-3 py-1.5 text-xs text-zinc-400">
<img src={imgYC.src} alt="Y Combinator" className="h-4 w-auto" />
<span>Y Combinator</span>
</div>
<div className="flex items-center gap-2 rounded-full border border-white/10 px-3 py-1.5 text-xs text-zinc-400">
<img src={imgA16z.src} alt="a16z" className="h-3 w-auto footer-invert" />
<span>a16z Speedrun</span>
</div>
</div>
<a
href="/startups"
className="text-xs text-zinc-500 hover:text-white transition-colors"
style={{
backgroundImage: 'radial-gradient(circle, currentColor 1px, transparent 1px)',
backgroundSize: '6px 1px',
backgroundPosition: '0 100%',
backgroundRepeat: 'repeat-x',
paddingBottom: '4px'
}}
>
Are you as well?
</a>
<span className="ml-auto flex items-center gap-1.5 text-xs text-zinc-600">
<svg width="14" height="10" viewBox="0 0 14 10" fill="none">
<rect width="14" height="10" fill="white" />
<rect y="0" width="14" height="1.2" fill="black" />
<rect y="2.2" width="14" height="1.2" fill="black" />
<rect y="4.4" width="14" height="1.2" fill="black" />
<rect y="6.6" width="14" height="1.2" fill="black" />
<rect y="8.8" width="14" height="1.2" fill="black" />
<rect width="5" height="5" fill="black" />
</svg>
Built in San Francisco, United States
</span>
</div>
{/* Copyright */}
<div className="mt-12 border-t border-white/10 pt-8">
<p className="text-xs text-zinc-600">
© {new Date().getFullYear()} Rivet Gaming, Inc. All rights reserved.
</p>
<p className="mt-2 text-xs text-zinc-700">
Cloudflare® and Durable Objects™ are trademarks of Cloudflare, Inc. No affiliation or endorsement implied.
</p>
</div>
</div>
);
}
const WHITE_THEMED_PATHS = ['/agent-os', '/agent-os/use-cases', '/agent-os/pricing', '/agent-os/registry', '/from-unix-to-agents', '/install'];
export function Footer() {
const pathname = usePathname();
const isWhite = WHITE_THEMED_PATHS.some((p) => pathname === p || pathname === p + '/') || pathname.startsWith('/agent-os/registry/');
return (
<div className={isWhite ? 'bg-white [&_*]:!border-zinc-200 [&_a]:!text-zinc-500 [&_a:hover]:!text-zinc-900 [&_hr]:!border-zinc-200 [&_.footer-invert]:invert' : ''}>
<hr className="mb-8 border-white/10" />
<footer
aria-labelledby="footer-heading"
className="mx-auto max-w-screen-2xl px-6 lg:px-12"
>
<h2 id="footer-heading" className="sr-only">
Footer
</h2>
<SmallPrint />
</footer>
</div>
);
}