@@ -5,14 +5,14 @@ import { formatDate } from '@/lib/date-formatting'
5
5
import { getAllPostsIds , getPostData } from '@/lib/posts'
6
6
import {
7
7
Avatar ,
8
+ AvatarGroup ,
9
+ Box ,
8
10
Container ,
9
11
Flex ,
10
12
Heading ,
11
13
Icon ,
12
14
Stack ,
13
15
Text ,
14
- Wrap ,
15
- WrapItem ,
16
16
} from '@chakra-ui/react'
17
17
import fs from 'fs'
18
18
import matter from 'gray-matter'
@@ -23,67 +23,57 @@ const Card = ({ frontmatter, id }) => {
23
23
const date = new Date ( frontmatter . date )
24
24
25
25
return (
26
- < Container
27
- my = { 20 }
28
- id = 'post'
29
- sx = { { bg : boxBackground , color : 'invert' } }
30
- maxW = { { base : '900px' , md : '930px' } }
31
- >
32
- < Flex direction = 'column' fontSize = { '2xl' } >
33
- < Stack direction = { 'row' } spacing = { 8 } justify = 'space-between' >
34
- < Stack >
35
- < Text my = { 8 } fontWeight = { 'bold' } opacity = { 0.5 } >
36
- xarray.dev / blog
37
- </ Text >
38
- </ Stack >
39
- < Flex
40
- direction = { 'row' }
41
- alignItems = { 'center' }
42
- justify = { 'right' }
43
- align = { 'right' }
44
- >
45
- < Image
26
+ < Box sx = { { bg : boxBackground , color : 'invert' } } h = { '100vh' } w = { '100vw' } >
27
+ < Container id = 'post' maxW = { { base : '900px' , md : '930px' } } >
28
+ < Flex direction = 'column' fontSize = { '2xl' } >
29
+ < Stack direction = { 'row' } spacing = { 8 } justify = 'space-between' >
30
+ < Stack >
31
+ < Text my = { 8 } fontWeight = { 'bold' } opacity = { 0.7 } >
32
+ xarray.dev / blog
33
+ </ Text >
34
+ </ Stack >
35
+ < Flex
36
+ direction = { 'row' }
37
+ alignItems = { 'center' }
46
38
justify = { 'right' }
47
39
align = { 'right' }
48
- w = { 40 }
49
- src = { '/dataset-diagram-logo.png' }
50
- alt = { 'xarray logo' }
51
- />
52
- </ Flex >
53
- </ Stack >
54
- < Heading as = { 'h1' } size = { '2xl' } my = { 8 } >
55
- { frontmatter . title }
56
- </ Heading >
40
+ >
41
+ < Image
42
+ justify = { 'right' }
43
+ align = { 'right' }
44
+ w = { 40 }
45
+ src = { '/dataset-diagram-logo.png' }
46
+ alt = { 'xarray logo' }
47
+ />
48
+ </ Flex >
49
+ </ Stack >
50
+ < Heading as = { 'h1' } size = { '2xl' } my = { 8 } >
51
+ { frontmatter . title }
52
+ </ Heading >
57
53
58
- < Stack direction = { 'row' } my = { 4 } align = { 'center' } >
59
- < Icon as = { MdOutlineCalendarToday } w = '8' h = '8' />
60
- < Text > { formatDate ( date ) } </ Text >
61
- </ Stack >
54
+ < Stack direction = { 'row' } my = { 4 } align = { 'center' } >
55
+ < Icon as = { MdOutlineCalendarToday } w = '8' h = '8' />
56
+ < Text > { formatDate ( date ) } </ Text >
57
+ </ Stack >
62
58
63
- < Stack direction = { 'row' } my = { 4 } align = { 'center' } >
64
- < Icon as = { MdPeopleOutline } w = '8' h = '8' />
59
+ < Stack direction = { 'row' } my = { 8 } align = { 'center' } >
60
+ < Icon as = { MdPeopleOutline } w = '8' h = '8' />
65
61
66
- < Wrap spacing = { 3 } my = { 8 } >
67
- { frontmatter . authors . map ( ( author ) => {
68
- return (
69
- < WrapItem key = { author . name } >
70
- < Flex align = { 'center' } direction = { 'column' } >
71
- < Avatar
72
- src = { `https://github.com/${ author . github } .png` }
73
- name = { author . name }
74
- size = { 'lg' }
75
- />
76
- < Text fontWeight = { 'bold' } fontSize = { 'md' } >
77
- { author . name }
78
- </ Text >
79
- </ Flex >
80
- </ WrapItem >
81
- )
82
- } ) }
83
- </ Wrap >
84
- </ Stack >
85
- </ Flex >
86
- </ Container >
62
+ < AvatarGroup size = { 'xl' } >
63
+ { frontmatter . authors . map ( ( author ) => {
64
+ return (
65
+ < Avatar
66
+ key = { author . name }
67
+ src = { `https://github.com/${ author . github } .png` }
68
+ name = { author . name }
69
+ />
70
+ )
71
+ } ) }
72
+ </ AvatarGroup >
73
+ </ Stack >
74
+ </ Flex >
75
+ </ Container >
76
+ </ Box >
87
77
)
88
78
}
89
79
0 commit comments