series building
This commit is contained in:
parent
758ab5c966
commit
ba0fcbfc96
@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import { t } from '@/lib/i18n'
|
||||
|
||||
type DocSection = 'user-guide' | 'faq' | 'publishing' | 'payment'
|
||||
|
||||
@ -18,7 +18,7 @@ export function DocsSidebar({ docs, selectedDoc, onSelectDoc }: DocsSidebarProps
|
||||
return (
|
||||
<aside className="lg:w-64 flex-shrink-0">
|
||||
<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 text-neon-cyan font-mono">Documentation</h2>
|
||||
<h2 className="text-lg font-bold mb-4 text-neon-cyan font-mono">{t('docs.title')}</h2>
|
||||
<nav className="space-y-2">
|
||||
{docs.map((doc) => (
|
||||
<button
|
||||
|
||||
@ -3,19 +3,21 @@ import { useNostrAuth } from '@/hooks/useNostrAuth'
|
||||
export function KeyIndicator() {
|
||||
const { pubkey, isUnlocked } = useNostrAuth()
|
||||
|
||||
// No indicator if no account
|
||||
if (!pubkey) {
|
||||
return null
|
||||
}
|
||||
|
||||
// Red if private key is accessible (unlocked)
|
||||
// Green if only public key is accessible (connected but not unlocked)
|
||||
const color = isUnlocked ? 'text-red-500' : 'text-green-500'
|
||||
const title = isUnlocked ? 'Private key accessible' : 'Public key accessible'
|
||||
const title = isUnlocked ? 'Private key accessible' : pubkey ? 'Public key accessible' : 'Repository Git'
|
||||
|
||||
return (
|
||||
<span className={`ml-2 text-xl ${color}`} title={title}>
|
||||
<a
|
||||
href="https://git.4nkweb.com/4nk/story-research-zapwall"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`ml-2 text-xl ${color} hover:opacity-80 transition-opacity cursor-pointer`}
|
||||
title={title}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
🔑
|
||||
</span>
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
||||
@ -21,19 +21,22 @@ export function PageHeader() {
|
||||
return (
|
||||
<header className="bg-cyber-dark border-b border-neon-cyan/30 shadow-glow-cyan">
|
||||
<div className="max-w-4xl mx-auto px-4 py-4 flex justify-between items-center">
|
||||
<Link href="/" className="text-2xl font-bold text-neon-cyan text-glow-cyan font-mono hover:text-neon-green transition-colors flex items-center gap-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<Link href="/" className="text-2xl font-bold text-neon-cyan text-glow-cyan font-mono hover:text-neon-green transition-colors">
|
||||
{t('home.title')}
|
||||
</Link>
|
||||
<a
|
||||
href="https://git.4nkweb.com/4nk/story-research-zapwall"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-cyber-accent hover:text-neon-cyan transition-colors"
|
||||
title="Repository Git"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<GitIcon />
|
||||
</a>
|
||||
<KeyIndicator />
|
||||
</Link>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<LanguageSelector />
|
||||
<Link
|
||||
@ -42,12 +45,6 @@ export function PageHeader() {
|
||||
>
|
||||
{t('nav.documentation')}
|
||||
</Link>
|
||||
<Link
|
||||
href="/settings"
|
||||
className="px-4 py-2 text-cyber-accent hover:text-neon-cyan text-sm font-medium transition-colors border border-cyber-accent/30 hover:border-neon-cyan/50 rounded hover:shadow-glow-cyan"
|
||||
>
|
||||
Settings
|
||||
</Link>
|
||||
<ConditionalPublishButton />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -26,10 +26,14 @@ export function useDocs(docs: DocLink[]) {
|
||||
const text = await response.text()
|
||||
setDocContent(text)
|
||||
} else {
|
||||
setDocContent('# Erreur\n\nImpossible de charger la documentation.')
|
||||
// Import t dynamically to avoid circular dependency
|
||||
const { t } = await import('@/lib/i18n')
|
||||
setDocContent(`# ${t('docs.error')}\n\n${t('docs.error.loadFailed')}`)
|
||||
}
|
||||
} catch {
|
||||
setDocContent('# Erreur\n\nImpossible de charger la documentation.')
|
||||
// Import t dynamically to avoid circular dependency
|
||||
const { t } = await import('@/lib/i18n')
|
||||
setDocContent(`# ${t('docs.error')}\n\n${t('docs.error.loadFailed')}`)
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
@ -37,6 +41,7 @@ export function useDocs(docs: DocLink[]) {
|
||||
|
||||
useEffect(() => {
|
||||
loadDoc('user-guide')
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [])
|
||||
|
||||
return {
|
||||
@ -46,4 +51,3 @@ export function useDocs(docs: DocLink[]) {
|
||||
loadDoc,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -38,6 +38,9 @@ export async function buildPresentationEvent(
|
||||
// Build URL: https://zapwall.fr/author/<hash>_<index>_<version>
|
||||
const profileUrl = generateObjectUrl('author', hashId, index, version)
|
||||
|
||||
// Encode pubkey to npub (for metadata JSON)
|
||||
const npub = nip19.npubEncode(authorPubkey)
|
||||
|
||||
// Build visible content message
|
||||
const visibleContent = [
|
||||
'Nouveau profil publié sur zapwall.fr',
|
||||
|
||||
@ -18,6 +18,16 @@ nav.publish=Publish profile
|
||||
nav.createAuthorPage=Create author page
|
||||
nav.loading=Loading...
|
||||
|
||||
# Documentation
|
||||
docs.title=Documentation
|
||||
docs.userGuide=User Guide
|
||||
docs.faq=FAQ
|
||||
docs.publishing=Publishing Guide
|
||||
docs.payment=Payment Guide
|
||||
docs.error=Error
|
||||
docs.error.loadFailed=Unable to load documentation.
|
||||
docs.meta.description=Complete documentation for zapwall.fr
|
||||
|
||||
# Categories
|
||||
category.science-fiction=Science Fiction
|
||||
category.scientific-research=Scientific Research
|
||||
|
||||
@ -18,6 +18,16 @@ nav.publish=Publier le profil
|
||||
nav.createAuthorPage=Créer page auteur
|
||||
nav.loading=Chargement...
|
||||
|
||||
# Documentation
|
||||
docs.title=Documentation
|
||||
docs.userGuide=Guide d'utilisation
|
||||
docs.faq=FAQ
|
||||
docs.publishing=Guide de publication
|
||||
docs.payment=Guide de paiement
|
||||
docs.error=Erreur
|
||||
docs.error.loadFailed=Impossible de charger la documentation.
|
||||
docs.meta.description=Documentation complète pour zapwall.fr
|
||||
|
||||
# Categories
|
||||
category.science-fiction=Science-fiction
|
||||
category.scientific-research=Recherche scientifique
|
||||
|
||||
@ -14,37 +14,37 @@ interface DocLink {
|
||||
file: string
|
||||
}
|
||||
|
||||
export default function DocsPage() {
|
||||
const docs: DocLink[] = [
|
||||
{
|
||||
id: 'user-guide',
|
||||
title: 'Guide d\'utilisation',
|
||||
title: t('docs.userGuide'),
|
||||
file: 'user-guide.md',
|
||||
},
|
||||
{
|
||||
id: 'faq',
|
||||
title: 'FAQ',
|
||||
title: t('docs.faq'),
|
||||
file: 'faq.md',
|
||||
},
|
||||
{
|
||||
id: 'publishing',
|
||||
title: 'Guide de publication',
|
||||
title: t('docs.publishing'),
|
||||
file: 'publishing-guide.md',
|
||||
},
|
||||
{
|
||||
id: 'payment',
|
||||
title: 'Guide de paiement',
|
||||
title: t('docs.payment'),
|
||||
file: 'payment-guide.md',
|
||||
},
|
||||
]
|
||||
|
||||
export default function DocsPage() {
|
||||
const { selectedDoc, docContent, loading, loadDoc } = useDocs(docs)
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>{t('nav.documentation')} - zapwall.fr</title>
|
||||
<meta name="description" content="Documentation complète pour zapwall.fr" />
|
||||
<meta name="description" content={t('docs.meta.description')} />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
</Head>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user