import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'

import Header from '../components/Header'
import Footer from '../components/Footer'
import SideMenu from '../components/SideMenu'
require('typeface-maven-pro')
require('typeface-lato')
import '../styles/index.css'
import '../styles/general.css'

import favicon32 from '../images/favicon32.png'

const Layout = ({ children, data }) => (
  <div className="font-sans mx-auto">
    <Helmet
      title="Saburly"
      meta={[
        { name: 'description', content: 'We code & design great software' },
        {
          name: 'keywords',
          content: 'software, design, coding, programming, code, consulting',
        },
      ]}
      link={[{ rel: 'shortcut icon', type: 'image/png', href: `${favicon32}` }]}
    />
    <div className="side-panel panel">
      <Header />
      {children()}
      <Footer />
    </div>
    <SideMenu />
  </div>
)

Layout.propTypes = {
  children: PropTypes.func,
}

export default Layout
