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'
|
||||
|
||||
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
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
|
||||
@@ -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={{
|
||||
|
||||
Reference in New Issue
Block a user