Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0ee28e2

Browse files
committed
refactor: redesign sponsor page
1 parent 62beda6 commit 0ee28e2

File tree

2 files changed

+26
-25
lines changed

2 files changed

+26
-25
lines changed

‎pages/others/sponsors.mdx‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Layout from 'lib/components/layout'
2-
import { Code, Link, Spacer, Badge, Text, Row, Col, useTheme } from '@zeit-ui/react'
2+
import { Link, Spacer, Text, User, useTheme, Grid } from '@zeit-ui/react'
33
import NextLink from 'next/link'
44
import Sponsors from '../../sponsors'
55

@@ -13,21 +13,15 @@ export const SponsorList = () => {
1313
const list = Sponsors
1414
.map(item => ({ ...item, amount: item.amount.toFixed(2) }))
1515
return (
16-
<div>
16+
<Grid.Containergap={2}>
1717
{list.map((item, index) => (
18-
<Row align="middle" key={`${item.name}-index`} style={{ marginBottom: '2rem' }}
19-
justify="space-between">
20-
<Col span={2}></Col>
21-
<Col span={8} style={{ overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', color: theme.palette.accents_4 }}>
22-
<Text b style={{ color: theme.palette.foreground }}>{item.name}
23-
{item.info && <span style={{ fontSize: '.7rem', fontWeight: '400', color: theme.palette.accents_4 }}><Spacer inline x={.2} />{item.info}</span>}
24-
</Text>
25-
</Col>
26-
<Col span={1}><Badge>{item.amount}$</Badge></Col>
27-
<Col span={4}></Col>
28-
</Row>
18+
<Grid key={`${item.name}-${index}`} xs={12} sm={8} alignItems="center">
19+
<User text={item.name} name={item.name} src={item.avatar}>
20+
<Text span size="12px">{item.amount}$ <Text type="secondary" span>{item.isSponsor ? '/ month' : ''}</Text></Text>
21+
</User>
22+
</Grid>
2923
))}
30-
</div>
24+
</Grid.Container>
3125
)
3226
}
3327

@@ -36,7 +30,7 @@ export const SponsorList = () => {
3630

3731

3832
你可以在 <NextLink href="/fixed/about"><Link color>关于我</Link></NextLink> 的页面找到捐赠链接,
39-
捐赠时的留言将在此展示
33+
按月赞助来自于 GitHub Sponsors
4034

4135
<Spacer y={2} />
4236
<SponsorList />

‎sponsors.js‎

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@ const Sponsors = [
22
{
33
name: 'Hanxing Yang',
44
amount: 1,
5-
info: 'GitHub Sponsor',
5+
isSponsor: true,
6+
avatar: 'https://avatars0.githubusercontent.com/u/1492263?s=96&v=4',
67
},
78
{
89
name: 'Neo Zhuo',
910
amount: 5,
10-
info: 'GitHub Sponsor',
11+
isSponsor: true,
12+
avatar: 'https://avatars3.githubusercontent.com/u/6374269?s=96&v=4',
1113
},
1214
{
1315
name: 'iqingting',
1416
amount: 50,
15-
info: 'GitHub Sponsor',
17+
isSponsor: true,
18+
avatar: 'https://avatars3.githubusercontent.com/u/3411958?s=96&v=4',
19+
1620
},
1721
{
1822
name: '*博',
@@ -21,32 +25,36 @@ const Sponsors = [
2125
{
2226
name: 'Kaito Sugimoto',
2327
amount: 1,
24-
info: 'GitHub Sponsor',
28+
isSponsor: true,
29+
avatar: 'https://avatars0.githubusercontent.com/u/36184621?s=96&v=4',
2530
},
2631
{
2732
name: 'geeeger',
2833
amount: 1,
29-
info: 'GitHub Sponsor',
34+
isSponsor: true,
35+
avatar: 'https://avatars3.githubusercontent.com/u/19817649?s=96&v=4',
3036
},
3137
{
3238
name: '**龙',
3339
amount: 1.43,
34-
info: '米饭',
3540
},
3641
{
3742
name: 'Aquariuslt',
3843
amount: 5,
39-
info: 'GitHub Sponsor',
44+
isSponsor: true,
45+
avatar: 'https://avatars3.githubusercontent.com/u/6554061?s=96&v=4',
4046
},
4147
{
4248
name: 'MonkeyLeeT',
4349
amount: 5,
44-
info: 'GitHub Sponsor',
50+
isSponsor: true,
51+
avatar: 'https://avatars0.githubusercontent.com/u/6754057?s=96&v=4',
4552
},
4653
{
4754
name: 'Lzumikonata',
4855
amount: 10,
49-
info: 'GitHub Sponsor',
56+
isSponsor: true,
57+
avatar: 'https://avatars2.githubusercontent.com/u/17999142?s=96&v=4',
5058
},
5159
{
5260
name: '*盈',
@@ -59,7 +67,6 @@ const Sponsors = [
5967
{
6068
name: '**清',
6169
amount: 1,
62-
info: '谢谢维特聚聚~~',
6370
},
6471
{
6572
name: '**强',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /