-
Notifications
You must be signed in to change notification settings - Fork 17
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 #88 from kalwalt/dev
fixing in about page
- Loading branch information
Showing
7 changed files
with
1,013 additions
and
19,598 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "gatsby-starter-i18n-bulma", | ||
"private": true, | ||
"description": "Gatsby example site using i18n and bulma for CSS", | ||
"version": "0.1.5", | ||
"version": "0.9.7", | ||
"author": "Walter Perdan <[email protected]> (www.kalwaltart.it)", | ||
"dependencies": { | ||
"@babel/parser": "^7.3.4", | ||
|
@@ -11,6 +11,7 @@ | |
"@fortawesome/free-brands-svg-icons": "^5.7.2", | ||
"@fortawesome/free-solid-svg-icons": "^5.7.2", | ||
"@fortawesome/react-fontawesome": "^0.1.4", | ||
"@hot-loader/react-dom": "^16.3.1", | ||
"@reach/dialog": "^0.1.4", | ||
"@vizuaalog/bulmajs": "^0.9.0", | ||
"animate.css": "^3.7.0", | ||
|
@@ -49,7 +50,6 @@ | |
"node-sass": "^4.11.0", | ||
"path": "^0.12.7", | ||
"react": "^16.3.1", | ||
"@hot-loader/react-dom": "^16.3.1", | ||
"react-helmet": "^5.2.0", | ||
"react-icon-base": "^2.1.2", | ||
"react-icons": "^3.5.0", | ||
|
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,85 @@ | ||
import React from "react" | ||
import * as PropTypes from "prop-types" | ||
import { Link, graphql } from 'gatsby' | ||
import Img from "gatsby-image" | ||
import Layout from "../components/Layout" | ||
import Content, { HTMLContent } from "../components/Content" | ||
|
||
const AboutPageTemplate = ({ title, content, contentComponent }) => { | ||
const PageContent = contentComponent || Content | ||
return ( | ||
<div className="container content"> | ||
<h1 className="title animated bounceInLeft">{title}</h1> | ||
<section className="section"> | ||
<PageContent className="container content" content={content} /> | ||
</section> | ||
</div> | ||
) | ||
} | ||
|
||
AboutPageTemplate.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
content: PropTypes.string, | ||
contentComponent: PropTypes.func, | ||
} | ||
|
||
class AboutPage extends React.Component { | ||
|
||
render() { | ||
var dataMarkdown = []; | ||
if (this.props.data !== null) { | ||
dataMarkdown = this.props.data.markdownRemark | ||
} | ||
const jsonData = this.props.data.allArticlesJson.edges[0].node.articles; | ||
return ( | ||
<Layout className="container" data={this.props.data} jsonData={jsonData} location={this.props.location}> | ||
<div> | ||
<AboutPageTemplate | ||
contentComponent={HTMLContent} | ||
title={dataMarkdown.frontmatter.title} | ||
content={dataMarkdown.html} | ||
/> | ||
</div> | ||
</Layout> | ||
) | ||
} | ||
} | ||
|
||
AboutPage.propTypes = { | ||
data: PropTypes.object.isRequired, | ||
} | ||
|
||
export default AboutPage | ||
|
||
export const pageQuery = graphql` | ||
query AboutPageQuery($id: String!) { | ||
site { | ||
siteMetadata { | ||
languages { | ||
defaultLangKey | ||
langs | ||
} | ||
} | ||
} | ||
allArticlesJson(filter:{title:{eq:"home"}}){ | ||
edges{ | ||
node{ | ||
articles { | ||
en | ||
it | ||
} | ||
} | ||
} | ||
} | ||
markdownRemark(id: {eq: $id}) { | ||
html | ||
frontmatter { | ||
id | ||
title | ||
} | ||
fields { | ||
slug | ||
} | ||
} | ||
} | ||
` |
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.