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

add edit gitlab btn and nav

parent 357a6b39
No related branches found
No related tags found
No related merge requests found
<template>
<v-row>
<v-col>
<v-btn
prepend-icon="mdi-gitlab"
variant="text"
size="small"
:href="path"
target="_blank"
>Edit on gitlab</v-btn
>
</v-col>
</v-row>
</template>
<script setup lang="ts">
import { ref } from "vue";
const { page } = useContent();
const owner = ref("mdm-lab");
const repo = ref("wiki");
const branch = ref("main");
const baseUrl = ref(new URL("https://gitlab.pasteur.fr"));
const path = ref(
new URL(
`/${owner.value}/${repo.value}/-/edit/${branch.value}/content/${page.value._file}`,
baseUrl.value
).href
);
</script>
<script setup lang="ts">
const { page, surround } = useContent();
</script>
<template> <template>
<v-card> <v-card>
<v-app> <v-app>
...@@ -5,9 +8,29 @@ ...@@ -5,9 +8,29 @@
<!-- <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> -->
<slot /> <v-container>
<!-- </v-card-text> <slot />
<!-- </v-card-text>
</v-card> --> </v-card> -->
<EditGitlab />
<v-row justify="space-between">
<v-col
v-for="(surroundPage, i) in surround"
:key="surroundPage?._id"
cols="auto"
>
<v-btn
v-if="surroundPage"
:prepend-icon="i === 0 ? 'mdi-arrow-left' : undefined"
:append-icon="i === 1 ? 'mdi-arrow-right' : undefined"
variant="outlined"
color="primary"
:to="surroundPage?._path"
>{{ surroundPage?.title }}</v-btn
>
</v-col>
</v-row>
</v-container>
<v-footer id="app-footer" app>footer</v-footer> <v-footer id="app-footer" app>footer</v-footer>
<!-- </v-container> --> <!-- </v-container> -->
</v-main> </v-main>
...@@ -16,11 +39,7 @@ ...@@ -16,11 +39,7 @@
</v-app> </v-app>
</v-card> </v-card>
</template> </template>
<script setup lang="ts">
const { page } = useContent();
console.log("the toc", page.value);
</script>
<style scoped> <style scoped>
#app-footer { #app-footer {
border-top: 1px solid rgba(var(--v-border-color), var(--v-border-opacity)); border-top: 1px solid rgba(var(--v-border-color), var(--v-border-opacity));
......
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