diff --git a/JokesApp/components/HorizontalListJokeComponent.tsx b/JokesApp/components/HorizontalListJokeComponent.tsx new file mode 100644 index 0000000..b1667b3 --- /dev/null +++ b/JokesApp/components/HorizontalListJokeComponent.tsx @@ -0,0 +1,77 @@ +import {Image, ImageBackground, StyleSheet, Text, View} from "react-native"; +import React from "react"; +import {Joke} from "../model/Joke"; +import * as url from "url"; +import {greyColor, indigo, purpleColor} from "../Theme"; + +type JokeListItemProps = { + item: Joke; +} + + +export function HorizontalListJokeComponent(props: JokeListItemProps) { + return ( + + + + + Résumé de la blague + {props.item.summary()} + + + + ) +} + +const styles = StyleSheet.create({ + + titleResume: { + fontSize: 15, + fontWeight: 'bold', + marginBottom: 20, + color: "white", + textAlign: 'center', + }, + listItem: { + flexDirection: 'column', + alignItems: 'center', + backgroundColor: indigo, + margin: 10, + height: 270, + width: 250, + borderRadius: 5, + }, + imageSettings: { + width: '75%', + height: 150, + position: 'absolute', + margin: 5, + }, + contentList :{ + flex: 1, + justifyContent: 'flex-end', + alignItems: 'center', + margin: 30, + }, + chip: { + borderRadius: 16, + backgroundColor: greyColor, + padding: 5, + marginTop: 5, + alignSelf: 'center', + }, + rectangle: { + borderRadius: 4, + flexShrink: 0, + width: "100%", + height: "20%", + backgroundColor: 'darksalmon', + }, + contentSummary: { + textAlign: 'center', + color: "white", + } + +}); + diff --git a/JokesApp/components/ListAllCategories.tsx b/JokesApp/components/ListAllCategories.tsx new file mode 100644 index 0000000..f59534f --- /dev/null +++ b/JokesApp/components/ListAllCategories.tsx @@ -0,0 +1,37 @@ +import {Joke} from "../model/Joke"; +import {Image, StyleSheet, Text, View} from "react-native"; +import React from "react"; +import {indigo} from "../Theme"; + +type JokeListItemProps = { + item: Joke; +} +export function ListAllCategories(props: JokeListItemProps) { + + return ( + + + {props.item.type()} + + + ); +} + + + +const styles = StyleSheet.create({ + listItem: { + flexDirection: 'column', + alignItems: 'flex-start', + margin: 10, + }, + chip: { + borderRadius: 16, + backgroundColor: 'rgba(140, 140, 161, 1)', + padding: 5, + marginTop: 5, + alignSelf: 'flex-start', + }, + + +}); \ No newline at end of file diff --git a/JokesApp/components/ListeJokeComponent.tsx b/JokesApp/components/ListeJokeComponent.tsx index eac89bf..d12d624 100644 --- a/JokesApp/components/ListeJokeComponent.tsx +++ b/JokesApp/components/ListeJokeComponent.tsx @@ -2,6 +2,7 @@ import {Image, ImageBackground, StyleSheet, Text, View} from "react-native"; import React from "react"; import {Joke} from "../model/Joke"; import * as url from "url"; +import {indigo} from "../Theme"; type JokeListItemProps = { item: Joke; @@ -36,7 +37,7 @@ const styles = StyleSheet.create({ flexDirection: 'row', alignItems: 'center', margin: 10, - backgroundColor : "rgba(14, 14, 44, 1)", + backgroundColor : indigo, }, imageSettings: { width: '40%', diff --git a/JokesApp/navigation/Navigation.tsx b/JokesApp/navigation/Navigation.tsx index 4681ec8..36b294a 100644 --- a/JokesApp/navigation/Navigation.tsx +++ b/JokesApp/navigation/Navigation.tsx @@ -4,6 +4,9 @@ import {createBottomTabNavigator} from "@react-navigation/bottom-tabs"; import {ListJokeScreen} from "../screens/ListJokeScreen"; import {Image, StyleSheet, View} from "react-native"; import {darksalmonColor, greyColor, indigo, purpleColor} from "../Theme"; +import {AccueilScreen} from "../screens/AccueilScreen"; +import {AddJokeScreen} from "../screens/AddJokeScreen"; +import {SettingsScreen} from "../screens/SettingsScreen"; const homeIcon = require("../assets/home_icon.png"); const listIcon = require("../assets/list_icon.png"); const addIcon = require("../assets/add_icon.png"); @@ -27,7 +30,7 @@ export function Navigation(){ tabBarShowLabel: false, tabBarStyle: styles.top, }} > - ( ) }}/> - ( ) }}/> - ( joke.type() !== joke.type() ) +export function AccueilScreen() { + return ( + + + + + Chat C'est Drôle + Dernieres Blagues + + item.summary()} + /> + + Top Categories + + + item.summary()} + /> + + ); +} +const styles = StyleSheet.create({ + +title: { + fontSize: 24, + color: 'darksalmon', + textAlign: 'center', + fontWeight: 'bold', + marginVertical: 20, +}, +titleResume: { + fontSize: 15, + fontWeight: 'bold', + marginBottom: 20, +}, +container: { + flex: 1, + backgroundColor: purpleColor, + +}, +top: { + backgroundColor : indigo, +}, + +imgStyle: { + alignSelf: 'center', + margin: 5, +}, +titleAccueil: { + fontSize: 20, + color: 'white', + fontWeight: 'bold', + margin: 10, +}, +categories: { + flexDirection: 'row', + alignItems: 'center', +} + + +}); diff --git a/JokesApp/screens/AddJokeScreen.tsx b/JokesApp/screens/AddJokeScreen.tsx new file mode 100644 index 0000000..beed738 --- /dev/null +++ b/JokesApp/screens/AddJokeScreen.tsx @@ -0,0 +1,33 @@ +import React from "react"; + +import {FlatList, Image, SafeAreaView, ScrollView, SectionListComponent, StyleSheet, Text, View} from "react-native"; +import {indigo, purpleColor} from "../Theme"; + +export function AddJokeScreen() { + return ( + + Ajouter une blague + In Work + + ); +} + + + + +const styles = StyleSheet.create({ + font: { + backgroundColor: indigo, + width: '100%', + height: '100%', + }, + text: { + fontSize: 24, + color: 'darksalmon', + textAlign: 'center', + fontWeight: 'bold', + marginVertical: 20, + } + + +}); diff --git a/JokesApp/screens/SettingsScreen.tsx b/JokesApp/screens/SettingsScreen.tsx new file mode 100644 index 0000000..d2dd723 --- /dev/null +++ b/JokesApp/screens/SettingsScreen.tsx @@ -0,0 +1,33 @@ +import React from "react"; + +import {FlatList, Image, SafeAreaView, ScrollView, SectionListComponent, StyleSheet, Text, View} from "react-native"; +import {indigo, purpleColor} from "../Theme"; + +export function SettingsScreen() { + return ( + + Settings Page + In Work + + ); +} + + + + +const styles = StyleSheet.create({ + font: { + backgroundColor: indigo, + width: '100%', + height: '100%', + }, + text: { + fontSize: 24, + color: 'darksalmon', + textAlign: 'center', + fontWeight: 'bold', + marginVertical: 20, + } + + +}); \ No newline at end of file