Merge pull request 'Model' (#5) from Model into master

Reviewed-on: #5
pull/6/head
Kevin MONDEJAR 2 months ago
commit 75ce49a814

@ -1,6 +0,0 @@
package com.example.what_the_fantasy
import androidx.compose.runtime.Composable
@Composable
fun AccueilPage() {}

@ -1,11 +0,0 @@
package com.example.what_the_fantasy
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
@Composable
fun FavoritePage() {}

@ -1,13 +0,0 @@
package com.example.what_the_fantasy
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
@Composable
fun LoginPage() {
}

@ -4,15 +4,15 @@ import android.os.Bundle
import androidx.activity.ComponentActivity import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
import com.example.what_the_fantasy.LoginPage import com.example.what_the_fantasy.ui.screens.LoginPage
class MainActivity : ComponentActivity() { class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
@ -20,8 +20,25 @@ class MainActivity : ComponentActivity() {
enableEdgeToEdge() enableEdgeToEdge()
setContent { setContent {
What_The_FantasyTheme { What_The_FantasyTheme {
Column {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
Title(
title = "What The Fantasy",
modifier = Modifier.padding(innerPadding)
)
}
}
LoginPage() LoginPage()
} }
} }
} }
} }
@Composable
fun Title(title: String, modifier: Modifier = Modifier) {
Text(
text = "Welcome to $title!",
modifier = modifier
)
}

@ -1,17 +0,0 @@
package com.example.what_the_fantasy
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
@Composable
fun ProfilPage() {}

@ -1,11 +0,0 @@
package com.example.what_the_fantasy
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
@Composable
fun QuizPage() {}

@ -1,11 +0,0 @@
package com.example.what_the_fantasy
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
@Composable
fun QuotePage() {}

@ -1,11 +0,0 @@
package com.example.what_the_fantasy
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
@Composable
fun SearchPage() {}

@ -1,11 +0,0 @@
package com.example.what_the_fantasy
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
@Composable
fun SignUpPage() {}

@ -1,11 +0,0 @@
package com.example.what_the_fantasy
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import com.example.what_the_fantasy.ui.theme.What_The_FantasyTheme
@Composable
fun SubmitQuotePage() {}

@ -1,7 +0,0 @@
package com.example.what_the_fantasy.data
data class Character (
val id: Int,
val name: String,
val idImg: Int
)

@ -1,63 +0,0 @@
package com.example.what_the_fantasy.data
object CharacterStub {
private val aragorn = Character(
1,
"Aragorn",
1
)
private val gandalf = Character(
2,
"Gandalf",
2
)
private val legolas = Character(
3,
"Legolas",
3
)
private val geralt = Character(
4,
"Geralt de Riv",
4
)
private val yennefer = Character(
5,
"Yennefer de Vengerberg",
5
)
private val ciri = Character(
6,
"Cirilla Fiona Elen Riannon",
6
)
private val jonSnow = Character(
7,
"Jon Snow",
7
)
private val daenerys = Character(
8,
"Daenerys Targaryen",
8
)
private val tywin = Character(
9,
"Tywin Lannister",
9
)
private val elric = Character(
10,
"Elric de Melniboné",
10
)
}

@ -1,53 +0,0 @@
package com.example.what_the_fantasy.data
object ImageStub {
private val imageAragorn = Image(
1,
"https://static.posters.cz/image/750/art-photo/aragorn-i142865.jpg"
)
private val imageGandalf = Image(
2,
"https://static.wikia.nocookie.net/seigneur-des-anneaux/images/a/ad/Gandalf_Db.jpg/revision/latest/thumbnail/width/360/height/360?cb=20210919182300&path-prefix=fr"
)
private val imageLegolas = Image(
3,
"https://storage.canalblog.com/81/50/1203904/92832500_o.jpeg"
)
private val imageGeralt = Image(
4,
"https://www.journaldugeek.com/app/uploads/2024/05/the-witcher-3-mod.jpg"
)
private val imageYennefer = Image(
5,
"https://www.parismatch.com/lmnr/var/pm/public/media/image/2022/03/02/01/The-Witcher-qui-est-l-actrice-Anya-Chalotra.jpg?VersionId=kkBQlX3KHlm1X7sTcGJGwJa3UREFwYFd"
)
private val imageCiri = Image(
6,
"https://www.gamelove.com/sites/www.gamelove.com/files/Guide/the_witcher_3/ciri/guide-the-witcher-3-personnages-ciri-001.jpg²"
)
private val imageJonSnow = Image(
7,
"https://i0.wp.com/imagesociale.fr/wp-content/uploads/got_jonsnow.jpg?ssl=1"
)
private val imageDaenerys = Image(
8,
"https://www.leparisien.fr/resizer/VgcUVs3QvEeH9RP-T5l0XF2tYQQ=/932x582/cloudfront-eu-central-1.images.arcpublishing.com/leparisien/FXGTC7Z3TDOHOGXQI54NDKHQHI.jpg"
)
private val imageTywin = Image(
9,
"https://media.vanityfair.fr/photos/60df271ce629ebff31500ece/1:1/w_652,h_652,c_limit/vf_tywin_lannister_4413.jpeg"
)
private val imageElric = Image(
10,
"https://cdna.artstation.com/p/assets/images/images/036/577/590/large/maena-paillet-elric11-web.jpg?1618043196"
)
}

