2020-08-17 21:07:16 +01:00
|
|
|
import React from 'react'
|
2020-08-17 21:59:29 +01:00
|
|
|
import PropTypes from 'prop-types'
|
2020-07-25 00:59:46 +01:00
|
|
|
import { BREAKPOINT_EXTRA_SMALL } from '../constants'
|
2020-05-09 03:17:19 +01:00
|
|
|
import Button from './button'
|
2020-07-25 00:59:46 +01:00
|
|
|
import NavigationBarButton from './navigation_bar_button'
|
2020-05-09 03:17:19 +01:00
|
|
|
import Search from './search'
|
|
|
|
import Text from './text'
|
2020-07-25 00:59:46 +01:00
|
|
|
import ResponsiveComponent from '../features/ui/util/responsive_component'
|
|
|
|
import ResponsiveClassesComponent from '../features/ui/util/responsive_classes_component'
|
2020-05-09 03:17:19 +01:00
|
|
|
|
2020-08-18 01:57:35 +01:00
|
|
|
class LoggedOutNavigationBar extends React.PureComponent {
|
2020-07-25 00:59:46 +01:00
|
|
|
|
2020-05-09 03:17:19 +01:00
|
|
|
render() {
|
2020-07-25 00:59:46 +01:00
|
|
|
const { isProfile } = this.props
|
|
|
|
|
2020-05-09 03:17:19 +01:00
|
|
|
return (
|
|
|
|
<ResponsiveClassesComponent
|
2020-08-18 21:49:11 +01:00
|
|
|
classNames={[_s.d, _s.z4, _s.minH53PX, _s.w100PC].join(' ')}
|
|
|
|
classNamesXS={[_s.d, _s.z4, _s.minH98PX, _s.w100PC].join(' ')}
|
2020-05-09 03:17:19 +01:00
|
|
|
>
|
|
|
|
<ResponsiveClassesComponent
|
2020-08-18 21:49:11 +01:00
|
|
|
classNames={[_s.d, _s.minH53PX, _s.bgNavigation, _s.aiCenter, _s.z3, _s.top0, _s.right0, _s.left0, _s.posFixed].join(' ')}
|
|
|
|
classNamesXS={[_s.d, _s.minH98PX, _s.bgNavigation, _s.aiCenter, _s.z3, _s.top0, _s.right0, _s.left0, _s.posFixed].join(' ')}
|
2020-05-09 03:17:19 +01:00
|
|
|
>
|
|
|
|
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.w1255PX, _s.flexRow, _s.flexWrap, _s.h100PC].join(' ')}>
|
2020-07-10 19:25:07 +01:00
|
|
|
|
|
|
|
<ResponsiveClassesComponent
|
2020-08-18 21:49:11 +01:00
|
|
|
classNames={[_s.d, _s.aiCenter, _s.jcCenter, _s.flexRow, _s.flexGrow1, _s.saveAreaInsetPT, _s.saveAreaInsetPL, _s.saveAreaInsetPR].join(' ')}
|
|
|
|
classNamesXS={[_s.d, _s.flexRow, _s.saveAreaInsetPT, _s.saveAreaInsetPL, _s.saveAreaInsetPR, _s.w100PC].join(' ')}
|
2020-07-10 19:25:07 +01:00
|
|
|
>
|
2020-05-09 03:17:19 +01:00
|
|
|
|
2020-07-10 19:25:07 +01:00
|
|
|
<Button
|
|
|
|
href='/'
|
|
|
|
color='none'
|
|
|
|
backgroundColor='none'
|
|
|
|
icon='logo'
|
2020-08-19 01:51:28 +01:00
|
|
|
title='Gab'
|
2020-07-10 19:25:07 +01:00
|
|
|
iconClassName={[_s.mr5, _s.fillNavigation].join(' ')}
|
|
|
|
/>
|
2020-05-09 03:17:19 +01:00
|
|
|
|
2020-07-25 00:59:46 +01:00
|
|
|
{
|
|
|
|
isProfile &&
|
|
|
|
<ResponsiveComponent min={BREAKPOINT_EXTRA_SMALL}>
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.flexRow, _s.mr15].join(' ')}>
|
2020-07-25 00:59:46 +01:00
|
|
|
<NavigationBarButton title='Home' icon='home' href='/home' />
|
|
|
|
<NavigationBarButton title='Explore' icon='explore' to='/explore' />
|
2020-08-06 05:00:40 +01:00
|
|
|
<NavigationBarButton title='News' icon='news' to='/news' />
|
2020-07-25 00:59:46 +01:00
|
|
|
</div>
|
|
|
|
</ResponsiveComponent>
|
|
|
|
}
|
|
|
|
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.flexGrow1, _s.pr10, _s.mrAuto, _s.maxW640PX].join(' ')}>
|
2020-07-10 19:25:07 +01:00
|
|
|
<Search isInNav />
|
|
|
|
</div>
|
2020-05-09 03:17:19 +01:00
|
|
|
|
2020-07-10 19:25:07 +01:00
|
|
|
</ResponsiveClassesComponent>
|
2020-05-09 03:17:19 +01:00
|
|
|
|
2020-07-10 19:25:07 +01:00
|
|
|
<ResponsiveClassesComponent
|
2020-08-18 21:49:11 +01:00
|
|
|
classNames={[_s.d, _s.flexRow, _s.py5, _s.px10, _s.w330PX, _s.mlAuto].join(' ')}
|
|
|
|
classNamesXS={[_s.d, _s.flexRow, _s.pb5, _s.px10, _s.w100PC].join(' ')}
|
2020-05-09 03:17:19 +01:00
|
|
|
>
|
|
|
|
|
2020-07-10 19:25:07 +01:00
|
|
|
<Button
|
|
|
|
isNarrow
|
|
|
|
isOutline
|
|
|
|
color='white'
|
|
|
|
backgroundColor='none'
|
|
|
|
href='/auth/sign_in'
|
2020-08-18 21:43:06 +01:00
|
|
|
className={[_s.borderColorWhite, _s.mr5, _s.flexGrow1, _s.aiCenter, _s.jcCenter, _s.py7].join(' ')}
|
2020-07-10 19:25:07 +01:00
|
|
|
>
|
|
|
|
<Text color='inherit' weight='medium' align='center'>
|
|
|
|
Log in
|
|
|
|
</Text>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
isNarrow
|
|
|
|
color='brand'
|
|
|
|
backgroundColor='white'
|
|
|
|
href='/auth/sign_up'
|
2020-08-18 21:43:06 +01:00
|
|
|
className={[_s.jcCenter, _s.aiCenter, _s.ml5, _s.flexGrow1, _s.py7].join(' ')}
|
2020-07-10 19:25:07 +01:00
|
|
|
>
|
|
|
|
<Text color='inherit' weight='bold' align='center'>
|
|
|
|
Sign up
|
|
|
|
</Text>
|
|
|
|
</Button>
|
2020-05-09 03:17:19 +01:00
|
|
|
|
2020-07-10 19:25:07 +01:00
|
|
|
</ResponsiveClassesComponent>
|
|
|
|
</div>
|
2020-05-09 03:17:19 +01:00
|
|
|
|
|
|
|
</ResponsiveClassesComponent>
|
|
|
|
</ResponsiveClassesComponent>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2020-08-18 01:57:35 +01:00
|
|
|
|
|
|
|
LoggedOutNavigationBar.propTypes = {
|
|
|
|
isProfile: PropTypes.bool,
|
|
|
|
title: PropTypes.string,
|
|
|
|
showBackBtn: PropTypes.bool,
|
|
|
|
}
|
|
|
|
|
|
|
|
export default LoggedOutNavigationBar
|