Skip to content

Commit 7b7c39e

Browse files
committed
fix /articles
1 parent 308d42a commit 7b7c39e

File tree

1 file changed

+11
-32
lines changed

1 file changed

+11
-32
lines changed

src/templates/blog.js

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ import { graphql } from 'gatsby'
33
import Img from 'gatsby-image'
44
import { css } from '@emotion/core'
55
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'
99
import { bpMaxSM, bpMinMD } from '../lib/breakpoints'
10+
import { useTheme } from 'components/Theming'
1011

11-
const Blog = ({
12-
data: { site, allMdx },
13-
pageContext: { pagination, categories },
14-
}) => {
12+
const Blog = ({ data: { site, allMdx }, pageContext: { pagination } }) => {
1513
const { page, nextPagePath, previousPagePath } = pagination
1614

1715
const posts = page
@@ -48,7 +46,6 @@ const Blog = ({
4846
key={post.id}
4947
css={css`
5048
:not(:first-of-type) {
51-
margin-top: 20px;
5249
${bpMaxSM} {
5350
margin-top: 20px;
5451
}
@@ -59,8 +56,7 @@ const Blog = ({
5956
margin-top: 20px;
6057
}
6158
}
62-
background: white;
63-
padding: 40px;
59+
margin-top: 40px;
6460
${bpMaxSM} {
6561
padding: ${post.frontmatter.banner
6662
? '0 20px 20px 20px'
@@ -71,14 +67,7 @@ const Blog = ({
7167
`}
7268
>
7369
{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>
8271
<Link
8372
aria-label={`View ${post.frontmatter.title} article`}
8473
to={`/${post.fields.slug}`}
@@ -87,11 +76,7 @@ const Blog = ({
8776
</Link>
8877
</div>
8978
)}
90-
<h2
91-
css={css`
92-
margin: 0 0 20px 0;
93-
`}
94-
>
79+
<h2>
9580
<Link
9681
aria-label={`View ${post.frontmatter.title} article`}
9782
to={`/${post.fields.slug}`}
@@ -100,18 +85,12 @@ const Blog = ({
10085
</Link>
10186
</h2>
10287
{/* <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>
11089
<Link
11190
to={`/${post.fields.slug}`}
112-
aria-label={`view "${post.frontmatter.title}" article`}
91+
aria-label={`Read ${post.frontmatter.title}`}
11392
>
114-
Read Article
93+
Read Article
11594
</Link>
11695
</div>
11796
))}

0 commit comments

Comments
 (0)