forked from Landris18/Daz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
223 lines (207 loc) · 11.2 KB
/
App.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
//Importations des modules et des components
import 'react-native-gesture-handler';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
import React, { Component } from 'react';
import styles from './assets/css/stylesheets';
import { View, Text, Image, ScrollView, Alert } from 'react-native';
import { Card, CardItem, Container} from 'native-base';
import * as Font from 'expo-font';
import { Ionicons,FontAwesome5, Entypo,Feather, MaterialIcons, AntDesign, MaterialCommunityIcons, Octicons} from '@expo/vector-icons';
import { TextInput } from 'react-native-gesture-handler';
//Importer le font Product Sans
function LoadProduct() {
Font.loadAsync({
'Product': require('./assets/fonts/SF-Pro-Display-Medium.otf'),
'ProductBold': require('./assets/fonts/SF-Pro-Display-Bold.otf'),
});
}
LoadProduct();
//Déclaration de la variable Stack
const Stack = createStackNavigator();
//Gestion des screens
export default class App extends Component{
render(){
return(
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="splash" component={splash} options={{ headerShown: false }}/>
<Stack.Screen name="log_sign" component={log_sign} options={{ headerShown: false }}/>
<Stack.Screen name="main" component={main} options={{ headerShown: false }}/>
<Stack.Screen
name="forgot"
component={forgot}
options={
{
headerShown:true,
title:'Forgot password',
headerStyle: {
backgroundColor: '#f25046',
elevation:3,
},
headerTintColor: '#ffffff',
headerTitleStyle: {
fontFamily:'Product',
fontSize:16,
},
}
}
/>
</Stack.Navigator>
</NavigationContainer>
)
}
}
//Page de Chargement
function splash({ navigation }){
//On navigue vers la page login après 1000ms soit 2s
setTimeout(function () {
navigation.navigate('log_sign');
},1000);
return(
<View style={styles.container}>
<View style={styles.logoView}>
<Image style={styles.logo} source={require('./assets/images/sesame.png')} ></Image>
</View>
<View style={styles.madeView}>
<Text style={styles.dazing}>DAZING</Text>
<Text style={styles.made}>Built by Black-Mavericks</Text>
</View>
</View>
)
}
//Déclaration de la variable Tab
const Tab = createMaterialBottomTabNavigator();
// Naviguer entre login et signup
function log_sign(){
return(
<Tab.Navigator shifting='true' barStyle={styles.bottomBar} activeColor="#2ebc4f" >
<Tab.Screen name="login" component={login}
options={{
headerShown: false,
title: '',
tabBarIcon:({ color })=>(<AntDesign name="home" size={24} color={color}/>)
}}
/>
<Tab.Screen name="main" component={main}
options={{
headerShown: false,
title: '',
tabBarIcon:({ color })=>(<AntDesign name="user" size={24} color={color}/>)
}}
/>
<Tab.Screen name="chercher" component={chercher}
options={{
headerShown: false,
title: '',
tabBarIcon:({ color })=>(<AntDesign name="search1" size={24} color={color}/>)
}}
/>
</Tab.Navigator>
)
}
//Page Login
class login extends Component {
render(){
return (
<View style={styles.loginPage}>
<Image style={styles.avatarImage} source={require('./assets/images/ld.jpeg')}/>
<TextInput style={styles.inputUser} placeholder=""><Ionicons name="search" size={15} color={'#777'} > <Text style={{fontFamily:'Product', color:'#777'}}>Rechercher</Text></Ionicons></TextInput>
<Text style={{height:14, width:1000, backgroundColor:'#dde2df', position:'absolute', top:90}}></Text>
<Image style={styles.comdata} source={require('./assets/images/comdata.png')}/>
<Container style={{position:'absolute', top:122, left:70}}>
<Text style={{fontFamily:"ProductBold", color:"#555", fontSize:13}}> Comdata Madagascar</Text>
<Text style={{fontFamily:"Product", color:"#999", fontSize:13}}> 363 abonnés</Text>
<Text style={{fontFamily:"Product", color:"#999", fontSize:13}}> 4h</Text>
</Container>
<Container style={{position:'absolute', top:190, left:20}}>
<Text style={{fontFamily:"Product", color:"#555", fontSize:14}}><AntDesign name="checksquare" size={16} color={'#2ebc4f'} />Comdata cherche un développeur PHP</Text>
<Text style={{fontFamily:"Product", color:"#555", fontSize:14}}><AntDesign name="checksquare" size={16} color={'#2ebc4f'} />Vous vous sentez être à la hauteur ?</Text>
</Container>
<Container style={{position:'absolute', top:235, left:0, width:1000, height:200, backgroundColor:'#eaf0ec'}}>
<Image style={{width:320, height:200, left:20}} source={require('./assets/images/opo.jpg')}/>
<Text style={{fontFamily:'ProductBold', color:'#777', left:20, top:3, fontSize:11}}> <AntDesign name="like1" size={16} color={'#1c97df'}/>18</Text>
<Text style={{height:1.2, width:330, backgroundColor:'#dde2df', top:6, left:15}}></Text>
<AntDesign name="like2" size={16} color={'#777'} style={{top:13, left:40}}/>
<Text style={{fontFamily:"ProductBold", color:"#777", fontSize:11, top:10, left:30}} >J'aime </Text>
<FontAwesome5 name="comment" size={16} color={'#777'} style={{ position:'absolute',top:232, left:130}}/>
<Text style={{fontFamily:"ProductBold", color:"#777", fontSize:11, position:'absolute', top:245, left:108}} >Commenter </Text>
<Entypo name="share" size={16} color={'#777'} style={{ position:'absolute',top:232, left:220}}/>
<Text style={{fontFamily:"ProductBold", color:"#777", fontSize:11, position:'absolute', top:245, left:208}} >Partager </Text>
<MaterialCommunityIcons name="telegram" size={16} color={'#777'} style={{ position:'absolute',top:232, left:305}}/>
<Text style={{fontFamily:"ProductBold", color:"#777", fontSize:11, position:'absolute', top:245, left:293}} >Envoyer </Text>
</Container>
<Text style={{height:14, width:1000, backgroundColor:'#dde2df', position:'absolute', top:508}}></Text>
</View>
)
}
}
function chercher({ navigation }){
return(
<View style={styles.loginPage}>
<Feather name="arrow-left" size={30} color={'#777'} style={{position:'absolute', top:30, left:15}} > </Feather>
<Text style={{fontSize:16, fontFamily:"Product", color:"#777", position:"absolute", top:33, left:55}}>Rechercher</Text>
<Text style={{height:1, width:1000, backgroundColor:'#dde2df', position:'absolute', top:67}}></Text>
<Container style={{top:90, left:-70}}>
<Text style={{fontFamily:"Product"}}>Recherches récentes</Text>
<Text></Text>
<Feather name="clock" size={15} color={'#777'} style={{fontFamily:"Product"}}><Text style={{fontFamily:"Product"}}> Informatique</Text></Feather>
<Text></Text>
<Feather name="clock" size={15} color={'#777'}><Text style={{fontFamily:"Product"}}> Développeur</Text></Feather>
<Text></Text>
<Text style={{fontFamily:"Product"}}>Essayer de chercher</Text>
<Text></Text>
<Feather name="search" size={15} color={'#777'}><Text style={{fontFamily:"Product"}}> Avocat</Text></Feather>
<Text></Text>
<Feather name="search" size={15} color={'#777'}><Text style={{fontFamily:"Product"}}> Ressource Humaine</Text></Feather>
<Text></Text>
<Feather name="search" size={15} color={'#777'}><Text style={{fontFamily:"Product"}}> Landry Manankoraisina</Text></Feather>
<Text></Text>
<Feather name="search" size={15} color={'#777'}><Text style={{fontFamily:"Product"}}> Programmation</Text></Feather>
</Container>
<Text style={{fontFamily:"Product", position:"absolute", top:90, right:20}}>Effacer</Text>
<Feather name="arrow-up-left" size={20} color={'#777'} style={{position:"absolute", top:128, right:30}}></Feather>
<Feather name="arrow-up-left" size={20} color={'#777'} style={{position:"absolute", top:168, right:30}}></Feather>
<Feather name="arrow-up-left" size={20} color={'#777'} style={{position:"absolute", top:240, right:30}}></Feather>
<Feather name="arrow-up-left" size={20} color={'#777'} style={{position:"absolute", top:280, right:30}}></Feather>
<Feather name="arrow-up-left" size={20} color={'#777'} style={{position:"absolute", top:322, right:30}}></Feather>
<Feather name="arrow-up-left" size={20} color={'#777'} style={{position:"absolute", top:361, right:30}}></Feather>
</View>
)
}
//Page MainPage
function main({navigation}){
return(
<View style={styles.loginPage}>
<Image style={styles.coverImage} source={require('./assets/images/leaf.jpeg')} ></Image>
<Image style={styles.avatarImage2} source={require('./assets/images/ld.jpeg')} ></Image>
<Octicons name="primitive-dot" size={32} color={"#2ebc4f"} style={{position:"absolute", top:180, left:122}}></Octicons>
<MaterialIcons name="edit" size={22} color={"#777"} style={{position:"absolute", top:180, left:320}}/>
<Container style={{position:'absolute', top:230, left:15}}>
<Text style={{fontFamily:"ProductBold", color:"#777", fontSize:15}}>BAKARY Gaetan Jonathan </Text>
<Text style={{fontFamily:"Product", color:"#777", fontSize:13}}>Etudiant à l'ESTI, Alternant à COMDATA</Text>
<Text style={{fontFamily:"Product", color:"#777", fontSize:13}}>Comdata Madagascar. ESTI</Text>
<Text style={{fontFamily:"Product", color:"#777", fontSize:13}}>Antananarivo, Madagascar</Text>
</Container>
<Container style={{position:'absolute', top:310, left:15, backgroundColor:'#eef5f0', borderRadius:6, width:330, height:90, borderWidth:1, borderColor:"#e0e7e2"}}>
<Text style={{fontFamily:"Product", color:"#777", fontSize:14, top:5, left:10}}>A l'écoute de nouvelles opportunités</Text>
<Text style={{fontFamily:"Product", color:"#777", fontSize:14, top:5, left:10}}>Poste administrateur système et Développeur</Text>
<Text></Text>
<Text style={{fontFamily:"ProductBold", color:"#2ebc4f", fontSize:14, top:5, left:10}}>Voir tous les détails</Text>
<MaterialIcons name="edit" size={22} color={"#777"} style={{position:"absolute", top:4, left:301}}/>
</Container>
<Text style={{height:14, width:1000, backgroundColor:'#dde2df', position:'absolute', top:420}}></Text>
<Container style={{position:'absolute', top:440, left:15, width:330, height:90,}}>
<Text style={{fontFamily:"Product",color:"#777", fontSize:16,}}>A propos</Text>
<Text></Text>
<Text style={{fontFamily:"Product",color:"#777", fontSize:14, top:-15,backgroundColor:"#e6eeee", width:120, padding:4, paddingLeft:10,paddingRight:10, borderRadius:20}}>Promotion 2018</Text>
<Text style={{fontFamily:"Product",color:"#777", fontSize:14, top:-42,backgroundColor:"#e6eeee", left:130, width:90, padding:4, paddingLeft:10, borderRadius:20}}>Fraternité 3</Text>
<Text style={{fontFamily:"Product",color:"#777", fontSize:14, top:-30, backgroundColor:"#e6eeee", width:63, padding:4, paddingLeft:10, borderRadius:20}}>APS2A</Text>
<Text style={{fontFamily:"Product",color:"#777", fontSize:14, top:-57, left:72,backgroundColor:"#e6eeee", width:96, padding:4, paddingLeft:10, borderRadius:20}}>Informatique</Text>
<MaterialIcons name="edit" size={22} color={"#777"} style={{position:"absolute", top:4, left:301}}/>
</Container>
</View>
)
}