Skip to content

Commit

Permalink
Merge pull request #214 from ZoltanVeres/yarn-formatting
Browse files Browse the repository at this point in the history
Reformatting code using prettier
  • Loading branch information
ZoltanVeres authored Mar 14, 2019
2 parents 819120f + d377b69 commit 19db4e6
Show file tree
Hide file tree
Showing 6 changed files with 186 additions and 174 deletions.
4 changes: 2 additions & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ module.exports = {
},
},
{
resolve:'gatsby-plugin-purgecss', // purges all unused/unreferenced css rules
resolve: 'gatsby-plugin-purgecss', // purges all unused/unreferenced css rules
options: {
develop: true, // Activates purging in npm run develop
develop: true, // Activates purging in npm run develop
purgeOnly: ['/all.sass'], // applies purging only on the bulma css file
},
}, // must be after other CSS plugins
Expand Down
6 changes: 3 additions & 3 deletions src/cms/preview-templates/IndexPagePreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ const IndexPagePreview = ({ entry, getAsset }) => {
image={entry.getIn(['data', 'image'])}
title={entry.getIn(['data', 'title'])}
heading={entry.getIn(['data', 'heading'])}
subheading = {entry.getIn(['data', 'subheading'])}
subheading={entry.getIn(['data', 'subheading'])}
description={entry.getIn(['data', 'description'])}
intro={{ blurbs }}
main={{
heading: entry.getIn(['data', 'main', 'heading']),
description: entry.getIn(['data', 'main', 'description']),
mainpitch: {
title: entry.getIn(['data','mainpitch', 'title']),
description: entry.getIn(['data','mainpitch', 'description'])
title: entry.getIn(['data', 'mainpitch', 'title']),
description: entry.getIn(['data', 'mainpitch', 'description']),
},
image1: {
image: getAsset(entry.getIn(['data', 'main', 'image1', 'image'])),
Expand Down
93 changes: 46 additions & 47 deletions src/components/BlogRoll.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,41 @@ import PropTypes from 'prop-types'
import { Link, graphql, StaticQuery } from 'gatsby'

class BlogRoll extends React.Component {

render() {
const { data } = this.props
const { edges: posts } = data.allMarkdownRemark

return (
<div className="columns is-multiline">
{posts && (posts
.map(({ node: post }) => (
<div
className="is-parent column is-6"
key={post.id}
>
<article className="tile is-child box notification">
<p>
<Link className="title has-text-primary is-size-4" to={post.fields.slug}>
{post.frontmatter.title}
</Link>
<span> &bull; </span>
<span className="subtitle is-size-5 is-block">{post.frontmatter.date}</span>
</p>
<p>
{post.excerpt}
<br />
<br />
<Link className="button" to={post.fields.slug}>
Keep Reading →
</Link>
</p>
{posts &&
posts.map(({ node: post }) => (
<div className="is-parent column is-6" key={post.id}>
<article className="tile is-child box notification">
<p>
<Link
className="title has-text-primary is-size-4"
to={post.fields.slug}
>
{post.frontmatter.title}
</Link>
<span> &bull; </span>
<span className="subtitle is-size-5 is-block">
{post.frontmatter.date}
</span>
</p>
<p>
{post.excerpt}
<br />
<br />
<Link className="button" to={post.fields.slug}>
Keep Reading →
</Link>
</p>
</article>
</div>
)))}
</div>
);
))}
</div>
)
}
}

Expand All @@ -51,30 +52,28 @@ BlogRoll.propTypes = {
export default () => (
<StaticQuery
query={graphql`
query BlogRollQuery {
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] },
filter: { frontmatter: { templateKey: { eq: "blog-post" } }}
) {
edges {
node {
excerpt(pruneLength: 400)
id
fields {
slug
}
frontmatter {
title
templateKey
date(formatString: "MMMM DD, YYYY")
query BlogRollQuery {
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] }
filter: { frontmatter: { templateKey: { eq: "blog-post" } } }
) {
edges {
node {
excerpt(pruneLength: 400)
id
fields {
slug
}
frontmatter {
title
templateKey
date(formatString: "MMMM DD, YYYY")
}
}
}
}
}
}
`}
render={(data, count) => (
<BlogRoll data={data} count={count} />
)}
render={(data, count) => <BlogRoll data={data} count={count} />}
/>
)
108 changes: 59 additions & 49 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,58 +20,68 @@ const Footer = class extends React.Component {
</div>
<div className="content has-text-centered has-background-black has-text-white-ter">
<div className="container has-background-black has-text-white-ter">
<div className="columns">
<div className="column is-4">
<div className="columns">
<div className="column is-4">
<section className="menu">
<ul className="menu-list">
<li><Link to="/" className="navbar-item">Home</Link></li>
<li><Link className="navbar-item" to="/about">About</Link></li>
<li><Link className="navbar-item" to="/products">
<ul className="menu-list">
<li>
<Link to="/" className="navbar-item">
Home
</Link>
</li>
<li>
<Link className="navbar-item" to="/about">
About
</Link>
</li>
<li>
<Link className="navbar-item" to="/products">
Products
</Link>
</li>
<li>
<Link className="navbar-item" to="/contact/examples">
Form Examples
</Link>
<Link className="navbar-item" to="/contact/examples">
Form Examples
</Link>
</li>
<li>
<a
className="navbar-item"
href="/admin/"
target="_blank"
rel="noopener noreferrer"
>
Admin
</a>
</li>
<li><a
className="navbar-item"
href="/admin/"
target="_blank"
rel="noopener noreferrer"
>
Admin
</a></li>
</ul>
</section>
</div>
<div className="column is-4">
</ul>
</section>
</div>
<div className="column is-4">
<section>
<ul className="menu-list">
<li>
<Link className="navbar-item" to="/blog">
Latest Stories
</Link>
</li>
<li>
<Link className="navbar-item" to="/contact">
Contact
</Link>
</li>
<li>
<Link className="navbar-item" to="/blog">
Latest Stories
</Link>
</li>
<li>
<Link className="navbar-item" to="/contact">
Contact
</Link>
</li>
</ul>
</section>
</div>
<div className="column is-4 social">

<a title="facebook" href="https://facebook.com">
<img
src={facebook}
alt="Facebook"
style={{ width: '1em', height: '1em' }}
/>
</a>
<a title="twitter" href="https://twitter.com">
</div>
<div className="column is-4 social">
<a title="facebook" href="https://facebook.com">
<img
src={facebook}
alt="Facebook"
style={{ width: '1em', height: '1em' }}
/>
</a>
<a title="twitter" href="https://twitter.com">
<img
className="fas fa-lg"
src={twitter}
Expand All @@ -81,21 +91,21 @@ const Footer = class extends React.Component {
</a>
<a title="instagram" href="https://instagram.com">
<img
src={instagram}
alt="Instagram"
style={{ width: '1em', height: '1em' }}
src={instagram}
alt="Instagram"
style={{ width: '1em', height: '1em' }}
/>
</a>
<a title="vimeo" href="https://vimeo.com">
<img
src={vimeo}
alt="Vimeo"
style={{ width: '1em', height: '1em' }}
src={vimeo}
alt="Vimeo"
style={{ width: '1em', height: '1em' }}
/>
</a>
</div>
</div>
</div>
</div>
</div>
</footer>
)
Expand Down
9 changes: 4 additions & 5 deletions src/pages/blog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import BlogRoll from '../../components/BlogRoll'

export default class BlogIndexPage extends React.Component {
render() {

return (
return (
<Layout>
<section className="section">
<div className="container">
<div className="content">
<div
<div
className="full-width-image-container margin-top-0"
style={{
backgroundImage: `url('/img/blog-index.jpg')`,
Expand All @@ -30,8 +29,8 @@ export default class BlogIndexPage extends React.Component {
</h1>
</div>
</div>
<BlogRoll />
</div>
<BlogRoll />
</div>
</section>
</Layout>
)
Expand Down
Loading

0 comments on commit 19db4e6

Please sign in to comment.