Update /docs page with dark theme and modern styling
- Replace DocsHeader with PageHeader and Footer - Update DocsSidebar with dark cyberpunk theme - Update DocsContent with dark theme and styled prose - Use i18n for page title - All TypeScript checks pass
This commit is contained in:
parent
cd7f6e04d9
commit
5ea0ed21e1
@ -10,14 +10,14 @@ export function DocsContent({ content, loading }: DocsContentProps) {
|
|||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return (
|
||||||
<div className="text-center py-12">
|
<div className="text-center py-12">
|
||||||
<p className="text-gray-500">Chargement de la documentation...</p>
|
<p className="text-cyber-accent">Chargement de la documentation...</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-white rounded-lg shadow-sm p-8">
|
<div className="bg-cyber-dark border border-neon-cyan/20 rounded-lg p-8 backdrop-blur-sm">
|
||||||
<div className="prose max-w-none">
|
<div className="prose prose-invert max-w-none prose-headings:text-neon-cyan prose-headings:font-mono prose-p:text-cyber-accent prose-a:text-neon-green prose-a:hover:text-neon-cyan prose-strong:text-neon-green prose-code:text-neon-cyan prose-code:bg-cyber-darker prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-pre:bg-cyber-darker prose-pre:border prose-pre:border-neon-cyan/20 prose-blockquote:border-neon-cyan/50 prose-blockquote:text-cyber-accent/70 prose-ul:text-cyber-accent prose-ol:text-cyber-accent prose-li:marker:text-neon-cyan">
|
||||||
{renderMarkdown(content)}
|
{renderMarkdown(content)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -17,17 +17,17 @@ interface DocsSidebarProps {
|
|||||||
export function DocsSidebar({ docs, selectedDoc, onSelectDoc }: DocsSidebarProps) {
|
export function DocsSidebar({ docs, selectedDoc, onSelectDoc }: DocsSidebarProps) {
|
||||||
return (
|
return (
|
||||||
<aside className="lg:w-64 flex-shrink-0">
|
<aside className="lg:w-64 flex-shrink-0">
|
||||||
<div className="bg-white rounded-lg shadow-sm p-4 sticky top-4">
|
<div className="bg-cyber-dark border border-neon-cyan/20 rounded-lg p-4 sticky top-4 backdrop-blur-sm">
|
||||||
<h2 className="text-lg font-bold mb-4">Documentation</h2>
|
<h2 className="text-lg font-bold mb-4 text-neon-cyan font-mono">Documentation</h2>
|
||||||
<nav className="space-y-2">
|
<nav className="space-y-2">
|
||||||
{docs.map((doc) => (
|
{docs.map((doc) => (
|
||||||
<button
|
<button
|
||||||
key={doc.id}
|
key={doc.id}
|
||||||
onClick={() => onSelectDoc(doc.id)}
|
onClick={() => onSelectDoc(doc.id)}
|
||||||
className={`w-full text-left px-3 py-2 rounded-lg text-sm transition-colors ${
|
className={`w-full text-left px-3 py-2 rounded-lg text-sm transition-all ${
|
||||||
selectedDoc === doc.id
|
selectedDoc === doc.id
|
||||||
? 'bg-blue-100 text-blue-700 font-medium'
|
? 'bg-neon-cyan/20 text-neon-cyan font-medium border border-neon-cyan/50 shadow-glow-cyan'
|
||||||
: 'text-gray-600 hover:bg-gray-100'
|
: 'text-cyber-accent hover:bg-cyber-dark/50 hover:text-neon-cyan border border-transparent hover:border-neon-cyan/30'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{doc.title}
|
{doc.title}
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import Link from 'next/link'
|
|
||||||
import { ConnectButton } from '@/components/ConnectButton'
|
|
||||||
import { DocsSidebar } from '@/components/DocsSidebar'
|
import { DocsSidebar } from '@/components/DocsSidebar'
|
||||||
import { DocsContent } from '@/components/DocsContent'
|
import { DocsContent } from '@/components/DocsContent'
|
||||||
|
import { PageHeader } from '@/components/PageHeader'
|
||||||
|
import { Footer } from '@/components/Footer'
|
||||||
import { useDocs } from '@/hooks/useDocs'
|
import { useDocs } from '@/hooks/useDocs'
|
||||||
|
import { t } from '@/lib/i18n'
|
||||||
|
|
||||||
type DocSection = 'user-guide' | 'faq' | 'publishing' | 'payment'
|
type DocSection = 'user-guide' | 'faq' | 'publishing' | 'payment'
|
||||||
|
|
||||||
@ -36,39 +37,19 @@ const docs: DocLink[] = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
function DocsHeader() {
|
|
||||||
return (
|
|
||||||
<header className="bg-white shadow-sm">
|
|
||||||
<div className="max-w-7xl mx-auto px-4 py-4 flex justify-between items-center">
|
|
||||||
<Link href="/" className="text-2xl font-bold text-gray-900 hover:text-gray-700">
|
|
||||||
zapwall.fr
|
|
||||||
</Link>
|
|
||||||
<div className="flex items-center gap-4">
|
|
||||||
<Link
|
|
||||||
href="/"
|
|
||||||
className="px-4 py-2 text-gray-600 hover:text-gray-800 text-sm font-medium"
|
|
||||||
>
|
|
||||||
Articles
|
|
||||||
</Link>
|
|
||||||
<ConnectButton />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function DocsPage() {
|
export default function DocsPage() {
|
||||||
const { selectedDoc, docContent, loading, loadDoc } = useDocs(docs)
|
const { selectedDoc, docContent, loading, loadDoc } = useDocs(docs)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Documentation - zapwall.fr</title>
|
<title>{t('nav.documentation')} - zapwall.fr</title>
|
||||||
<meta name="description" content="Documentation complète pour zapwall.fr" />
|
<meta name="description" content="Documentation complète pour zapwall.fr" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
</Head>
|
</Head>
|
||||||
<main className="min-h-screen bg-gray-50">
|
<main className="min-h-screen bg-cyber-darker">
|
||||||
<DocsHeader />
|
<PageHeader />
|
||||||
<div className="max-w-7xl mx-auto px-4 py-8">
|
<div className="max-w-7xl mx-auto px-4 py-8">
|
||||||
<div className="flex flex-col lg:flex-row gap-8">
|
<div className="flex flex-col lg:flex-row gap-8">
|
||||||
<DocsSidebar
|
<DocsSidebar
|
||||||
@ -83,6 +64,7 @@ export default function DocsPage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<Footer />
|
||||||
</main>
|
</main>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user