From c9f4aae6332c012489cf17f7dc265f276cdfefb3 Mon Sep 17 00:00:00 2001 From: Maxime Moraine Date: Mon, 30 Mar 2020 11:03:20 +0200 Subject: [PATCH] recherche et pages --- docs/.vuepress/config.js | 146 ++++++++++++++---- docs/.vuepress/theme/components/NavDrawer.vue | 133 ++++++++++++++++ docs/.vuepress/theme/components/Page.vue | 18 +++ .../theme/components/search/SRDSearchBox.vue | 2 +- docs/.vuepress/theme/layouts/GlobalLayout.vue | 65 ++------ docs/.vuepress/theme/layouts/Layout.vue | 13 +- 6 files changed, 281 insertions(+), 96 deletions(-) create mode 100644 docs/.vuepress/theme/components/NavDrawer.vue create mode 100644 docs/.vuepress/theme/components/Page.vue diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index b91f895..a768baa 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -31,34 +31,98 @@ module.exports = { sidebar: [ { title: 'Pour les joueurs', + expanded: true, 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', path: '/races/', children: [ - '/races/demi-elfe/', - '/races/demi-orc/', - '/races/elfe/', - '/races/gnome/', - '/races/halfelin/', - '/races/humain/', - '/races/nain/', - '/races/aasimar/', - '/races/demi-ogre/', - '/races/felys/', - '/races/homme-serpent/', - '/races/sangdragon/', - '/races/tieffelin/' + { + title: 'Demi-elfe', + path: '/races/demi-elfe/' + }, + { + title: 'Demi-orc', + path: '/races/demi-orc/' + }, + { + title: 'Elfe', + path: '/races/elfe/' + }, + { + 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/', - '/partir-a-laventure/', - '/combattre/', - '/gerer-la-sante-du-personnage/', - '/lancer-des-sorts/', + { + title: 'Options de personnalisation', + path: '/options-de-personnalisation/' + }, + { + 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', path: '/grimoire/' @@ -68,14 +132,38 @@ module.exports = { { title: 'Pour les meneurs', children: [ - '/les-tresors/', - '/objets-magiques/', - '/objets-magiques-intelligents/', - '/pieges/', - '/maladies/', - '/folie/', - '/objets-opposition/', - '/poisons/' + { + title: "Les trésorrs", + path: '/les-tresors/' + }, + { + title: "Objects magiques", + path: '/objets-magiques/' + }, + { + 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/' + } ] } ] diff --git a/docs/.vuepress/theme/components/NavDrawer.vue b/docs/.vuepress/theme/components/NavDrawer.vue new file mode 100644 index 0000000..a33634f --- /dev/null +++ b/docs/.vuepress/theme/components/NavDrawer.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/docs/.vuepress/theme/components/Page.vue b/docs/.vuepress/theme/components/Page.vue new file mode 100644 index 0000000..f0c4a20 --- /dev/null +++ b/docs/.vuepress/theme/components/Page.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/docs/.vuepress/theme/components/search/SRDSearchBox.vue b/docs/.vuepress/theme/components/search/SRDSearchBox.vue index fa03db4..54dd739 100644 --- a/docs/.vuepress/theme/components/search/SRDSearchBox.vue +++ b/docs/.vuepress/theme/components/search/SRDSearchBox.vue @@ -134,7 +134,7 @@ export default { }, isSearchable (page) { - let searchPaths = null + let searchPaths = this.$site.themeConfig.searchPaths || null // all paths searchables if (searchPaths === null) { return true } diff --git a/docs/.vuepress/theme/layouts/GlobalLayout.vue b/docs/.vuepress/theme/layouts/GlobalLayout.vue index 26207c6..15249de 100644 --- a/docs/.vuepress/theme/layouts/GlobalLayout.vue +++ b/docs/.vuepress/theme/layouts/GlobalLayout.vue @@ -1,57 +1,16 @@