Gestalte Docs-Landing und Header im Nuxt-UI-Template-Stil
This commit is contained in:
23
docs-site/app/components/PageHeaderLinks.vue
Normal file
23
docs-site/app/components/PageHeaderLinks.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
const route = useRoute()
|
||||
|
||||
const repoBase = 'https://git.federspiel.tech/flfeders/FEDEO/src/branch/dev/docs'
|
||||
|
||||
const sourceUrl = computed(() => {
|
||||
if (route.path === '/') {
|
||||
return `${repoBase}/README.md`
|
||||
}
|
||||
return `${repoBase}${route.path}.md`
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UButton
|
||||
color="neutral"
|
||||
variant="outline"
|
||||
icon="i-lucide-file-text"
|
||||
label="Quelle"
|
||||
:to="sourceUrl"
|
||||
target="_blank"
|
||||
/>
|
||||
</template>
|
||||
@@ -44,7 +44,17 @@ const links = computed(() => {
|
||||
:title="page.title"
|
||||
:description="page.description"
|
||||
:headline="headline"
|
||||
/>
|
||||
>
|
||||
<template #links>
|
||||
<UButton
|
||||
v-for="(link, index) in page.links"
|
||||
:key="index"
|
||||
v-bind="link"
|
||||
/>
|
||||
|
||||
<PageHeaderLinks />
|
||||
</template>
|
||||
</UPageHeader>
|
||||
|
||||
<UPageBody>
|
||||
<ContentRenderer
|
||||
|
||||
Reference in New Issue
Block a user