Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from ZoltanVeres/kaldi-indexpage-improvements
Kaldi indexpage improvements
- Loading branch information
Showing
26 changed files
with
986 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import { IndexPageTemplate } from '../../templates/index-page' | ||
|
||
const IndexPagePreview = ({ entry, getAsset }) => { | ||
const entryBlurbs = entry.getIn(['data', 'intro', 'blurbs']) | ||
const blurbs = entryBlurbs ? entryBlurbs.toJS() : [] | ||
|
||
return ( | ||
<IndexPageTemplate | ||
image={entry.getIn(['data', 'image'])} | ||
title={entry.getIn(['data', 'title'])} | ||
heading={entry.getIn(['data', 'heading'])} | ||
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']) | ||
}, | ||
image1: { | ||
image: getAsset(entry.getIn(['data', 'main', 'image1', 'image'])), | ||
alt: entry.getIn(['data', 'main', 'image1', 'alt']), | ||
}, | ||
image2: { | ||
image: getAsset(entry.getIn(['data', 'main', 'image2', 'image'])), | ||
alt: entry.getIn(['data', 'main', 'image2', 'alt']), | ||
}, | ||
}} | ||
/> | ||
) | ||
} | ||
|
||
IndexPagePreview.propTypes = { | ||
entry: PropTypes.shape({ | ||
getIn: PropTypes.func, | ||
}), | ||
getAsset: PropTypes.func, | ||
} | ||
|
||
export default IndexPagePreview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import React from 'react' | ||
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 class="tile is-child box notification"> | ||
<p> | ||
<Link className="title has-text-primary is-size-4" to={post.fields.slug}> | ||
{post.frontmatter.title} | ||
</Link> | ||
<span> • </span> | ||
<p className="subtitle is-size-5">{post.frontmatter.date}</p> | ||
</p> | ||
<p> | ||
{post.excerpt} | ||
<br /> | ||
<br /> | ||
<Link className="button" to={post.fields.slug}> | ||
Keep Reading → | ||
</Link> | ||
</p> | ||
</article> | ||
</div> | ||
)))} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
BlogRoll.propTypes = { | ||
data: PropTypes.shape({ | ||
allMarkdownRemark: PropTypes.shape({ | ||
edges: PropTypes.array, | ||
}), | ||
}), | ||
} | ||
|
||
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") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`} | ||
render={(data, count) => ( | ||
<BlogRoll data={data} count={count} /> | ||
)} | ||
/> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import React from 'react' | ||
import { Link } from 'gatsby' | ||
|
||
import logo from '../img/logo.svg' | ||
import facebook from '../img/social/facebook.svg' | ||
import instagram from '../img/social/instagram.svg' | ||
import twitter from '../img/social/twitter.svg' | ||
import vimeo from '../img/social/vimeo.svg' | ||
|
||
const Footer = class extends React.Component { | ||
render() { | ||
return ( | ||
<footer className="footer has-background-black has-text-white-ter"> | ||
<div className="content has-text-centered"> | ||
<img | ||
src={logo} | ||
alt="Kaldi" | ||
style={{ width: '14em', height: '10em' }} | ||
/> | ||
</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"> | ||
<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"> | ||
Products | ||
</Link> | ||
</li> | ||
<li> | ||
<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> | ||
</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> | ||
</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"> | ||
<img | ||
className="fas fa-lg" | ||
src={twitter} | ||
alt="Twitter" | ||
style={{ width: '1em', height: '1em' }} | ||
/> | ||
</a> | ||
<a title="instagram" href="https://instagram.com"> | ||
<img | ||
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' }} | ||
/> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</footer> | ||
) | ||
} | ||
} | ||
|
||
export default Footer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.