Skip to content

Commit 086f8e9

Browse files
committed
style fixes
1 parent 20e3dc6 commit 086f8e9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/routes/blog/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { h } from 'preact';
2-
import { Link } from 'preact-router';
32
import { usePrerenderData } from '@preact/prerender-data-provider';
43
import Markdown from 'markdown-to-jsx';
54
import style from './style';
@@ -34,7 +33,7 @@ function getBlogBody(data, isLoading) {
3433
<div>
3534
<h1 class={style.blogtitle}>{details.title}</h1>
3635
{ 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})`} /> }
3837
<div class={style.blogbody}>
3938
<Markdown>{ content }</Markdown>
4039
</div>

src/routes/blog/style.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
max-width: 728px;
33
width: 100%;
44
margin: 0 auto 10em;
5-
line-height: 1.5;
5+
line-height: 1.6rem;
66
}
77

88
.blogtitle {
@@ -12,7 +12,7 @@
1212
}
1313

1414
.blogbody {
15-
font-size: 1.2rem;
15+
font-size: 1.1rem;
1616
}
1717

1818
.blogbody img {
@@ -33,7 +33,8 @@
3333
}
3434

3535
.blogcover {
36-
width: 100%;
36+
height: 400px;
37+
background-size: cover;
3738
}
3839

3940
.loadingPlaceholder .blogtitle {

0 commit comments

Comments
 (0)