From f5128a7b0719484ec4f32709e255dc291b179bc5 Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Fri, 6 Oct 2023 10:18:16 +0200 Subject: [PATCH] add layout article-no-toc --- components/Nav/PrevNext.vue | 13 ++++++++++++ content/3.defense-systems/0.index.md | 2 +- content/4.refseq.md | 2 +- layouts/article-no-toc.vue | 30 ++++++++++++++++++++++++++++ layouts/article.vue | 9 +-------- pages/defense-systems.vue | 7 +------ 6 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 components/Nav/PrevNext.vue create mode 100644 layouts/article-no-toc.vue diff --git a/components/Nav/PrevNext.vue b/components/Nav/PrevNext.vue new file mode 100644 index 00000000..f35a9450 --- /dev/null +++ b/components/Nav/PrevNext.vue @@ -0,0 +1,13 @@ +<script setup lang="ts"> +const { surround } = useContent(); + +</script> +<template> + <v-row justify="space-between"> + <v-col v-for="(surroundPage, i) in surround" :key="surroundPage?._id" :cols="mobile ? '12' : 'auto'"> + <v-btn v-if="surroundPage" :prepend-icon="i === 0 ? 'mdi-arrow-left' : undefined" + :append-icon="i === 1 ? 'mdi-arrow-right' : undefined" :block="mobile ? true : false" variant="outlined" + color="primary" :to="surroundPage?._path">{{ surroundPage?.title }}</v-btn> + </v-col> + </v-row> +</template> \ No newline at end of file diff --git a/content/3.defense-systems/0.index.md b/content/3.defense-systems/0.index.md index 9d3a6693..798b183d 100644 --- a/content/3.defense-systems/0.index.md +++ b/content/3.defense-systems/0.index.md @@ -1,6 +1,6 @@ --- title: List of defense systems -layout: article +layout: article-no-toc --- diff --git a/content/4.refseq.md b/content/4.refseq.md index 19e7ab8b..ec34a0f0 100644 --- a/content/4.refseq.md +++ b/content/4.refseq.md @@ -1,4 +1,4 @@ --- -layout: article +layout: article-no-toc navigation: false --- \ No newline at end of file diff --git a/layouts/article-no-toc.vue b/layouts/article-no-toc.vue new file mode 100644 index 00000000..a7a46c5f --- /dev/null +++ b/layouts/article-no-toc.vue @@ -0,0 +1,30 @@ +<script setup lang="ts"> +const { page } = useContent(); +// import { useCustomTheme } from '~/composables/useCustomTheme' +import { useDisplay } from 'vuetify' + +// const { isDark } = useCustomTheme() +const { mobile } = useDisplay() + + +</script> +<template> + <VApp> + <v-main style="min-height: 300px"> + <v-container> + <slot /> + <EditGitlab /> + <NavPrevNext /> + </v-container> + <Footer></Footer> + </v-main> + <NavNavbar /> + <nav-back-to-top /> + </VApp> +</template> + +<style scoped> +#app-footer { + border-top: 1px solid rgba(var(--v-border-color), var(--v-border-opacity)); +} +</style> diff --git a/layouts/article.vue b/layouts/article.vue index cda9f07d..1480e3f2 100644 --- a/layouts/article.vue +++ b/layouts/article.vue @@ -24,14 +24,7 @@ console.log(next) <!-- </v-card-text> </v-card> --> <EditGitlab /> - <v-row justify="space-between"> - <v-col v-for="(surroundPage, i) in [prev, next]" :key="surroundPage?._id" :cols="mobile ? '12' : 'auto'"> - <v-btn v-if="surroundPage" :prepend-icon="i === 0 ? 'mdi-arrow-left' : undefined" - :append-icon="i === 1 ? 'mdi-arrow-right' : undefined" :block="mobile ? true : false" variant="outlined" - color="primary" :to="surroundPage?._path">{{ surroundPage?.title }}</v-btn> - </v-col> - </v-row> - + <NavPrevNext /> </v-container> <Footer></Footer> </v-main> diff --git a/pages/defense-systems.vue b/pages/defense-systems.vue index 9ca3390e..2ad4c2e6 100644 --- a/pages/defense-systems.vue +++ b/pages/defense-systems.vue @@ -53,11 +53,6 @@ const systems = computed(() => { </script> <template> <v-card flat color="transparent"> - <v-card-title>List systems</v-card-title> - <ListSystems - :headers="headers" - :systems="systems" - :height="height - 405" - ></ListSystems> + <ListSystems :headers="headers" :systems="systems" :height="height - 405"></ListSystems> </v-card> </template> \ No newline at end of file -- GitLab