File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import { h } from 'preact' ;
2
- import { Link } from 'preact-router' ;
3
2
import { usePrerenderData } from '@preact/prerender-data-provider' ;
4
3
import Markdown from 'markdown-to-jsx' ;
5
4
import style from './style' ;
@@ -34,7 +33,7 @@ function getBlogBody(data, isLoading) {
34
33
< div >
35
34
< h1 class = { style . blogtitle } > { details . title } </ h1 >
36
35
{ details . subtitle && < caption class = { style . blogsubtitle } > { details . subtitle } </ caption > }
37
- { details . cover && < img class = { style . blogcover } src = { details . cover } /> }
36
+ { details . cover && < div class = { style . blogcover } style = { `background-image:url( ${ details . cover } )` } /> }
38
37
< div class = { style . blogbody } >
39
38
< Markdown > { content } </ Markdown >
40
39
</ div >
Original file line number Diff line number Diff line change 2
2
max-width : 728px ;
3
3
width : 100% ;
4
4
margin : 0 auto 10em ;
5
- line-height : 1.5 ;
5
+ line-height : 1.6 rem ;
6
6
}
7
7
8
8
.blogtitle {
12
12
}
13
13
14
14
.blogbody {
15
- font-size : 1.2 rem ;
15
+ font-size : 1.1 rem ;
16
16
}
17
17
18
18
.blogbody img {
33
33
}
34
34
35
35
.blogcover {
36
- width : 100% ;
36
+ height : 400px ;
37
+ background-size : cover;
37
38
}
38
39
39
40
.loadingPlaceholder .blogtitle {
You can’t perform that action at this time.
0 commit comments