-
Notifications
You must be signed in to change notification settings - Fork 0
/
PregnancyScreen.js
118 lines (112 loc) · 3.75 KB
/
PregnancyScreen.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
import React, { Component } from 'react';
import { AppRegistry, Text, Image, StyleSheet, View, ScrollView, Linking, Button } from 'react-native';
import HealthInfo from '../screens/HealthInfo';
export default class Pregnancy extends Component {
constructor(props) {
super(props);
this.state = {health: false, menstrual: false, pregnancy: true, birthControl: false, abortion: false}
}
goBack = () => {
this.setState({health: true, menstrual: false, pregnancy: false, birthControl: false, abortion: false})
}
render() {
if(this.state.pregnancy){
return (
<Image
style={styles.bgImage}
source={{ uri:'http://www.zingerbug.com/Backgrounds/background_images/lavender_mini_flowers.gif' }}
>
<ScrollView style={styles.overallView}>
<View style={styles.topNav}>
<Button
onPress = {this.goBack}
color = 'black'
title = 'Back to Homescreen'
/>
</View>
<Text style={styles.baseText}>
<Text style={styles.titleText}>
{'\n'}Pregnancy{'\n'}
</Text>
Pregnancy can be both an exciting and scary time in a woman's life! We've compiled a list of helpful resources for you to consult below: {"\n"}{"\n"}
<Text style={styles.subTitleText}>
Helpful Outside Sources {"\n"}
</Text>
<Text style={styles.hyperlink} onPress={() => Linking.openURL('https://www.medicinenet.com/pregnancy/article.htm')}>
Medicinenet.com: Pregnancy Week by Week {"\n"}
</Text>
<Text style={styles.hyperlink} onPress={() => Linking.openURL('https://www.babycenter.com/pregnancy')}>
Babycenter: A popular source for everything relating to pregancy. {"\n"}
</Text>
<Text style={styles.hyperlink} onPress={() => Linking.openURL('https://www.webmd.com/baby/default.htm')}>
WebMD: A short overview. {"\n"}
</Text>
<Text style={styles.hyperlink} onPress={() => Linking.openURL('https://en.wikipedia.org/wiki/Pregnancy')}>
Wikipedia: A more clinical and informative angle. {"\n"}
</Text>
<Text style={styles.hyperlink} onPress={() => Linking.openURL('https://www.pregnancy.com/')}>
Pregnancy.com: Week-by-week visualizations. {"\n"}
</Text>
<Text style={styles.hyperlink} onPress={() => Linking.openURL('http://www.parents.com/pregnancy/')}>
Parents.com: Another popular source with all kinds of information. {"\n"}
</Text>
</Text>
</ScrollView>
</Image>
);
}
else{
return <HealthInfo/>;
}
}
}
const styles = StyleSheet.create({
baseText: {
marginHorizontal: 30,
fontFamily: 'Helvetica',
color:'#2d0f63',
backgroundColor: 'rgba(0,0,0,0)'
/* put this at the very top text tag */
},
subTitleText: {
fontSize:20,
fontWeight: 'bold',
},
/*for subheadings*/
titleText: {
marginVertical: 30,
fontSize: 30,
fontWeight: 'bold',
},
/*biggest title*/
bgImage: {
position: 'absolute',
width: '100%',
height: '100%',
justifyContent: 'center',
},
/*the purple flower background image, goes int he image tag*/
hyperlink: {
textDecorationLine: 'underline',
lineHeight: 25,
},
/*for hyperlinked text*/
overallView: {
backgroundColor:
'rgba(252, 201, 231, 0.4)',
marginVertical: 30,
position: 'absolute',
width: '100%',
height: '100%',
marginTop: 20,
},
/*for the big view container holding all the text, also makes the background translucent*/
topNav: {
marginTop: 20,
flex: 1,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'flex-start',
backgroundColor: "transparent",
},
});