Skip to content

Commit 0039655

Browse files
committed
feat: annual-reports page
1 parent 809a741 commit 0039655

File tree

7 files changed

+76
-908
lines changed

7 files changed

+76
-908
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"react-countup": "^6.5.3",
3333
"react-dom": "^19.0.0",
3434
"react-icons": "^5.5.0",
35+
"react-pdf": "^10.2.0",
3536
"react-quill-new": "^3.4.6",
3637
"sanitize-html": "^2.17.0",
3738
"vditor": "^3.11.1"

src/data/annual-reports.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
export interface AnnualReport {
2+
id: string
3+
title: string
4+
year: number
5+
description: string
6+
coverImage: string
7+
publishDate: string
8+
pdfUrl: string
9+
}
10+
11+
// 模拟年度报告数据
12+
export const mockReports: AnnualReport[] = [
13+
{
14+
id: '2022',
15+
title: '2022年开源社年度报告',
16+
year: 2022,
17+
description: '展示2022年开源社在推动中国开源生态发展方面的卓越贡献。报告涵盖了重大开源项目孵化、社区活动组织、人才网络建设等多个维度的成就。',
18+
coverImage: '/img/report/report2022.png',
19+
publishDate: '2022-02-20',
20+
pdfUrl: '/report/2022开源社年度报告.pdf'
21+
},
22+
{
23+
id: '2021',
24+
title: '2021年开源社年度报告',
25+
year: 2021,
26+
description: '记录2021年开源社在疫情挑战下继续推进开源事业的坚韧历程。重点展示了线上活动创新、数字化转型以及国际合作的重要进展。',
27+
coverImage: '/img/report/report2021.png',
28+
publishDate: '2021-03-10',
29+
pdfUrl: '/report/2021开源社年度报告.pdf'
30+
},
31+
{
32+
id: '2020',
33+
title: '2020年开源社年度报告',
34+
year: 2020,
35+
description: '记录2020年开源社在疫情挑战下继续推进开源事业的坚韧历程。重点展示了线上活动创新、数字化转型以及国际合作的重要进展。',
36+
coverImage: '/img/report/report2020.png',
37+
publishDate: '2020-03-10',
38+
pdfUrl: '/report/2020开源社年度报告.pdf'
39+
}
40+
]

src/pages/_app.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { AppProps } from 'next/app';
22
import Layout from '../components/Layout';
33
import '../styles/globals.css';
4+
import '../styles/react-pdf.css';
45
import { GoogleAnalytics } from '@next/third-parties/google';
56

67
import { ConfigProvider, App as AntdApp } from 'antd';

0 commit comments

Comments
 (0)