-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kastorCodeLogo.png, kastorCodeName.png, and logo.png Add images.d.ts in types folder HOOK/ADD: useKastorCode COMPONENT/UPDATE: Button (add align items and justify content to center) PAGE/UPDATE: Home (add app logo, GitHub button and KastorCode animations)
- Loading branch information
1 parent
4302b33
commit 7acf8c2
Showing
28 changed files
with
191 additions
and
9 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+741 Bytes
(110%)
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+520 Bytes
(120%)
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.45 KB
(120%)
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.09 KB
(140%)
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.2 KB
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.2 KB
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.08 KB
(140%)
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import useKastorCode from './useKastorCode' | ||
|
||
|
||
export { | ||
useKastorCode | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
import React, { useState, useEffect, useRef } from 'react' | ||
import { Animated, Easing, Modal, View } from 'react-native' | ||
|
||
import LOGO from '~/assets/images/kastorCodeLogo.png' | ||
|
||
import NAME from '~/assets/images/kastorCodeName.png' | ||
|
||
|
||
function useKastorCode () { | ||
const animation = useRef(new Animated.Value(0)).current | ||
|
||
const [show, setShow] = useState(false) | ||
|
||
|
||
function runAnimations () { | ||
setShow(true) | ||
} | ||
|
||
|
||
function runAnimationsNow () { | ||
Animated.timing(animation, { | ||
toValue: 1, | ||
duration: 3000, | ||
easing: Easing.linear, | ||
useNativeDriver: false | ||
}) | ||
.start(() => { | ||
setShow(false) | ||
animation.setValue(0) | ||
}) | ||
} | ||
|
||
|
||
function Component () { | ||
return ( | ||
<Modal transparent={true}> | ||
<Animated.View | ||
style={{ | ||
flex: 1, alignItems: 'center', justifyContent: 'center', | ||
backgroundColor: 'rgba(0,0,0,0.33)', | ||
opacity: animation.interpolate({ | ||
inputRange: [0, 0.3, 0.7, 1], outputRange: [0, 1, 1, 0] | ||
}) | ||
}} | ||
> | ||
<View style={{ marginBottom: 20 }}> | ||
<Animated.Image | ||
source={LOGO} | ||
// @ts-ignore | ||
tintColor='#301934' | ||
style={{ | ||
resizeMode: 'contain', | ||
height: animation.interpolate({ | ||
inputRange: [0, 1], outputRange: [216 / 2, 216] | ||
}) | ||
}} | ||
/> | ||
|
||
<Animated.Image | ||
source={LOGO} | ||
// @ts-ignore | ||
tintColor='#ff033e' | ||
style={{ | ||
position: 'absolute', resizeMode: 'contain', | ||
height: animation.interpolate({ | ||
inputRange: [0, 1], outputRange: [216 / 2, 216] | ||
}) | ||
}} | ||
/> | ||
</View> | ||
|
||
<View> | ||
<Animated.Image | ||
source={NAME} | ||
// @ts-ignore | ||
tintColor='#301934' | ||
style={{ | ||
resizeMode: 'contain', | ||
height: animation.interpolate({ | ||
inputRange: [0, 1], outputRange: [33 / 2, 33] | ||
}) | ||
}} | ||
/> | ||
|
||
<Animated.Image | ||
source={NAME} | ||
// @ts-ignore | ||
tintColor='#ff033e' | ||
style={{ | ||
position: 'absolute', resizeMode: 'contain', | ||
height: animation.interpolate({ | ||
inputRange: [0, 1], outputRange: [33 / 2, 33] | ||
}) | ||
}} | ||
/> | ||
</View> | ||
</Animated.View> | ||
</Modal> | ||
) | ||
} | ||
|
||
|
||
useEffect(() => { | ||
if (show) { | ||
runAnimationsNow() | ||
} | ||
}, [show]) | ||
|
||
|
||
return { | ||
Component, | ||
runAnimations, | ||
show | ||
} | ||
} | ||
|
||
|
||
export default useKastorCode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module '*.png' |