@@ -3,15 +3,13 @@ import { graphql } from 'gatsby'
3
3
import Img from 'gatsby-image'
4
4
import { css } from '@emotion/core'
5
5
import Container from 'components/Container'
6
- import SEO from '../ components/SEO'
7
- import Layout from '../ components/Layout'
8
- import Link from '../ components/Link'
6
+ import SEO from 'components/SEO'
7
+ import Layout from 'components/Layout'
8
+ import Link from 'components/Link'
9
9
import { bpMaxSM , bpMinMD } from '../lib/breakpoints'
10
+ import { useTheme } from 'components/Theming'
10
11
11
- const Blog = ( {
12
- data : { site, allMdx } ,
13
- pageContext : { pagination, categories } ,
14
- } ) => {
12
+ const Blog = ( { data : { site, allMdx } , pageContext : { pagination } } ) => {
15
13
const { page, nextPagePath, previousPagePath } = pagination
16
14
17
15
const posts = page
@@ -48,7 +46,6 @@ const Blog = ({
48
46
key = { post . id }
49
47
css = { css `
50
48
:not(:first-of-type) {
51
- margin-top: 20px;
52
49
${ bpMaxSM } {
53
50
margin-top: 20px;
54
51
}
@@ -59,8 +56,7 @@ const Blog = ({
59
56
margin-top: 20px;
60
57
}
61
58
}
62
- background: white;
63
- padding: 40px;
59
+ margin-top: 40px;
64
60
${ bpMaxSM } {
65
61
padding: ${ post . frontmatter . banner
66
62
? '0 20px 20px 20px'
@@ -71,14 +67,7 @@ const Blog = ({
71
67
` }
72
68
>
73
69
{ post . frontmatter . banner && (
74
- < div
75
- css = { css ( {
76
- margin : '0 -20px 30px -20px' ,
77
- [ bpMinMD ] : {
78
- margin : '0 0 40px 0' ,
79
- } ,
80
- } ) }
81
- >
70
+ < div >
82
71
< Link
83
72
aria-label = { `View ${ post . frontmatter . title } article` }
84
73
to = { `/${ post . fields . slug } ` }
@@ -87,11 +76,7 @@ const Blog = ({
87
76
</ Link >
88
77
</ div >
89
78
) }
90
- < h2
91
- css = { css `
92
- margin: 0 0 20px 0;
93
- ` }
94
- >
79
+ < h2 >
95
80
< Link
96
81
aria-label = { `View ${ post . frontmatter . title } article` }
97
82
to = { `/${ post . fields . slug } ` }
@@ -100,18 +85,12 @@ const Blog = ({
100
85
</ Link >
101
86
</ h2 >
102
87
{ /* <small>{post.frontmatter.date}</small> */ }
103
- < p
104
- css = { css `
105
- margin-top: 10px;
106
- ` }
107
- >
108
- { post . excerpt }
109
- </ p > { ' ' }
88
+ < p > { post . excerpt } </ p >
110
89
< Link
111
90
to = { `/${ post . fields . slug } ` }
112
- aria-label = { `view " ${ post . frontmatter . title } " article ` }
91
+ aria-label = { `Read ${ post . frontmatter . title } ` }
113
92
>
114
- Read Article →
93
+ Read Article
115
94
</ Link >
116
95
</ div >
117
96
) ) }
0 commit comments