diff --git a/src/FLAD/App.tsx b/src/FLAD/App.tsx
index 9f2df37..827ebf3 100644
--- a/src/FLAD/App.tsx
+++ b/src/FLAD/App.tsx
@@ -1,22 +1,16 @@
-import { LinearGradient } from 'expo-linear-gradient';
-import { StatusBar } from 'expo-status-bar';
-import { useState, useTransition } from 'react';
-import FavoritePage from './screens/favoritePage';
-import { cards as cardArray } from './data/data'
import Navigation from './navigation/Navigation';
-import { NavigationContainer } from '@react-navigation/native';
-import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
-import { Animated, Dimensions, ImageBackground, StyleSheet, Text, View } from 'react-native';
-import Card from './components/Card';
-
+import LoginPage from './screens/loginPage';
+import {SafeAreaProvider,useSafeAreaInsets} from 'react-native-safe-area-context';
+import Onboarding from './components/Onboarding';
export default function App() {
-const Stack = createBottomTabNavigator();
-
return (
-
-
+
+ //
+ //
+ // {/* */}
+ //
);
}
diff --git a/src/FLAD/assets/icons/Check.png b/src/FLAD/assets/icons/Check.png
new file mode 100644
index 0000000..e2aadff
Binary files /dev/null and b/src/FLAD/assets/icons/Check.png differ
diff --git a/src/FLAD/assets/images/Board_Image.png b/src/FLAD/assets/images/Board_Image.png
new file mode 100644
index 0000000..de93bdd
Binary files /dev/null and b/src/FLAD/assets/images/Board_Image.png differ
diff --git a/src/FLAD/assets/images/Board_Image2.png b/src/FLAD/assets/images/Board_Image2.png
new file mode 100644
index 0000000..cc56b34
Binary files /dev/null and b/src/FLAD/assets/images/Board_Image2.png differ
diff --git a/src/FLAD/assets/images/Board_Image3.png b/src/FLAD/assets/images/Board_Image3.png
new file mode 100644
index 0000000..f7db356
Binary files /dev/null and b/src/FLAD/assets/images/Board_Image3.png differ
diff --git a/src/FLAD/components/NextButton.tsx b/src/FLAD/components/NextButton.tsx
new file mode 100644
index 0000000..87f7388
--- /dev/null
+++ b/src/FLAD/components/NextButton.tsx
@@ -0,0 +1,87 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { View, StyleSheet, TouchableOpacity , Animated } from 'react-native';
+import Svg, { G, Circle } from 'react-native-svg';
+import { AntDesign } from '@expo/vector-icons';
+
+export default function NextButton({ percentage, scrollTo }) {
+ const size = 128;
+ const strokeWidth = 2;
+ const center = size / 2;
+ const radius = size / 2 - strokeWidth / 2;
+ const circumFerence = 2 * Math.PI * radius;
+
+ const progressAnimation = useRef(new Animated.Value(0)).current;
+ const progressRef = useRef(null);
+
+ const animation = (toValue) => {
+ return Animated.timing(progressAnimation, {
+ toValue,
+ duration: 250,
+ useNativeDriver: true
+ }).start()
+ }
+
+ useEffect(() => {
+ animation(percentage);
+ }, [percentage]);
+
+ useEffect(() => {
+ progressAnimation.addListener(
+ (value) => {
+ const strokeDashoffset = circumFerence - (circumFerence * value.value) / 100;
+
+ if (progressRef?.current) {
+ progressRef.current.setNativeProps({
+ strokeDashoffset,
+ });
+ }
+
+ },
+ [percentage]
+
+ );
+
+ return () => {
+ progressAnimation.removeAllListeners();
+ };
+
+ }, []);
+
+ return (
+
+
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ marginTop: -70
+ },
+ button: {
+ position: 'absolute',
+ backgroundColor: '#3F2F78',
+ borderRadius: 100,
+ padding: 20
+ }
+})
diff --git a/src/FLAD/components/Onboarding.tsx b/src/FLAD/components/Onboarding.tsx
new file mode 100644
index 0000000..f557c56
--- /dev/null
+++ b/src/FLAD/components/Onboarding.tsx
@@ -0,0 +1,69 @@
+import React, { useState, useRef } from 'react';
+import { View, StyleSheet, Text, FlatList, Animated } from 'react-native';
+
+import OnboardingItem from './OnboardingItem';
+import Paginator from './Paginator';
+import NextButton from './NextButton';
+import slides from '../data/slides';
+
+export default function Onboarding() {
+ const [currentIndex, setCurrentIndex] = useState(0);
+ const scrollX = useRef(new Animated.Value(0)).current;
+ const slidesRef = useRef(null);
+
+ const viewableItemsChanged = useRef(({ viewableItems }) => {
+ setCurrentIndex(viewableItems[0].index);
+ }).current;
+
+ const viewConfig = useRef({ viewAreaCoveragePercentThreshold: 50 }).current;
+
+ const scrollTo = () => {
+ if(currentIndex < slides.length - 1) {
+ slidesRef.current.scrollToIndex({ index: currentIndex + 1 });
+ } else {
+ console.log('Last item.');
+ }
+ };
+
+ return (
+
+
+ }
+ horizontal
+ showsHorizontalScrollIndicator={false}
+ pagingEnabled
+ bounces={false}
+ keyExtractor={(item) => item.id}
+ onScroll={Animated.event([{ nativeEvent: { contentOffset: { x: scrollX } } }], {
+ useNativeDriver: false,
+ })}
+ scrollEventThrottle={32}
+ onViewableItemsChanged={viewableItemsChanged}
+ viewabilityConfig={viewConfig}
+ ref={slidesRef}
+ />
+
+
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ backgroundColor: '#141414'
+ },
+ balise: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ marginTop: -130
+ }
+})
diff --git a/src/FLAD/components/OnboardingItem.tsx b/src/FLAD/components/OnboardingItem.tsx
new file mode 100644
index 0000000..1f4203a
--- /dev/null
+++ b/src/FLAD/components/OnboardingItem.tsx
@@ -0,0 +1,48 @@
+import React from 'react';
+import { View, StyleSheet, Text, Image, useWindowDimensions } from 'react-native';
+
+import slides from '../data/slides';
+
+export default function Onboarding({ item }) {
+ const { width } = useWindowDimensions();
+
+ return (
+
+
+
+
+ {item.title}
+ {item.description}
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'flex-start',
+ marginTop: -60
+ },
+ image: {
+ justifyContent: 'center'
+ },
+ title: {
+ fontWeight: '800',
+ fontSize: 28,
+ marginBottom: 10,
+ color: 'white',
+ textAlign: 'left',
+ paddingRight: 30,
+ paddingLeft: 20,
+ marginTop: -80
+ },
+ description: {
+ fontWeight: '300',
+ color: 'white',
+ textAlign: 'left',
+ paddingRight: 30,
+ paddingLeft: 20
+ }
+})
diff --git a/src/FLAD/components/Paginator.tsx b/src/FLAD/components/Paginator.tsx
new file mode 100644
index 0000000..d7846ab
--- /dev/null
+++ b/src/FLAD/components/Paginator.tsx
@@ -0,0 +1,47 @@
+import React from 'react';
+import { View, StyleSheet, Animated, useWindowDimensions } from 'react-native';
+
+
+export default function Paginator({ data, scrollX }) {
+ const { width } = useWindowDimensions();
+
+ return (
+
+ {data.map((_, i) => {
+ const inputRange = [(i - 1) * width, i * width, (i + 1) * width];
+
+ const dotWidth = scrollX.interpolate({
+ inputRange,
+ outputRange: [10, 20, 10],
+ extrapolate: 'clamp',
+ })
+
+ const opacity = scrollX.interpolate({
+ inputRange,
+ outputRange: [0.3, 1, 0.3],
+ extrapolate: 'clamp'
+ })
+
+ return
+ })}
+
+ );
+}
+
+const styles = StyleSheet.create({
+ dot: {
+ height: 10,
+ borderRadius: 5,
+ backgroundColor: "#fff",
+ marginHorizontal: 8
+ }
+})
diff --git a/src/FLAD/data/slides.tsx b/src/FLAD/data/slides.tsx
new file mode 100644
index 0000000..9ce8c0d
--- /dev/null
+++ b/src/FLAD/data/slides.tsx
@@ -0,0 +1,20 @@
+export default [
+ {
+ id: '1',
+ title: 'Bienvenue sur Flad',
+ description: 'L\'application pour découvrir de nouvelle music et vous faires de nouveaux amis',
+ image: require('../assets/images/Board_Image.png')
+ },
+ {
+ id: '2',
+ title: 'Tous les jours de nouvelle music qui peut vous plaire',
+ description: 'L\'application apprend de vous et de vos amis pour vos suggérer des albums et séries',
+ image: require('../assets/images/Board_Image2.png')
+ },
+ {
+ id: '3',
+ title: 'La music ça se partage',
+ description: 'Faites connaissances avec de nouvelles personnes et partagez vos critiques',
+ image: require('../assets/images/Board_Image3.png')
+ }
+]
\ No newline at end of file
diff --git a/src/FLAD/navigation/FavoriteNavigation.tsx b/src/FLAD/navigation/FavoriteNavigation.tsx
new file mode 100644
index 0000000..40fc83b
--- /dev/null
+++ b/src/FLAD/navigation/FavoriteNavigation.tsx
@@ -0,0 +1,16 @@
+import React, {Component} from 'react';
+import FavoritePage from '../screens/favoritePage';
+import { createStackNavigator } from '@react-navigation/stack';
+
+export default function MusicNavigation() {
+ const Stack = createStackNavigator();
+ return (
+
+
+
+ )
+ }
\ No newline at end of file
diff --git a/src/FLAD/navigation/LoginNavigation.tsx b/src/FLAD/navigation/LoginNavigation.tsx
new file mode 100644
index 0000000..57b1c2e
--- /dev/null
+++ b/src/FLAD/navigation/LoginNavigation.tsx
@@ -0,0 +1,23 @@
+import React, {Component} from 'react';
+import LoginPage from '../screens/loginPage';
+import { createStackNavigator } from '@react-navigation/stack';
+import Navigation from './Navigation';
+
+export default function LoginNavigation() {
+ const Stack = createStackNavigator();
+ console.log("je suis ici");
+ return (
+
+
+
+
+ )
+ }
\ No newline at end of file
diff --git a/src/FLAD/navigation/Navigation.tsx b/src/FLAD/navigation/Navigation.tsx
index ee9a0e9..150ab17 100644
--- a/src/FLAD/navigation/Navigation.tsx
+++ b/src/FLAD/navigation/Navigation.tsx
@@ -1,36 +1,35 @@
import React, {Component} from 'react';
-import { NavigationContainer } from '@react-navigation/native';
-import Home from '../screens/spot';
-import FavoritePage from '../screens/favoritePage';
-import LoginPage from '../screens/loginPage';
-import { createStackNavigator } from '@react-navigation/stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
+import { NavigationContainer } from '@react-navigation/native';
+import FavoriteNavigation from './FavoriteNavigation';
+import FontAwesome from 'react-native-vector-icons/FontAwesome';
-export default function StackNavigation() {
- const Stack = createBottomTabNavigator();
- return (
-
-
-
-
-
-
+export default function Navigation() {
+ const BottomTabNavigator = createBottomTabNavigator();
+ const MyTheme = {
+ dark: false,
+ colors: {
+ primary: 'rgb(255, 45, 85)',
+ card: 'rgb(35, 33, 35)',
+ border: 'rgb(35, 33, 35)',
+ },
+ };
+ return (
+
+
+ ,
+ }}/>
+
- )
- }
+ )
+}
+function TabBarIcon(props: {
+ name: React.ComponentProps['name'];
+ color: string;
+}) {
+ return ;
+}
\ No newline at end of file
diff --git a/src/FLAD/package.json b/src/FLAD/package.json
index 842a5d3..d751614 100644
--- a/src/FLAD/package.json
+++ b/src/FLAD/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@react-navigation/bottom-tabs": "^6.5.4",
- "@react-navigation/native": "^6.1.3",
+ "@react-navigation/native": "^6.1.4",
"@react-navigation/native-stack": "^6.9.8",
"@react-navigation/stack": "^6.3.12",
"axios": "^1.2.6",
@@ -28,8 +28,10 @@
"react-native": "0.70.5",
"react-native-gesture-handler": "~2.8.0",
"react-native-reanimated": "~2.12.0",
- "react-native-safe-area-context": "4.4.1",
+ "react-native-safe-area-context": "^4.4.1",
"react-native-screens": "~3.18.0",
+ "react-native-svg": "^13.8.0",
+ "react-native-vector-icons": "^9.2.0",
"react-native-web": "~0.18.9",
"rive-react-native": "^3.0.41"
},
diff --git a/src/FLAD/screens/favoritePage.tsx b/src/FLAD/screens/favoritePage.tsx
index 35b2a88..e336e83 100644
--- a/src/FLAD/screens/favoritePage.tsx
+++ b/src/FLAD/screens/favoritePage.tsx
@@ -1,8 +1,7 @@
import React, {Component} from 'react';
-import { Animated, StyleSheet, Text, View, FlatList, ScrollView, TouchableHighlight } from 'react-native';
-import Card from '../components/Card';
+import { Animated, StyleSheet, Text, View, FlatList, ScrollView } from 'react-native';
import CardMusic from '../components/CardMusic';
-import Music from '../model/Music'
+import Music from '../Model/Music'
export default function favoritePage() {
const MUSIC_LIST : Music[] = [
@@ -11,7 +10,7 @@ export default function favoritePage() {
new Music("Stratos", "Kekra", "https://images.genius.com/ddc9cadedd1d4cef0860aaa85af9cd46.705x705x1.png"),
new Music("Autobahn", "Sch", "https://images.genius.com/83b6c98680d38bde1571f6b4093244b5.1000x1000x1.jpg"),
new Music("Freeze Raël", "Freeze Corleone", "https://intrld.com/wp-content/uploads/2020/08/freeze-corleone-la-menace-fanto%CC%82me.png"),
- new Music("Blanka", "PNL", require("../assets/images/pnl.png")),
+ new Music("Blanka", "PNL", require("../assets/images/pnl.png"))
]
return (
@@ -42,7 +41,7 @@ const styles = StyleSheet.create({
},
titleContainer: {
marginLeft: 20,
- marginVertical: 50,
+ marginVertical: 60,
},
title: {
fontSize: 24,
@@ -56,5 +55,6 @@ const styles = StyleSheet.create({
},
scroll: {
marginBottom: 120,
+ marginTop: -30
}
});
diff --git a/src/FLAD/screens/loginPage.tsx b/src/FLAD/screens/loginPage.tsx
index 834c1eb..c037998 100644
--- a/src/FLAD/screens/loginPage.tsx
+++ b/src/FLAD/screens/loginPage.tsx
@@ -1,20 +1,54 @@
-import React, {Component} from 'react';
-import { View, Image, StyleSheet, Text, ImageBackground, Button, TextInput } from 'react-native';
+import React, {Component, useState } from 'react';
+import { View, Image, StyleSheet, Text, ImageBackground, Button, TextInput, TouchableWithoutFeedback, Keyboard, TouchableOpacity } from 'react-native';
+import { TouchableHighlight } from 'react-native-gesture-handler';
+//import {useNavigation} from "@react-navigation/native";
+
+const DismissKeyboard = ({ children }) => (
+ Keyboard.dismiss()}>
+ {children}
+
+)
export default function loginPage() {
+ const [rememberMe, setRememberMe] = useState(false);
+
+ const toggleRememberMe = () => {
+ setRememberMe(!rememberMe);
+ }
+ //const navigation = useNavigation();
+
return (
+
+
+ v1.0
+
- Se connecter
-
- {/* */}
+ SE CONNECTER
+
+
+
+
+
+ SE SOUVENIR DE MOI
+
+ console.log("Oui")}>
+
+
+
+ Tu n'as pas de compte?
+ S'inscrire
+
+
)
}
+
+
const styles = StyleSheet.create ({
container: {
flex: 1,
@@ -24,25 +58,88 @@ const styles = StyleSheet.create ({
justifyContent: 'center',
},
imageLogo: {
- width: 200,
- height: 100,
+ width: 280,
+ height: 140,
+ alignSelf: 'center',
+ marginBottom: 100
+ },
+ button: {
+ marginTop: 40,
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'center',
alignSelf: 'center',
- marginTop: 50
+ backgroundColor: 'white',
+ width: 86,
+ height: 86,
+ borderRadius: 21
+ },
+ buttonImage: {
+ width: 40,
+ height: 40
},
input: {
width: 300,
- height: 30,
- borderRadius: 10,
+ height: 42,
+ borderRadius: 30,
color: 'black',
backgroundColor: 'white',
- fontSize: 10,
- alignSelf: 'center'
-
+ fontSize: 15,
+ alignSelf: 'center',
+ marginBottom: 20,
+ paddingLeft: 20,
+ paddingRight: 20
},
text: {
fontWeight: 'bold',
- fontSize: 20,
+ fontSize: 25,
+ alignSelf: 'center',
+ color: 'white',
+ marginBottom: 15
+ },
+ shadow: {
+ shadowColor: '#000',
+ shadowOffset: {
+ width: 2,
+ height: 3,
+ },
+ shadowOpacity: 0.50,
+ shadowRadius: 3.84,
+ },
+ versionText: {
+ position: 'absolute',
+ top: 40,
+ right: 20,
+ color: 'gray',
+ fontWeight: 'bold',
+ fontSize: 15
+ },
+ rememberMeContainer: {
+ flexDirection: 'row',
+ alignItems: 'center',
alignSelf: 'center',
+ marginBottom: 20,
+ marginTop: 10
+ },
+ checkbox: {
+ width: 20,
+ height: 20,
+ borderRadius: 5,
+ borderWidth: 1,
+ borderColor: 'gray',
+ marginRight: 10
+ },
+ rememberMeText: {
+ fontWeight: 'bold',
+ fontSize: 17,
color: 'white'
+ },
+ checkboxChecked: {
+ backgroundColor: 'white'
+ },
+ inscriptionText: {
+ flexDirection: 'row',
+ alignSelf: 'center',
+ bottom: -80
}
})
\ No newline at end of file