style: adjust style

This commit is contained in:
robin committed 2026-08-04 16:02:02 +02:00
1 parent 592b1a158a
commit aee4b8c567
5 files changed
+110 -78

No files matched your search

+18 -8
View File
@@ -1,9 +1,8 @@
import { getWikiPageBySlug } from '@/lib/wiki';
import { notFound } from 'next/navigation';
import rehypePrettyCode from 'rehype-pretty-code';
import { MDXRemote } from 'next-mdx-remote/rsc';
import { Callout, Grid, Card, Steps, Step, InlineCode, PreBlock } from '@/components/mdx-components';
import rehypePrettyCode from 'rehype-pretty-code';
import { Callout, Grid, Card, Steps, Step, InlineCode } from '@/components/mdx-components';
const mdxOptions = {
mdxOptions: {
@@ -11,7 +10,7 @@ const mdxOptions = {
[
rehypePrettyCode,
{
theme: 'github-dark', // oder 'one-dark-pro', 'nord', etc.
theme: 'github-dark',
keepBackground: true,
},
],
@@ -20,12 +19,18 @@ const mdxOptions = {
};
const mdxComponents = {
// Eigene UI-Komponenten
Callout,
Grid,
Card,
Steps,
Step,
h2: (props: any) => <h2 className="text-2xl font-bold text-white mt-12 mb-4" {...props} />,
// Custom Typography Überschreibungen
code: InlineCode,
h1: (props: any) => <h1 className="text-3xl font-bold text-white mt-8 mb-4 border-b border-zinc-800 pb-3" {...props} />,
h2: (props: any) => <h2 className="text-2xl font-bold text-white mt-10 mb-4" {...props} />,
h3: (props: any) => <h3 className="text-xl font-semibold text-white mt-6 mb-3" {...props} />,
};
type PageProps = {
@@ -43,9 +48,14 @@ export default async function Page({ params }: PageProps) {
}
return (
<article className="prose prose-invert max-w-none p-6">
<h1>{article.title}</h1>
{/* Direkte MDX-Rendering-Komponente von Next.js */}
<article className="prose prose-invert prose-blue max-w-4xl mx-auto p-6 md:p-12 min-h-screen">
<header className="mb-8 border-b border-zinc-800 pb-6">
<h1 className="text-4xl font-extrabold text-white mb-2 m-0">{article.title}</h1>
{article.updatedAt && (
<p className="text-zinc-500 text-sm m-0">Zuletzt aktualisiert: {article.updatedAt}</p>
)}
</header>
<MDXRemote
source={article.rawContent}
components={mdxComponents}