Skip to content

Commit 8d8699f

Browse files
committed
more
Signed-off-by: bitliu <[email protected]>
1 parent ba0bdfe commit 8d8699f

File tree

2 files changed

+86
-8
lines changed

2 files changed

+86
-8
lines changed

website/src/pages/publications.js

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ const papers = [
2121
type: 'paper',
2222
title: 'Semantic Inference Routing Protocol (SIRP)',
2323
authors: 'Huamin Chen, Luay Jalil',
24-
venue: 'IETF Draft',
24+
venue: 'IETF',
2525
year: '2025',
2626
abstract: 'A protocol specification for semantic inference routing that enables intelligent request routing based on semantic understanding and inference requirements.',
2727
links: [
28-
{ type: 'paper', url: 'https://datatracker.ietf.org/doc/html/draft-chen-nmrg-semantic-inference-routing', label: '📄 IETF Draft' },
28+
{ type: 'paper', url: 'https://datatracker.ietf.org/doc/html/draft-chen-nmrg-semantic-inference-routing', label: '📄 Paper' },
2929
],
3030
featured: true,
3131
},
@@ -131,14 +131,23 @@ function PublicationCard({ item }) {
131131
export default function Publications() {
132132
const [activeFilter, setActiveFilter] = useState('all')
133133

134-
const allItems = [...papers, ...talks].sort((a, b) => {
134+
const sortedPapers = papers.sort((a, b) => {
135135
// Sort by featured first, then by year (descending), then by id
136136
if (a.featured && !b.featured) return -1
137137
if (!a.featured && b.featured) return 1
138138
if (a.year !== b.year) return parseInt(b.year) - parseInt(a.year)
139139
return a.id - b.id
140140
})
141141

142+
const sortedTalks = talks.sort((a, b) => {
143+
// Sort by featured first, then by year (descending), then by id
144+
if (a.featured && !b.featured) return -1
145+
if (!a.featured && b.featured) return 1
146+
if (a.year !== b.year) return parseInt(b.year) - parseInt(a.year)
147+
return a.id - b.id
148+
})
149+
150+
const allItems = [...sortedPapers, ...sortedTalks]
142151
const filteredItems = activeFilter === 'all'
143152
? allItems
144153
: allItems.filter(item => item.type === activeFilter)
@@ -197,11 +206,35 @@ export default function Publications() {
197206
</div>
198207

199208
<main>
200-
<div className={styles.publicationsList}>
201-
{filteredItems.map(item => (
202-
<PublicationCard key={item.id} item={item} />
203-
))}
204-
</div>
209+
{activeFilter === 'all' ? (
210+
<div className={styles.twoRowLayout}>
211+
{/* Papers Row */}
212+
<section className={styles.sectionRow}>
213+
<h2 className={styles.sectionTitle}>📄 Papers</h2>
214+
<div className={styles.publicationsRow}>
215+
{sortedPapers.map(item => (
216+
<PublicationCard key={item.id} item={item} />
217+
))}
218+
</div>
219+
</section>
220+
221+
{/* Talks Row */}
222+
<section className={styles.sectionRow}>
223+
<h2 className={styles.sectionTitle}>🎤 Talks</h2>
224+
<div className={styles.publicationsRow}>
225+
{sortedTalks.map(item => (
226+
<PublicationCard key={item.id} item={item} />
227+
))}
228+
</div>
229+
</section>
230+
</div>
231+
) : (
232+
<div className={styles.publicationsList}>
233+
{filteredItems.map(item => (
234+
<PublicationCard key={item.id} item={item} />
235+
))}
236+
</div>
237+
)}
205238

206239
{filteredItems.length === 0 && (
207240
<div className={styles.emptyState}>

website/src/pages/publications.module.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,35 @@
8888
box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
8989
}
9090

91+
/* Two-row layout for "All" view */
92+
.twoRowLayout {
93+
margin-bottom: 4rem;
94+
}
95+
96+
.sectionRow {
97+
margin-bottom: 4rem;
98+
}
99+
100+
.sectionTitle {
101+
font-size: 2.5rem;
102+
font-weight: 800;
103+
margin-bottom: 2rem;
104+
text-align: center;
105+
background: linear-gradient(45deg, #0969da, #8250df, #58a6ff);
106+
-webkit-background-clip: text;
107+
-webkit-text-fill-color: transparent;
108+
background-clip: text;
109+
text-shadow: 0 0 20px rgba(9, 105, 218, 0.2);
110+
}
111+
112+
.publicationsRow {
113+
display: grid;
114+
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
115+
gap: 2rem;
116+
margin-bottom: 2rem;
117+
}
118+
119+
/* Single column layout for filtered views */
91120
.publicationsList {
92121
display: flex;
93122
flex-direction: column;
@@ -308,6 +337,13 @@
308337
}
309338

310339
/* Responsive Design */
340+
@media (max-width: 1024px) {
341+
.publicationsRow {
342+
grid-template-columns: 1fr;
343+
gap: 2rem;
344+
}
345+
}
346+
311347
@media (max-width: 768px) {
312348
.container {
313349
padding: 1rem;
@@ -330,6 +366,15 @@
330366
gap: 2rem;
331367
}
332368

369+
.publicationsRow {
370+
grid-template-columns: 1fr;
371+
gap: 1.5rem;
372+
}
373+
374+
.sectionTitle {
375+
font-size: 2rem;
376+
}
377+
333378
.publicationCard {
334379
padding: 2rem;
335380
}

0 commit comments

Comments
 (0)