mirror of
https://github.com/em-squared/5e-drs.git
synced 2025-11-01 14:04:19 +00:00
recherche et pages
This commit is contained in:
parent
eccc40a123
commit
c9f4aae633
6 changed files with 281 additions and 96 deletions
|
|
@ -31,34 +31,98 @@ module.exports = {
|
||||||
sidebar: [
|
sidebar: [
|
||||||
{
|
{
|
||||||
title: 'Pour les joueurs',
|
title: 'Pour les joueurs',
|
||||||
|
expanded: true,
|
||||||
children: [
|
children: [
|
||||||
'/creation-du-personnage/',
|
{
|
||||||
'/au-dela-du-niveau-1/',
|
title: "Création du personnage",
|
||||||
|
path: '/creation-du-personnage/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Au-delà du niveau 1',
|
||||||
|
path: '/au-dela-du-niveau-1/'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Races',
|
title: 'Races',
|
||||||
path: '/races/',
|
path: '/races/',
|
||||||
children: [
|
children: [
|
||||||
'/races/demi-elfe/',
|
{
|
||||||
'/races/demi-orc/',
|
title: 'Demi-elfe',
|
||||||
'/races/elfe/',
|
path: '/races/demi-elfe/'
|
||||||
'/races/gnome/',
|
},
|
||||||
'/races/halfelin/',
|
{
|
||||||
'/races/humain/',
|
title: 'Demi-orc',
|
||||||
'/races/nain/',
|
path: '/races/demi-orc/'
|
||||||
'/races/aasimar/',
|
},
|
||||||
'/races/demi-ogre/',
|
{
|
||||||
'/races/felys/',
|
title: 'Elfe',
|
||||||
'/races/homme-serpent/',
|
path: '/races/elfe/'
|
||||||
'/races/sangdragon/',
|
},
|
||||||
'/races/tieffelin/'
|
{
|
||||||
|
title: 'Gnome',
|
||||||
|
path: '/races/gnome/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Halfelin',
|
||||||
|
path: '/races/halfelin/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Humain',
|
||||||
|
path: '/races/humain/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Nain',
|
||||||
|
path: '/races/nain/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Aasimar',
|
||||||
|
path: '/races/aasimar/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Demi-ogre',
|
||||||
|
path: '/races/demi-ogre/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Félys',
|
||||||
|
path: '/races/felys/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Homme serpent',
|
||||||
|
path: '/races/homme-serpent/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Sangdragon',
|
||||||
|
path: '/races/sangdragon/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Tieffelin',
|
||||||
|
path: '/races/tieffelin/'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
'/options-de-personnalisation/',
|
{
|
||||||
'/utiliser-les-caracteristiques/',
|
title: 'Options de personnalisation',
|
||||||
'/partir-a-laventure/',
|
path: '/options-de-personnalisation/'
|
||||||
'/combattre/',
|
},
|
||||||
'/gerer-la-sante-du-personnage/',
|
{
|
||||||
'/lancer-des-sorts/',
|
title: 'Utiliser les caractéristiques',
|
||||||
|
path: '/utiliser-les-caracteristiques/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Partir à l'aventure",
|
||||||
|
path: '/partir-a-laventure/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Combattre",
|
||||||
|
path: '/combattre/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Gérer la santé du personnage",
|
||||||
|
path: '/gerer-la-sante-du-personnage/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Lancer des sorts",
|
||||||
|
path: '/lancer-des-sorts/'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Grimoire',
|
title: 'Grimoire',
|
||||||
path: '/grimoire/'
|
path: '/grimoire/'
|
||||||
|
|
@ -68,14 +132,38 @@ module.exports = {
|
||||||
{
|
{
|
||||||
title: 'Pour les meneurs',
|
title: 'Pour les meneurs',
|
||||||
children: [
|
children: [
|
||||||
'/les-tresors/',
|
{
|
||||||
'/objets-magiques/',
|
title: "Les trésorrs",
|
||||||
'/objets-magiques-intelligents/',
|
path: '/les-tresors/'
|
||||||
'/pieges/',
|
},
|
||||||
'/maladies/',
|
{
|
||||||
'/folie/',
|
title: "Objects magiques",
|
||||||
'/objets-opposition/',
|
path: '/objets-magiques/'
|
||||||
'/poisons/'
|
},
|
||||||
|
{
|
||||||
|
title: "Objets magiques intelligents",
|
||||||
|
path: '/objets-magiques-intelligents/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Les pièges",
|
||||||
|
path: '/pieges/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Les maladies",
|
||||||
|
path: '/maladies/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "La folie",
|
||||||
|
path: '/folie/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Les objets",
|
||||||
|
path: '/objets-opposition/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Les poisons",
|
||||||
|
path: '/poisons/'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
133
docs/.vuepress/theme/components/NavDrawer.vue
Normal file
133
docs/.vuepress/theme/components/NavDrawer.vue
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
<template>
|
||||||
|
<v-navigation-drawer class="main-drawer" v-model="drawer" :clipped="$vuetify.breakpoint.lgAndUp" width="300" app>
|
||||||
|
<!-- <v-treeview
|
||||||
|
item-key="path"
|
||||||
|
item-text="title"
|
||||||
|
:items="items"
|
||||||
|
dense
|
||||||
|
open-all
|
||||||
|
hoverable
|
||||||
|
open-on-click
|
||||||
|
activatable
|
||||||
|
@update:active="updateActive"
|
||||||
|
>
|
||||||
|
</v-treeview> -->
|
||||||
|
<v-list dense nav>
|
||||||
|
<template v-for="item in items">
|
||||||
|
<v-list-group v-if="item.children" :key="item.title" v-model="item.expanded">
|
||||||
|
<template v-slot:activator>
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>
|
||||||
|
{{ item.title }}
|
||||||
|
</v-list-item-title>
|
||||||
|
</v-list-item-content>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-for="child in item.children">
|
||||||
|
<v-list-group v-if="child.children" :key="child.title" sub-group v-model="child.expanded">
|
||||||
|
<template v-slot:activator>
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>
|
||||||
|
{{ child.title }}
|
||||||
|
</v-list-item-title>
|
||||||
|
</v-list-item-content>
|
||||||
|
</template>
|
||||||
|
<v-list-item v-for="subchild in child.children" link :to="{path: subchild.path}">
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>
|
||||||
|
{{ subchild.title }}
|
||||||
|
</v-list-item-title>
|
||||||
|
</v-list-item-content>
|
||||||
|
</v-list-item>
|
||||||
|
</v-list-group>
|
||||||
|
<v-list-item v-else :key="child.title" link :to="{path: child.path}">
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>
|
||||||
|
{{ child.title }}
|
||||||
|
</v-list-item-title>
|
||||||
|
</v-list-item-content>
|
||||||
|
</v-list-item>
|
||||||
|
</template>
|
||||||
|
</v-list-group>
|
||||||
|
<v-list-item v-else :key="item.title" link :to="{path: item.path}">
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>
|
||||||
|
{{ item.title }}
|
||||||
|
</v-list-item-title>
|
||||||
|
</v-list-item-content>
|
||||||
|
</v-list-item>
|
||||||
|
</template>
|
||||||
|
</v-list>
|
||||||
|
</v-navigation-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'NavDrawer',
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
items: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
drawer: {
|
||||||
|
get () {
|
||||||
|
return this.$store.state.drawer
|
||||||
|
},
|
||||||
|
set (newValue) {
|
||||||
|
this.$store.commit('setDrawer', newValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted () {
|
||||||
|
this.items = this.$site.themeConfig.sidebar
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
updateActive (active) {
|
||||||
|
console.log(active)
|
||||||
|
if (active[0] == undefined) return
|
||||||
|
const path = active[0].replace('.html', '')
|
||||||
|
this.$router.push(path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// Case of list
|
||||||
|
.v-application--is-ltr {
|
||||||
|
.main-drawer {
|
||||||
|
|
||||||
|
.v-list-group--sub-group {
|
||||||
|
.v-list-item__icon:first-child {
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.v-list--dense {
|
||||||
|
.v-list-group--sub-group {
|
||||||
|
.v-list-group__header {
|
||||||
|
padding-left: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.v-list--nav {
|
||||||
|
.v-list-item {
|
||||||
|
padding-left: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Case of treeview
|
||||||
|
.v-treeview-node__level {
|
||||||
|
width: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
18
docs/.vuepress/theme/components/Page.vue
Normal file
18
docs/.vuepress/theme/components/Page.vue
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<template>
|
||||||
|
<main class="page content">
|
||||||
|
|
||||||
|
<Content />
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Page',
|
||||||
|
components: { }
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
|
@ -134,7 +134,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
isSearchable (page) {
|
isSearchable (page) {
|
||||||
let searchPaths = null
|
let searchPaths = this.$site.themeConfig.searchPaths || null
|
||||||
|
|
||||||
// all paths searchables
|
// all paths searchables
|
||||||
if (searchPaths === null) { return true }
|
if (searchPaths === null) { return true }
|
||||||
|
|
|
||||||
|
|
@ -1,57 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-app>
|
||||||
<v-navigation-drawer v-model="drawer" :clipped="$vuetify.breakpoint.lgAndUp" app>
|
|
||||||
<v-list dense>
|
<NavDrawer />
|
||||||
<template v-for="item in items">
|
|
||||||
<v-row v-if="item.heading" :key="item.heading" align="center">
|
|
||||||
<v-col cols="6">
|
|
||||||
<v-subheader v-if="item.heading">
|
|
||||||
{{ item.heading }}
|
|
||||||
</v-subheader>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="6" class="text-center">
|
|
||||||
<a href="#!" class="body-2 black--text">EDIT</a>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-list-group v-else-if="item.children" :key="item.text" v-model="item.model" :prepend-icon="item.model ? item.icon : item['icon-alt']" append-icon="">
|
|
||||||
<template v-slot:activator>
|
|
||||||
<v-list-item-content>
|
|
||||||
<v-list-item-title>
|
|
||||||
{{ item.text }}
|
|
||||||
</v-list-item-title>
|
|
||||||
</v-list-item-content>
|
|
||||||
</template>
|
|
||||||
<v-list-item v-for="(child, i) in item.children" :key="i" link>
|
|
||||||
<v-list-item-action v-if="child.icon">
|
|
||||||
<v-icon>{{ child.icon }}</v-icon>
|
|
||||||
</v-list-item-action>
|
|
||||||
<v-list-item-content>
|
|
||||||
<v-list-item-title>
|
|
||||||
{{ child.text }}
|
|
||||||
</v-list-item-title>
|
|
||||||
</v-list-item-content>
|
|
||||||
</v-list-item>
|
|
||||||
</v-list-group>
|
|
||||||
<v-list-item v-else :key="item.text" link>
|
|
||||||
<v-list-item-action>
|
|
||||||
<v-icon>{{ item.icon }}</v-icon>
|
|
||||||
</v-list-item-action>
|
|
||||||
<v-list-item-content>
|
|
||||||
<v-list-item-title>
|
|
||||||
{{ item.text }}
|
|
||||||
</v-list-item-title>
|
|
||||||
</v-list-item-content>
|
|
||||||
</v-list-item>
|
|
||||||
</template>
|
|
||||||
</v-list>
|
|
||||||
</v-navigation-drawer>
|
|
||||||
|
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
|
||||||
<v-content>
|
<v-content>
|
||||||
<v-container class="fill-height" fluid>
|
<v-container class="fill-height" fluid>
|
||||||
<v-row align="center" justify="center">
|
<v-row align="start" justify="center">
|
||||||
|
<v-col cols="12">
|
||||||
<DefaultGlobalLayout/>
|
<DefaultGlobalLayout/>
|
||||||
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
</v-content>
|
</v-content>
|
||||||
|
|
@ -61,13 +20,15 @@
|
||||||
<script>
|
<script>
|
||||||
import GlobalLayout from '@app/components/GlobalLayout.vue'
|
import GlobalLayout from '@app/components/GlobalLayout.vue'
|
||||||
import Navbar from '@theme/components/Navbar.vue'
|
import Navbar from '@theme/components/Navbar.vue'
|
||||||
|
import NavDrawer from '@theme/components/NavDrawer.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GlobalLayout',
|
name: 'GlobalLayout',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
DefaultGlobalLayout: GlobalLayout,
|
DefaultGlobalLayout: GlobalLayout,
|
||||||
Navbar
|
Navbar,
|
||||||
|
NavDrawer
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
|
@ -108,14 +69,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
drawer: {
|
|
||||||
get () {
|
|
||||||
return this.$store.state.drawer
|
|
||||||
},
|
|
||||||
set (newValue) {
|
|
||||||
this.$store.commit('setDrawer', newValue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Home v-if="$page.frontmatter.home" />
|
<Page></Page>
|
||||||
|
|
||||||
<Page v-else>
|
|
||||||
<template #top>
|
|
||||||
<slot name="page-top" />
|
|
||||||
</template>
|
|
||||||
<template #bottom>
|
|
||||||
<slot name="page-bottom" />
|
|
||||||
</template>
|
|
||||||
</Page>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Page from '@theme/components/Page.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Layout',
|
name: 'Layout',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
Page
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue