File tree Expand file tree Collapse file tree 3 files changed +19
-44
lines changed Expand file tree Collapse file tree 3 files changed +19
-44
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ module.exports = () => {
20
20
return {
21
21
url : `/blog/${ blog . id } ` ,
22
22
data : {
23
+ title : blog . details . title ,
23
24
content : data
24
25
}
25
26
} ;
Original file line number Diff line number Diff line change @@ -10,8 +10,15 @@ const blogs = (props) => {
10
10
return ( < h1 > Loading</ h1 > ) ;
11
11
}
12
12
13
- if ( data && data . data && data . data . content ) {
14
- return ( < Markdown > { data . data . content } </ Markdown > ) ;
13
+ if ( data && data . data ) {
14
+ return (
15
+ < article class = { style . blogcontainer } >
16
+ < h1 class = { style . blogtitle } > { data . data . title } </ h1 >
17
+ < div class = { style . blogbody } >
18
+ < Markdown > { data . data . content } </ Markdown >
19
+ </ div >
20
+ </ article >
21
+ ) ;
15
22
}
16
23
17
24
return ( < h1 > Blog</ h1 > ) ;
Original file line number Diff line number Diff line change 1
- .pageBlogs {
2
- padding : 0 5% ;
1
+ .blogcontainer {
2
+ max-width : 728px ;
3
+ width : 100% ;
4
+ margin : 0 auto 10em ;
5
+ line-height : 1.5 ;
3
6
}
4
7
5
- .pageTitle {
6
- position : relative;
7
- display : inline-block;
8
+ .blogtitle {
9
+ font-size : 1.8rem ;
8
10
font-weight : 500 ;
9
- font-family : serif;
10
11
}
11
12
12
- .pageTitle : after {
13
- position : absolute;
14
- bottom : -5px ;
15
- left : 0px ;
16
- content : '' ;
17
- width : 75% ;
18
- border-bottom : 2px solid # FFC107 ;
19
- }
20
-
21
- h2 {
22
- font-weight : 400 ;
23
- font-size : 24px ;
24
- margin : 48px 0 12px 0 ;
25
- }
26
-
27
- .tag {
28
- padding : 4px 8px ;
29
- margin-left : 8px ;
30
- text-transform : lowercase;
31
- background-color : # ffdd037c ;
32
- border-radius : 5px ;
33
- color : # 999 ;
34
- font-size : 12px ;
35
- }
36
-
37
- .tag : first-child {
38
- margin-left : 0px ;
39
- }
40
-
41
- .preview {
42
- width : 50% ;
43
- line-height : 1.3 ;
44
- color : # 666 ;
45
- max-height : 80px ;
46
- overflow : hidden;
47
- text-overflow : ellipsis;
13
+ .blogbody {
14
+ font-size : 1.2rem ;
48
15
}
You can’t perform that action at this time.
0 commit comments