Navigation links sorting change: index file are always on top.
Markdown content: If the content don't includes a h1, the title is render at the beginning of the page
This commit is contained in:
parent
7b2c74c405
commit
9c222edcdf
|
|
@ -17,6 +17,17 @@ const hasChildren = computed(() => {
|
|||
return props.link && props.link.children && props.link.children.length > 0 || false;
|
||||
});
|
||||
|
||||
if(hasChildren.value)
|
||||
{
|
||||
props.link.children?.sort((a, b) => {
|
||||
if(a._path === props.link._path)
|
||||
return -1;
|
||||
if(b._path === props.link._path)
|
||||
return 1;
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
const collapsed = ref(!useRoute().path.startsWith(props.link._path));
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ function toggleLeftPanel(_: Event) {
|
|||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
const { page } = useContent()
|
||||
useContentHead(page);
|
||||
|
||||
|
|
@ -28,6 +29,7 @@ onMounted(() => {
|
|||
<div class="publish-renderer">
|
||||
<div class="markdown-preview-view markdown-rendered node-insert-event hide-title">
|
||||
<div class="markdown-preview-sizer markdown-preview-section" style="padding-bottom: 0px;">
|
||||
<h1 v-if="!(page as MarkdownParsedContent).body.children.find((e: MarkdownNode) => e.tag === 'h1')">{{(page as MarkdownParsedContent).title}}</h1>
|
||||
<ContentRenderer :key="page._id" :value="page" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -48,8 +50,8 @@ onMounted(() => {
|
|||
<div v-else-if="!!page">
|
||||
<div class="not-found-container">
|
||||
<div class="not-found-image"></div>
|
||||
<div class="not-found-title">Impossible d'afficher</div>
|
||||
<div class="not-found-description">Cette page est actuellement vide et impossible à traiter</div>
|
||||
<div class="not-found-title">Impossible d'afficher (ou vide)</div>
|
||||
<div class="not-found-description">Cette page est actuellement vide ou impossible à traiter</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="not-found-container">
|
||||
|
|
|
|||
Loading…
Reference in New Issue