File tree Expand file tree Collapse file tree 5 files changed +32
-27
lines changed Expand file tree Collapse file tree 5 files changed +32
-27
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,7 @@ export default function Card({
9
9
} ) {
10
10
return (
11
11
< div
12
- className = { `py-4 px-4 bg-white dark:bg-dark-700 rounded-lg ${
13
- classes || ''
14
- } `}
12
+ className = { ` ${ classes || '' } p-4 bg-white dark:bg-dark-700 rounded-lg` }
15
13
>
16
14
{ children }
17
15
</ div >
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export default function Layout({
13
13
sidebarContentRight,
14
14
} : LayoutProps ) {
15
15
return (
16
- < div className = "mx-auto bg-gray-100 dark:bg-dark-800 min-h-screen" >
16
+ < div className = "mx-auto bg-gray-200 dark:bg-dark-800 min-h-screen" >
17
17
< Navbar />
18
18
< div className = "grid grid-cols-9 gap-10 mt-10 px-60 pt-10" >
19
19
{ sidebarContentLeft && (
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -27,15 +27,29 @@ const StoryPreview = ({ story }: StoryPreviewProps) => {
27
27
)
28
28
29
29
return (
30
- < Card classes = "my-8 flex flex-col" >
31
- < UserSnippet user = { data . createdBy } />
32
- < div className = "prose dark:text-gray-100" >
33
- < h3 className = "dark:text-gray-200" > { data . title } </ h3 >
34
- < p > { data . abstractContent } </ p >
30
+ < div className = "my-8 flex flex-col bg-white dark:bg-dark-700 rounded-lg" >
31
+ < div >
32
+ < img className = "cover-image" src = { data . thumbnail } alt = "" />
35
33
</ div >
36
- < StoryAbstract abstract = { data . abstractContent } />
37
- < StoryPreviewFooter />
38
- </ Card >
34
+ < div className = "px-4 pb-4" >
35
+ < UserSnippet user = { data . createdBy } />
36
+ < div className = "prose dark:text-gray-100" >
37
+ < h3 className = "dark:text-gray-200" > { data . title } </ h3 >
38
+ < p > { data . abstractContent } </ p >
39
+ </ div >
40
+ < StoryPreviewFooter />
41
+ </ div >
42
+ < style jsx >
43
+ { `
44
+ .cover-image {
45
+ border-radius: 0.5rem 0.5rem 0 0;
46
+ max-height: 10rem;
47
+ width: 100%;
48
+ object-fit: cover;
49
+ }
50
+ ` }
51
+ </ style >
52
+ </ div >
39
53
)
40
54
}
41
55
Original file line number Diff line number Diff line change @@ -23,13 +23,13 @@ const UserSnippet = ({ user }: UserSnippetProps) => {
23
23
)
24
24
25
25
return (
26
- < div className = "flex" >
27
- < img
28
- src = { data . avatar }
29
- alt = { ` ${ data . handle } 's avatar` }
30
- className = "w-12 h-12 rounded-md"
31
- />
32
- < div className = "flex flex-col mx-2" >
26
+ < div className = "flex flex-col " >
27
+ < div className = "flex min-h-32" >
28
+ < img
29
+ src = { data . avatar }
30
+ alt = { ` ${ data . handle } 's avatar` }
31
+ className = "w-16 h-16 rounded-full -mt-8 border-4 dark:border-dark-700"
32
+ / >
33
33
< div className = "flex flex-row" >
34
34
< Link href = { `/${ data . handle } ` } >
35
35
< a className = " font-bold" > { `@${ data . handle } ` } </ a >
@@ -38,8 +38,8 @@ const UserSnippet = ({ user }: UserSnippetProps) => {
38
38
{ data . reputation . value }
39
39
</ span >
40
40
</ div >
41
- < span className = " text-sm" > { data . bio } </ span >
42
41
</ div >
42
+ < span className = " text-sm" > { data . bio } </ span >
43
43
</ div >
44
44
)
45
45
}
You can’t perform that action at this time.
0 commit comments