overflow hidden auto -itendation
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { CitationProvider } from '@/components/context-citation';
|
||||
import { ReferencesContainer } from '@/components/container-references';
|
||||
import { CustomMDX } from '@/components/mdx-custom';
|
||||
import { CitationProvider } from "@/components/context-citation";
|
||||
import { ReferencesContainer } from "@/components/container-references";
|
||||
import { CustomMDX } from "@/components/mdx-custom";
|
||||
import { Breadcrumbs } from "./element-breadcrumbs";
|
||||
import Link from 'next/link';
|
||||
import { Publication } from '@/lib/publications';
|
||||
import { ProjectNavigation } from './project-navigation';
|
||||
import { Tag } from 'lucide-react';
|
||||
import Image from 'next/image';
|
||||
import Link from "next/link";
|
||||
import { Publication } from "@/lib/publications";
|
||||
import { ProjectNavigation } from "./project-navigation";
|
||||
import { Tag } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
|
||||
interface Post {
|
||||
code: string;
|
||||
@@ -22,15 +21,23 @@ interface Post {
|
||||
};
|
||||
}
|
||||
|
||||
interface NavigationLink { slug: string; title: string; }
|
||||
interface NavigationLink {
|
||||
slug: string;
|
||||
title: string;
|
||||
}
|
||||
interface ArticleProps {
|
||||
post: Post;
|
||||
publications: Publication[];
|
||||
navigation?: { prev: NavigationLink | null; next: NavigationLink | null; };
|
||||
navigation?: { prev: NavigationLink | null; next: NavigationLink | null };
|
||||
basePath: string;
|
||||
}
|
||||
|
||||
export function Article({ post, publications, navigation, basePath }: ArticleProps) {
|
||||
export function Article({
|
||||
post,
|
||||
publications,
|
||||
navigation,
|
||||
basePath,
|
||||
}: ArticleProps) {
|
||||
return (
|
||||
<CitationProvider publications={publications}>
|
||||
<main className="flex flex-col min-h-[100dvh] space-y-10">
|
||||
@@ -42,7 +49,9 @@ export function Article({ post, publications, navigation, basePath }: ArticlePro
|
||||
baseLabel={basePath.charAt(0).toUpperCase() + basePath.slice(1)}
|
||||
/>
|
||||
{post.frontmatter.date && (
|
||||
<time className="text-sm text-muted-foreground" dateTime={post.frontmatter.date}>
|
||||
<time
|
||||
className="text-sm text-muted-foreground"
|
||||
dateTime={post.frontmatter.date}>
|
||||
{new Date(post.frontmatter.date).toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
@@ -61,7 +70,7 @@ export function Article({ post, publications, navigation, basePath }: ArticlePro
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<article className="prose prose-stone dark:prose-invert max-w-none">
|
||||
<article className="prose prose-stone dark:prose-invert max-w-none overflow-hidden">
|
||||
{post.frontmatter.icon && (
|
||||
<div className="float-left mr-4 mb-2">
|
||||
<Image
|
||||
@@ -81,7 +90,10 @@ export function Article({ post, publications, navigation, basePath }: ArticlePro
|
||||
<div className="flex flex-wrap items-center gap-x-2 gap-y-1">
|
||||
<Tag className="size-4 text-muted-foreground" />
|
||||
{post.frontmatter.tags.map((tag: string) => (
|
||||
<Link key={tag} href={`/tags/${tag}`} className="px-3 py-1 text-sm font-medium bg-secondary text-secondary-foreground transition-colors hover:bg-primary hover:text-primary-foreground">
|
||||
<Link
|
||||
key={tag}
|
||||
href={`/tags/${tag}`}
|
||||
className="px-3 py-1 text-sm font-medium bg-secondary text-secondary-foreground transition-colors hover:bg-primary hover:text-primary-foreground">
|
||||
{tag}
|
||||
</Link>
|
||||
))}
|
||||
@@ -91,11 +103,15 @@ export function Article({ post, publications, navigation, basePath }: ArticlePro
|
||||
<ReferencesContainer />
|
||||
|
||||
{navigation && (
|
||||
<ProjectNavigation prev={navigation.prev} next={navigation.next} basePath={basePath} />
|
||||
<ProjectNavigation
|
||||
prev={navigation.prev}
|
||||
next={navigation.next}
|
||||
basePath={basePath}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</CitationProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user