Updated structure, added footer and css classes

This commit is contained in:
Moris Zen
2018-06-27 13:22:17 +02:00
parent dd1bdd7543
commit ac2f3c0197
4 changed files with 38 additions and 15 deletions

10
src/components/Footer.js Normal file
View File

@@ -0,0 +1,10 @@
import React from 'react'
import Link from 'gatsby-link'
const Footer = () => (
<footer>
<h1>Footer</h1>
</footer>
)
export default Footer

View File

@@ -2,17 +2,19 @@ import React from 'react'
import Link from 'gatsby-link'
const Header = ({ siteTitle }) => (
<h1 style={{ margin: 0 }}>
<Link
to="/"
style={{
color: 'white',
textDecoration: 'none',
}}
>
{siteTitle}
</Link>
</h1>
<header>
<h1 style={{ margin: 0 }}>
<Link
to="/"
style={{
color: 'white',
textDecoration: 'none',
}}
>
{siteTitle}
</Link>
</h1>
</header>
)
export default Header

View File

@@ -2,11 +2,12 @@ import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import Header from '../components/header'
import Header from '../components/Header'
import Footer from '../components/Footer'
import "../styles/index.css"
const Layout = ({ children, data }) => (
<div className="font-sans">
<div className="font-sans container mx-auto">
<Helmet
title={data.site.siteMetadata.title}
meta={[
@@ -15,7 +16,10 @@ const Layout = ({ children, data }) => (
]}
/>
<Header siteTitle={data.site.siteMetadata.title} />
{children()}
<main>
{children()}
</main>
<Footer />
</div>
)

View File

@@ -1,10 +1,17 @@
import React, { Component } from 'react';
import Helmet from 'react-helmet'
class PostDefault extends Component {
render() {
const { data } = this.props
return (
<div>
<Helmet
title={`${data.wordpressPost.title} - Saburly.com`}
meta={[
{ name: 'description', content: 'We code & design great software' },
{ name: 'keywords', content: 'software, design, coding, programming, code, consulting' },
]}
/>
<h1>Specific Post - {data.wordpressPost.title}</h1>
<h1>Slug - {data.wordpressPost.slug}</h1>
<div dangerouslySetInnerHTML={{