forked from Queso5/Avian-Guard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplashScreenCustom.js
More file actions
115 lines (109 loc) · 2.55 KB
/
Copy pathSplashScreenCustom.js
File metadata and controls
115 lines (109 loc) · 2.55 KB
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
import { ImageBackground, Text, View, StyleSheet } from 'react-native';
import { useFonts } from 'expo-font';
import * as SplashScreen from 'expo-splash-screen';
import { useEffect } from 'react';
SplashScreen.preventAutoHideAsync();
export default function SplashScreenCustom() {
const [fontsLoaded] = useFonts({
'Poppins-Bold': require('./assets/fonts/Poppins-Bold.ttf'),
});
useEffect(() => {
if (fontsLoaded) {
setTimeout(() => {
SplashScreen.hideAsync();
}, 2000);
}
}, [fontsLoaded]);
if (!fontsLoaded) {
return null;
}
return (
<ImageBackground
source={require('./assets/images/splash-background.png')}
style={styles.background}
resizeMode="cover"
>
<View style={styles.container}>
<View style={styles.logoContainer}>
<View style={styles.logoCircle}>
<View style={styles.logoInnerCircle}>
<Text style={styles.logoEmoji}>🦅</Text>
</View>
<Text style={styles.logoText}>Your Logo Here</Text>
</View>
</View>
<View style={styles.titleContainer}>
<Text style={styles.title}>Avian{'\n'}Guard</Text>
</View>
<View style={styles.taglineContainer}>
<Text style={styles.tagline}>Detect. Protect. Preserve.</Text>
</View>
</View>
</ImageBackground>
);
}
const styles = StyleSheet.create({
background: {
flex: 1,
},
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
logoContainer: {
alignItems: 'center',
marginBottom: 20,
},
logoCircle: {
width: 120,
height: 120,
borderRadius: 60,
backgroundColor: 'white',
justifyContent: 'center',
alignItems: 'center',
shadowColor: '#000',
shadowOffset: { width: 0, height: 4 },
shadowOpacity: 0.1,
shadowRadius: 8,
elevation: 8,
},
logoInnerCircle: {
width: 80,
height: 80,
borderRadius: 40,
backgroundColor: '#f3f4f6',
justifyContent: 'center',
alignItems: 'center',
},
logoEmoji: {
fontSize: 40,
},
logoText: {
marginTop: 10,
fontSize: 12,
color: '#9ca3af',
textAlign: 'center',
},
titleContainer: {
alignItems: 'center',
marginBottom: 40,
},
title: {
fontSize: 48,
fontFamily: 'Poppins-Bold',
color: '#111827',
textAlign: 'center',
lineHeight: 52,
},
taglineContainer: {
position: 'absolute',
bottom: 100,
alignItems: 'center',
},
tagline: {
fontSize: 18,
color: '#111827',
fontWeight: '500',
},
});