added quartz wiki

This commit is contained in:
2025-11-29 03:01:04 +01:00
parent 989253c72f
commit 1063619fef
25 changed files with 1351 additions and 149 deletions

65
app/api/wiki/[...path]/route.ts Executable file
View File

@@ -0,0 +1,65 @@
import { NextRequest, NextResponse } from 'next/server'
const WIKI_SERVICE_URL = process.env.WIKI_SERVICE_URL || 'http://wiki:8080'
export async function GET(
request: NextRequest,
{ params }: { params: { path: string[] } }
) {
try {
const path = params.path || []
const searchParams = request.nextUrl.searchParams.toString()
const queryString = searchParams ? `?${searchParams}` : ''
const wikiPath = path.length > 0 ? `/${path.join('/')}` : '/'
const wikiUrl = `${WIKI_SERVICE_URL}${wikiPath}${queryString}`
const response = await fetch(wikiUrl, {
headers: {
'User-Agent': request.headers.get('user-agent') || 'Next.js',
},
})
if (!response.ok) {
return new NextResponse('Wiki not found', { status: response.status })
}
const contentType = response.headers.get('content-type') || 'text/html'
const content = await response.text()
// Pass through headers
const headers = new Headers()
headers.set('Content-Type', contentType)
// Handle CORS if needed
headers.set('Access-Control-Allow-Origin', '*')
// Preserve cache headers
const cacheControl = response.headers.get('cache-control')
if (cacheControl) {
headers.set('Cache-Control', cacheControl)
}
return new NextResponse(content, {
status: response.status,
headers,
})
} catch (error) {
console.error('Wiki proxy error:', error)
return new NextResponse('Error loading wiki', { status: 500 })
}
}
// Handle other HTTP methods
export async function POST(request: NextRequest, { params }: { params: { path: string[] } }) {
return GET(request, { params })
}
export async function PUT(request: NextRequest, { params }: { params: { path: string[] } }) {
return GET(request, { params })
}
export async function DELETE(request: NextRequest, { params }: { params: { path: string[] } }) {
return GET(request, { params })
}

156
app/wiki/page.tsx Executable file
View File

@@ -0,0 +1,156 @@
'use client'
import { motion } from 'framer-motion'
import Navigation from '@/components/Navigation'
import Footer from '@/components/Footer'
import { useState } from 'react'
export default function Wiki() {
const [showFullPage, setShowFullPage] = useState(true)
// Wiki URL über den Next.js API Proxy
const wikiUrl = '/api/wiki'
if (showFullPage) {
// Vollständige Wiki-Seite als iframe
return (
<>
<Navigation />
<main style={{ paddingTop: '52px', height: 'calc(100vh - 52px)', display: 'flex', flexDirection: 'column' }}>
<div style={{
position: 'fixed',
top: '52px',
left: 0,
right: 0,
background: 'rgba(0, 0, 0, 0.9)',
padding: '10px 20px',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
zIndex: 999,
borderBottom: '1px solid rgba(255, 255, 255, 0.1)'
}}>
<h2 style={{ fontSize: '18px', fontWeight: '600', margin: 0 }}>doing-it Wiki</h2>
<button
onClick={() => setShowFullPage(false)}
className="btn btn-secondary"
style={{ padding: '8px 20px', fontSize: '14px' }}
>
Zur Übersicht
</button>
</div>
<iframe
src={wikiUrl}
style={{
width: '100%',
height: '100%',
border: 'none',
marginTop: '50px',
background: '#fff'
}}
title="doing-it Wiki"
/>
</main>
</>
)
}
// Übersichtsseite mit Option zum Öffnen des Wikis
return (
<>
<Navigation />
<main>
<section className="hero">
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.8 }}
className="hero-content"
>
<h1 className="hero-title">Wiki</h1>
<p className="hero-subtitle">
Unser Wissensbereich mit nützlichen Informationen<br />
rund um IT-Weiterbildung und Schulungen
</p>
<div className="hero-buttons" style={{ marginTop: '40px' }}>
<button
onClick={() => setShowFullPage(true)}
className="btn btn-primary"
style={{ cursor: 'pointer' }}
>
Wiki öffnen
</button>
<a
href={wikiUrl}
target="_blank"
rel="noopener noreferrer"
className="btn btn-secondary"
>
In neuem Tab öffnen
</a>
</div>
</motion.div>
</section>
<section className="features" style={{ paddingTop: '80px' }}>
<div className="container">
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.8, delay: 0.2 }}
>
<h2 style={{ fontSize: '48px', fontWeight: '600', marginBottom: '40px', textAlign: 'center' }}>
Was finden Sie im Wiki?
</h2>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: '30px', marginTop: '60px' }}>
<div className="feature-card">
<h3 style={{ fontSize: '24px', fontWeight: '600', marginBottom: '16px' }}>
IT-Grundlagen
</h3>
<p style={{ color: 'var(--color-text-secondary)', lineHeight: '1.6' }}>
Umfassende Informationen zu grundlegenden IT-Konzepten, Technologien und Best Practices.
</p>
</div>
<div className="feature-card">
<h3 style={{ fontSize: '24px', fontWeight: '600', marginBottom: '16px' }}>
Schulungsmethoden
</h3>
<p style={{ color: 'var(--color-text-secondary)', lineHeight: '1.6' }}>
Moderne Ansätze und bewährte Methoden für effektive IT-Schulungen und Weiterbildungen.
</p>
</div>
<div className="feature-card">
<h3 style={{ fontSize: '24px', fontWeight: '600', marginBottom: '16px' }}>
Ressourcen
</h3>
<p style={{ color: 'var(--color-text-secondary)', lineHeight: '1.6' }}>
Sammlung von nützlichen Tools, Materialien und weiterführenden Ressourcen.
</p>
</div>
</div>
</motion.div>
</div>
</section>
<section className="features" style={{ paddingTop: '80px', paddingBottom: '120px' }}>
<div className="container">
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.8, delay: 0.4 }}
style={{ textAlign: 'center' }}
>
<h3 style={{ fontSize: '32px', fontWeight: '600', marginBottom: '20px' }}>
Bereit loszulegen?
</h3>
<p style={{ color: 'var(--color-text-secondary)', fontSize: '20px', marginBottom: '40px' }}>
Klicken Sie auf den Button oben, um direkt zum Wiki zu gelangen.
</p>
</motion.div>
</div>
</section>
</main>
<Footer />
</>
)
}