Skip to content
Snippets Groups Projects
Commit 644769df authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Add button back to top

parent 03002171
No related branches found
No related tags found
No related merge requests found
Pipeline #112609 passed with stages
in 6 minutes and 4 seconds
<!-- from https://github.com/vuetifyjs/vuetify/blob/master/packages/docs/src/components/app/BackToTop.vue -->
<template>
<v-layout-item
v-scroll="onScroll"
class="text-end pointer-events-none"
model-value
position="bottom"
size="88"
>
<div class="ma-4">
<v-fab-transition>
<v-btn
v-show="model"
class="mt-auto pointer-events-initial"
color="primary"
elevation="8"
icon="mdi-chevron-up"
size="large"
@click="onClick"
/>
</v-fab-transition>
</div>
</v-layout-item>
</template>
<script setup>
import { ref } from 'vue'
const model = ref(false)
function onScroll () {
model.value = window.scrollY > 200
}
function onClick () {
window.scrollTo({
top: 0,
behavior: 'smooth',
})
}
</script>
<style scoped>
.pointer-events-none {
pointer-events: none;
}
.pointer-events-initial {
pointer-events: initial;
}
</style>
\ No newline at end of file
...@@ -11,19 +11,14 @@ const { mobile } = useDisplay(); ...@@ -11,19 +11,14 @@ const { mobile } = useDisplay();
</script> </script>
<template> <template>
<v-navigation-drawer <v-navigation-drawer v-if="!mobile" id="app-toc" location="right" :border="0" permanent>
v-if="!mobile"
id="app-toc"
location="right"
:border="0"
permanent
>
<template #prepend> <template #prepend>
<div class="text-h6 font-weight-medium mt-4 mb-2 ms-4">Contents</div> <div class="text-h6 font-weight-medium mt-4 mb-2 ms-4">Contents</div>
</template> </template>
<ul class="px-2 py-2"> <ul class="px-2 py-2">
<NavTableOfContentItem :links="props.links" /></ul <NavTableOfContentItem :links="props.links" />
></v-navigation-drawer> </ul>
</v-navigation-drawer>
</template> </template>
<style scoped> <style scoped>
#app-toc ul { #app-toc ul {
......
...@@ -13,7 +13,9 @@ console.log(next) ...@@ -13,7 +13,9 @@ console.log(next)
</script> </script>
<template> <template>
<VApp> <VApp>
<v-main style="min-height: 300px"> <v-main style="min-height: 300px">
<!-- <v-container class="fill-height w-auto" > --> <!-- <v-container class="fill-height w-auto" > -->
<!-- <v-card flat max-width="1000" min-height="300" color="transparent"> <!-- <v-card flat max-width="1000" min-height="300" color="transparent">
<v-card-text> --> <v-card-text> -->
...@@ -29,11 +31,13 @@ console.log(next) ...@@ -29,11 +31,13 @@ console.log(next)
color="primary" :to="surroundPage?._path">{{ surroundPage?.title }}</v-btn> color="primary" :to="surroundPage?._path">{{ surroundPage?.title }}</v-btn>
</v-col> </v-col>
</v-row> </v-row>
</v-container> </v-container>
<Footer></Footer> <Footer></Footer>
</v-main> </v-main>
<NavNavbar /> <NavNavbar />
<NavTableOfContent :links="page.body.toc.links" /> <NavTableOfContent :links="page.body.toc.links" />
<nav-back-to-top />
</VApp> </VApp>
</template> </template>
......
...@@ -42,7 +42,6 @@ const headers = computed(() => { ...@@ -42,7 +42,6 @@ const headers = computed(() => {
}); });
const systems = computed(() => { const systems = computed(() => {
return sanitizedData.value.map((content) => { return sanitizedData.value.map((content) => {
console.log(content)
return { return {
system: { name: content.title, path: content._path }, system: { name: content.title, path: content._path },
...content[tableKey], ...content[tableKey],
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment