mirror of
https://github.com/Blair-SGA-Dev-Team/blazerapp.git
synced 2024-11-24 05:31:16 -05:00
Home page + others
This commit is contained in:
parent
290ce494fd
commit
f216cfb872
|
@ -118,7 +118,7 @@ class Calendar extends React.Component {
|
|||
render() {
|
||||
return (
|
||||
<View>
|
||||
<View style = {{height: 56, display: 'flex'}}>
|
||||
<View style = {{height: 90, display: 'flex'}}>
|
||||
<LinearGradient
|
||||
colors={['#f99', 'white']}
|
||||
style = {{height: '100%', borderBottomColor:'black', borderBottomWidth:0.5, display: 'flex', justifyContent: 'flex-end', paddingBottom: '2.5%'}}
|
||||
|
|
232
app/Home.js
232
app/Home.js
File diff suppressed because one or more lines are too long
|
@ -30,6 +30,7 @@ import SSLOps, {SSLInfo} from './SSLOps'
|
|||
import LunchEvents, {LunchInfo} from './LunchEvents'
|
||||
import ChallengeWeek from './ChallengeWeek'
|
||||
import Settings from './Settings'
|
||||
import Poll from './Poll'
|
||||
import Images from './Images'
|
||||
import LinearGradient from 'react-native-linear-gradient'
|
||||
|
||||
|
@ -57,7 +58,7 @@ class MoreSwitch extends React.Component {
|
|||
renderItem={({item})=>
|
||||
|
||||
<TouchableOpacity style={styles.moreitem} onPress={()=>this.props.navigation.navigate(item.key)}>
|
||||
<Image source = {item.img} style = {{height: 40, width: 40, marginRight: 10}}/>
|
||||
<Image source = {item.img} style = {{height: 40, width: 40, marginRight: 10, tintColor: '#e3e3e3'}}/>
|
||||
<Text style={styles.moretext}>{item.name}</Text>
|
||||
</TouchableOpacity>
|
||||
}
|
||||
|
|
55
app/Poll.js
55
app/Poll.js
|
@ -6,6 +6,8 @@ import {
|
|||
View,
|
||||
Text,
|
||||
StatusBar,
|
||||
Image,
|
||||
TouchableOpacity,
|
||||
} from 'react-native';
|
||||
|
||||
import {
|
||||
|
@ -16,19 +18,54 @@ import {
|
|||
ReloadInstructions,
|
||||
} from 'react-native/Libraries/NewAppScreen';
|
||||
import {WebView} from 'react-native-webview';
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
import { Linking } from 'react-native';
|
||||
import { url } from './resources/fetchInfo.json'
|
||||
|
||||
class Poll extends React.Component {
|
||||
|
||||
/*constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
fetch(`${url}/api/en/lunchEvents`,{
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache'
|
||||
}
|
||||
}
|
||||
)
|
||||
.then((response) => {
|
||||
return response.text();
|
||||
})
|
||||
.then((json) => {
|
||||
this.setState({data: JSON.parse(json)});
|
||||
})
|
||||
.catch((error) => console.error(error))
|
||||
}*/
|
||||
|
||||
render() {
|
||||
return (
|
||||
<WebView
|
||||
source = {{uri: 'https://docs.google.com/forms/d/e/1FAIpQLSfR0XP2yo3TV3egz7aMok56wnP9kG4FQt2v3rHrrayf8uC7Vw/viewform?usp=sf_link'}}
|
||||
javaScriptEnabled={true}
|
||||
domStorageEnabled={true}
|
||||
startInLoadingState={true}
|
||||
style={{marginTop: 20}}
|
||||
cacheEnabled={true}
|
||||
|
||||
/>
|
||||
<View style = {{backgroundColor: 'white'}}>
|
||||
<View style = {{height: 90, display: 'flex'}}>
|
||||
<LinearGradient
|
||||
colors={['#f99', 'white']}
|
||||
style = {{height: '100%', borderBottomColor:'black', borderBottomWidth:0.5, display: 'flex', justifyContent: 'flex-end', paddingBottom: '2.5%'}}
|
||||
>
|
||||
<Text style = {{fontSize: 24, fontWeight: 'bold', alignSelf: 'center'}}>Polls</Text>
|
||||
</LinearGradient>
|
||||
|
||||
</View>
|
||||
<View style={{backgroundColor: 'white', height: '100%', display: 'flex', alignItems: 'center'}}>
|
||||
<TouchableOpacity onPress={()=>Linking.openURL("https://google.com")}>
|
||||
<Image source={require('./assets/polls.png')} style={{marginTop: 50, height: 300, width: 300, tintColor: 'red'}}/>
|
||||
</TouchableOpacity>
|
||||
<Text style ={{fontSize: 20, marginTop: 30}}>Press the image to take the poll!</Text>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
BIN
app/assets/polls.png
Normal file
BIN
app/assets/polls.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
BIN
app/assets/unknown.png
Normal file
BIN
app/assets/unknown.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -1 +1 @@
|
|||
{"url":"https://6227632bc899.ngrok.io"}
|
||||
{"url":"http://127.0.0.1:5000"}
|
|
@ -40,6 +40,10 @@ const styles = StyleSheet.create({
|
|||
textDecorationStyle: "solid",
|
||||
textDecorationColor: "red",
|
||||
},
|
||||
homeTitle: {
|
||||
fontSize: 20,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
title3: {
|
||||
fontSize: 28,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user