This commit is contained in:
Raven Scott
2026-05-29 13:22:34 -04:00
parent 4704dc2f80
commit 15d9459ea1
3 changed files with 70 additions and 59 deletions
+35 -7
View File
@@ -84,7 +84,11 @@ body {
gap: 1.125rem;
font-size: 1.0625rem;
line-height: 1.75;
color: rgb(255 255 255);
color: rgb(75 85 99);
}
.dark .legal-prose {
color: rgb(209 213 219);
}
.legal-prose > h2 {
@@ -93,7 +97,7 @@ body {
font-size: 1.5rem;
font-weight: 700;
letter-spacing: -0.025em;
color: rgb(255 255 255);
color: rgb(17 24 39);
}
.legal-prose > h2:first-child {
@@ -104,34 +108,53 @@ body {
margin-top: 0;
}
.dark .legal-prose > h2 {
color: rgb(255 255 255);
}
.legal-prose > h3 {
margin-top: 1.5rem;
margin-bottom: 0.5rem;
font-size: 1.25rem;
font-weight: 600;
color: rgb(17 24 39);
}
.dark .legal-prose > h3 {
color: rgb(255 255 255);
}
.legal-prose p {
margin-top: 0;
margin-bottom: 0;
color: rgb(255 255 255);
}
.legal-prose a {
font-weight: 500;
color: rgb(147 197 253);
color: rgb(37 99 235);
text-decoration: underline;
text-underline-offset: 3px;
transition: color 0.15s ease;
}
.legal-prose a:hover {
color: rgb(191 219 254);
color: rgb(29 78 216);
}
.dark .legal-prose a {
color: rgb(96 165 250);
}
.dark .legal-prose a:hover {
color: rgb(147 197 253);
}
.legal-prose strong {
font-weight: 600;
color: rgb(17 24 39);
}
.dark .legal-prose strong {
color: rgb(255 255 255);
}
@@ -205,8 +228,13 @@ body {
margin-bottom: 0;
padding: 1rem 1.25rem;
border-radius: 0.5rem;
background-color: rgb(255 255 255 / 0.06);
color: rgb(255 255 255);
background-color: rgb(239 246 255);
color: rgb(30 58 138);
font-size: 0.9375rem;
}
.dark .legal-prose blockquote {
background-color: rgb(30 58 138 / 0.25);
color: rgb(191 219 254);
}
}
+16 -29
View File
@@ -1,6 +1,5 @@
import type { Metadata } from 'next';
import Link from 'next/link';
import { ArrowRight, Scale } from 'lucide-react';
import { legalDocuments, LEGAL_LAST_UPDATED } from '@/lib/legal/documents';
export const metadata: Metadata = {
@@ -28,53 +27,41 @@ export const metadata: Metadata = {
export default function LegalHubPage() {
return (
<div className="min-h-screen text-white">
<section className="py-16 sm:py-20">
<div className="min-h-screen bg-[#111829]">
<section className="py-20 bg-gradient-to-b from-blue-50 to-white dark:from-gray-900 dark:to-gray-800">
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1 text-sm font-medium text-white mb-6">
<Scale className="h-4 w-4" aria-hidden />
<h1 className="text-4xl sm:text-5xl font-bold text-gray-900 dark:text-white mb-6">
Legal
</div>
<h1 className="text-4xl sm:text-5xl font-bold tracking-tight text-white mb-4 text-balance">
Policies & agreements
</h1>
<p className="text-lg sm:text-xl text-white leading-relaxed max-w-2xl">
Documents for the P2NS open-source project and the p2ns.space website. Choose a topic below.
<p className="text-xl text-gray-600 dark:text-gray-300">
Policies and agreements for the P2NS open-source project and this website.
</p>
<p className="mt-6 text-sm text-gray-400">
<p className="mt-4 text-sm text-gray-500 dark:text-gray-400">
Last updated {LEGAL_LAST_UPDATED}
</p>
</div>
</section>
<section className="pb-16 sm:pb-20">
<section className="py-20 bg-white dark:bg-gray-900">
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-5 sm:gap-6">
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{legalDocuments.map((doc) => {
const Icon = doc.icon;
return (
<Link
key={doc.href}
href={doc.href}
className="group flex flex-col rounded-2xl bg-white/5 p-6 transition-colors hover:bg-white/10"
className="group bg-white dark:bg-gray-800 p-6 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-blue-500 dark:hover:border-blue-500 transition-all hover:shadow-lg"
>
<div className="flex items-start gap-4 mb-4">
<div className="shrink-0 p-2.5 rounded-xl bg-white/10 group-hover:bg-white/15 transition-colors">
<Icon className="h-6 w-6 text-blue-300" />
</div>
<div className="min-w-0 flex-1">
<h2 className="text-lg font-semibold text-white group-hover:text-blue-200 transition-colors leading-snug">
{doc.title}
</h2>
<div className="flex items-center space-x-3 mb-4">
<div className="p-2 bg-blue-100 dark:bg-blue-900 rounded-lg group-hover:bg-blue-200 dark:group-hover:bg-blue-800 transition-colors">
<Icon className="h-6 w-6 text-blue-600 dark:text-blue-400" />
</div>
<h2 className="text-xl font-semibold text-gray-900 dark:text-white">
{doc.title}
</h2>
</div>
<p className="text-sm leading-relaxed text-white flex-1">
{doc.description}
</p>
<span className="mt-5 inline-flex items-center gap-1 text-sm font-medium text-blue-300">
Read document
<ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-0.5" />
</span>
<p className="text-gray-600 dark:text-gray-400">{doc.description}</p>
</Link>
);
})}
+19 -23
View File
@@ -20,58 +20,54 @@ export default function LegalDocumentLayout({
showNotice = false,
}: LegalDocumentLayoutProps) {
return (
<div className="min-h-screen text-white">
<section className="relative py-16 sm:py-20">
<div className="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="min-h-screen bg-[#111829]">
<section className="py-20 bg-gradient-to-b from-blue-50 to-white dark:from-gray-900 dark:to-gray-800">
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
<nav
aria-label="Breadcrumb"
className="flex flex-wrap items-center gap-1.5 text-sm text-gray-400 mb-8"
className="flex flex-wrap items-center gap-1.5 text-sm text-gray-500 dark:text-gray-400 mb-6"
>
<Link
href="/legal"
className="inline-flex items-center gap-1 text-white hover:text-blue-300 transition-colors"
className="inline-flex items-center gap-1 hover:text-blue-600 dark:hover:text-blue-400 transition-colors"
>
<Scale className="h-4 w-4 shrink-0 opacity-80" aria-hidden />
<Scale className="h-4 w-4 shrink-0 opacity-70" aria-hidden />
Legal
</Link>
<ChevronRight className="h-4 w-4 shrink-0 opacity-50" aria-hidden />
<span className="font-medium text-white">{title}</span>
<span className="font-medium text-gray-700 dark:text-gray-200">{title}</span>
</nav>
<h1 className="text-3xl sm:text-4xl lg:text-5xl font-bold tracking-tight text-white mb-4 text-balance">
<h1 className="text-4xl sm:text-5xl font-bold text-gray-900 dark:text-white mb-4">
{title}
</h1>
{description && (
<p className="text-lg sm:text-xl text-white leading-relaxed text-balance">
{description}
</p>
<p className="text-xl text-gray-600 dark:text-gray-300">{description}</p>
)}
<p className="mt-6 text-sm text-gray-400">
<p className="mt-4 text-sm text-gray-500 dark:text-gray-400">
Last updated {LEGAL_LAST_UPDATED}
</p>
</div>
</section>
<section className="pb-16 sm:pb-20">
<div className="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8">
<section className="py-20 bg-white dark:bg-gray-900">
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
{showNotice && (
<div
role="note"
className="mb-8 flex gap-3 rounded-xl bg-amber-950/50 px-5 py-4 text-sm leading-relaxed text-white"
className="mb-8 flex gap-3 rounded-lg border border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-900/30 px-4 py-3 text-sm leading-relaxed text-amber-950 dark:text-amber-100"
>
<span className="mt-0.5 shrink-0 text-base" aria-hidden>
<span className="mt-0.5 shrink-0" aria-hidden>
</span>
<p>{LEGAL_NOTICE}</p>
</div>
)}
<article className="px-0 sm:px-0">
<LegalProse>{children}</LegalProse>
</article>
<LegalProse>{children}</LegalProse>
{seeAlso && seeAlso.length > 0 && (
<aside className="mt-12">
<h2 className="text-sm font-semibold uppercase tracking-wider text-gray-400 mb-4">
<aside className="mt-12 pt-8">
<h2 className="text-lg font-semibold text-gray-900 dark:text-white mb-4">
See also
</h2>
<ul className="grid gap-3 sm:grid-cols-2">
@@ -79,10 +75,10 @@ export default function LegalDocumentLayout({
<li key={link.href}>
<Link
href={link.href}
className="group flex items-center justify-between gap-3 rounded-xl bg-white/5 px-4 py-3 text-sm font-medium text-white transition-colors hover:bg-white/10"
className="group flex items-center justify-between gap-3 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 px-4 py-3 text-sm font-medium text-gray-900 dark:text-white transition-all hover:border-blue-500 dark:hover:border-blue-500 hover:shadow-md"
>
<span>{link.label}</span>
<ChevronRight className="h-4 w-4 shrink-0 text-gray-400 group-hover:text-blue-300 transition-colors" />
<ChevronRight className="h-4 w-4 shrink-0 text-gray-400 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors" />
</Link>
</li>
))}