Added header bar for navigating home

This commit is contained in:
Logan Allen 2019-06-04 15:00:54 -07:00
parent de24d2c98c
commit c0ef07d6ed
6 changed files with 247 additions and 172 deletions

BIN
apps/chat/src/Icon-Home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

View File

@ -0,0 +1,22 @@
import React, { Component } from 'react';
import classnames from 'classnames';
import { IconHome } from '/components/lib/icons/icon-home';
export class HeaderBar extends Component {
render() {
return (
<div className="bg-black w-100" style={{ height: 48, padding: 8 }}>
<a className="db"
style={{ background: '#1A1A1A', borderRadius: 16, width: 32, height: 32 }}
href='/'>
<IconHome />
</a>
</div>
);
}
}

View File

@ -0,0 +1,9 @@
import React, { Component } from 'react';
export class IconHome extends Component {
render() {
return (
<img src="/~chat/img/Home.png" width={32} height={32} />
);
}
}

View File

@ -1,16 +1,23 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import classnames from 'classnames'; import classnames from 'classnames';
import { HeaderBar } from '/components/lib/header-bar.js';
export class Skeleton extends Component { export class Skeleton extends Component {
render() { render() {
return ( return (
<div className="cf h-100 w-100 absolute flex"> <div className="h-100 w-100 absolute">
<div className="fl h-100 br overflow-x-hidden" style={{ flexBasis: 320 }}> <HeaderBar />
{this.props.sidebar} <div className="cf w-100 absolute flex"
</div> style={{
<div className="h-100 fr" style={{ flexGrow: 1 }}> height: 'calc(100% - 48px)'
{this.props.children} }}>
<div className="fl h-100 br overflow-x-hidden" style={{ flexBasis: 320 }}>
{this.props.sidebar}
</div>
<div className="h-100 fr" style={{ flexGrow: 1 }}>
{this.props.children}
</div>
</div> </div>
</div> </div>
); );

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

File diff suppressed because one or more lines are too long