95 lines
3.6 KiB
TypeScript
95 lines
3.6 KiB
TypeScript
import { getPublicationsData } from "@/lib/publications";
|
|
import { PublicationCard } from "@/components/publication-card";
|
|
import { DATA } from "@/app/resume";
|
|
import { Badge } from "@/components/ui/badge";
|
|
import fs from "fs";
|
|
import path from "path";
|
|
import { TrackedLink } from "@/components/util-tracked-link";
|
|
import { Metadata } from "next";
|
|
|
|
export const metadata: Metadata = {
|
|
alternates: {
|
|
canonical: `${DATA.url}/publications`,
|
|
},
|
|
}
|
|
|
|
export default function PublicationsPage() {
|
|
const publicationsRaw = getPublicationsData();
|
|
|
|
const publications = publicationsRaw.map((pub) => {
|
|
const pdfPath = path.join(process.cwd(), "public", "publications", `${pub.key}.pdf`);
|
|
const pdfExists = fs.existsSync(pdfPath);
|
|
return {
|
|
...pub,
|
|
pdfAvailable: pdfExists,
|
|
};
|
|
}).sort((a, b) => parseInt(b.year) - parseInt(a.year));
|
|
|
|
const publicationsByYear: { [year: string]: typeof publications } = {};
|
|
publications.forEach((pub) => {
|
|
if (!publicationsByYear[pub.year]) { publicationsByYear[pub.year] = []; }
|
|
publicationsByYear[pub.year].push(pub);
|
|
});
|
|
|
|
const years = Object.keys(publicationsByYear).sort((a, b) => parseInt(b) - parseInt(a));
|
|
|
|
return (
|
|
<main className="flex flex-col min-h-[100dvh] space-y-6">
|
|
<section id="publications">
|
|
<div className="mx-auto w-full max-w-4xl space-y-6">
|
|
<div className="space-y-2">
|
|
<h1 className="text-3xl font-bold tracking-tighter sm:text-5xl xl:text-6xl/none">
|
|
Publications
|
|
</h1>
|
|
<p className="text-muted-foreground">
|
|
This section details my scientific publications, primarily focused on advancing machine learning and deep neural networks. For an updated list of my work, please refer to my research profiles linked below.
|
|
</p>
|
|
</div>
|
|
|
|
<div className="flex flex-wrap gap-3 my-10 justify-center">
|
|
{Object.entries(DATA.contact.social)
|
|
//ts-
|
|
.filter(([, social]) => social.pub)
|
|
.map(([name, social]) => (
|
|
<TrackedLink href={social.url} key={name} eventName={`${name}-social`}>
|
|
<Badge className="flex gap-2 px-3 py-1 text-sm">
|
|
<social.icon className="size-4" />
|
|
{name}
|
|
</Badge>
|
|
</TrackedLink>
|
|
))}
|
|
</div>
|
|
<hr/>
|
|
<div className="space-y-8"> {/* Increased spacing between year sections */}
|
|
{years.map((year) => (
|
|
<div key={year} className="flex flex-col md:flex-row md:space-x-8">
|
|
<div className="md:w-16 flex-shrink-0">
|
|
<h2 className="sticky top-20 font-bold text-xl text-muted-foreground md:text-right">
|
|
{year}
|
|
</h2>
|
|
</div>
|
|
<div className="flex-grow space-y-4 pt-2 md:pt-0"> {/* Main content column */}
|
|
{publicationsByYear[year].map((pub) => (
|
|
<PublicationCard
|
|
key={pub.key}
|
|
bibtexKey={pub.key}
|
|
title={pub.title}
|
|
authors={pub.authors}
|
|
journal={pub.journal}
|
|
year={pub.year}
|
|
url={pub.url}
|
|
pdfUrl={pub.pdfUrl}
|
|
bibtex={pub.bibtex}
|
|
pdfAvailable={pub.pdfAvailable}
|
|
className="cards"
|
|
/>
|
|
))}
|
|
</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
);
|
|
} |