Skip to content

Instantly share code, notes, and snippets.

@tomitrescak
Last active October 20, 2016 12:20
Show Gist options
  • Save tomitrescak/35b43b6e7e78e84d99606ab4e4917c93 to your computer and use it in GitHub Desktop.
Save tomitrescak/35b43b6e7e78e84d99606ab4e4917c93 to your computer and use it in GitHub Desktop.
import React from 'react';
import Helmet from 'react-helmet';
import { style } from 'typestyle';
import { i18n } from 'es2015-i18n-tag';
const content = style({ margin: '30px' });
export class Layout extends React.Component {
static contextTypes = {
Ui: React.PropTypes.object
};
render() {
return (
<main>
<div id="content" className={content}>
<Helmet titleTemplate={i18n`My Site / %s`} />
<div id="main">
{ this.props.children }
</div>
</div>
<div id="footer" className={footer}>
{ this.props.footer }
</div>
</main >
);
}
componentDidMount() {
this.context.Ui.pageTransition();
}
};
export default Layout;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment