Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal
Created December 6, 2018 13:28
Show Gist options
  • Save amandeepmittal/f86d8ca715de55b491fa03f652324ce6 to your computer and use it in GitHub Desktop.
Save amandeepmittal/f86d8ca715de55b491fa03f652324ce6 to your computer and use it in GitHub Desktop.
import Link from 'next/link';
const Layout = ({ children }) => (
<div>
<div className="container">
<nav>
<Link>
<a>
<span className="title">Hacker News Clone</span>
</a>
</Link>
</nav>
{children}
</div>
<style jsx>{`
.container {
max-width: 960px;
margin: 0 auto;
background: #f6f6ee;
}
nav {
background: #ffa600;
padding: 1em;
}
nav > * {
display: inline-block;
color: #000000;
}
nav a {
text-decoration: none;
}
nav .main-title {
font-weight: bold;
}
`}</style>
<style global jsx>
{`
body {
background: white;
}
`}
</style>
</div>
);
export default Layout;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment