Skip to content

Commit 9e3a245

Browse files
committed
Merge branch 'main' into labor-hackathon-2026
2 parents bc438a9 + ee0cf17 commit 9e3a245

36 files changed

Lines changed: 2323 additions & 2161 deletions

.env

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ NEXT_PUBLIC_ACTIVITY_TABLE_ID = tblREEMxDOECZZrK
1111
NEXT_PUBLIC_PROJECT_TABLE_ID = tblGnY6Hm0nTSBR9
1212
NEXT_PUBLIC_AWARD_TABLE_ID = tblmYd5V5BMngAp2
1313

14-
NEXT_PUBLIC_STRAPI_API_HOST = https://china-ngo-db.onrender.com/api/
14+
NEXT_PUBLIC_STRAPI_API_HOST = https://test.nomad-home.cn/api/Lark/
15+
NEXT_PUBLIC_NGO_BASE_ID = Kfs0bHJZhaKtJLs3uBTcnynnnNf
16+
NEXT_PUBLIC_NGO_TABLE_ID = tbl3eTvwgMGukhqL
17+
NEXT_PUBLIC_NGO_YEAR_STATISTIC_TABLE_ID = tblNWHacXaiEYC50
18+
NEXT_PUBLIC_NGO_CITY_STATISTIC_TABLE_ID = tblFFyaTEpGAaZNl
19+
NEXT_PUBLIC_NGO_TYPE_STATISTIC_TABLE_ID = tblZeAOFqH6zX6Tr
1520

1621
SMTP_HOST = smtp.feishu.cn
1722
SMTP_PORT = 465

.npmrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
auto-install-peers = false
2-
//npm.pkg.github.com/:_authToken=${GH_PAT}
3-
@open-source-bazaar:registry=https://npm.pkg.github.com

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@
2222
## 开始
2323

2424
```bash
25-
npm install
26-
npm run dev
27-
# or
28-
yarn install
29-
yarn dev
25+
pnpm install
26+
pnpm dev
3027
```
3128

3229
可访问 http://localhost:3000.

components/Activity/Hackathon/ActionHub.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { FC, PropsWithChildren } from 'react';
1+
import type { FC, PropsWithChildren, ReactNode } from 'react';
22
import { Col, Container, Row } from 'react-bootstrap';
33

44
import { HackathonHeroAction } from './Hero';
@@ -14,7 +14,7 @@ export interface HackathonActionHubEntry {
1414

1515
export interface HackathonActionHubProps {
1616
entries: HackathonActionHubEntry[];
17-
facts: string[];
17+
facts: ReactNode[];
1818
primaryAction?: HackathonHeroAction;
1919
primaryDescription: string;
2020
primaryTitle: string;
@@ -90,8 +90,8 @@ export const HackathonActionHub: FC<PropsWithChildren<HackathonActionHubProps>>
9090
</nav>
9191

9292
<ul className={`list-unstyled ${styles.regFacts} d-flex flex-wrap gap-2 mt-4`}>
93-
{facts.map(fact => (
94-
<li key={fact}>{fact}</li>
93+
{facts.map((fact, index) => (
94+
<li key={index}>{fact}</li>
9595
))}
9696
</ul>
9797
</div>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
@import './theme.less';
2+
3+
.wrap {
4+
display: grid;
5+
gap: 0.75rem;
6+
max-width: 520px;
7+
}
8+
9+
.label {
10+
margin: 0;
11+
color: @muted;
12+
font-size: 0.72rem;
13+
font-family: @heading;
14+
letter-spacing: 0.1em;
15+
text-transform: uppercase;
16+
}
17+
18+
.grid {
19+
display: grid;
20+
grid-template-columns: repeat(4, minmax(0, 1fr));
21+
gap: 0.8rem;
22+
23+
.item {
24+
gap: 0.7rem;
25+
box-shadow:
26+
inset 0 0 0 1px rgba(255, 255, 255, 0.03),
27+
0 0 26px rgba(44, 232, 255, 0.08);
28+
border: 1px solid rgba(44, 232, 255, 0.26);
29+
border-radius: 18px;
30+
background: linear-gradient(180deg, rgba(44, 232, 255, 0.08), rgba(44, 232, 255, 0.03));
31+
min-height: 120px;
32+
33+
strong {
34+
color: #fff;
35+
font-size: clamp(2.3rem, 4vw, 3.8rem);
36+
line-height: 1;
37+
font-family: @heading;
38+
letter-spacing: 0.08em;
39+
}
40+
41+
span {
42+
color: rgba(255, 255, 255, 0.72);
43+
font-size: 0.82rem;
44+
font-family: @heading;
45+
letter-spacing: 0.2em;
46+
text-transform: uppercase;
47+
}
48+
}
49+
}
50+
51+
@media (max-width: 767px) {
52+
.grid {
53+
grid-template-columns: repeat(2, minmax(0, 1fr));
54+
55+
li {
56+
min-height: 96px;
57+
58+
strong {
59+
font-size: 2rem;
60+
}
61+
}
62+
}
63+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { TableCellValue } from 'mobx-lark';
2+
import { observer } from 'mobx-react';
3+
import { FC, useContext, useState } from 'react';
4+
import { Countdown, TimeUnit } from 'idea-react';
5+
6+
import { Agenda } from '../../../models/Hackathon';
7+
import { I18nContext } from '../../../models/Translation';
8+
import styles from './AgendaCountdown.module.less';
9+
import { agendaTypeLabelOf, resolveCountdownState } from './utility';
10+
11+
export interface AgendaCountdownProps {
12+
agendaItems: Agenda[];
13+
endTime?: TableCellValue;
14+
startTime?: TableCellValue;
15+
units: TimeUnit[];
16+
}
17+
18+
const AgendaCountdown: FC<AgendaCountdownProps> = observer(
19+
({ agendaItems, endTime, startTime, units }) => {
20+
const { t } = useContext(I18nContext);
21+
const [referenceTime, setReferenceTime] = useState(Date.now());
22+
const { nextItem: nextAgendaItem, countdownTo } = resolveCountdownState(
23+
agendaItems,
24+
referenceTime,
25+
startTime,
26+
endTime,
27+
);
28+
29+
if (!countdownTo) return null;
30+
31+
const countdownLabel = nextAgendaItem
32+
? agendaTypeLabelOf(nextAgendaItem.type, t, t('agenda'))
33+
: t('event_duration');
34+
35+
return (
36+
<div className={styles.wrap}>
37+
{countdownLabel && <p className={styles.label}>{countdownLabel}</p>}
38+
39+
<Countdown
40+
className={styles.grid}
41+
itemClassName={`${styles.item} d-flex flex-column align-items-center justify-content-center`}
42+
endTime={countdownTo}
43+
onEnd={() => setReferenceTime(Date.now())}
44+
units={units}
45+
/>
46+
</div>
47+
);
48+
},
49+
);
50+
export default AgendaCountdown;

components/Activity/Hackathon/Hero.module.less

Lines changed: 6 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -179,54 +179,10 @@
179179
}
180180
}
181181

182-
.countdownWrap {
183-
display: grid;
184-
gap: 0.75rem;
185-
max-width: 520px;
186-
}
187-
188-
.countdownLabel {
189-
color: @muted;
190-
font-size: 0.72rem;
191-
font-family: @heading;
192-
letter-spacing: 0.1em;
193-
text-transform: uppercase;
194-
}
195-
196-
.countdownGrid {
197-
display: grid;
198-
grid-template-columns: repeat(4, minmax(0, 1fr));
199-
gap: 0.8rem;
200-
}
201-
202-
.countdownCell {
203-
gap: 0.7rem;
204-
box-shadow:
205-
inset 0 0 0 1px rgba(255, 255, 255, 0.03),
206-
0 0 26px rgba(44, 232, 255, 0.08);
207-
border: 1px solid rgba(44, 232, 255, 0.26);
208-
border-radius: 18px;
209-
background: linear-gradient(180deg, rgba(44, 232, 255, 0.08), rgba(44, 232, 255, 0.03));
210-
min-height: 120px;
211-
212-
strong {
213-
color: #fff;
214-
font-size: clamp(2.3rem, 4vw, 3.8rem);
215-
line-height: 1;
216-
font-family: @heading;
217-
letter-spacing: 0.08em;
218-
}
219-
220-
span {
221-
color: rgba(255, 255, 255, 0.72);
222-
font-size: 0.82rem;
223-
font-family: @heading;
224-
letter-spacing: 0.2em;
225-
text-transform: uppercase;
226-
}
227-
}
228-
229182
.actionButton {
183+
// prettier-ignore
184+
.button-primary();
185+
230186
box-shadow: 0 0 28px rgba(44, 232, 255, 0.14);
231187
border-color: rgba(44, 232, 255, 0.48);
232188
background: rgba(44, 232, 255, 0.08);
@@ -240,6 +196,9 @@
240196
}
241197

242198
.actionButtonGhost {
199+
// prettier-ignore
200+
.button-ghost();
201+
243202
border-color: rgba(255, 255, 255, 0.16);
244203
background: rgba(255, 255, 255, 0.03);
245204
color: rgba(255, 255, 255, 0.82);
@@ -442,16 +401,4 @@
442401
.heroBadge {
443402
font-size: 0.72rem;
444403
}
445-
446-
.countdownGrid {
447-
grid-template-columns: repeat(2, minmax(0, 1fr));
448-
}
449-
450-
.countdownCell {
451-
min-height: 96px;
452-
453-
strong {
454-
font-size: 2rem;
455-
}
456-
}
457404
}

0 commit comments

Comments
 (0)