Browse Source

Changes on Welcome page and contact area

juan.hernandez41 1 year ago
parent
commit
9a6f71fa35
2 changed files with 61 additions and 19 deletions
  1. 61
    19
      App.js
  2. BIN
      census-logos.png

+ 61
- 19
App.js View File

124
   buttonContainer: {
124
   buttonContainer: {
125
     flexDirection: 'column',
125
     flexDirection: 'column',
126
     backgroundColor: '#f0f8ff',
126
     backgroundColor: '#f0f8ff',
127
-    alignItems: 'center',
128
-    justifyContent: 'center',
129
-	paddingTop:100,
130
-	marginTop: 20,
127
+    // alignItems: 'center',
128
+    // justifyContent: 'center',
129
+	paddingTop:40,
130
+	marginTop: 15,
131
+  },
132
+  bottom: {
133
+    flex: 0.3,
134
+    backgroundColor: "gray",
135
+    borderWidth: 5,
136
+    borderBottomLeftRadius: 20,
137
+    borderBottomRightRadius: 20,
138
+	alignItems:'center',
139
+
131
   },
140
   },
132
   container: {
141
   container: {
133
     flexDirection: 'column',
142
     flexDirection: 'column',
136
     alignItems: 'center',
145
     alignItems: 'center',
137
     justifyContent: 'center',
146
     justifyContent: 'center',
138
 	paddingTop:20,
147
 	paddingTop:20,
139
-	marginTop: 20,
148
+	marginTop: 15,
140
   },
149
   },
150
+
151
+
141
   containerbackground:{
152
   containerbackground:{
142
 	
153
 	
143
     backgroundColor: '#f0f8ff'
154
     backgroundColor: '#f0f8ff'
194
 //data parsing goes here
205
 //data parsing goes here
195
 function getInfo(){
206
 function getInfo(){
196
 	//console.log(information[6])
207
 	//console.log(information[6])
197
-	return information
208
+	if(!information)
209
+	{Alert.alert("Please try again later! Error retriving data")}
210
+	else
211
+	{return information}
212
+
213
+	
198
 }
214
 }
199
 
215
 
200
 //data display
216
 //data display
375
 //the text at the end of a page gets cut off if anyone knows how to fix that?
391
 //the text at the end of a page gets cut off if anyone knows how to fix that?
376
 vars = {
392
 vars = {
377
 		welcome:
393
 		welcome:
378
-
394
+<ScrollView style={styles.scrollView}>
379
 		<View style = {styles.containerbackground}>
395
 		<View style = {styles.containerbackground}>
380
-		<ScrollView style={styles.scrollView}>
396
+		
381
 		  	<View style = {styles.container}>
397
 		  	<View style = {styles.container}>
382
 				<Text style={styles.intro}>Bienvenido!</Text>
398
 				<Text style={styles.intro}>Bienvenido!</Text>
399
+				<Image source={require('./smallLogo.jpeg')} />
383
 			</View>
400
 			</View>
384
 			<View style = {styles.container}>
401
 			<View style = {styles.container}>
385
 				<Text style={styles.sub}>Aquí podra mantenerse al tanto con las 
402
 				<Text style={styles.sub}>Aquí podra mantenerse al tanto con las 
387
 					los Demographic Data Profiles de cada municipio de
404
 					los Demographic Data Profiles de cada municipio de
388
 					Puerto Rico.</Text>
405
 					Puerto Rico.</Text>
389
 		   </View>
406
 		   </View>
390
-		  </ScrollView>
391
-		</View>,
407
+
408
+		   <View style = {styles.bottom}>
409
+				<Text style={styles.intro2}>Contactenos:</Text>
410
+				<Text style={styles.sub}>Prof: Hernando Mattei Torres
411
+				<Button onPress={() => Linking.openURL('mailto:hernando.mattei@upr.edu') }
412
+      			title="e-mail" /></Text>
413
+				<Text style={styles.sub}>Angelica Rosario Santos
414
+				<Button onPress={() => Linking.openURL('mailto:angelica.rosario2@upr.edu') }
415
+      			title="e-mail" /></Text>
416
+				<Text style={styles.sub}>Data from:</Text>
417
+				<Image source={require('./census-logos.png')} />
418
+				<Button onPress={() => Linking.openURL('https://data.census.gov/profile?q=United+States&g=0100000US') }
419
+      			title="United States Census page" />
420
+		   </View>
421
+		  
422
+		</View>
423
+		</ScrollView>,
392
 		 
424
 		 
393
 		newsView:
425
 		newsView:
394
 		<View style = {styles.containerbackground}>
426
 		<View style = {styles.containerbackground}>
442
       return (
474
       return (
443
 	  <View>
475
 	  <View>
444
 		
476
 		
445
-			<View style = {styles.containerbackground}>
477
+		<View style = {styles.containerbackground}>
478
+				<ScrollView style={styles.scrollView}>
446
 				<View style = {styles.buttonContainer}>
479
 				<View style = {styles.buttonContainer}>
447
 					<Text style={styles.Navsub}> Demographic Data Viewer</Text>
480
 					<Text style={styles.Navsub}> Demographic Data Viewer</Text>
448
-							<View style = {styles.buttons}>
481
+						<Text style={styles.sub}> Navegador</Text>
482
+							<Pressable style = {styles.buttons} onPress={this.setNews}>
483
+							
449
 			 		 			<Button
484
 			 		 			<Button
450
-								onPress = {this.setNews}
451
-				 				title = "Noticias"
485
+								title = "Noticias"
452
 				 				color = "white"
486
 				 				color = "white"
453
 			  					/>
487
 			  					/>
454
-			  					<Button
455
-								 onPress = {this.setData}
456
-								 title = "Datos"
457
-								 color = "white"
488
+			  
489
+			  					
490
+							</Pressable>
491
+								
492
+							<Pressable style = {styles.buttons} onPress={this.setData}>
493
+							
494
+			 		 			<Button
495
+								title = "Datos"
496
+				 				color = "white"
458
 			  					/>
497
 			  					/>
459
-							</View>
498
+			  
499
+			  					
500
+							</Pressable>
460
 						
501
 						
461
 						
502
 						
462
 		  				{this.state.current}
503
 		  				{this.state.current}
463
 					</View>
504
 					</View>
505
+					</ScrollView>
464
 			</View>
506
 			</View>
465
 		</View>
507
 		</View>
466
       );
508
       );

BIN
census-logos.png View File