mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-21 13:51:50 +03:00
Added header bar for navigating home
This commit is contained in:
parent
de24d2c98c
commit
c0ef07d6ed
BIN
apps/chat/src/Icon-Home.png
Normal file
BIN
apps/chat/src/Icon-Home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 255 B |
22
apps/chat/src/js/components/lib/header-bar.js
Normal file
22
apps/chat/src/js/components/lib/header-bar.js
Normal 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>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
9
apps/chat/src/js/components/lib/icons/icon-home.js
Normal file
9
apps/chat/src/js/components/lib/icons/icon-home.js
Normal 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} />
|
||||
);
|
||||
}
|
||||
}
|
@ -1,16 +1,23 @@
|
||||
import React, { Component } from 'react';
|
||||
import classnames from 'classnames';
|
||||
|
||||
import { HeaderBar } from '/components/lib/header-bar.js';
|
||||
|
||||
export class Skeleton extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="cf h-100 w-100 absolute flex">
|
||||
<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 className="h-100 w-100 absolute">
|
||||
<HeaderBar />
|
||||
<div className="cf w-100 absolute flex"
|
||||
style={{
|
||||
height: 'calc(100% - 48px)'
|
||||
}}>
|
||||
<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>
|
||||
);
|
||||
|
BIN
apps/chat/urbit/app/chat/img/Home.png
Normal file
BIN
apps/chat/urbit/app/chat/img/Home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 255 B |
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user