forked from WorldBrain/Memex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.jsx
51 lines (45 loc) · 1.43 KB
/
layout.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import Navigation from './components/navigation'
import routes from './routes'
import Head from './containers/Head'
import styles from './base.css'
import { HelpBtn } from '../overview/help-btn'
import AccountMenu from '../authentication/components/AccountMenu'
import styled from 'styled-components'
class Layout extends Component {
isActive = (route) => this.props.location.pathname === route.pathname
render() {
return (
<RootContainer>
<Head />
<Navigation
currentLocation={this.props.location}
routes={routes}
>
<AccountMenu />
</Navigation>
<div className={styles.route}>{this.props.children}</div>
<HelpBtn />
</RootContainer>
)
}
}
const RootContainer = styled.div`
background-color: ${(props) => props.theme.colors.black};
display: flex;
flex-direction: row;
min-width: fit-content;
& * {
box-sizing: border-box;
font-family: 'Satoshi', sans-serif;
font-feature-settings: 'pnum' on, 'lnum' on, 'case' on, 'ss03' on,
'ss04' on, 'liga' off;
letter-spacing: 0.8px;
}
`
Layout.propTypes = {
location: PropTypes.object.isRequired,
children: PropTypes.object.isRequired,
}
export default Layout