Skip to content

Commit e63932a

Browse files
CopilotTechQuery
andauthored
[add] Open Source Bounty page based on Lark BI Table views (#46)
Co-authored-by: South Drifter <[email protected]>
1 parent 7bb5bf3 commit e63932a

File tree

7 files changed

+235
-1
lines changed

7 files changed

+235
-1
lines changed

components/Navigator/MainNavigator.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const topNavBarMenu = ({ t }: typeof i18n): MenuItem[] => [
4141
{ href: '/project', title: t('open_source_projects') },
4242
{ href: '/issue', title: 'GitHub issues' },
4343
{ href: '/license-filter', title: t('license_filter') },
44+
{ href: '/finance', title: t('finance_page_title') },
4445
],
4546
},
4647
{
@@ -60,14 +61,15 @@ const topNavBarMenu = ({ t }: typeof i18n): MenuItem[] => [
6061
},
6162
],
6263
},
64+
{ href: '/bounty', title: t('bounty') },
6365
{
6466
title: t('NGO'),
6567
subs: [
66-
{ href: '/NGO', title: t('China_NGO_DB') },
6768
{
6869
href: 'https://open-source-bazaar.feishu.cn/wiki/VGrMwiweVivWrHkTcvpcJTjjnoY',
6970
title: t('Open_Source_NGO_plan'),
7071
},
72+
{ href: '/NGO', title: t('China_NGO_DB') },
7173
],
7274
},
7375
{

pages/bounty.tsx

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import { observer } from 'mobx-react';
2+
import { FC, useContext } from 'react';
3+
import { Card, Col, Container, Row } from 'react-bootstrap';
4+
5+
import { PageHead } from '../components/Layout/PageHead';
6+
import { I18nContext } from '../models/Translation';
7+
import styles from '../styles/Bounty.module.less';
8+
9+
type BountyViewProps = Record<'icon' | 'title' | 'url', string>;
10+
11+
const BountyView: FC<BountyViewProps> = ({ title, url, icon }) => (
12+
<Card className={`${styles.bountyCard} rounded-4`} body>
13+
<Card.Title as="h2" className="fs-5">
14+
{icon} <span className={styles.cardTitle}>{title}</span>
15+
</Card.Title>
16+
<div
17+
className={`${styles.iframeContainer} overflow-hidden w-100 rounded-4 position-relative`}
18+
style={{ height: 'calc(100vh - 10rem)' }}
19+
>
20+
<iframe className="border-0 h-100 w-100 rounded-4" title={title} loading="lazy" src={url} />
21+
</div>
22+
</Card>
23+
);
24+
25+
const BountyPage: FC = observer(() => {
26+
const { t } = useContext(I18nContext);
27+
28+
return (
29+
<>
30+
<PageHead title={t('bounty_page_title')} />
31+
32+
<section className={styles.hero}>
33+
<Container>
34+
<h1 className={`text-center ${styles.title}`}>{t('bounty_page_title')}</h1>
35+
<p className={`text-center ${styles.description}`}>{t('bounty_page_description')}</p>
36+
</Container>
37+
</section>
38+
39+
<Container className="my-5 d-flex flex-column gap-4">
40+
<BountyView
41+
title={t('bounty_dashboard')}
42+
url="https://open-source-bazaar.feishu.cn/share/base/dashboard/shrcnt4EaAxn3zx9faRarERgEqf"
43+
icon="📊"
44+
/>
45+
46+
<Row className="g-4">
47+
<Col xs={12} lg={8}>
48+
<BountyView
49+
icon="📋"
50+
title={t('bounty_task_rank')}
51+
url="https://open-source-bazaar.feishu.cn/share/base/view/shrcnUVgb8E73UthaB2Tk4glnSb"
52+
/>
53+
</Col>
54+
<Col xs={12} lg={4}>
55+
<BountyView
56+
icon="📝"
57+
title={t('bounty_task_submission')}
58+
url="https://open-source-bazaar.feishu.cn/share/base/form/shrcn2Ss97TSu3XgPi7mbZbrXLe"
59+
/>
60+
</Col>
61+
</Row>
62+
63+
<Row className="g-4">
64+
<Col xs={12} lg={8}>
65+
<BountyView
66+
icon="🏆"
67+
title={t('bounty_achievement_rank')}
68+
url="https://open-source-bazaar.feishu.cn/share/base/view/shrcne4IY9mYAfoo9a69oxyAdTb"
69+
/>
70+
</Col>
71+
<Col xs={12} lg={4}>
72+
<BountyView
73+
icon="✅"
74+
title={t('bounty_achievement_submission')}
75+
url="https://open-source-bazaar.feishu.cn/share/base/form/shrcn7yHGIOnPNjdZck3eBaiMVc"
76+
/>
77+
</Col>
78+
</Row>
79+
80+
<BountyView
81+
icon="🪙"
82+
title={t('bounty_token_rank')}
83+
url="https://open-source-bazaar.feishu.cn/share/base/view/shrcn6QBgImHEjFH5qDf5tjmrzb"
84+
/>
85+
86+
<BountyView
87+
icon="🦸"
88+
title={t('bounty_hero_rank')}
89+
url="https://open-source-bazaar.feishu.cn/share/base/view/shrcnyrOkRfqSAjWEjCQ9T4OOwc"
90+
/>
91+
92+
<BountyView
93+
icon="💳"
94+
title={t('bounty_debt_rank')}
95+
url="https://open-source-bazaar.feishu.cn/share/base/view/shrcnImOzkBXW3okKp3nLskPMgd"
96+
/>
97+
</Container>
98+
</>
99+
);
100+
});
101+
102+
export default BountyPage;

pages/finance/index.module.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
display: grid;
2727
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
2828
gap: 1rem;
29+
list-style: none;
2930
}
3031

3132
.statCard {

styles/Bounty.module.less

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// Fresh and lively bounty page styling inspired by hackathon page
2+
3+
.hero {
4+
position: relative;
5+
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
6+
padding: 4rem 0;
7+
overflow: hidden;
8+
color: #fff;
9+
10+
&::before {
11+
position: absolute;
12+
top: -50%;
13+
left: -50%;
14+
animation: grid-animation 20s linear infinite;
15+
background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
16+
background-size: 50px 50px;
17+
width: 200%;
18+
height: 200%;
19+
pointer-events: none;
20+
content: '';
21+
}
22+
}
23+
24+
@keyframes grid-animation {
25+
0% {
26+
transform: translate(0, 0);
27+
}
28+
100% {
29+
transform: translate(50px, 50px);
30+
}
31+
}
32+
33+
.title {
34+
margin-bottom: 1rem;
35+
font-weight: 700;
36+
font-size: 3rem;
37+
text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
38+
39+
@media (max-width: 768px) {
40+
font-size: 2rem;
41+
}
42+
}
43+
44+
.description {
45+
opacity: 0.9;
46+
margin: 0 auto;
47+
max-width: 800px;
48+
font-size: 1.2rem;
49+
50+
@media (max-width: 768px) {
51+
font-size: 1rem;
52+
}
53+
}
54+
55+
.bountyCard {
56+
transition: all 0.3s ease;
57+
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
58+
border: 2px solid transparent;
59+
border-radius: 16px;
60+
background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
61+
height: 100%;
62+
overflow: hidden;
63+
64+
&:hover {
65+
transform: translateY(-8px) scale(1.02);
66+
box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
67+
background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(240, 147, 251, 0.15));
68+
}
69+
}
70+
71+
.cardTitle {
72+
display: inline-block;
73+
margin-bottom: 1.5rem;
74+
border-bottom: 3px solid;
75+
border-image: linear-gradient(90deg, #f093fb, #f5576c, #ffd140) 1;
76+
background: linear-gradient(90deg, #f093fb, #f5576c, #ffd140);
77+
padding-bottom: 0.5rem;
78+
font-weight: 700;
79+
font-size: 1.3rem;
80+
-webkit-text-fill-color: transparent;
81+
background-clip: text;
82+
83+
@media (max-width: 768px) {
84+
font-size: 1.1rem;
85+
}
86+
}
87+
88+
.iframeContainer {
89+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
90+
}

translation/en-US.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export default {
77
open_collaborator_award: 'Open Collaborator Award',
88
activity: 'Activity',
99
hackathon: 'Hackathon',
10+
bounty: 'Open Source Bounty',
1011
open_source_projects: 'Open Source projects',
1112
open_source_bazaar: 'Open Source Bazaar',
1213
home_page: 'Home Page',
@@ -34,6 +35,18 @@ export default {
3435
volunteer: 'Volunteer',
3536
online_volunteer: 'Online Volunteer',
3637

38+
// Bounty page
39+
bounty_page_title: 'Open Source Bounty',
40+
bounty_page_description: 'Participate in open source projects and earn bounty rewards',
41+
bounty_dashboard: 'Dashboard',
42+
bounty_token_rank: 'Token Rank',
43+
bounty_task_rank: 'Task Rank',
44+
bounty_task_submission: 'Task Submission Form',
45+
bounty_achievement_rank: 'Achievement Rank',
46+
bounty_achievement_submission: 'Achievement Submission Form',
47+
bounty_hero_rank: 'Hero Rank',
48+
bounty_debt_rank: 'Debt Rank',
49+
3750
//License-tool Page
3851
license_filter: 'Open Source License Selector',
3952
feature_attitude_undefined: "I don't care",

translation/zh-CN.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default {
99
open_source_projects: '开源项目',
1010
activity: '活动',
1111
hackathon: '黑客马拉松',
12+
bounty: '开源悬赏',
1213
home_page: '主页',
1314
wiki: '知识库',
1415

@@ -33,6 +34,18 @@ export default {
3334
volunteer: '志愿者',
3435
online_volunteer: '线上志愿者',
3536

37+
// Bounty page
38+
bounty_page_title: '开源悬赏',
39+
bounty_page_description: '参与开源项目,获得悬赏奖励',
40+
bounty_dashboard: '仪表盘',
41+
bounty_token_rank: '代币榜',
42+
bounty_task_rank: '任务榜',
43+
bounty_task_submission: '任务发布表单',
44+
bounty_achievement_rank: '成果榜',
45+
bounty_achievement_submission: '成果提交表单',
46+
bounty_hero_rank: '英雄榜',
47+
bounty_debt_rank: '欠条榜',
48+
3649
//License-tool Page
3750
license_filter: '开源协议选择器',
3851
feature_attitude_undefined: '我不在乎',

translation/zh-TW.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default {
99
open_source_projects: '開源項目',
1010
activity: '活動',
1111
hackathon: '黑客馬拉松',
12+
bounty: '開源懸賞',
1213
home_page: '主頁',
1314
wiki: '知識庫',
1415

@@ -33,6 +34,18 @@ export default {
3334
volunteer: '志工',
3435
online_volunteer: '線上志工',
3536

37+
// Bounty page
38+
bounty_page_title: '開源懸賞',
39+
bounty_page_description: '參與開源項目,獲得懸賞獎勵',
40+
bounty_dashboard: '儀表板',
41+
bounty_token_rank: '代幣榜',
42+
bounty_task_rank: '任務榜',
43+
bounty_task_submission: '任務發布表單',
44+
bounty_achievement_rank: '成果榜',
45+
bounty_achievement_submission: '成果提交表單',
46+
bounty_hero_rank: '英雄榜',
47+
bounty_debt_rank: '欠條榜',
48+
3649
//License-tool Page
3750
license_filter: '開源許可證選擇器',
3851
feature_attitude_undefined: '我不在乎',

0 commit comments

Comments
 (0)