Skip to content

Commit a1f105c

Browse files
brian033claude
andcommitted
content: add 2025 publications, year filter, and remove page heroes
- Add 4 new 2025 publications (CGH, entomology, BIB, precision oncology) - Replace single-select year filter with multi-select toggle buttons - Remove PageHero from publication, blog, and member pages - Fix background gradient fade on long pages with background-attachment: fixed - Simplify publication link text to "Link" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d40ebcb commit a1f105c

8 files changed

Lines changed: 97 additions & 26 deletions

File tree

src/app/App.test.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ describe("App routing and shared layout", () => {
3232

3333
test("renders all route-level page heroes through the shared shell", () => {
3434
const routes = [
35-
{ path: "/publication", name: /publication archive/i },
36-
{ path: "/member", name: /lab members/i },
37-
{ path: "/blog", name: /selected reading/i },
3835
{ path: "/galaxy", name: /NTU Galaxy / }
3936
];
4037

src/components/sections/PublicationList.tsx

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,61 @@
1+
import { useState } from "react";
12
import { publicationGroups } from "../../data/mock/publications";
23
import { ExternalLink } from "../ui/ExternalLink";
34
import { SectionShell } from "../ui/SectionShell";
45

56
export function PublicationList() {
7+
const allYears = publicationGroups.map((g) => g.year);
8+
const [selectedYears, setSelectedYears] = useState<Set<string>>(new Set(allYears));
9+
10+
const allSelected = selectedYears.size === allYears.length;
11+
12+
function toggleYear(year: string) {
13+
setSelectedYears((prev) => {
14+
const next = new Set(prev);
15+
if (next.has(year)) {
16+
next.delete(year);
17+
} else {
18+
next.add(year);
19+
}
20+
return next;
21+
});
22+
}
23+
24+
function toggleAll() {
25+
setSelectedYears(allSelected ? new Set() : new Set(allYears));
26+
}
27+
28+
const filtered = publicationGroups.filter((g) => selectedYears.has(g.year));
29+
630
return (
731
<SectionShell className="pt-10">
32+
<div className="mb-8 flex flex-wrap gap-2">
33+
<button
34+
onClick={toggleAll}
35+
className={`rounded-full px-4 py-1.5 text-sm font-semibold transition-colors ${
36+
allSelected
37+
? "bg-navy text-white"
38+
: "border border-slate-200 bg-white text-slate-600 hover:text-navy"
39+
}`}
40+
>
41+
All
42+
</button>
43+
{allYears.map((year) => (
44+
<button
45+
key={year}
46+
onClick={() => toggleYear(year)}
47+
className={`rounded-full px-4 py-1.5 text-sm font-semibold transition-colors ${
48+
selectedYears.has(year)
49+
? "bg-navy text-white"
50+
: "border border-slate-200 bg-white text-slate-600 hover:text-navy"
51+
}`}
52+
>
53+
{year}
54+
</button>
55+
))}
56+
</div>
857
<div className="space-y-12">
9-
{publicationGroups.map((group) => (
58+
{filtered.map((group) => (
1059
<section key={group.year} aria-labelledby={`publication-year-${group.year}`}>
1160
<div className="mb-5 flex items-center gap-4">
1261
<h2 id={`publication-year-${group.year}`} className="text-3xl">
@@ -25,7 +74,7 @@ export function PublicationList() {
2574
<h3 className="mt-4 text-2xl">{item.title}</h3>
2675
<p className="mt-3 max-w-4xl text-sm leading-7 text-slate-600">{item.authors}</p>
2776
<div className="mt-5">
28-
<ExternalLink href={item.href}>Read publication record</ExternalLink>
77+
<ExternalLink href={item.href}>Link</ExternalLink>
2978
</div>
3079
</article>
3180
))}

src/components/ui/PageHero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function PageHero({ eyebrow, title, summary, actions, strapline, subtitle
3434
<div className="page-grid relative">
3535
<div className="grid gap-8 lg:grid-cols-[1.2fr_0.8fr] lg:items-stretch">
3636
<div className="rounded-[2rem] border border-white/50 bg-white/80 p-8 shadow-glass backdrop-blur-md sm:p-10">
37-
<Eyebrow>{eyebrow}</Eyebrow>
37+
{eyebrow ? <Eyebrow>{eyebrow}</Eyebrow> : null}
3838
<h1 className="mt-4 max-w-3xl text-4xl leading-tight sm:text-5xl lg:text-6xl">{title}</h1>
3939
{strapline ? <p className="mt-4 text-lg font-semibold text-slate-700">{strapline}</p> : null}
4040
{subtitle ? <h3 className="mt-4 text-xl font-semibold text-primary sm:text-2xl">{subtitle}</h3> : null}

src/data/mock/publications.ts

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,54 @@
11
import type { PageHeroContent, PublicationYearGroup } from "../../types/content";
22

33
export const publicationHero: PageHeroContent = {
4-
eyebrow: "Publication",
4+
eyebrow: "",
55
title: "Publication Archive",
66
summary:
77
"A curated, year-grouped archive of papers and talks spanning protein sequence analysis, variant interpretation, immunogenomics, and precision medicine."
88
};
99

1010
export const publicationGroups: PublicationYearGroup[] = [
11+
{
12+
year: "2025",
13+
items: [
14+
{
15+
id: "pub_072",
16+
year: "2025",
17+
dateLabel: "14 May 2025",
18+
title: "Whole Exome Sequencing-identified Germline Variants Underlie High Familial Risk and Early-onset Colorectal Cancer in Taiwan",
19+
venue: "Clinical Gastroenterology and Hepatology",
20+
authors: "Yi-Chen Huang*, Yen-Nien Chen*, An-Ko Chung, Yu-An Chen, Pei-Lung Chen, Tang-Long Shen, Chien-Yu Chen, and Han-Mo Chiu",
21+
href: "https://www.sciencedirect.com/science/article/pii/S1542356525006603"
22+
},
23+
{
24+
id: "pub_073",
25+
year: "2025",
26+
dateLabel: "25 Feb 2025",
27+
title: "Comparing organophosphate and pyrethroid resistance levels of Aedes aegypti (Diptera: Culicidae) in frequent and infrequent application areas of Taiwan",
28+
venue: "Journal of Asia-Pacific Entomology",
29+
authors: "Chang-Yu Wu, Shu-Mei Dai, Chin-Gi Huang, Yu-Hsien Chen, Wen-Ting Wang, Chien-Yu Chen, Ju-Chun Hsu*",
30+
href: "https://www.sciencedirect.com/science/article/abs/pii/S1226861525000524"
31+
},
32+
{
33+
id: "pub_074",
34+
year: "2025",
35+
dateLabel: "25 Feb 2025",
36+
title: "A large language model framework for literature-based disease–gene association prediction",
37+
venue: "Briefings in Bioinformatics",
38+
authors: "Peng-Hsuan Li, Yih-Yun Sun, Hsueh-Fen Juan, Chien-Yu Chen, Huai-Kuang Tsai, Jia-Hsin Huang*",
39+
href: "https://academic.oup.com/bib/article/26/1/bbaf070/8042066?searchresult=1"
40+
},
41+
{
42+
id: "pub_075",
43+
year: "2025",
44+
dateLabel: "3 Feb 2025",
45+
title: "Annotation-free deep learning for predicting gene mutations from whole slide images of acute myeloid leukemia",
46+
venue: "Precision Oncology",
47+
authors: "Bo-Han Wei, Xavier Cheng-Hong Tsai, Kuo-Jui Sun, Min-Yen Lo, Sheng-Yu Hung, Wen-Chien Chou, Hwei-Fang Tien, Hsin-An Hou, Chien-Yu Chen*",
48+
href: "https://www.nature.com/articles/s41698-025-00804-0"
49+
}
50+
]
51+
},
1152
{
1253
year: "2024",
1354
items: [

src/pages/BlogPage.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
import { BlogCardGrid } from "../components/sections/BlogCardGrid";
2-
import { blogHero } from "../data/mock/blog";
3-
import { PageHero } from "../components/ui/PageHero";
42

53
export function BlogPage() {
6-
return (
7-
<>
8-
<PageHero {...blogHero} />
9-
<BlogCardGrid />
10-
</>
11-
);
4+
return <BlogCardGrid />;
125
}

src/pages/MemberPage.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import { FeaturedPISection } from "../components/sections/FeaturedPISection";
22
import { MemberDirectorySection } from "../components/sections/MemberDirectorySection";
3-
import { memberHero } from "../data/mock/members";
4-
import { PageHero } from "../components/ui/PageHero";
53

64
export function MemberPage() {
75
return (
86
<>
9-
<PageHero {...memberHero} />
107
<FeaturedPISection />
118
<MemberDirectorySection />
129
</>

src/pages/PublicationPage.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
import { PublicationList } from "../components/sections/PublicationList";
2-
import { publicationHero } from "../data/mock/publications";
3-
import { PageHero } from "../components/ui/PageHero";
42

53
export function PublicationPage() {
6-
return (
7-
<>
8-
<PageHero {...publicationHero} />
9-
<PublicationList />
10-
</>
11-
);
4+
return <PublicationList />;
125
}

src/styles/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
background-image:
1919
radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 28%),
2020
linear-gradient(180deg, #f8fafc 0%, #f5f7fb 48%, #f8fafc 100%);
21+
background-attachment: fixed;
2122
}
2223

2324
h1,

0 commit comments

Comments
 (0)