2017-05-01 10:49:27 +09:00
|
|
|
import { Components, registerComponent, withCurrentUser } from 'meteor/vulcan:core';
|
2016-04-25 17:02:41 +09:00
|
|
|
import React, { PropTypes, Component } from 'react';
|
2017-06-14 09:53:42 +09:00
|
|
|
import classNames from 'classnames';
|
2017-07-29 16:26:34 +09:00
|
|
|
import Helmet from 'react-helmet';
|
2016-03-30 10:52:40 +09:00
|
|
|
|
2017-06-14 09:53:42 +09:00
|
|
|
const Layout = ({currentUser, children, currentRoute}) =>
|
2016-02-16 15:08:30 +09:00
|
|
|
|
2017-06-14 09:53:42 +09:00
|
|
|
<div className={classNames('wrapper', `wrapper-${currentRoute.name.replace('.', '-')}`)} id="wrapper">
|
2016-03-25 10:45:28 +09:00
|
|
|
|
2017-07-29 16:26:34 +09:00
|
|
|
<Helmet>
|
|
|
|
<link name="bootstrap" rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css"/>
|
|
|
|
<link name="font-awesome" rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
|
|
</Helmet>
|
|
|
|
|
2017-05-09 10:14:10 +09:00
|
|
|
{currentUser ? <Components.UsersProfileCheck currentUser={currentUser} documentId={currentUser._id} /> : null}
|
2016-04-13 08:43:43 +02:00
|
|
|
|
2017-05-01 10:49:27 +09:00
|
|
|
<Components.Header />
|
|
|
|
|
|
|
|
<div className="main">
|
2016-04-15 11:09:19 +02:00
|
|
|
|
2017-05-01 10:49:27 +09:00
|
|
|
<Components.FlashMessages />
|
2016-03-25 10:45:28 +09:00
|
|
|
|
2017-05-01 10:49:27 +09:00
|
|
|
<Components.Newsletter />
|
2016-03-25 11:30:01 +09:00
|
|
|
|
2017-05-09 10:14:10 +09:00
|
|
|
{children}
|
2016-03-25 10:45:28 +09:00
|
|
|
|
2017-05-01 10:49:27 +09:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<Components.Footer />
|
|
|
|
|
|
|
|
</div>
|
2016-03-25 10:45:28 +09:00
|
|
|
|
2017-05-01 10:49:27 +09:00
|
|
|
registerComponent('Layout', Layout, withCurrentUser);
|