Skip to content

Commit

Permalink
Change post preview style
Browse files Browse the repository at this point in the history
  • Loading branch information
dantehemerson committed May 3, 2020
1 parent d1c4157 commit a80d50f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 40 deletions.
17 changes: 8 additions & 9 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require('dotenv').config()
const aboutData = require('./about')
console.log('NOTION TOKEN = ', process.env.GATSBY_NOTION_TOKEN)

module.exports = {
pathPrefix: `/`,
Expand Down Expand Up @@ -212,13 +211,13 @@ module.exports = {
endpoint: process.env.GATSBY_MAILCHIMP_LIST || '',
},
},
{
resolve: 'gatsby-source-notionso-dante-version',
options: {
name: 'Dante',
rootPageUrl: 'https://www.notion.so/dantecalderon/Blog-06dcf96249e14461a9a66619c18aaf57',
debug: false,
},
},
// {
// resolve: 'gatsby-source-notionso-dante-version',
// options: {
// name: 'Dante',
// rootPageUrl: 'https://www.notion.so/dantecalderon/Blog-06dcf96249e14461a9a66619c18aaf57',
// debug: false,
// },
// },
],
}
9 changes: 5 additions & 4 deletions src/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const ImageWrapper = styled.div`
width: 100%;
max-width: 500px;
${media.md`
width: 36%;
width: 25%;
`};
`
const Info = styled.div`
Expand All @@ -40,7 +40,7 @@ const Info = styled.div`
padding-top: 12px;
${media.md`
padding: 0 0 0 50px;
width: 64%;
width: 75%;
max-width: 100%;
`};
`
Expand All @@ -50,7 +50,7 @@ const Title = styled.h3`
transition: 0.3s;
font-size: 17px;
${media.sm`
font-size: 1.31951rem;
font-size: 1.1rem;
`}
${Container}:hover & {
color: #1976d2;
Expand All @@ -62,11 +62,12 @@ const Time = styled.p`
text-align: right;
padding: 6px 6px 6px;
`

const Excerpt = styled.p`
color: #757575;
font-size: 15px;
${media.sm`
font-size: 1rem;
font-size: 0.9rem;
`};
`

Expand Down
4 changes: 1 addition & 3 deletions src/components/SubscribeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ const SubscribeForm = () => {
e.preventDefault()
addToMailchimp(email)
.then(data => {
// console.log(data)
// alert(data.result + ' ' + data.msg)
Swal.fire({
type: data.result,
title: data.result === 'success' ? 'Success' : 'Error',
Expand All @@ -69,7 +67,7 @@ const SubscribeForm = () => {
cancelButtonClass: 'Btn',
onClose: () => {
if (data.result === 'success') setEmail('')
}
},
})
})
.catch(error => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/portfolio.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { pages } from '../utils'

const Portfolio = props => {
const posts = props.data.allMdx.edges || []
console.log('Dante: posts', posts)
const siteUrl = props.data.site.siteMetadata.siteUrl

return (
Expand Down
17 changes: 1 addition & 16 deletions src/templates/BlogListTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ import { pages } from '../utils'

const PostsWrapper = styled.div`
padding: 0 15px;
max-width: 1060px;
max-width: 900px;
margin: 0 auto 35px;
`

const Blog = props => {
const posts = props.data.allMdx.edges || []
const siteUrl = props.data.site.siteMetadata.siteUrl
console.log(props.data.allNotionPageDante)

const { currentPage, numPages, hasNextPage, hasPrevPage } = props.pageContext
return (
Expand Down Expand Up @@ -63,20 +62,6 @@ export const queryBlog = graphql`
siteUrl
}
}
allNotionPageDante(
filter: { isDraft: { eq: false } }
sort: { fields: [indexPage], order: DESC }
) {
edges {
node {
title
slug
excerpt
pageIcon
pageCover
}
}
}
allMdx(
sort: { fields: [frontmatter___date], order: DESC }
filter: { frontmatter: { model: { eq: "post" }, published: { eq: true } } }
Expand Down
8 changes: 1 addition & 7 deletions src/templates/TagsBlogListTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const BlogWithTags = props => {
const tagSlug = get(props, 'pageContext.tagSlug')
const tags = get(props, 'pageContext.tags')
const title = `${preferSpacedTag(tags)} - Blog`
console.log(props)
const posts = props.data.allMdx.edges || []
const siteUrl = props.data.site.siteMetadata.siteUrl
return (
Expand All @@ -38,18 +37,13 @@ const BlogWithTags = props => {
excerpt: node.excerpt,
date: node.frontmatter.date,
path: `/${node.fields.slug}`,
timeToRead: node.timeToRead
timeToRead: node.timeToRead,
}}
key={node.frontmatter.path}
/>
)
else return false
})}
<Pagination
limit={props.pageContext.limit}
numPages={props.pageContext.numPages}
currentPage={props.pageContext.currentPage}
/>
</PostsWrapper>
</div>
</Layout>
Expand Down

0 comments on commit a80d50f

Please sign in to comment.