Updated structure, added footer and css classes
This commit is contained in:
10
src/components/Footer.js
Normal file
10
src/components/Footer.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import Link from 'gatsby-link'
|
||||||
|
|
||||||
|
const Footer = () => (
|
||||||
|
<footer>
|
||||||
|
<h1>Footer</h1>
|
||||||
|
</footer>
|
||||||
|
)
|
||||||
|
|
||||||
|
export default Footer
|
||||||
@@ -2,17 +2,19 @@ import React from 'react'
|
|||||||
import Link from 'gatsby-link'
|
import Link from 'gatsby-link'
|
||||||
|
|
||||||
const Header = ({ siteTitle }) => (
|
const Header = ({ siteTitle }) => (
|
||||||
<h1 style={{ margin: 0 }}>
|
<header>
|
||||||
<Link
|
<h1 style={{ margin: 0 }}>
|
||||||
to="/"
|
<Link
|
||||||
style={{
|
to="/"
|
||||||
color: 'white',
|
style={{
|
||||||
textDecoration: 'none',
|
color: 'white',
|
||||||
}}
|
textDecoration: 'none',
|
||||||
>
|
}}
|
||||||
{siteTitle}
|
>
|
||||||
</Link>
|
{siteTitle}
|
||||||
</h1>
|
</Link>
|
||||||
|
</h1>
|
||||||
|
</header>
|
||||||
)
|
)
|
||||||
|
|
||||||
export default Header
|
export default Header
|
||||||
|
|||||||
@@ -2,11 +2,12 @@ import React from 'react'
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import Helmet from 'react-helmet'
|
import Helmet from 'react-helmet'
|
||||||
|
|
||||||
import Header from '../components/header'
|
import Header from '../components/Header'
|
||||||
|
import Footer from '../components/Footer'
|
||||||
import "../styles/index.css"
|
import "../styles/index.css"
|
||||||
|
|
||||||
const Layout = ({ children, data }) => (
|
const Layout = ({ children, data }) => (
|
||||||
<div className="font-sans">
|
<div className="font-sans container mx-auto">
|
||||||
<Helmet
|
<Helmet
|
||||||
title={data.site.siteMetadata.title}
|
title={data.site.siteMetadata.title}
|
||||||
meta={[
|
meta={[
|
||||||
@@ -15,7 +16,10 @@ const Layout = ({ children, data }) => (
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Header siteTitle={data.site.siteMetadata.title} />
|
<Header siteTitle={data.site.siteMetadata.title} />
|
||||||
{children()}
|
<main>
|
||||||
|
{children()}
|
||||||
|
</main>
|
||||||
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Helmet from 'react-helmet'
|
||||||
class PostDefault extends Component {
|
class PostDefault extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { data } = this.props
|
const { data } = this.props
|
||||||
return (
|
return (
|
||||||
<div>
|
<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>Specific Post - {data.wordpressPost.title}</h1>
|
||||||
<h1>Slug - {data.wordpressPost.slug}</h1>
|
<h1>Slug - {data.wordpressPost.slug}</h1>
|
||||||
<div dangerouslySetInnerHTML={{
|
<div dangerouslySetInnerHTML={{
|
||||||
|
|||||||
Reference in New Issue
Block a user