Skip to content
Snippets Groups Projects
Commit 302c392b authored by Pierre-Jean CHANCELLIER's avatar Pierre-Jean CHANCELLIER
Browse files

update README

parent 473303b0
No related branches found
No related tags found
No related merge requests found
...@@ -67,3 +67,15 @@ More information about the usage of this directory in [the documentation](https: ...@@ -67,3 +67,15 @@ More information about the usage of this directory in [the documentation](https:
This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex. This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store). More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store).
## Contributions
```bash
$ git clone https://git.duniter.org/paidge/wotwizard-ui.git
$ cd wotwizard-ui
$ npm install
$ npm run dev
```
### Ajouter des pages
Il suffit de créer un fichier `./pages/mapage.vue` pour que la nouvelle page soit accessible directement sur http://localhost/mapage. Pensez à insérer la logique pour le fil d'ariane dans ce fichier et à mettre à jour le menu dans la variable `menus` du fichier `./layouts/default.vue`. 3 pages d'exemple sont fournies pour montrer l'utilisation de l'API graphQL et de chartJS.
\ No newline at end of file
...@@ -4,20 +4,21 @@ ...@@ -4,20 +4,21 @@
<button class="toggle btn border-secondary position-absolute p-1 m-3" @click="toggleMenu"><span></span></button> <button class="toggle btn border-secondary position-absolute p-1 m-3" @click="toggleMenu"><span></span></button>
<NavigationBreadcrumb :breadcrumb="breadcrumb" class="ml-5 py-3 px-4" /> <NavigationBreadcrumb :breadcrumb="breadcrumb" class="ml-5 py-3 px-4" />
</div> </div>
<NavigationMenuSidebar @toggleMenu="toggleMenu" /> <NavigationMenuSidebar @toggleMenu="toggleMenu" :menus="menus" />
<div class="bg_overlay" @click="toggleMenu"></div> <div class="bg_overlay" @click="toggleMenu"></div>
</header> </header>
</template> </template>
<script> <script>
export default { export default {
props: {
breadcrumb: Array,
menus: Array
},
methods: { methods: {
toggleMenu() { toggleMenu() {
document.querySelector('.app').classList.toggle('open') document.querySelector('.app').classList.toggle('open')
} }
},
props: {
breadcrumb: Array
} }
} }
</script> </script>
......
...@@ -14,24 +14,8 @@ ...@@ -14,24 +14,8 @@
<script> <script>
export default { export default {
data() { props: {
return { menus: Array
menus : [
{
title: 'Développement',
items : [
{path: '/explore',title: 'Explorer la toile de confiance'},
{path: '/appolo',title: 'Appolo'},
{path: '/chartjs',title: 'ChartJS'}
]},
{
title: 'Un menu',
items : [
{path: '/lien',title: 'Un lien'},
{path: '/autrelien',title: 'Un aure lien'}
]}
]
}
}, },
methods: { methods: {
toggleMenu() { toggleMenu() {
......
<template> <template>
<div class="app"> <div class="app">
<NavigationBar :breadcrumb="breadcrumb" /> <NavigationBar :breadcrumb="breadcrumb" :menus="menus" />
<Nuxt /> <Nuxt />
</div> </div>
</template> </template>
...@@ -9,7 +9,22 @@ ...@@ -9,7 +9,22 @@
export default { export default {
data() { data() {
return { return {
breadcrumb: [] breadcrumb: [],
menus : [
{
title: 'Développement',
items : [
{path: '/explore',title: 'Explorer la toile de confiance'},
{path: '/appolo',title: 'Appolo'},
{path: '/chartjs',title: 'ChartJS'}
]},
{
title: 'Un menu',
items : [
{path: '/lien',title: 'Un lien'},
{path: '/autrelien',title: 'Un aure lien'}
]}
]
} }
}, },
created() { created() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment