add Quizz route
This commit is contained in:
5
resources/js/router.js
vendored
5
resources/js/router.js
vendored
@@ -13,6 +13,7 @@ import ToDoListIndex from './views/ToDoLists/ToDoListIndex'
|
||||
import ToDoListShow from './views/ToDoLists/ToDoListShow'
|
||||
import GameIndex from './views/Games/GameIndex'
|
||||
import Hangman from './views/Games/HangMan/Hangman'
|
||||
import Quizz from './views/Games/Quizz/Quizz'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
@@ -72,5 +73,9 @@ export default new VueRouter({
|
||||
path: '/jeux/pendu', component: Hangman,
|
||||
meta: {title: 'Jeu : Le pendu'}
|
||||
},
|
||||
{
|
||||
path: '/jeux/quizz', component: Quizz,
|
||||
meta: {title: 'Jeu : Quizz'}
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
<template>
|
||||
<div class="p-4">
|
||||
<h1 class="page-title">Liste des jeux</h1>
|
||||
<div class="flex flex-wrap mt-4">
|
||||
<HangmanIndex link="/jeux/pendu" class="w-full sm:w-1/2 md:w-1/3 lg:w-1/4 card" />
|
||||
<div class="flex flex-wrap -m-2 mt-2">
|
||||
<HangmanIndex link="/jeux/pendu" class="w-full sm:w-1/2 md:w-1/3 lg:w-1/4" />
|
||||
<QuizzIndex link="/jeux/quizz" class="w-full sm:w-1/2 md:w-1/3 lg:w-1/4" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HangmanIndex from './HangMan/HangmanIndex'
|
||||
import QuizzIndex from './Quizz/QuizzIndex'
|
||||
|
||||
export default {
|
||||
name: 'GameIndex',
|
||||
components: {
|
||||
HangmanIndex
|
||||
HangmanIndex, QuizzIndex
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<router-link :to="link">
|
||||
<div class="m-2 card">
|
||||
<svg-vue icon="hangman" />
|
||||
<h2>Pendu</h2>
|
||||
</div>
|
||||
</router-link>
|
||||
</template>
|
||||
|
||||
|
||||
11
resources/js/views/Games/Quizz/Quizz.vue
Normal file
11
resources/js/views/Games/Quizz/Quizz.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Quizz</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Quizz'
|
||||
}
|
||||
</script>
|
||||
21
resources/js/views/Games/Quizz/QuizzIndex.vue
Normal file
21
resources/js/views/Games/Quizz/QuizzIndex.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<router-link :to="link">
|
||||
<div class="m-2 card">
|
||||
<svg-vue icon="close" />
|
||||
<h2>Quizz</h2>
|
||||
</div>
|
||||
</router-link>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'QuizzIndex',
|
||||
props: {
|
||||
link: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user