Created
January 3, 2020 03:41
-
-
Save siisee11/063d959e8d3e2cadf7641fef4e010e55 to your computer and use it in GitHub Desktop.
With navigation
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
import React from "react" | |
import { Link } from "gatsby" | |
const ListLink = props => ( | |
<li style={{ display: `inline-block`, marginRight: `1rem` }}> | |
<Link to={props.to}>{props.children}</Link> | |
</li> | |
) | |
export default ({ children }) => ( | |
<div style={{ margin: `3rem auto`, maxWidth: 650, padding: `0 1rem` }}> | |
<header style={{ marginBottom: `1.5rem` }}> | |
<Link to="/" style={{ textShadow: `none`, backgroundImage: `none` }}> | |
<h3 style={{ display: `inline` }}>MySweetSite</h3> | |
</Link> | |
<ul style={{ listStyle: `none`, float: `right` }}> | |
<ListLink to="/">Home</ListLink> | |
<ListLink to="/about/">About</ListLink> | |
<ListLink to="/contact/">Contact</ListLink> | |
</ul> | |
</header> | |
{children} | |
</div> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment