-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.ios.js
141 lines (133 loc) · 3.37 KB
/
index.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/**
* 8tracks React Native App
* https://8tracks.com/apps/ios
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var EffectsView = require('react-native-effects-view');
// var Dimensions = require('Dimensions');
var {
AppRegistry,
StyleSheet,
View,
Image,
Text,
StatusBarIOS,
PixelRatio,
TouchableHighlight
} = React;
class Landing extends React.Component {
renderBottomText() {
return (
<Text style={styles.bottomNoteText}>
8tracks is internet radio created by people, not algorithms
</Text>
);
}
showLoginModal() {
console.log('modal will be shown');
}
render() {
return (
<View style={styles.page}>
<Image style={styles.bg} source={require('image!bg-568')}>
<Image style={styles.logo} source={require('image!logo')} />
<TouchableHighlight
style={styles.loginBlock}
onPress={this.showLoginModal.bind(this)}
underlayColor="#182144"
activeOpacity={0.5}
>
<Image style={styles.loginBg} source={require('image!login-btn')}>
<Text style={styles.loginText}>Use 8tracks Account</Text>
</Image>
</TouchableHighlight>
<EffectsView
style={styles.bottomNote}
blurStyle="light"
vibrantContent={this.renderBottomText.call(this)}
/>
</Image>
</View>
);
}
}
class EightTracksReact extends React.Component {
componentWillMount() {
StatusBarIOS.setStyle(StatusBarIOS.Style.lightContent, true);
}
render() {
return (
<Landing />
);
}
}
var styles = StyleSheet.create({
page: {
flex: 1,
backgroundColor: 'transparent',
},
bg: {
flex: 1,
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
top: 0,
justifyContent: 'center',
alignItems: 'center',
},
logoSide: {
flex: 3,
alignSelf: 'auto',
backgroundColor: 'white',
},
logoCenter: {
flex: 4,
alignSelf: 'auto',
backgroundColor: 'red',
height: 100,
},
logo: {
width: 110 * PixelRatio.get(),
height: 43 * PixelRatio.get(),
marginTop: -150,
},
loginBlock: {
position: 'absolute',
bottom: 60,
left: 0,
right: 0,
height: 50,
},
loginBg: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
},
loginText: {
color: 'white',
fontSize: 18,
fontFamily: 'ProximaNova-Regular'
},
bottomNote: {
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
height: 60,
flex: 1,
alignItems: 'center',
justifyContent: 'center'
},
bottomNoteText: {
color: 'white',
fontSize: 14,
fontFamily: 'ProximaNova-Regular',
textAlign: 'center',
marginLeft: 60,
marginRight: 60
},
});
AppRegistry.registerComponent('EightTracksReact', () => EightTracksReact);