Skip to content

Commit 00bbbf7

Browse files
authored
update research and people pages (#28)
1 parent 70a623c commit 00bbbf7

File tree

7 files changed

+381
-122
lines changed

7 files changed

+381
-122
lines changed

app/page.tsx

Lines changed: 4 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { ArrowRight, Brain, Code, Code2, FileText, Globe, Telescope } from "lucide-react"
1+
import { ArrowRight, Brain, Code2, Telescope } from "lucide-react"
22
import Link from "next/link"
33

44
import { AnimatedLogo } from "@/components/animations/AnimatedLogo"
55
import { FunderSection } from "@/components/funding/FunderSection"
6+
import { ResearchHighlight } from "@/components/research/ResearchHighlight"
67
import { Badge } from "@/components/ui/badge"
78
import { Button } from "@/components/ui/button"
89
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
@@ -11,7 +12,7 @@ import publicationsData from "@/data/publications.json"
1112
import researchData from "@/data/research.json"
1213

1314
export default function Home() {
14-
const featuredPublications = publicationsData.filter(pub => pub.featured).slice(0, 6)
15+
const featuredPublications = publicationsData.filter(pub => pub.featured).slice(0, 7)
1516

1617
return (
1718
<div className="flex flex-col">
@@ -136,107 +137,7 @@ export default function Home() {
136137
</section>
137138

138139
{/* Featured Research */}
139-
<section className="bg-muted/30 py-24 lg:py-32">
140-
<div className="section-container">
141-
<div className="flex items-end justify-between">
142-
<div>
143-
<h2 className="text-3xl font-bold tracking-tight sm:text-4xl">
144-
Featured Publications
145-
</h2>
146-
<p className="mt-4 text-lg text-muted-foreground">
147-
Recent advances from our lab
148-
</p>
149-
</div>
150-
<Button asChild variant="outline">
151-
<Link href="/publications">View All</Link>
152-
</Button>
153-
</div>
154-
155-
<div className="mt-16 grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
156-
{featuredPublications.map((pub) => {
157-
const pubWithImage = pub as typeof pub & { image?: string }
158-
return (
159-
<Card key={pub.id} className="group transition-all hover:shadow-soft-lg">
160-
<CardHeader>
161-
<Badge variant="outline" className="mb-3 w-fit">
162-
{pub.year}
163-
</Badge>
164-
<CardTitle className="text-lg leading-tight transition-colors group-hover:text-primary">
165-
{pub.title}
166-
</CardTitle>
167-
<CardDescription className="mt-2">
168-
{pub.authors.join(", ")}
169-
</CardDescription>
170-
</CardHeader>
171-
<CardContent className="space-y-4">
172-
{pubWithImage.image && (
173-
<div className="overflow-hidden rounded-lg border bg-white shadow-sm dark:bg-white/90">
174-
<img
175-
src={pubWithImage.image}
176-
alt={pub.title}
177-
className="h-auto w-full"
178-
/>
179-
</div>
180-
)}
181-
<div className="flex flex-wrap gap-2">
182-
{pub.tags.slice(0, 3).map((tag) => (
183-
<Badge key={tag} variant="secondary" className="text-xs">
184-
{tag}
185-
</Badge>
186-
))}
187-
</div>
188-
<p className="text-sm text-muted-foreground">{pub.venue}</p>
189-
{pub.links && (
190-
<div className="flex flex-wrap gap-2">
191-
{pub.links.arxiv && (
192-
<Button asChild variant="outline" size="sm">
193-
<a href={pub.links.arxiv} target="_blank" rel="noopener noreferrer">
194-
<FileText className="mr-2 size-3" />
195-
arXiv
196-
</a>
197-
</Button>
198-
)}
199-
{pub.links.biorxiv && (
200-
<Button asChild variant="outline" size="sm">
201-
<a href={pub.links.biorxiv} target="_blank" rel="noopener noreferrer">
202-
<FileText className="mr-2 size-3" />
203-
bioRxiv
204-
</a>
205-
</Button>
206-
)}
207-
{pub.links.github && (
208-
<Button asChild variant="outline" size="sm">
209-
<a href={pub.links.github} target="_blank" rel="noopener noreferrer">
210-
<Code className="mr-2 size-3" />
211-
Code
212-
</a>
213-
</Button>
214-
)}
215-
{pub.links.website && (
216-
<Button asChild variant="outline" size="sm">
217-
<a href={pub.links.website} target="_blank" rel="noopener noreferrer">
218-
<Globe className="mr-2 size-3" />
219-
Website
220-
</a>
221-
</Button>
222-
)}
223-
{pub.links.docs && (
224-
<Button asChild variant="outline" size="sm">
225-
<a href={pub.links.docs} target="_blank" rel="noopener noreferrer">
226-
<FileText className="mr-2 size-3" />
227-
Docs
228-
</a>
229-
</Button>
230-
)}
231-
</div>
232-
)}
233-
</CardContent>
234-
</Card>
235-
)
236-
})}
237-
</div>
238-
</div>
239-
</section>
140+
<ResearchHighlight publications={featuredPublications} />
240141

241142
{/* Impact Section */}
242143
<section className="py-24 lg:py-32">

app/people/page.tsx

Lines changed: 107 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ export default function PeoplePage() {
1616
const currentMembers = peopleData.filter(p => p.status === "current")
1717
const alumni = peopleData.filter(p => p.status === "alumni")
1818

19+
// Helper function to get primary link (website > scholar > other)
20+
const getPrimaryLink = (person: typeof peopleData[0]) => {
21+
if (!person.links) return null
22+
if (person.links.website) return person.links.website
23+
if (person.links.scholar) return person.links.scholar
24+
const otherLinks = Object.values(person.links)
25+
return otherLinks.length > 0 ? otherLinks[0] : null
26+
}
27+
1928
const pi = currentMembers.find(p => p.role === "Principal Investigator")
2029
const phd = currentMembers.filter(p => p.role === "PhD Student")
2130
const masters = currentMembers.filter(p => p.role === "Master Student")
@@ -66,7 +75,20 @@ export default function PeoplePage() {
6675
</div>
6776
)}
6877
<div className="flex-1">
69-
<CardTitle className="text-2xl">{pi.name}</CardTitle>
78+
<CardTitle className="text-2xl">
79+
{getPrimaryLink(pi) ? (
80+
<a
81+
href={getPrimaryLink(pi) as string}
82+
target="_blank"
83+
rel="noopener noreferrer"
84+
className="hover:underline"
85+
>
86+
{pi.name}
87+
</a>
88+
) : (
89+
pi.name
90+
)}
91+
</CardTitle>
7092
<CardDescription className="mt-2 text-lg">{pi.title}</CardDescription>
7193
{pi.bio && (
7294
<p className="mt-4 leading-relaxed text-muted-foreground">{pi.bio}</p>
@@ -133,7 +155,20 @@ export default function PeoplePage() {
133155
</div>
134156
)}
135157
<div className="min-w-0 flex-1">
136-
<CardTitle className="text-lg leading-tight">{person.name}</CardTitle>
158+
<CardTitle className="text-lg leading-tight">
159+
{getPrimaryLink(person) ? (
160+
<a
161+
href={getPrimaryLink(person) as string}
162+
target="_blank"
163+
rel="noopener noreferrer"
164+
className="hover:underline"
165+
>
166+
{person.name}
167+
</a>
168+
) : (
169+
person.name
170+
)}
171+
</CardTitle>
137172
<p className="mt-1 text-sm text-muted-foreground">{person.role}</p>
138173
</div>
139174
</div>
@@ -200,7 +235,20 @@ export default function PeoplePage() {
200235
</div>
201236
)}
202237
<div className="min-w-0 flex-1">
203-
<CardTitle className="text-lg leading-tight">{person.name}</CardTitle>
238+
<CardTitle className="text-lg leading-tight">
239+
{getPrimaryLink(person) ? (
240+
<a
241+
href={getPrimaryLink(person) as string}
242+
target="_blank"
243+
rel="noopener noreferrer"
244+
className="hover:underline"
245+
>
246+
{person.name}
247+
</a>
248+
) : (
249+
person.name
250+
)}
251+
</CardTitle>
204252
<p className="mt-1 text-sm text-muted-foreground">{person.role}</p>
205253
</div>
206254
</div>
@@ -268,7 +316,20 @@ export default function PeoplePage() {
268316
</div>
269317
)}
270318
<div className="min-w-0 flex-1">
271-
<CardTitle className="text-lg leading-tight">{person.name}</CardTitle>
319+
<CardTitle className="text-lg leading-tight">
320+
{getPrimaryLink(person) ? (
321+
<a
322+
href={getPrimaryLink(person) as string}
323+
target="_blank"
324+
rel="noopener noreferrer"
325+
className="hover:underline"
326+
>
327+
{person.name}
328+
</a>
329+
) : (
330+
person.name
331+
)}
332+
</CardTitle>
272333
<p className="mt-1 text-sm text-muted-foreground">{person.role}</p>
273334
</div>
274335
</div>
@@ -334,7 +395,20 @@ export default function PeoplePage() {
334395
</div>
335396
)}
336397
<div className="min-w-0 flex-1">
337-
<CardTitle className="text-lg leading-tight">{person.name}</CardTitle>
398+
<CardTitle className="text-lg leading-tight">
399+
{getPrimaryLink(person) ? (
400+
<a
401+
href={getPrimaryLink(person) as string}
402+
target="_blank"
403+
rel="noopener noreferrer"
404+
className="hover:underline"
405+
>
406+
{person.name}
407+
</a>
408+
) : (
409+
person.name
410+
)}
411+
</CardTitle>
338412
<p className="mt-1 text-sm text-muted-foreground">{person.role}</p>
339413
</div>
340414
</div>
@@ -397,7 +471,20 @@ export default function PeoplePage() {
397471
</div>
398472
)}
399473
<div className="min-w-0 flex-1">
400-
<CardTitle className="text-lg leading-tight">{person.name}</CardTitle>
474+
<CardTitle className="text-lg leading-tight">
475+
{getPrimaryLink(person) ? (
476+
<a
477+
href={getPrimaryLink(person) as string}
478+
target="_blank"
479+
rel="noopener noreferrer"
480+
className="hover:underline"
481+
>
482+
{person.name}
483+
</a>
484+
) : (
485+
person.name
486+
)}
487+
</CardTitle>
401488
<p className="mt-1 text-sm text-muted-foreground">{person.role}</p>
402489
</div>
403490
</div>
@@ -462,7 +549,20 @@ export default function PeoplePage() {
462549
</div>
463550
)}
464551
<div className="min-w-0 flex-1">
465-
<CardTitle className="text-lg leading-tight">{person.name}</CardTitle>
552+
<CardTitle className="text-lg leading-tight">
553+
{getPrimaryLink(person) ? (
554+
<a
555+
href={getPrimaryLink(person) as string}
556+
target="_blank"
557+
rel="noopener noreferrer"
558+
className="hover:underline"
559+
>
560+
{person.name}
561+
</a>
562+
) : (
563+
person.name
564+
)}
565+
</CardTitle>
466566
{person.degree && (
467567
<Badge variant="outline" className="mt-1 text-xs">{person.degree}</Badge>
468568
)}

0 commit comments

Comments
 (0)