mirror of
https://github.com/hanzoai/rfc.git
synced 2026-10-30 18:23:14 +00:00
A version written into a manifest is written into every manifest that wants it, which is how eslint came to exist in a hundred and four forms across this estate and how a package came to resolve twice at run time. The catalog moves the number out of the manifest: a manifest names the package, the workspace names the version. Four are held below their latest because the newer release cannot be used, and the reason is recorded rather than the version alone: @noble/hashes 2 renamed every subpath the web3 stack imports, @splinetool/runtime 2 depends on a package that was never published, @dynamic-labs 5.4.1 the same, and react-resizable-panels 3 points its types condition at the bundle.
111 lines
3.5 KiB
TypeScript
111 lines
3.5 KiB
TypeScript
import Link from 'next/link';
|
|
import { Globe, MessageCircle, Send } from 'lucide-react'
|
|
import { Github, Linkedin, Twitter, Youtube } from '@hanzo/ui/brands';
|
|
import { Button } from '@hanzo/ui/primitives/Button';
|
|
import { Logo, Lockup } from './logo';
|
|
import { ThemeToggle } from './theme-toggle';
|
|
import config, { type SocialLink } from '@/rfc.config';
|
|
|
|
const socialIcon: Record<SocialLink['platform'], typeof Github> = {
|
|
github: Github,
|
|
twitter: Twitter,
|
|
discord: MessageCircle,
|
|
telegram: Send,
|
|
youtube: Youtube,
|
|
linkedin: Linkedin,
|
|
website: Globe,
|
|
};
|
|
|
|
/** The one header. Every full-width page mounts this; nothing rolls its own. */
|
|
export function SiteHeader({ children }: { children?: React.ReactNode }) {
|
|
return (
|
|
<header className="rfc-header">
|
|
<div className="rfc-shell">
|
|
<Link href="/" aria-label={config.name}>
|
|
<Lockup size={20} />
|
|
</Link>
|
|
<div className="rfc-cluster" style={{ '--gap': '0.75rem' } as React.CSSProperties}>
|
|
{children}
|
|
<ThemeToggle />
|
|
<Button size="sm" asChild>
|
|
<Link href="/docs">Browse</Link>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
);
|
|
}
|
|
|
|
/** The one footer, driven entirely by `rfc.config.ts`. */
|
|
export function SiteFooter() {
|
|
const { footer } = config;
|
|
|
|
return (
|
|
<footer className="rfc-footer">
|
|
<div className="rfc-shell rfc-stack" style={{ '--gap': '2rem' } as React.CSSProperties}>
|
|
<div className="rfc-grid" data-cols="4">
|
|
{footer.sections.map((section) => (
|
|
<nav key={section.title} className="rfc-stack" style={{ '--gap': '0.5rem' } as React.CSSProperties}>
|
|
<p className="rfc-small" style={{ fontWeight: 600, margin: 0 }}>
|
|
{section.title}
|
|
</p>
|
|
{section.links.map((link) =>
|
|
link.external ? (
|
|
<a
|
|
key={link.label}
|
|
href={link.href}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
className="rfc-link rfc-small"
|
|
>
|
|
{link.label}
|
|
</a>
|
|
) : (
|
|
<Link key={link.label} href={link.href} className="rfc-link rfc-small">
|
|
{link.label}
|
|
</Link>
|
|
),
|
|
)}
|
|
</nav>
|
|
))}
|
|
</div>
|
|
|
|
<div
|
|
className="rfc-cluster"
|
|
data-between
|
|
style={{ borderTop: '1px solid var(--border)', paddingTop: '1.5rem' }}
|
|
>
|
|
<span className="rfc-cluster rfc-small rfc-muted">
|
|
<Logo size={20} />© {new Date().getFullYear()} {footer.copyright}
|
|
</span>
|
|
<span className="rfc-cluster">
|
|
{footer.socials.map((social) => {
|
|
const Icon = socialIcon[social.platform];
|
|
return (
|
|
<a
|
|
key={social.platform}
|
|
href={social.href}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
className="rfc-link"
|
|
title={social.label ?? social.platform}
|
|
>
|
|
<Icon size={16} />
|
|
</a>
|
|
);
|
|
})}
|
|
<a
|
|
href={`${config.repoUrl}/blob/main/CONTRIBUTING.md`}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
className="rfc-link rfc-fine"
|
|
>
|
|
Contribute
|
|
</a>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
);
|
|
}
|