1
1
import React , { useState , useEffect } from "react"
2
2
import { useI18next , useTranslation } from "gatsby-plugin-react-i18next"
3
- import styled from "@emotion/styled"
4
3
import axios from "axios"
5
4
6
5
import Translation from "./Translation"
7
6
import Link from "./Link"
8
- import { FakeLinkExternal , CardItem as Item } from "./SharedStyledComponents"
9
7
10
8
import { GATSBY_FUNCTIONS_PATH } from "../constants"
11
-
12
- const Section = styled . div `
13
- display: flex;
14
- flex-wrap: wrap;
15
- margin-top: 2rem;
16
- margin-bottom: 2rem;
17
- width: 100%;
18
- `
19
-
20
- const ErrorMsg = styled . div `
21
- color: ${ ( props ) => props . theme . colors . fail } ;
22
- `
9
+ import {
10
+ Box ,
11
+ Flex ,
12
+ Heading ,
13
+ LinkBox ,
14
+ LinkOverlay ,
15
+ ListItem ,
16
+ Text ,
17
+ UnorderedList ,
18
+ useToken ,
19
+ VStack ,
20
+ } from "@chakra-ui/react"
23
21
24
22
export interface Label {
25
23
name : string
@@ -42,24 +40,54 @@ export interface IPropsIssueSection {
42
40
}
43
41
44
42
const IssueSection : React . FC < IPropsIssueSection > = ( { issues } ) => {
43
+ const [ cardBoxShadow ] = useToken ( "colors" , [ "cardBoxShadow" ] )
44
+
45
45
if ( ! issues ) {
46
46
return null
47
47
}
48
48
return (
49
- < Section >
49
+ < Flex flexWrap = "wrap" my = { 8 } width = "full" gap = { 4 } >
50
50
{ issues . map ( ( issue , idx ) => {
51
51
const url = issue . html_url ? issue . html_url : "#"
52
52
return (
53
- < Item to = { url } key = { idx } hideArrow = { true } >
54
- < div > { issue . title } </ div >
55
- { issue . errorMsg && < ErrorMsg > { issue . errorMsg } </ ErrorMsg > }
56
- < div >
57
- { issue . html_url && < FakeLinkExternal > Discuss</ FakeLinkExternal > }
58
- </ div >
59
- </ Item >
53
+ < LinkBox
54
+ key = { idx }
55
+ flex = { { base : "1 1 240px" , sm : "0 1 240px" } }
56
+ w = "100%"
57
+ p = { 4 }
58
+ color = "text"
59
+ borderRadius = "2px"
60
+ border = "1px solid"
61
+ borderColor = "lightBorder"
62
+ transition = "all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1)"
63
+ cursor = "pointer"
64
+ _hover = { {
65
+ boxShadow : cardBoxShadow ,
66
+ border : "1px solid" ,
67
+ borderColor : "black300" ,
68
+ } }
69
+ >
70
+ < Box > { issue . title } </ Box >
71
+ { issue . errorMsg && < Text color = "fail" > { issue . errorMsg } </ Text > }
72
+ < Box >
73
+ { issue . html_url && (
74
+ < LinkOverlay
75
+ href = { url }
76
+ textDecoration = "none"
77
+ _after = { {
78
+ content : '"↗"' ,
79
+ ml : 0.5 ,
80
+ } }
81
+ isExternal
82
+ >
83
+ Discuss
84
+ </ LinkOverlay >
85
+ ) }
86
+ </ Box >
87
+ </ LinkBox >
60
88
)
61
89
} ) }
62
- </ Section >
90
+ </ Flex >
63
91
)
64
92
}
65
93
@@ -157,94 +185,94 @@ const Roadmap: React.FC<IProps> = () => {
157
185
} , [ language ] )
158
186
159
187
return (
160
- < div >
161
- < p >
188
+ < Box >
189
+ < Text >
162
190
< Translation id = "page-about-p-1" />
163
- </ p >
164
- < p >
191
+ </ Text >
192
+ < Text >
165
193
< Link to = "https://github.com/ethereum/ethereum-org-website/blob/master/LICENSE" >
166
194
< Translation id = "page-about-link-1" />
167
195
</ Link >
168
196
.
169
- </ p >
170
- < p >
197
+ </ Text >
198
+ < Text >
171
199
< Translation id = "page-about-p-2" /> { " " }
172
200
< Link to = "https://github.com/ethereum/ethereum-org-website" >
173
201
< Translation id = "page-about-link-2" />
174
202
</ Link >
175
203
< Translation id = "page-about-p-3" />
176
- </ p >
177
- < ul >
178
- < li >
204
+ </ Text >
205
+ < UnorderedList >
206
+ < ListItem >
179
207
< Translation id = "page-about-li-1" />
180
- </ li >
181
- < li >
208
+ </ ListItem >
209
+ < ListItem >
182
210
< Translation id = "page-about-li-2" />
183
- </ li >
184
- < li >
211
+ </ ListItem >
212
+ < ListItem >
185
213
< Translation id = "page-about-li-3" />
186
- </ li >
187
- </ ul >
188
- < p >
214
+ </ ListItem >
215
+ </ UnorderedList >
216
+ < Text >
189
217
< Translation id = "page-about-p-4" />
190
- </ p >
191
- < h3 >
218
+ </ Text >
219
+ < Heading as = "h3" >
192
220
< Translation id = "page-about-h3" />
193
- </ h3 >
194
- < p >
221
+ </ Heading >
222
+ < Text >
195
223
< Translation id = "page-about-p-5" /> { " " }
196
224
< Link to = "https://github.com/ethereum/ethereum-org-website/labels/Status%3A%20In%20Progress" >
197
225
< Translation id = "page-about-link-3" /> { " " }
198
226
</ Link >
199
227
.
200
- </ p >
228
+ </ Text >
201
229
< IssueSection issues = { issues . inProgress } />
202
- < h3 >
230
+ < Heading as = "h3" >
203
231
< Translation id = "page-about-h3-2" />
204
- </ h3 >
205
- < p >
232
+ </ Heading >
233
+ < Text >
206
234
< Translation id = "page-about-p-6" /> { " " }
207
235
< Link to = "https://github.com/ethereum/ethereum-org-website/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Up+Next%22" >
208
236
< Translation id = "page-about-link-3" />
209
237
</ Link >
210
238
.
211
- </ p >
239
+ </ Text >
212
240
< IssueSection issues = { issues . planned } />
213
- < h3 >
241
+ < Heading as = "h3" >
214
242
< Translation id = "page-about-h3-1" />
215
- </ h3 >
216
- < p >
243
+ </ Heading >
244
+ < Text >
217
245
< Translation id = "page-about-p-7" /> { " " }
218
246
< Link to = "https://github.com/ethereum/ethereum-org-website/issues?q=is%3Aissue+is%3Aclosed" >
219
247
< Translation id = "page-about-link-6" /> { " " }
220
248
</ Link >
221
249
.
222
- </ p >
250
+ </ Text >
223
251
< IssueSection issues = { issues . implemented } />
224
- < h2 >
252
+ < Heading as = "h2" >
225
253
< Translation id = "page-about-h2" />
226
- </ h2 >
227
- < p >
254
+ </ Heading >
255
+ < Text >
228
256
< Translation id = "page-about-p-8" />
229
- </ p >
230
- < ul >
231
- < li >
257
+ </ Text >
258
+ < UnorderedList >
259
+ < ListItem >
232
260
< Link to = "https://discord.gg/bTCfS8C" >
233
261
< Translation id = "page-about-link-4" />
234
262
</ Link >
235
- </ li >
236
- < li >
263
+ </ ListItem >
264
+ < ListItem >
237
265
< Link to = "https://github.com/ethereum/ethereum-org-website/issues/new/choose" >
238
266
< Translation id = "page-about-link-7" />
239
267
</ Link >
240
- </ li >
241
- < li >
268
+ </ ListItem >
269
+ < ListItem >
242
270
< Link to = "https://twitter.com/ethdotorg" >
243
271
< Translation id = "page-about-link-5" />
244
272
</ Link >
245
- </ li >
246
- </ ul >
247
- </ div >
273
+ </ ListItem >
274
+ </ UnorderedList >
275
+ </ Box >
248
276
)
249
277
}
250
278
0 commit comments