1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-27 20:30:04 +02:00
copilot/legacy/spikes/compose-demo/components/layout.js

35 lines
1.0 KiB
JavaScript
Raw Normal View History

2017-05-11 18:30:03 +03:00
import NProgress from 'nprogress';
import Head from 'next/head';
import Router from 'next/router';
import Article from './article';
Router.onRouteChangeStart = () => NProgress.start();
Router.onRouteChangeComplete = () => NProgress.done();
Router.onRouteChangeError = () => NProgress.done();
export default ({ children, title = '' }) => (
<main>
<Head>
<title>{title}</title>
<meta charSet="utf-8" />
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<link rel="stylesheet" type="text/css" href="/static/nprogress.css" />
<link rel="stylesheet" type="text/css" href="/static/codemirror.css" />
<link rel="stylesheet" type="text/css" href="/static/eclipse.css" />
<link rel="stylesheet" type="text/css" href="/static/foldgutter.css" />
<style jsx global>{`
html, body {
margin: 0;
padding: 0;
font-family: Helvetica;
}
`}</style>
</Head>
<Article>
{children}
</Article>
</main>
);