-
Notifications
You must be signed in to change notification settings - Fork 0
added splash screen, revamped login screen. #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import React, { useState, useEffect, useContext } from 'react'; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idk where to put this specifically but a few things about the login page that need to be fixed:
|
||
| import { View, Text, ActivityIndicator, KeyboardAvoidingView, TouchableOpacity, Alert } from 'react-native'; | ||
| import { View, Text, ActivityIndicator, KeyboardAvoidingView, TouchableOpacity, ImageBackground } from 'react-native'; | ||
| import * as Location from 'expo-location'; | ||
| import { styles } from '../styles'; | ||
| import { Input, Button } from 'react-native-elements/'; | ||
|
|
@@ -19,6 +19,8 @@ export default ({ navigation }) => { | |
| const context = useContext(Context); | ||
| const [fontLoaded] = useFonts({ | ||
| Fredoka: require('../assets/fonts/FredokaOne-Regular.ttf'), | ||
| OpenSans: require('../assets/fonts/OpenSans.ttf'), | ||
| OpenSansItalic: require('../assets/fonts/OpenSansItalic.ttf'), | ||
| }); | ||
|
|
||
| const setLocation = async () => { | ||
|
|
@@ -61,32 +63,40 @@ export default ({ navigation }) => { | |
| return ( | ||
| <> | ||
| <KeyboardAvoidingView behavior='padding' style={styles.loginScreenContainer}> | ||
| <LinearGradient | ||
| // Background Linear Gradient | ||
| colors={['rgba(236, 99, 94, 1)', 'rgba(245, 192, 106, 1)']} | ||
| style={{ position: 'absolute', top: 0, left: 0, width: "100%", height: "100%" }} | ||
| /> | ||
| <ImageBackground | ||
|
|
||
| source={{ uri: "https://news.cornell.edu/sites/default/files/styles/full_size/public/UP_2017_0630_051.jpg?itok=MzKRS1G7" }} | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is there random whitespace here? Remove and format properly |
||
| style={styles.loginScreenHeroImg} > | ||
|
|
||
| <View style={styles.yoloPillXL}> | ||
| <Text style={{ | ||
| color: 'white', | ||
| fontFamily: 'OpenSans', | ||
| fontWeight: "800", | ||
| fontSize: 40, | ||
| }}>Login</Text> | ||
| </View> | ||
| </ImageBackground> | ||
| <View style={{ alignItems: 'center' }}> | ||
| <Text style={{ color: 'white', fontSize: 100, fontWeight: "900", fontFamily: 'Fredoka' }}>YOLO</Text> | ||
| <Input | ||
| placeholder="Username" | ||
| placeholderTextColor='rgba(255,255,255,0.6)' | ||
| placeholderTextColor='grey' | ||
| textContentType={'username'} | ||
| leftIcon={<Ionicons name="person" size={20} style={styles.loginIcon} />} | ||
| leftIcon={<Ionicons name="person" size={18} style={styles.loginIcon} />} | ||
| onChangeText={t => setUserName(t)} | ||
| inputContainerStyle={{ borderBottomColor: 'white', marginLeft: 20, marginRight: 20 }} | ||
| inputContainerStyle={{ borderBottomColor: 'grey', marginLeft: 20, marginRight: 20 }} | ||
| containerStyle={{ marginTop: 20 }} | ||
| inputStyle={{ color: 'white', fontSize: 22 }} | ||
| inputStyle={{ color: 'grey', fontSize: 18 }} | ||
| /> | ||
| <Input | ||
| placeholder="Password" | ||
| secureTextEntry | ||
| placeholderTextColor='rgba(255,255,255,0.6)' | ||
| placeholderTextColor='grey' | ||
| textContentType={'password'} | ||
| leftIcon={<Ionicons name="key-outline" size={20} style={styles.loginIcon} />} | ||
| leftIcon={<Ionicons name="key-outline" size={18} style={styles.loginIcon} />} | ||
| onChangeText={t => setPassword(t)} | ||
| inputContainerStyle={{ borderBottomColor: 'white', marginLeft: 20, marginRight: 20 }} | ||
| inputStyle={{ color: 'white', fontSize: 22 }} | ||
| inputContainerStyle={{ borderBottomColor: 'grey', marginLeft: 20, marginRight: 20 }} | ||
| inputStyle={{ color: 'grey', fontSize: 18 }} | ||
|
|
||
| /> | ||
| <Button | ||
|
|
@@ -138,8 +148,8 @@ export default ({ navigation }) => { | |
| password: password | ||
| }); | ||
| }}> | ||
| <Text style={{ color: "white", alignSelf: 'center', marginTop: 30 }}> | ||
| Don't have an account? <Text style={{ fontWeight: "bold" }}>Sign up here!</Text> | ||
| <Text style={{ color: "grey", alignSelf: 'center', marginTop: 30 }}> | ||
| Don't have an account? <Text style={{ fontWeight: "bold", color: "grey" }}>Sign up here!</Text> | ||
| </Text> | ||
| </TouchableOpacity> | ||
| </KeyboardAvoidingView> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import React, { useContext, useEffect, useState } from "react"; | ||
| import { View, Text, ActivityIndicator, KeyboardAvoidingView, TouchableOpacity, Alert } from "react-native"; | ||
| import { View, Text, ActivityIndicator, KeyboardAvoidingView, TouchableOpacity, ImageBackground } from "react-native"; | ||
| import { Input, Button } from "react-native-elements"; | ||
| import { styles } from "../styles"; | ||
| import { Ionicons } from '@expo/vector-icons'; | ||
|
|
@@ -22,6 +22,8 @@ export default ({ navigation, route }) => { | |
|
|
||
| const [_] = useFonts({ | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idk where to leave this comment but I think you fiddling with the styles in styles.js screwed up the register page so it's not centered vertically anymore and also the icons are orange but so is the BG of register page, so make sure to fix that |
||
| Fredoka: require('../assets/fonts/FredokaOne-Regular.ttf'), | ||
| OpenSans: require('../assets/fonts/OpenSans.ttf'), | ||
| OpenSansItalic: require('../assets/fonts/OpenSansItalic.ttf'), | ||
| }); | ||
|
|
||
| useEffect(() => { | ||
|
|
@@ -50,15 +52,24 @@ export default ({ navigation, route }) => { | |
| }, [loading]); | ||
|
|
||
| return ( | ||
| <KeyboardAvoidingView behavior="padding" style={styles.loginScreenContainer}> | ||
| <LinearGradient | ||
| // Background Linear Gradient | ||
| colors={['rgba(236, 99, 94, 1)', 'rgba(245, 192, 106, 1)']} | ||
| style={{ position: 'absolute', top: 0, left: 0, width: "100%", height: "100%" }} | ||
| /> | ||
| <KeyboardAvoidingView behavior='padding' style={styles.loginScreenContainer}> | ||
| <ImageBackground | ||
|
|
||
| source={{ uri: "https://sce.cornell.edu/img/content/825-inset-full-1.jpg" }} | ||
| style={styles.loginScreenHeroImg} > | ||
|
|
||
| <View style={styles.yoloPillXL}> | ||
| <Text style={{ | ||
| color: 'white', | ||
| fontFamily: 'OpenSans', | ||
| fontWeight: "800", | ||
| fontSize: 40, | ||
| }}>Register</Text> | ||
| </View> | ||
| </ImageBackground> | ||
| <View style={{ alignItems: 'center' }}> | ||
| <Text style={{ | ||
| fontFamily: 'Fredoka', | ||
| fontFamily: 'OpenSans', | ||
| fontSize: 25, | ||
| margin: 10, | ||
| color: 'white', | ||
|
|
@@ -68,31 +79,31 @@ export default ({ navigation, route }) => { | |
| }}>Register</Text> | ||
| <Input | ||
| placeholder="Name" | ||
| placeholderTextColor='rgba(255,255,255,0.6)' | ||
| leftIcon={<Ionicons name="person" size={20} style={styles.loginIcon} />} | ||
| placeholderTextColor='grey' | ||
| leftIcon={<Ionicons name="person" size={18} style={styles.loginIcon} />} | ||
| value={name} | ||
| onChangeText={currName => setName(currName)} | ||
| inputContainerStyle={{ borderBottomColor: 'white', marginLeft: 20, marginRight: 20 }} | ||
| inputStyle={{ color: 'white', fontSize: 22 }} | ||
| inputContainerStyle={{ borderBottomColor: 'grey', marginLeft: 20, marginRight: 20 }} | ||
| inputStyle={{ color: 'grey', fontSize: 18 }} | ||
| /> | ||
| <Input | ||
| placeholder="Username" | ||
| placeholderTextColor='rgba(255,255,255,0.6)' | ||
| leftIcon={<Ionicons name="person-circle-outline" size={20} style={styles.loginIcon} />} | ||
| placeholderTextColor='grey' | ||
| leftIcon={<Ionicons name="person-circle-outline" size={18} style={styles.loginIcon} />} | ||
| value={username} | ||
| onChangeText={currUser => setUsername(currUser)} | ||
| inputContainerStyle={{ borderBottomColor: 'white', marginLeft: 20, marginRight: 20 }} | ||
| inputStyle={{ color: 'white', fontSize: 22 }} | ||
| inputContainerStyle={{ borderBottomColor: 'grey', marginLeft: 20, marginRight: 20 }} | ||
| inputStyle={{ color: 'grey', fontSize: 18 }} | ||
| /> | ||
| <Input | ||
| placeholder="Password" | ||
| secureTextEntry | ||
| placeholderTextColor='rgba(255,255,255,0.6)' | ||
| leftIcon={<Ionicons name="key-outline" size={20} style={styles.loginIcon} />} | ||
| placeholderTextColor='grey' | ||
| leftIcon={<Ionicons name="key-outline" size={18} style={styles.loginIcon} />} | ||
| value={password} | ||
| onChangeText={currPass => setPassword(currPass)} | ||
| inputContainerStyle={{ borderBottomColor: 'white', marginLeft: 20, marginRight: 20 }} | ||
| inputStyle={{ color: 'white', fontSize: 22 }} | ||
| inputContainerStyle={{ borderBottomColor: 'grey', marginLeft: 20, marginRight: 20 }} | ||
| inputStyle={{ color: 'grey', fontSize: 18 }} | ||
| /> | ||
| <Button | ||
| title={<Text style={ | ||
|
|
@@ -146,11 +157,12 @@ export default ({ navigation, route }) => { | |
| <TouchableOpacity onPress={() => { | ||
| navigation.navigate("Login"); | ||
| }}> | ||
| <Text style={{ color: "white", alignSelf: 'center', marginTop: 30, fontWeight: "bold" }}> | ||
| <Text style={{ color: "grey", alignSelf: 'center', marginTop: 30, fontWeight: "bold" }}> | ||
| Go back | ||
| </Text> | ||
| </TouchableOpacity> | ||
| </View> | ||
| </KeyboardAvoidingView> | ||
| </KeyboardAvoidingView > | ||
|
|
||
| ) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| import React, { useState, useEffect, useContext } from 'react'; | ||
| import { View, Text, ActivityIndicator, KeyboardAvoidingView, TouchableOpacity, Alert, Image } from 'react-native'; | ||
| import { styles } from '../styles'; | ||
| import { useFonts } from 'expo-font'; | ||
|
|
||
| export default ({ navigation }) => { | ||
|
|
||
| const [fontLoaded] = useFonts({ | ||
| OpenSans: require('../assets/fonts/OpenSans.ttf'), | ||
| OpenSansItalic: require('../assets/fonts/OpenSansItalic.ttf'), | ||
| }); | ||
| if (!fontLoaded) | ||
| return <></>; | ||
| return ( | ||
| <> | ||
| <View style={styles.splashScreenContainer}> | ||
| <Image source={{ uri: 'https://c0.wallpaperflare.com/preview/470/565/195/cornell-cornell-university-the-bell-tower-building.jpg' }} | ||
| style={styles.splashScreenHeroImage} /> | ||
| <View style={styles.splashScreenBottomContainer}> | ||
| <View style={styles.yoloPill}> | ||
| <Text style={{ | ||
| color: 'white', | ||
| fontFamily: 'OpenSans', | ||
| fontWeight: "bold", | ||
| fontSize: 26, | ||
| }}>#YOLO</Text> | ||
| </View> | ||
| <Text style={{ | ||
| color: 'black', | ||
| fontFamily: 'OpenSans', | ||
| fontWeight: "bold", | ||
| fontSize: 26, | ||
| marginTop: 10 | ||
| }}>Welcome to your next week.</Text> | ||
|
|
||
| <Text style={{ | ||
| color: 'gray', | ||
| fontFamily: 'OpenSans', | ||
| fontWeight: "bold", | ||
| fontSize: 17, | ||
| marginTop: 10 | ||
| }}>Build out your calendar. Explore, visit, and discover events on your campus today!</Text> | ||
|
|
||
| <TouchableOpacity | ||
| style={styles.splashButton} | ||
| onPress={() => navigation.navigate("Login")} | ||
| > | ||
| <Text style={{ | ||
| color: 'white', | ||
| fontFamily: 'OpenSans', | ||
| fontWeight: "bold", | ||
| fontSize: 17, | ||
| marginTop: 12.5 | ||
| }}> | ||
| Get started! | ||
| </Text> | ||
| </TouchableOpacity> | ||
| </View> | ||
|
|
||
| </View> | ||
| </> | ||
| ) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to uncomment this before merge