2020-02-28 15:20:47 +00:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes'
|
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component'
|
2020-02-24 21:56:07 +00:00
|
|
|
import Sticky from 'react-stickynode'
|
|
|
|
import Sidebar from '../components/sidebar'
|
|
|
|
import Image from '../components/image'
|
2020-02-28 15:20:47 +00:00
|
|
|
import Text from '../components/text'
|
|
|
|
import Button from '../components/button'
|
|
|
|
import DisplayName from '../components/display_name'
|
|
|
|
import TabBar from '../components/tab_bar'
|
2020-02-24 21:56:07 +00:00
|
|
|
|
2020-02-28 15:20:47 +00:00
|
|
|
export default class ProfileLayout extends ImmutablePureComponent {
|
2020-02-24 21:56:07 +00:00
|
|
|
static propTypes = {
|
2020-02-28 15:20:47 +00:00
|
|
|
account: ImmutablePropTypes.map,
|
2020-02-24 21:56:07 +00:00
|
|
|
layout: PropTypes.object,
|
|
|
|
title: PropTypes.string,
|
|
|
|
showBackBtn: PropTypes.bool,
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2020-02-28 15:20:47 +00:00
|
|
|
const { account, children, layout } = this.props
|
|
|
|
|
|
|
|
const tabs = !account ? null : [
|
|
|
|
{
|
|
|
|
to: `/${account.get('acct')}`,
|
|
|
|
title: 'Timeline',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
to: `/${account.get('acct')}/comments`,
|
|
|
|
title: 'Comments',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
to: `/${account.get('acct')}/photos`,
|
|
|
|
title: 'Photos',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
to: `/${account.get('acct')}/videos`,
|
|
|
|
title: 'Videos',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
to: '',
|
|
|
|
title: 'More',
|
|
|
|
},
|
|
|
|
]
|
2020-02-24 21:56:07 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={[_s.default, _s.flexRow, _s.width100PC, _s.heightMin100VH, _s.backgroundcolorSecondary3].join(' ')}>
|
|
|
|
|
|
|
|
<Sidebar />
|
|
|
|
|
|
|
|
<main role='main' className={[_s.default, _s.flexShrink1, _s.flexGrow1, _s.borderColorSecondary2, _s.borderLeft1PX].join(' ')}>
|
|
|
|
|
|
|
|
<div className={[_s.default, _s.width1015PX, _s.flexRow, _s.justifyContentSpaceBetween, _s.paddingLeft15PX, _s.paddingVertical15PX].join(' ')}>
|
|
|
|
<div className={[_s.default, _s.z1, _s.width100PC].join(' ')}>
|
2020-02-28 15:20:47 +00:00
|
|
|
<div className={[_s.default, _s.height350PX, _s.width100PC, _s.radiusSmall, _s.overflowHidden].join(' ')}>
|
2020-02-24 21:56:07 +00:00
|
|
|
<Image className={_s.height350PX} src='https://gab.com/media/user/bz-5cf53d08403d4.jpeg' />
|
|
|
|
</div>
|
|
|
|
|
2020-02-28 15:20:47 +00:00
|
|
|
<div className={[_s.default, _s.borderBottom1PX, _s.borderColorSecondary, _s.width100PC].join(' ')}>
|
|
|
|
<div className={[_s.default, _s.flexRow, _s.paddingHorizontal15PX].join(' ')}>
|
|
|
|
<Image
|
|
|
|
className={[_s.circle, _s.marginTopNeg75PX, _s.borderColorWhite, _s.border2PX].join(' ')}
|
|
|
|
height='150px'
|
|
|
|
width='150px'
|
|
|
|
src='http://localhost:3000/system/accounts/avatars/000/000/001/original/260e8c96c97834da.jpeg?1562898139'
|
|
|
|
/>
|
|
|
|
<div className={[_s.default, _s.paddingHorizontal15PX, _s.paddingVertical10PX].join(' ')}>
|
|
|
|
<DisplayName account={account} multiline large />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className={[_s.default, _s.flexRow, _s.borderBottom1PX, _s.borderColorSecondary, _s.marginTop5PX, _s.height53PX].join(' ')}>
|
|
|
|
<div className={[_s.default].join(' ')}>
|
|
|
|
<TabBar tabs={tabs} large />
|
|
|
|
</div>
|
|
|
|
<div className={[_s.default, _s.flexRow, _s.marginLeftAuto, _s.paddingVertical5PX].join(' ')}>
|
|
|
|
<Button
|
|
|
|
outline
|
|
|
|
icon='ellipsis'
|
|
|
|
iconWidth='18px'
|
|
|
|
iconHeight='18px'
|
|
|
|
iconClassName={_s.fillColorBrand}
|
|
|
|
color='brand'
|
|
|
|
backgroundColor='none'
|
|
|
|
className={[_s.justifyContentCenter, _s.alignItemsCenter, _s.marginRight10PX, _s.paddingHorizontal10PX].join(' ')}
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
outline
|
|
|
|
icon='chat'
|
|
|
|
iconWidth='18px'
|
|
|
|
iconHeight='18px'
|
|
|
|
iconClassName={_s.fillColorBrand}
|
|
|
|
color='brand'
|
|
|
|
backgroundColor='none'
|
|
|
|
className={[_s.justifyContentCenter, _s.alignItemsCenter, _s.marginRight10PX, _s.paddingHorizontal10PX].join(' ')}
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
className={[_s.justifyContentCenter, _s.alignItemsCenter].join(' ')}
|
|
|
|
>
|
|
|
|
<span className={[_s.paddingHorizontal15PX].join(' ')}>
|
|
|
|
<Text
|
|
|
|
color='white'
|
|
|
|
weight='bold'
|
|
|
|
size='medium'
|
|
|
|
className={[_s.paddingHorizontal15PX].join(' ')}
|
|
|
|
>
|
|
|
|
Follow
|
|
|
|
</Text>
|
|
|
|
</span>
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-24 21:56:07 +00:00
|
|
|
</div>
|
|
|
|
|
2020-02-28 15:20:47 +00:00
|
|
|
<div className={[_s.default, _s.width1015PX, _s.flexRow, _s.justifyContentSpaceBetween, _s.paddingRight15PX, _s.paddingVertical15PX].join(' ')}>
|
2020-02-24 21:56:07 +00:00
|
|
|
<div className={[_s.default, _s.width645PX, _s.z1].join(' ')}>
|
|
|
|
<div className={_s.default}>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className={[_s.default, _s.width340PX].join(' ')}>
|
2020-02-28 15:20:47 +00:00
|
|
|
<Sticky top={15} enabled>
|
2020-02-24 21:56:07 +00:00
|
|
|
<div className={[_s.default, _s.width340PX].join(' ')}>
|
|
|
|
{layout}
|
|
|
|
</div>
|
|
|
|
</Sticky>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|