|
|
|
@ -11,15 +11,17 @@ const { theme, page, frontmatter } = useData()
|
|
|
|
|
const editLink = useEditLink()
|
|
|
|
|
const control = usePrevNext()
|
|
|
|
|
|
|
|
|
|
const hasEditLink = computed(() => {
|
|
|
|
|
return theme.value.editLink && frontmatter.value.editLink !== false
|
|
|
|
|
})
|
|
|
|
|
const hasLastUpdated = computed(() => {
|
|
|
|
|
return page.value.lastUpdated && frontmatter.value.lastUpdated !== false
|
|
|
|
|
})
|
|
|
|
|
const showFooter = computed(() => {
|
|
|
|
|
return hasEditLink.value || hasLastUpdated.value || control.value.prev || control.value.next
|
|
|
|
|
})
|
|
|
|
|
const hasEditLink = computed(
|
|
|
|
|
() => theme.value.editLink && frontmatter.value.editLink !== false
|
|
|
|
|
)
|
|
|
|
|
const hasLastUpdated = computed(() => page.value.lastUpdated)
|
|
|
|
|
const showFooter = computed(
|
|
|
|
|
() =>
|
|
|
|
|
hasEditLink.value ||
|
|
|
|
|
hasLastUpdated.value ||
|
|
|
|
|
control.value.prev ||
|
|
|
|
|
control.value.next
|
|
|
|
|
)
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
@ -47,14 +49,28 @@ const showFooter = computed(() => {
|
|
|
|
|
<span class="visually-hidden" id="doc-footer-aria-label">Pager</span>
|
|
|
|
|
|
|
|
|
|
<div class="pager">
|
|
|
|
|
<VPLink v-if="control.prev?.link" class="pager-link prev" :href="control.prev.link">
|
|
|
|
|
<span class="desc" v-html="theme.docFooter?.prev || 'Previous page'"></span>
|
|
|
|
|
<VPLink
|
|
|
|
|
v-if="control.prev?.link"
|
|
|
|
|
class="pager-link prev"
|
|
|
|
|
:href="control.prev.link"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
class="desc"
|
|
|
|
|
v-html="theme.docFooter?.prev || 'Previous page'"
|
|
|
|
|
></span>
|
|
|
|
|
<span class="title" v-html="control.prev.text"></span>
|
|
|
|
|
</VPLink>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pager">
|
|
|
|
|
<VPLink v-if="control.next?.link" class="pager-link next" :href="control.next.link">
|
|
|
|
|
<span class="desc" v-html="theme.docFooter?.next || 'Next page'"></span>
|
|
|
|
|
<VPLink
|
|
|
|
|
v-if="control.next?.link"
|
|
|
|
|
class="pager-link next"
|
|
|
|
|
:href="control.next.link"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
class="desc"
|
|
|
|
|
v-html="theme.docFooter?.next || 'Next page'"
|
|
|
|
|
></span>
|
|
|
|
|
<span class="title" v-html="control.next.text"></span>
|
|
|
|
|
</VPLink>
|
|
|
|
|
</div>
|
|
|
|
|