Skip to content

Commit 961f165

Browse files
authored
Merge pull request #19 from co2-git/feature/17
Fix #17
2 parents c5612dd + f5b67cf commit 961f165

24 files changed

+714
-23
lines changed

.flowconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
./app/components/Layout/Init.js.flow
2020
./app/components/Layout/Layout.js.flow
2121
./app/components/Layout/Open.js.flow
22+
./app/components/Layout/Page.js.flow
2223
./app/components/Layout/Router.js.flow
2324
./app/components/Terminal/Console.js.flow
2425

app/components/App/App.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ import React from 'react';
33

44
import AppBar from './AppBar';
55
import Page from '../Layout/Page';
6+
import AppBottomBar from './AppBottomBar';
67

78
const App = ({app}: $AppProps) => (
8-
<Page>
9+
<Page style={{display: 'flex', flexDirection: 'column'}}>
910
<AppBar app={app} />
11+
<div style={{flexGrow: 2}}>
12+
13+
</div>
14+
<AppBottomBar app={app} />
1015
</Page>
1116
);
1217

app/components/App/AppBar.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// @flow
2-
import DropDownIcon from 'material-ui/svg-icons/navigation/arrow-drop-down';
32
import IconButton from 'material-ui/IconButton';
4-
import IconMenu from 'material-ui/IconMenu';
53
import MaterialUIAppBar from 'material-ui/AppBar';
6-
import MenuItem from 'material-ui/MenuItem';
74
import NavigationBack from 'material-ui/svg-icons/navigation/arrow-back';
85
import path from 'path';
96
import React from 'react';
@@ -19,21 +16,6 @@ const AppBar = ({app}: $AppBarProps) => (
1916
</IconButton>
2017
)}
2118
onLeftIconButtonClick={() => switchRoute(0)}
22-
iconElementRight={(
23-
<IconMenu
24-
iconButtonElement={(
25-
<IconButton><DropDownIcon /></IconButton>
26-
)}
27-
onItemClick={(event, child) => console.log(child.props.primaryText)}
28-
>
29-
<MenuItem primaryText="Packager" />
30-
<MenuItem primaryText="React Native" />
31-
<MenuItem primaryText="Android" />
32-
<MenuItem primaryText="iOS" />
33-
<MenuItem primaryText="Expo" />
34-
<MenuItem primaryText="Native modules" />
35-
</IconMenu>
36-
)}
3719
/>
3820
);
3921

app/components/App/AppBottomBar.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// @flow
2+
import React from 'react';
3+
import {BottomNavigation, BottomNavigationItem} from 'material-ui/BottomNavigation';
4+
import Paper from 'material-ui/Paper';
5+
import PlayIcon from 'material-ui/svg-icons/av/play-arrow';
6+
import EjectIcon from 'material-ui/svg-icons/action/eject';
7+
import InfoIcon from 'material-ui/svg-icons/action/info';
8+
import AndroidIcon from 'material-ui/svg-icons/action/android';
9+
import UpgradeIcon from 'material-ui/svg-icons/notification/system-update';
10+
import SmartPhoneIcon from 'material-ui/svg-icons/hardware/smartphone';
11+
12+
const AppBottomBar = () => (
13+
<Paper zDepth={1}>
14+
<BottomNavigation>
15+
<BottomNavigationItem
16+
label="Info"
17+
onClick={() => this.select(0)}
18+
icon={<InfoIcon />}
19+
/>
20+
<BottomNavigationItem
21+
label="Start"
22+
onClick={() => this.select(0)}
23+
icon={<PlayIcon />}
24+
/>
25+
<BottomNavigationItem
26+
label="Android"
27+
onClick={() => this.select(0)}
28+
icon={<AndroidIcon />}
29+
/>
30+
<BottomNavigationItem
31+
label="iOS"
32+
onClick={() => this.select(0)}
33+
icon={<i className="icon-apple" style={{fontSize: 24, color: '#777', marginTop: -3}} />}
34+
/>
35+
<BottomNavigationItem
36+
label="Upgrade"
37+
onClick={() => this.select(0)}
38+
icon={<UpgradeIcon />}
39+
/>
40+
<BottomNavigationItem
41+
label="Native"
42+
onClick={() => this.select(0)}
43+
icon={<SmartPhoneIcon />}
44+
/>
45+
<BottomNavigationItem
46+
label="Eject"
47+
onClick={() => this.select(0)}
48+
icon={<EjectIcon />}
49+
/>
50+
</BottomNavigation>
51+
</Paper>
52+
);
53+
54+
export default AppBottomBar;

app/components/Layout/Page.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import React from 'react';
22

33
import {pageStyle} from '../../styles/main';
4+
import merge from '../../styles/mixins/merge';
45

5-
const Page = props => <div style={pageStyle} {...props} />;
6+
const Page = (props: $PageOwnProps) => (
7+
<div {...props} style={merge(pageStyle, props.style)} />
8+
);
69

710
export default Page;

app/components/Layout/Page.js.flow

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// @flow
2+
3+
declare type $PageOwnProps = {|
4+
+style?: Object,
5+
|};

app/styles/mixins/merge.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import compact from 'lodash/compact';
22

33
const merge = (...styles) => {
44
const transformed = {};
5-
styles.forEach((style) => {
5+
const realStyles = compact(styles);
6+
for (const style of realStyles) {
67
Object.assign(transformed, style);
7-
});
8+
}
89
return transformed;
910
};
1011

assets/fonts/fontello/LICENSE.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Font license info
2+
3+
4+
## Font Awesome
5+
6+
Copyright (C) 2016 by Dave Gandy
7+
8+
Author: Dave Gandy
9+
License: SIL ()
10+
Homepage: http://fortawesome.github.com/Font-Awesome/
11+
12+

assets/fonts/fontello/README.txt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
This webfont is generated by http://fontello.com open source project.
2+
3+
4+
================================================================================
5+
Please, note, that you should obey original font licenses, used to make this
6+
webfont pack. Details available in LICENSE.txt file.
7+
8+
- Usually, it's enough to publish content of LICENSE.txt file somewhere on your
9+
site in "About" section.
10+
11+
- If your project is open-source, usually, it will be ok to make LICENSE.txt
12+
file publicly available in your repository.
13+
14+
- Fonts, used in Fontello, don't require a clickable link on your site.
15+
But any kind of additional authors crediting is welcome.
16+
================================================================================
17+
18+
19+
Comments on archive content
20+
---------------------------
21+
22+
- /font/* - fonts in different formats
23+
24+
- /css/* - different kinds of css, for all situations. Should be ok with
25+
twitter bootstrap. Also, you can skip <i> style and assign icon classes
26+
directly to text elements, if you don't mind about IE7.
27+
28+
- demo.html - demo file, to show your webfont content
29+
30+
- LICENSE.txt - license info about source fonts, used to build your one.
31+
32+
- config.json - keeps your settings. You can import it back into fontello
33+
anytime, to continue your work
34+
35+
36+
Why so many CSS files ?
37+
-----------------------
38+
39+
Because we like to fit all your needs :)
40+
41+
- basic file, <your_font_name>.css - is usually enough, it contains @font-face
42+
and character code definitions
43+
44+
- *-ie7.css - if you need IE7 support, but still don't wish to put char codes
45+
directly into html
46+
47+
- *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
48+
rules, but still wish to benefit from css generation. That can be very
49+
convenient for automated asset build systems. When you need to update font -
50+
no need to manually edit files, just override old version with archive
51+
content. See fontello source code for examples.
52+
53+
- *-embedded.css - basic css file, but with embedded WOFF font, to avoid
54+
CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
55+
We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
56+
server headers. But if you ok with dirty hack - this file is for you. Note,
57+
that data url moved to separate @font-face to avoid problems with <IE9, when
58+
string is too long.
59+
60+
- animate.css - use it to get ideas about spinner rotation animation.
61+
62+
63+
Attention for server setup
64+
--------------------------
65+
66+
You MUST setup server to reply with proper `mime-types` for font files -
67+
otherwise some browsers will fail to show fonts.
68+
69+
Usually, `apache` already has necessary settings, but `nginx` and other
70+
webservers should be tuned. Here is list of mime types for our file extensions:
71+
72+
- `application/vnd.ms-fontobject` - eot
73+
- `application/x-font-woff` - woff
74+
- `application/x-font-ttf` - ttf
75+
- `image/svg+xml` - svg

assets/fonts/fontello/config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "",
3+
"css_prefix_text": "icon-",
4+
"css_use_suffix": false,
5+
"hinting": true,
6+
"units_per_em": 1000,
7+
"ascent": 850,
8+
"glyphs": [
9+
{
10+
"uid": "e9fa538fd5913046497ac148e27cd8ea",
11+
"css": "apple",
12+
"code": 61817,
13+
"src": "fontawesome"
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)