@ -1,13 +0,0 @@
package com.example.what_the_fantasy.data
data class Quote (
val id: Int,
val content: String,
val likes: Int,
val langue: String,
val isValide: Boolean,
val reason: String?,
val idChar: Int,
val idSrc: Int,
val idUserVerif: Int
)

@ -1,244 +0,0 @@
package com.example.what_the_fantasy.data
object QuoteStub {
private val quoteAragorn1 = Quote(
1,
"Un jour viendra où le courage des hommes faillira… mais ce jour nest pas arrivé !",
1000,
"fr",
true,
null,
1,
1,
1
)
private val quoteAragorn2 = Quote(
2,
"Je ne suis pas un homme qui prend aisément la fuite.",
900,
"fr",
true,
null,
1,
1,
1
)
private val quoteGandalf1 = Quote(
3,
"Un magicien n'est jamais en retard, ni en avance d'ailleurs. Il arrive précisément à l'heure prévue.",
1500,
"fr",
true,
null,
2,
1,
1
)
private val quoteGandalf2 = Quote(
4,
"Fuyez, pauvres fous !",
2000,
"fr",
true,
null,
2,
1,
1
)
private val quoteLegolas1 = Quote(
5,
"Ils emmènent les Hobbits à Isengard !",
1200,
"fr",
true,
null,
3,
1,
1
)
private val quoteLegolas2 = Quote(
6,
"Un soleil rouge se lève… Beaucoup de sang a dû couler cette nuit.",
1100,
"fr",
true,
null,
3,
1,
1
)
private val quoteGeralt1 = Quote(
7,
"Les mauvaises choses arrivent à ceux qui les méritent.",
1300,
"fr",
true,
null,
4,
2,
1
)
private val quoteGeralt2 = Quote(
8,
"Si je devais choisir entre un mal et un autre, alors je préfère ne pas choisir du tout.",
1700,
"fr",
true,
null,
4,
2,
1
)
private val quoteYennefer1 = Quote(
9,
"La magie, cest le chaos, lart et la science combinés.",
1400,
"fr",
true,
null,
5,
2,
1
)
private val quoteYennefer2 = Quote(
10,
"Je suis Yennefer de Vengerberg. Je ne supplie jamais.",
1600,
"fr",
true,
null,
5,
2,
1
)
private val quoteCiri1 = Quote(
11,
"Je suis une enfant de la destinée.",
1250,
"fr",
true,
null,
6,
2,
1
)
private val quoteCiri2 = Quote(
12,
"Lavenir nest jamais écrit.",
1350,
"fr",
true,
null,
6,
2,
1
)
private val quoteJonSnow1 = Quote(
13,
"Lhiver vient.",
1800,
"fr",
true,
null,
7,
3,
1
)
private val quoteJonSnow2 = Quote(
14,
"Lamour est la mort du devoir.",
1900,
"fr",
true,
null,
7,
3,
1
)
private val quoteDaenerys1 = Quote(
15,
"Je ne suis pas une femme ordinaire. Mes rêves se réalisent.",
1700,
"fr",
true,
null,
8,
3,
1
)
private val quoteDaenerys2 = Quote(
16,
"Dracarys !",
2500,
"fr",
true,
null,
8,
3,
1
)
private val quoteTywin1 = Quote(
17,
"Un lion ne se soucie pas de lopinion des moutons.",
1600,
"fr",
true,
null,
9,
3,
1
)
private val quoteTywin2 = Quote(
18,
"Nimporte quel imbécile peut gagner une bataille, mais il faut un roi pour gagner une guerre.",
1700,
"fr",
true,
null,
9,
3,
1
)
private val quoteElric1 = Quote(
19,
"Le destin est une chose étrange, il nous fait souvent croiser des chemins inattendus.",
1400,
"fr",
true,
null,
10,
4,
1
)
private val quoteElric2 = Quote(
20,
"Stormbringer ! Lame maudite, mon seul véritable compagnon.",
1500,
"fr",
true,
null,
10,
4,
1
)
}

@ -1,7 +0,0 @@
package com.example.what_the_fantasy.data
data class Source (
val id: Int,
val title: String,
val dateS: Int
)

@ -1,28 +0,0 @@
package com.example.what_the_fantasy.data
object SourceStub {
private val sourceLOTR = Source(
1,
"Le Seigneur des Anneaux",
1954
)
private val sourceWitcher = Source(
2,
"The Witcher",
1990
)
private val sourceGOT = Source(
3,
"Game of Thrones",
1996
)
private val sourceElric = Source(
4,
"Elric de Melniboné",
1972
)
}

@ -0,0 +1,111 @@
package com.example.what_the_fantasy.data.local
import com.example.what_the_fantasy.data.model.Character
object CharacterStub {
val aragorn = Character(
id = 1,
name = "Aragorn",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-fantaisie_1045-185.jpg?size=338&ext=jpg"
)
val legolas = Character(
id = 2,
name = "Legolas",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-fantaisie_1045-186.jpg?size=338&ext=jpg"
)
val gandalf = Character(
id = 3,
name = "Gandalf",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-magicien-fantaisie_1045-187.jpg?size=338&ext=jpg"
)
val frodoBaggins = Character(
id = 4,
name = "Frodo Baggins",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-188.jpg?size=338&ext=jpg"
)
val gimli = Character(
id = 5,
name = "Gimli",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-nain-fantaisie_1045-189.jpg?size=338&ext=jpg"
)
val galadriel = Character(
id = 6,
name = "Galadriel",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-190.jpg?size=338&ext=jpg"
)
val boromir = Character(
id = 7,
name = "Boromir",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-191.jpg?size=338&ext=jpg"
)
val eowyn = Character(
id = 8,
name = "Éowyn",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerriere-femme-fantaisie_1045-192.jpg?size=338&ext=jpg"
)
val saruman = Character(
id = 9,
name = "Saruman",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-magicien-malefique-fantaisie_1045-193.jpg?size=338&ext=jpg"
)
val faramir = Character(
id = 10,
name = "Faramir",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg"
)
val theoden = Character(
id = 11,
name = "Théoden",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-roi-fantaisie_1045-195.jpg?size=338&ext=jpg"
)
val merry = Character(
id = 12,
name = "Merry",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-196.jpg?size=338&ext=jpg"
)
val pippin = Character(
id = 13,
name = "Pippin",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-197.jpg?size=338&ext=jpg"
)
val samwiseGamgee = Character(
id = 14,
name = "Samwise Gamgee",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-198.jpg?size=338&ext=jpg"
)
val elrond = Character(
id = 15,
name = "Elrond",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-homme-fantaisie_1045-199.jpg?size=338&ext=jpg"
)
val arwen = Character(
id = 16,
name = "Arwen",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-200.jpg?size=338&ext=jpg"
)
val treebeard = Character(
id = 17,
name = "Treebeard",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-ent-fantaisie_1045-201.jpg?size=338&ext=jpg"
)
val gollum = Character(
id = 18,
name = "Gollum",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-creature-fantaisie_1045-202.jpg?size=338&ext=jpg"
)
val nazgul = Character(
id = 19,
name = "Nazgûl",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-spectre-fantaisie_1045-203.jpg?size=338&ext=jpg"
)
val shelob = Character(
id = 20,
name = "Shelob",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-araignee-fantaisie_1045-204.jpg?size=338&ext=jpg"
)
val allCharacters: List<Character> = listOf(
aragorn, legolas, gandalf, frodoBaggins, gimli, galadriel, boromir, eowyn, saruman, faramir,
theoden, merry, pippin, samwiseGamgee, elrond, arwen, treebeard, gollum, nazgul, shelob
)
}

@ -0,0 +1,91 @@
package com.example.what_the_fantasy.data.local
import com.example.what_the_fantasy.data.model.Image
object ImageStub {
val aragornImage = Image(
id = 1,
url = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-fantaisie_1045-185.jpg?size=338&ext=jpg"
)
val legolasImage = Image(
id = 2,
url = "https://img.freepik.com/vecteurs-libre/personnage-elfe-fantaisie_1045-186.jpg?size=338&ext=jpg"
)
val gandalfImage = Image(
id = 3,
url = "https://img.freepik.com/vecteurs-libre/personnage-magicien-fantaisie_1045-187.jpg?size=338&ext=jpg"
)
val frodoBagginsImage = Image(
id = 4,
url = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-188.jpg?size=338&ext=jpg"
)
val gimliImage = Image(
id = 5,
url = "https://img.freepik.com/vecteurs-libre/personnage-nain-fantaisie_1045-189.jpg?size=338&ext=jpg"
)
val galadrielImage = Image(
id = 6,
url = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-190.jpg?size=338&ext=jpg"
)
val boromirImage = Image(
id = 7,
url = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-191.jpg?size=338&ext=jpg"
)
val eowynImage = Image(
id = 8,
url = "https://img.freepik.com/vecteurs-libre/personnage-guerriere-femme-fantaisie_1045-192.jpg?size=338&ext=jpg"
)
val sarumanImage = Image(
id = 9,
url = "https://img.freepik.com/vecteurs-libre/personnage-magicien-malefique-fantaisie_1045-193.jpg?size=338&ext=jpg"
)
val faramirImage = Image(
id = 10,
url = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg"
)
val theodenImage = Image(
id = 11,
url = "https://img.freepik.com/vecteurs-libre/personnage-roi-fantaisie_1045-195.jpg?size=338&ext=jpg"
)
val merryImage = Image(
id = 12,
url = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-196.jpg?size=338&ext=jpg"
)
val pippinImage = Image(
id = 13,
url = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-197.jpg?size=338&ext=jpg"
)
val samwiseGamgeeImage = Image(
id = 14,
url = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-198.jpg?size=338&ext=jpg"
)
val elrondImage = Image(
id = 15,
url = "https://img.freepik.com/vecteurs-libre/personnage-elfe-homme-fantaisie_1045-199.jpg?size=338&ext=jpg"
)
val arwenImage = Image(
id = 16,
url = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-200.jpg?size=338&ext=jpg"
)
val treebeardImage = Image(
id = 17,
url = "https://img.freepik.com/vecteurs-libre/personnage-ent-fantaisie_1045-201.jpg?size=338&ext=jpg"
)
val gollumImage = Image(
id = 18,
url = "https://img.freepik.com/vecteurs-libre/personnage-creature-fantaisie_1045-202.jpg?size=338&ext=jpg"
)
val nazgulImage = Image(
id = 19,
url = "https://img.freepik.com/vecteurs-libre/personnage-spectre-fantaisie_1045-203.jpg?size=338&ext=jpg"
)
val shelobImage = Image(
id = 20,
url = "https://img.freepik.com/vecteurs-libre/personnage-araignee-fantaisie_1045-204.jpg?size=338&ext=jpg"
)
val allImages: List<Image> = listOf(
aragornImage, legolasImage, gandalfImage, frodoBagginsImage, gimliImage, galadrielImage, boromirImage, eowynImage, sarumanImage, faramirImage,
theodenImage, merryImage, pippinImage, samwiseGamgeeImage, elrondImage, arwenImage, treebeardImage, gollumImage, nazgulImage, shelobImage
)
}

@ -0,0 +1,100 @@
package com.example.what_the_fantasy.data.local
import com.example.what_the_fantasy.data.model.Question
object QuestionStub {
val question1 = Question(
id = 1,
question = "Quel est le nom du roi des elfes dans 'Le Seigneur des Anneaux' ?",
ansA = "Elrond",
ansB = "Legolas",
ansC = "Thranduil",
ansD = "Galadriel",
correctAns = "C"
)
val question2 = Question(
id = 2,
question = "Qui est l'auteur de la série 'Harry Potter' ?",
ansA = "J.K. Rowling",
ansB = "J.R.R. Tolkien",
ansC = "C.S. Lewis",
ansD = "George R.R. Martin",
correctAns = "A"
)
val question3 = Question(
id = 3,
question = "Dans 'Star Wars', qui est le père de Luke Skywalker ?",
ansA = "Obi-Wan Kenobi",
ansB = "Darth Vader",
ansC = "Yoda",
ansD = "Han Solo",
correctAns = "B"
)
val question4 = Question(
id = 4,
question = "Quel est le nom de l'épée de Bilbo Baggins ?",
ansA = "Glamdring",
ansB = "Sting",
ansC = "Andúril",
ansD = "Orcrist",
correctAns = "B"
)
val question5 = Question(
id = 5,
question = "Dans 'Game of Thrones', quel est le nom de la capitale des Sept Couronnes ?",
ansA = "Winterfell",
ansB = "King's Landing",
ansC = "Dorne",
ansD = "Casterly Rock",
correctAns = "B"
)
val question6 = Question(
id = 6,
question = "Quel est le nom du dragon de Daenerys Targaryen dans 'Game of Thrones' ?",
ansA = "Drogon",
ansB = "Viserion",
ansC = "Rhaegal",
ansD = "Balerion",
correctAns = "A"
)
val question7 = Question(
id = 7,
question = "Qui est l'auteur de 'Le Hobbit' ?",
ansA = "J.R.R. Tolkien",
ansB = "C.S. Lewis",
ansC = "George R.R. Martin",
ansD = "J.K. Rowling",
correctAns = "A"
)
val question8 = Question(
id = 8,
question = "Dans 'Le Seigneur des Anneaux', qui est le porteur de l'Anneau Unique ?",
ansA = "Frodo Baggins",
ansB = "Samwise Gamgee",
ansC = "Aragorn",
ansD = "Gandalf",
correctAns = "A"
)
val question9 = Question(
id = 9,
question = "Quel est le nom du royaume gouverné par Théoden dans 'Le Seigneur des Anneaux' ?",
ansA = "Gondor",
ansB = "Rohan",
ansC = "Mordor",
ansD = "Lothlórien",
correctAns = "B"
)
val question10 = Question(
id = 10,
question = "Dans 'Harry Potter', quel est le nom de l'école de magie fréquentée par Harry ?",
ansA = "Poudlard",
ansB = "Beauxbâtons",
ansC = "Durmstrang",
ansD = "Ilvermorny",
correctAns = "A"
)
val allQuestions: List<Question> = listOf(
question1, question2, question3, question4, question5, question6, question7, question8, question9, question10
)
}

@ -0,0 +1,192 @@
package com.example.what_the_fantasy.data.local
import com.example.what_the_fantasy.data.model.Quote
object QuoteStub {
val quote1 = Quote(
id = 1,
content = "All we have to decide is what to do with the time that is given us.",
likes = 466,
language = "en",
character = CharacterStub.gandalf.name,
source = "The Lord of the Rings: The Fellowship of the Ring",
imgUrl = CharacterStub.gandalf.imgUrl
)
val quote2 = Quote(
id = 2,
content = "A wizard is never late, nor is he early, he arrives precisely when he means to.",
likes = 467,
language = "en",
character = CharacterStub.gandalf.name,
source = "The Lord of the Rings: The Fellowship of the Ring",
imgUrl = CharacterStub.gandalf.imgUrl
)
val quote3 = Quote(
id = 3,
content = "Even the smallest person can change the course of the future.",
likes = 466,
language = "en",
character = CharacterStub.galadriel.name,
source = "The Lord of the Rings: The Fellowship of the Ring",
imgUrl = CharacterStub.galadriel.imgUrl
)
val quote4 = Quote(
id = 4,
content = "I would rather share one lifetime with you than face all the ages of this world alone.",
likes = 120,
language = "en",
character = CharacterStub.arwen.name,
source = "The Lord of the Rings: The Fellowship of the Ring",
imgUrl = CharacterStub.arwen.imgUrl
)
val quote5 = Quote(
id = 5,
content = "Faithless is he that says farewell when the road darkens.",
likes = 150,
language = "en",
character = CharacterStub.gimli.name,
source = "The Lord of the Rings: The Fellowship of the Ring",
imgUrl = CharacterStub.gimli.imgUrl
)
val quote6 = Quote(
id = 6,
content = "It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to.",
likes = 200,
language = "en",
character = CharacterStub.frodoBaggins.name,
source = "The Lord of the Rings: The Fellowship of the Ring",
imgUrl = CharacterStub.frodoBaggins.imgUrl
)
val quote7 = Quote(
id = 7,
content = "I am no man.",
likes = 300,
language = "en",
character = CharacterStub.eowyn.name,
source = "The Lord of the Rings: The Return of the King",
imgUrl = CharacterStub.eowyn.imgUrl
)
val quote8 = Quote(
id = 8,
content = "The world is changed. I feel it in the water. I feel it in the earth. I smell it in the air.",
likes = 400,
language = "en",
character = CharacterStub.treebeard.name,
source = "The Lord of the Rings: The Two Towers",
imgUrl = CharacterStub.treebeard.imgUrl
)
val quote9 = Quote(
id = 9,
content = "We wants it, we needs it. Must have the precious.",
likes = 500,
language = "en",
character = CharacterStub.gollum.name,
source = "The Lord of the Rings: The Two Towers",
imgUrl = CharacterStub.gollum.imgUrl
)
val quote10 = Quote(
id = 10,
content = "The board is set, the pieces are moving. We come to it at last, the great battle of our time.",
likes = 600,
language = "en",
character = CharacterStub.gandalf.name,
source = "The Lord of the Rings: The Return of the King",
imgUrl = CharacterStub.gandalf.imgUrl
)
val quote11 = Quote(
id = 11,
content = "Un grand pouvoir implique de grandes responsabilités.",
likes = 466,
language = "fr",
character = CharacterStub.aragorn.name,
source = "Spider-Man",
imgUrl = CharacterStub.aragorn.imgUrl
)
val quote12 = Quote(
id = 12,
content = "Que la Force soit avec toi.",
likes = 467,
language = "fr",
character = CharacterStub.legolas.name,
source = "Star Wars",
imgUrl = CharacterStub.legolas.imgUrl
)
val quote13 = Quote(
id = 13,
content = "La magie est partout. Il suffit de savoir où la trouver.",
likes = 466,
language = "fr",
character = CharacterStub.gandalf.name,
source = "Harry Potter",
imgUrl = CharacterStub.gandalf.imgUrl
)
val quote14 = Quote(
id = 14,
content = "Le monde est plein de choses magiques, patientant que nos sens s'aiguisent.",
likes = 120,
language = "fr",
character = CharacterStub.frodoBaggins.name,
source = "Le Seigneur des Anneaux",
imgUrl = CharacterStub.frodoBaggins.imgUrl
)
val quote15 = Quote(
id = 15,
content = "La peur mène à la colère, la colère mène à la haine, la haine mène à la souffrance.",
likes = 150,
language = "fr",
character = CharacterStub.gimli.name,
source = "Star Wars",
imgUrl = CharacterStub.gimli.imgUrl
)
val quote16 = Quote(
id = 16,
content = "La vie est une aventure audacieuse ou rien du tout.",
likes = 200,
language = "fr",
character = CharacterStub.galadriel.name,
source = "Helen Keller",
imgUrl = CharacterStub.galadriel.imgUrl
)
val quote17 = Quote(
id = 17,
content = "Le courage n'est pas l'absence de peur, mais la capacité de vaincre ce qui fait peur.",
likes = 300,
language = "fr",
character = CharacterStub.boromir.name,
source = "Nelson Mandela",
imgUrl = CharacterStub.boromir.imgUrl
)
val quote18 = Quote(
id = 18,
content = "La folie, c'est de faire toujours la même chose et de s'attendre à un résultat différent.",
likes = 400,
language = "fr",
character = CharacterStub.eowyn.name,
source = "Albert Einstein",
imgUrl = CharacterStub.eowyn.imgUrl
)
val quote19 = Quote(
id = 19,
content = "Le bonheur n'est pas quelque chose de tout fait. Il vient de vos propres actions.",
likes = 500,
language = "fr",
character = CharacterStub.saruman.name,
source = "Dalaï Lama",
imgUrl = CharacterStub.saruman.imgUrl
)
val quote20 = Quote(
id = 20,
content = "La vie est un mystère qu'il faut vivre, et non un problème à résoudre.",
likes = 600,
language = "fr",
character = CharacterStub.samwiseGamgee.name,
source = "Gandhi",
imgUrl = CharacterStub.samwiseGamgee.imgUrl
)
val allQuotes: List<Quote> = listOf(
quote1, quote2, quote3, quote4, quote5, quote6, quote7, quote8, quote9, quote10,
quote11, quote12, quote13, quote14, quote15, quote16, quote17, quote18, quote19, quote20
)
}

@ -0,0 +1,80 @@
package com.example.what_the_fantasy.data.local
import com.example.what_the_fantasy.data.model.Source
import com.example.what_the_fantasy.data.model.SrcType
object SourceStub {
val theLordOfTheRingsMovie = Source(
id = 1,
title = "The Lord of the Rings: The Fellowship of the Ring",
dateS = 2001,
type = SrcType.Movie
)
val theTwoTowersMovie = Source(
id = 2,
title = "The Lord of the Rings: The Two Towers",
dateS = 2002,
type = SrcType.Movie
)
val theReturnOfTheKingMovie = Source(
id = 3,
title = "The Lord of the Rings: The Return of the King",
dateS = 2003,
type = SrcType.Movie
)
val harryPotterSeries = Source(
id = 4,
title = "Harry Potter",
dateS = 1997,
type = SrcType.Series
)
val starWarsMovie = Source(
id = 5,
title = "Star Wars",
dateS = 1977,
type = SrcType.Movie
)
val spiderManMovie = Source(
id = 6,
title = "Spider-Man",
dateS = 2002,
type = SrcType.Movie
)
val theWitcherVideoGame = Source(
id = 7,
title = "The Witcher",
dateS = 2007,
type = SrcType.VideoGame
)
val theElderScrollsVideoGame = Source(
id = 8,
title = "The Elder Scrolls",
dateS = 1994,
type = SrcType.VideoGame
)
val gameOfThronesSeries = Source(
id = 9,
title = "Game of Thrones",
dateS = 2011,
type = SrcType.Series
)
val theHobbitMovie = Source(
id = 10,
title = "The Hobbit: An Unexpected Journey",
dateS = 2012,
type = SrcType.Movie
)
val allSources: List<Source> = listOf(
theLordOfTheRingsMovie,
theTwoTowersMovie,
theReturnOfTheKingMovie,
harryPotterSeries,
starWarsMovie,
spiderManMovie,
theWitcherVideoGame,
theElderScrollsVideoGame,
gameOfThronesSeries,
theHobbitMovie
)
}

@ -0,0 +1,80 @@
package com.example.what_the_fantasy.data.local
import com.example.what_the_fantasy.data.model.User
object UserStub {
val user1 = User(
id = 1,
username = "Aragorn123",
email = "aragorn@example.com",
date = "2022-01-15",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-fantaisie_1045-185.jpg?size=338&ext=jpg"
)
val user2 = User(
id = 2,
username = "Legolas456",
email = "legolas@example.com",
date = "2021-05-23",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-fantaisie_1045-186.jpg?size=338&ext=jpg"
)
val user3 = User(
id = 3,
username = "Gandalf789",
email = "gandalf@example.com",
date = "2020-09-10",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-magicien-fantaisie_1045-187.jpg?size=338&ext=jpg"
)
val user4 = User(
id = 4,
username = "FrodoBaggins",
email = "frodo@example.com",
date = "2023-03-18",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-hobbit-fantaisie_1045-188.jpg?size=338&ext=jpg"
)
val user5 = User(
id = 5,
username = "Gimli999",
email = "gimli@example.com",
date = "2022-07-04",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-nain-fantaisie_1045-189.jpg?size=338&ext=jpg"
)
val user6 = User(
id = 6,
username = "Galadriel321",
email = "galadriel@example.com",
date = "2021-11-30",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-elfe-femme-fantaisie_1045-190.jpg?size=338&ext=jpg"
)
val user7 = User(
id = 7,
username = "Boromir654",
email = "boromir@example.com",
date = "2023-06-22",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-191.jpg?size=338&ext=jpg"
)
val user8 = User(
id = 8,
username = "Eowyn777",
email = "eowyn@example.com",
date = "2022-04-11",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerriere-femme-fantaisie_1045-192.jpg?size=338&ext=jpg"
)
val user9 = User(
id = 9,
username = "Saruman888",
email = "saruman@example.com",
date = "2021-08-15",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-magicien-malefique-fantaisie_1045-193.jpg?size=338&ext=jpg"
)
val user10 = User(
id = 10,
username = "Faramir222",
email = "faramir@example.com",
date = "2023-02-08",
imgUrl = "https://img.freepik.com/vecteurs-libre/personnage-guerrier-homme-fantaisie_1045-194.jpg?size=338&ext=jpg"
)
val allUsers: List<User> = listOf(
user1, user2, user3, user4, user5, user6, user7, user8, user9, user10
)
}

@ -0,0 +1,7 @@
package com.example.what_the_fantasy.data.model
data class Character (
val id: Int,
val name: String,
val imgUrl: String
)

@ -1,4 +1,4 @@
package com.example.what_the_fantasy.data package com.example.what_the_fantasy.data.model
data class Image( data class Image(
val id: Int, val id: Int,

@ -0,0 +1,11 @@
package com.example.what_the_fantasy.data.model
class Question(
val id:Int,
val question:String,
val ansA:String,
val ansB:String,
val ansC:String,
val ansD:String,
val correctAns: String,
)

@ -0,0 +1,11 @@
package com.example.what_the_fantasy.data.model
data class Quote (
val id: Int,
val content: String,
val likes: Int,
val language: String,
val character: String,
val source: String,
val imgUrl: String
)

@ -0,0 +1,8 @@
package com.example.what_the_fantasy.data.model
data class Source (
val id: Int,
val title: String,
val dateS: Int,
val type: SrcType
)

@ -0,0 +1,7 @@
package com.example.what_the_fantasy.data.model
enum class SrcType (val value: String) {
Movie("@string/movie"),
VideoGame("@string/videoGame"),
Series("@string/series"),
}

@ -0,0 +1,9 @@
package com.example.what_the_fantasy.data.model
class User(
val id:Int,
var username:String,
var email:String,
var date:String,
val imgUrl: String
)

@ -0,0 +1,4 @@
package com.example.what_the_fantasy.ui.components
class NavBar {
}

@ -0,0 +1,6 @@
package com.example.what_the_fantasy.ui.screens
import androidx.compose.runtime.Composable
@Composable
fun AccueilPage() {}

@ -0,0 +1,6 @@
package com.example.what_the_fantasy.ui.screens
import androidx.compose.runtime.Composable
@Composable
fun FavoritePage() {}

@ -0,0 +1,7 @@
package com.example.what_the_fantasy.ui.screens
import androidx.compose.runtime.Composable
@Composable
fun LoginPage() {
}

@ -0,0 +1,6 @@
package com.example.what_the_fantasy.ui.screens
import androidx.compose.runtime.Composable
@Composable
fun ProfilPage() {}

@ -0,0 +1,6 @@
package com.example.what_the_fantasy.ui.screens
import androidx.compose.runtime.Composable
@Composable
fun QuizPage() {}

@ -0,0 +1,6 @@
package com.example.what_the_fantasy.ui.screens
import androidx.compose.runtime.Composable
@Composable
fun QuotePage() {}

@ -0,0 +1,6 @@
package com.example.what_the_fantasy.ui.screens
import androidx.compose.runtime.Composable
@Composable
fun SearchPage() {}

@ -0,0 +1,6 @@
package com.example.what_the_fantasy.ui.screens
import androidx.compose.runtime.Composable
@Composable
fun SignUpPage() {}

@ -0,0 +1,6 @@
package com.example.what_the_fantasy.ui.screens
import androidx.compose.runtime.Composable
@Composable
fun SubmitQuotePage() {}

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">What The Fantasy</string>
<string name="movie">Film</string>
<string name="videoGame">Jeu Vidéo</string>
<string name="series">Série</string>
</resources>

@ -1,3 +1,6 @@
<resources> <resources>
<string name="app_name">What_The_Fantasy</string> <string name="app_name">What The Fantasy</string>
<string name="movie">Movie</string>
<string name="videoGame">Video Game</string>
<string name="series">Series</string>
</resources> </resources>
Loading…
Cancel
Save