Skip to content

Commit 6351bb4

Browse files
committed
update news and news interface
1 parent 40839b4 commit 6351bb4

File tree

2 files changed

+110
-5
lines changed

2 files changed

+110
-5
lines changed

app/page.tsx

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Image from "next/image";
77
// import { Image } from "@heroui/image";
88

99
import { title, subtitle } from "@/components/primitives";
10+
import { newsList, News } from "@/config/news.ts"
1011

1112
function ResearchDirection({ title, image }: { title: string; image: string }) {
1213
return (
@@ -34,16 +35,64 @@ function ResearchDirection({ title, image }: { title: string; image: string }) {
3435
);
3536
}
3637

38+
39+
function replaceMarkdownLinks(text: string): React.ReactNode[] {
40+
const parts: React.ReactNode[] = [];
41+
const regex = /\[([^\]]+)\]\(([^)]+)\)/g;
42+
let lastIndex = 0;
43+
let match;
44+
45+
while ((match = regex.exec(text)) !== null) {
46+
const [fullMatch, title, url] = match;
47+
const matchStart = match.index;
48+
49+
// Add text before the link
50+
if (lastIndex < matchStart) {
51+
parts.push(text.slice(lastIndex, matchStart));
52+
}
53+
54+
// Add JSX Link component
55+
parts.push(
56+
<Link key={parts.length} href={url}>
57+
{title}
58+
</Link>
59+
);
60+
61+
lastIndex = matchStart + fullMatch.length;
62+
}
63+
64+
// Add remaining text after the last match
65+
if (lastIndex < text.length) {
66+
parts.push(text.slice(lastIndex));
67+
}
68+
69+
return parts;
70+
}
71+
72+
73+
function ExpandNews(news: News, index: number) {
74+
return (<li key={index}>
75+
<div style={{ display: 'flex', alignItems: 'flex-start' }}>
76+
<span style={{ width: '100px', flexShrink: 0 }}>
77+
<em>{news.date}</em>
78+
</span>
79+
<span style={{ marginLeft: '1em' }}>
80+
{replaceMarkdownLinks(news.content)}
81+
</span>
82+
</div>
83+
</li>)
84+
}
85+
3786
export default function Home() {
3887
return (
3988
<>
4089
<div className="p-4">
4190
<h1 className={subtitle()}>🔥 News</h1>
4291
<ScrollShadow className="w-full h-[180px] px-8">
4392
<ul>
44-
<li>
45-
<p>The lab has received an <Link href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2403317&HistoricalAwards=false">NSF core program award</Link> on building foundation models for scientific discovery</p>
46-
</li>
93+
{newsList.map((news, index) => ExpandNews(news, index))}
94+
95+
{/*
4796
<li>
4897
Rex gave a tutorial on Machine Learning in Network Science at{" "}
4998
<Link href="https://netsci2024.com/en/schools">NetSci 2024</Link>
@@ -82,7 +131,7 @@ export default function Home() {
82131
<li>
83132
Rex gave a talk on multimodal graph models at AWS. Date: Jan 11,
84133
2024
85-
</li>
134+
</li> */}
86135
</ul>
87136
</ScrollShadow>
88137
</div>

config/news.ts

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,60 @@
11
export interface News {
2-
content: any;
32
date: string | undefined;
3+
content: any;
44
}
5+
6+
7+
export const newsList: News[] = [
8+
{
9+
date: "Aug, 2025",
10+
content: "Tutorial on Non-Euclidean Foundation Models. International Conference on Knowledge Discovery and Data Mining (KDD)."
11+
},
12+
{
13+
date: "May, 2025",
14+
content: "Keynote on AI agent for science. WebConf 2025.",
15+
},
16+
{
17+
date: "May, 2025",
18+
content: "Organized Workshop on Graph Signal Processing (GSP 2025)."
19+
},
20+
{
21+
date: "May, 2025",
22+
content: "Organized Workshop on Non-Euclidean Foundation Models. WebConf 2025.",
23+
},
24+
{
25+
date: "April, 2025",
26+
content: "Invited Talk on Hyperbolic Foundation Models. University of Illinois Urbana Champaign."
27+
},
28+
{
29+
date: "April, 2025",
30+
content: "Invited Talk on Hyperbolic Large Language Models. Queen's University."
31+
},
32+
{
33+
date: "Dec, 2024",
34+
content: "Invited Talk on Time Series Representation Learning. Amazon.",
35+
},
36+
{
37+
date: "Nov, 2024",
38+
content: "Organized Workshop on Time Series Foundation Models. International Conference on AI in Finance (ICAIF 2024)",
39+
},
40+
{
41+
date: "Oct, 2024",
42+
content: "Invited Talk on Hyperbolic Representation Learning. University of Rochester."
43+
},
44+
{
45+
date: "Sep, 2024",
46+
content: "Keynote speech on Hyperbolic Representation Learning and Foundation Models. IMS-NTU Joint Workshop on Applied Geometry for Data Sciences."
47+
},
48+
{
49+
date: "Aug, 2024",
50+
content: "Invited Talk on LLM for Telecom.Ericsson, Sweden."
51+
},
52+
{
53+
date: "Aug, 2024",
54+
content: "The lab has received an [NSF core program award](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2403317&HistoricalAwards=false) on building foundation models for scientific discovery."
55+
},
56+
{
57+
date: "Jun, 2024",
58+
content: "Rex gave a tutorial on Machine Learning in Network Science at [NetSci 2024](https://netsci2024.com/en/schools)."
59+
}
60+
]

0 commit comments

Comments
 (0)