Tag path fix
This commit is contained in:
parent
1c9812c3a8
commit
09eb05cf8d
6
app.vue
6
app.vue
|
|
@ -6,8 +6,6 @@ function toggleLeftPanel(_: Event): void {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const { path } = useRoute();
|
|
||||||
|
|
||||||
const { data: tags } = await useAsyncData('descriptions', queryContent('/tags').findOne);
|
const { data: tags } = await useAsyncData('descriptions', queryContent('/tags').findOne);
|
||||||
|
|
||||||
provide('tags/descriptions', tags);
|
provide('tags/descriptions', tags);
|
||||||
|
|
@ -32,8 +30,8 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="gap-3">
|
<div class="gap-3">
|
||||||
<NuxtLink class="site-nav-bar-text" aria-label="Accueil" :href="'/'" ><img src="" /></NuxtLink>
|
<NuxtLink class="site-nav-bar-text" aria-label="Accueil" :href="'/'" ><img src="" /></NuxtLink>
|
||||||
<NuxtLink class="site-nav-bar-text" aria-label="Systeme" :href="'/explorer'" :class="{'mod-active': path.startsWith('/explorer')}">Systeme</NuxtLink>
|
<NuxtLink class="site-nav-bar-text" aria-label="Systeme" :href="'/explorer'" :class="{'mod-active': $route.path.startsWith('/explorer')}">Systeme</NuxtLink>
|
||||||
<NuxtLink class="site-nav-bar-text" aria-label="Outils" :href="'/tools'" :class="{'mod-active': path.startsWith('/tools')}">Outils</NuxtLink>
|
<NuxtLink class="site-nav-bar-text" aria-label="Outils" :href="'/tools'" :class="{'mod-active': $route.path.startsWith('/tools')}">Outils</NuxtLink>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,6 @@ function showPreview(e: Event, bbox: boolean) {
|
||||||
if(content.value === null)
|
if(content.value === null)
|
||||||
loadContent();
|
loadContent();
|
||||||
}
|
}
|
||||||
function showTag(e: Event)
|
|
||||||
{
|
|
||||||
//e.preventDefault();
|
|
||||||
}
|
|
||||||
function hidePreview(e: Event) {
|
function hidePreview(e: Event) {
|
||||||
timeout = setTimeout(() => hovered.value = false, 300);
|
timeout = setTimeout(() => hovered.value = false, 300);
|
||||||
}
|
}
|
||||||
|
|
@ -123,7 +119,7 @@ function hidePreview(e: Event) {
|
||||||
|
|
||||||
<template >
|
<template >
|
||||||
<template v-if="href !== ''">
|
<template v-if="href !== ''">
|
||||||
<a @mouseenter="(e) => showPreview(e, true)" @mouseleave="hidePreview" v-bind="$attrs" :href="stringifyParsedURL({ host: '/explorer', pathname: content?._path ?? href, hash: anchor, search: '' })" :target="target">
|
<a @mouseenter="(e) => showPreview(e, true)" @mouseleave="hidePreview" v-bind="$attrs" :href="stringifyParsedURL({ host: '/explorer', pathname: (content?._path ?? href) + (anchor ? '/' + anchor.substring(1) : ''), hash: '', search: '' })" :target="target">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</a>
|
</a>
|
||||||
<Teleport to="body" v-if="hovered && (loading || !!content)">
|
<Teleport to="body" v-if="hovered && (loading || !!content)">
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ if(hasChildren.value)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const collapsed = ref(!useRoute().path.startsWith(props.link._path));
|
const collapsed = ref(!useRoute().path.startsWith('/explorer' + props.link._path));
|
||||||
|
|
||||||
function hideLeftPanel(_: Event)
|
function hideLeftPanel(_: Event)
|
||||||
{
|
{
|
||||||
|
|
@ -51,7 +51,7 @@ function hideLeftPanel(_: Event)
|
||||||
<NavigationLink v-if="hasChildren" v-for="l of link.children" :link="l"/>
|
<NavigationLink v-if="hasChildren" v-for="l of link.children" :link="l"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<NuxtLink @click="hideLeftPanel" v-else class="tree-item-self" :to="'/explorer' + link._path" :active-class="'mod-active'">
|
<NuxtLink @click="hideLeftPanel" v-else class="tree-item-self" :to="'/explorer' + link._path" :active-class="'mod-active'" >
|
||||||
<div class="tree-item-inner">{{ link.title }}</div>
|
<div class="tree-item-inner">{{ link.title }}</div>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ onMounted(() => {
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<LeftComponent />
|
||||||
<ContentList :query="{ where: { frontmatter: { tags: { $contains: tag }}}}">
|
<ContentList :query="{ where: { frontmatter: { tags: { $contains: tag }}}}">
|
||||||
<template #default="{ list }">
|
<template #default="{ list }">
|
||||||
<div class="render-container-inner">
|
<div class="render-container-inner">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue