11import 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'
33import NextLink from ' next/link'
44import 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.Container gap = { 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 />
0 commit comments