File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,14 @@ const blogs = (props) => {
11
11
}
12
12
13
13
if ( data && data . data ) {
14
+ const { details, content } = data . data ;
14
15
return (
15
16
< article class = { style . blogcontainer } >
16
- < h1 class = { style . blogtitle } > { data . data . details . title } </ h1 >
17
- < caption class = { style . blogsubtitle } > { data . data . details . subtitle } </ caption >
17
+ < h1 class = { style . blogtitle } > { details . title } </ h1 >
18
+ { details . subtitle && < caption class = { style . blogsubtitle } > { details . subtitle } </ caption > }
19
+ { details . cover && < img class = { style . blogcover } src = { details . cover } /> }
18
20
< div class = { style . blogbody } >
19
- < Markdown > { data . data . content } </ Markdown >
21
+ < Markdown > { content } </ Markdown >
20
22
</ div >
21
23
</ article >
22
24
) ;
Original file line number Diff line number Diff line change 8
8
.blogtitle {
9
9
font-size : 2.2rem ;
10
10
font-weight : 400 ;
11
+ margin-bottom : 0 ;
11
12
}
12
13
13
14
.blogbody {
19
20
}
20
21
21
22
.blogsubtitle {
22
- font-weight : 300 ;
23
- color : # 999 ;
23
+ color : # aaa ;
24
24
display : block;
25
+ text-align : left;
26
+ font-size : 1.2rem ;
27
+ margin-bottom : 2rem ;
28
+ }
25
29
30
+ .blogcover {
31
+ width : 100% ;
26
32
}
You can’t perform that action at this time.
0 commit comments