1
0
forked from fr/deguapp

Edited: Styles on login page, styles on sign up page

This commit is contained in:
Matěj Kevin Nechodom 2024-05-09 18:05:15 +02:00
parent 05d0ff7134
commit 7c25158c85
3 changed files with 35 additions and 14 deletions

View File

@ -69,7 +69,9 @@ function LoginPage() {
/> />
</View> </View>
<View> <View>
<Link href="/signup">Don't have an account?</Link> <Link href="/signup" style={styles.signup}>
Don't have an account?
</Link>
</View> </View>
</View> </View>
</View> </View>
@ -106,7 +108,7 @@ const styles = StyleSheet.create({
header: { header: {
width: "100%", width: "100%",
alignItems: "center", alignItems: "center",
paddingTop: "10%", paddingTop: "20%",
}, },
input: { input: {
height: "auto", height: "auto",
@ -131,6 +133,12 @@ const styles = StyleSheet.create({
top: 0, top: 0,
height: "100%", height: "100%",
}, },
signup: {
textDecorationLine: "underline",
fontSize: 14,
marginTop: 10,
fontStyle: "italic",
},
}); });
export default LoginPage; export default LoginPage;

View File

@ -3,6 +3,8 @@ import { useState } from "react";
import Button from "../components/Button"; import Button from "../components/Button";
import { colors } from "../components/style"; import { colors } from "../components/style";
import { Link, router } from "expo-router"; import { Link, router } from "expo-router";
import { LinearGradient } from "expo-linear-gradient";
import { Animated } from "react-native";
import { useAuth } from "./context/AuthContext"; import { useAuth } from "./context/AuthContext";
@ -35,6 +37,10 @@ function SignupPage() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<AnimatedLinearGradient
colors={[colors.dark, colors.darkSecondary]}
style={styles.gradient}
/>
<View style={styles.header}> <View style={styles.header}>
<Image <Image
source={require("../assets/deguapp_logo.png")} source={require("../assets/deguapp_logo.png")}
@ -88,7 +94,7 @@ function SignupPage() {
color={colors.gold} color={colors.gold}
onPress={signin} onPress={signin}
/> />
<Link href="/login" style={styles.a}> <Link href="/login" style={styles.login}>
Already have an account? Log In! Already have an account? Log In!
</Link> </Link>
</View> </View>
@ -96,16 +102,20 @@ function SignupPage() {
); );
} }
const AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
width: "100%", width: "100%",
height: "100%", height: "100%",
backgroundColor: colors.dark, backgroundColor: colors.dark,
justifyContent: "center",
alignItems: "center",
maxHeight: "100%",
}, },
form: { form: {
flex: 1, flex: 1,
alignItems: "center", alignItems: "center",
paddingTop: "10%",
width: "100%", width: "100%",
gap: 15, gap: 15,
}, },
@ -113,36 +123,38 @@ const styles = StyleSheet.create({
color: "#FFF", color: "#FFF",
fontSize: 30, fontSize: 30,
textAlign: "center", textAlign: "center",
paddingTop: "20%", paddingTop: "3%",
}, paddingBottom: "3%",
a: {
color: "#FFF",
fontSize: 12,
fontStyle: "italic",
textDecorationLine: "underline",
}, },
logo: { logo: {
width: "80%", width: "80%",
resizeMode: "contain", resizeMode: "contain",
marginTop: "15%",
}, },
header: { header: {
width: "100%", width: "100%",
alignItems: "center", alignItems: "center",
paddingTop: "20%",
}, },
input: { input: {
height: "auto", height: "auto",
width: "60%", width: "60%",
borderColor: "gray", borderColor: "gray",
borderWidth: 1, borderWidth: 1,
borderRadius: 5, borderRadius: 10,
padding: 10, padding: 13,
color: "#fff", color: "#fff",
}, },
btnContainer: { btnContainer: {
flexDirection: "row", flexDirection: "row",
gap: 5, gap: 5,
}, },
login: {
color: "#FFF",
fontStyle: "italic",
textDecorationLine: "underline",
fontSize: 14,
marginTop: 10,
},
}); });
export default SignupPage; export default SignupPage;

View File

@ -7,4 +7,5 @@ export const colors = {
black: "#020405ff", black: "#020405ff",
dark: "#010409", dark: "#010409",
darkSecondary: "#0D1117", darkSecondary: "#0D1117",
white: "#FFFFFF",
}; };