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,10 +124,19 @@ const styles = StyleSheet.create({
124 124
   buttonContainer: {
125 125
     flexDirection: 'column',
126 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 141
   container: {
133 142
     flexDirection: 'column',
@@ -136,8 +145,10 @@ const styles = StyleSheet.create({
136 145
     alignItems: 'center',
137 146
     justifyContent: 'center',
138 147
 	paddingTop:20,
139
-	marginTop: 20,
148
+	marginTop: 15,
140 149
   },
150
+
151
+
141 152
   containerbackground:{
142 153
 	
143 154
     backgroundColor: '#f0f8ff'
@@ -194,7 +205,12 @@ const handlePress = () => false
194 205
 //data parsing goes here
195 206
 function getInfo(){
196 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 216
 //data display
@@ -375,11 +391,12 @@ class App extends React.Component {
375 391
 //the text at the end of a page gets cut off if anyone knows how to fix that?
376 392
 vars = {
377 393
 		welcome:
378
-
394
+<ScrollView style={styles.scrollView}>
379 395
 		<View style = {styles.containerbackground}>
380
-		<ScrollView style={styles.scrollView}>
396
+		
381 397
 		  	<View style = {styles.container}>
382 398
 				<Text style={styles.intro}>Bienvenido!</Text>
399
+				<Image source={require('./smallLogo.jpeg')} />
383 400
 			</View>
384 401
 			<View style = {styles.container}>
385 402
 				<Text style={styles.sub}>Aquí podra mantenerse al tanto con las 
@@ -387,8 +404,23 @@ vars = {
387 404
 					los Demographic Data Profiles de cada municipio de
388 405
 					Puerto Rico.</Text>
389 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 425
 		newsView:
394 426
 		<View style = {styles.containerbackground}>
@@ -442,25 +474,35 @@ setNews = () => this.setState({ current: this.vars.newsView })
442 474
       return (
443 475
 	  <View>
444 476
 		
445
-			<View style = {styles.containerbackground}>
477
+		<View style = {styles.containerbackground}>
478
+				<ScrollView style={styles.scrollView}>
446 479
 				<View style = {styles.buttonContainer}>
447 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 484
 			 		 			<Button
450
-								onPress = {this.setNews}
451
-				 				title = "Noticias"
485
+								title = "Noticias"
452 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 503
 		  				{this.state.current}
463 504
 					</View>
505
+					</ScrollView>
464 506
 			</View>
465 507
 		</View>
466 508
       );

BIN
census-logos.png View File