perf(theme): optimize internal link
This commit is contained in:
parent
27b6f70b91
commit
811f7f4361
@ -12,7 +12,7 @@ const { archives } = useArchives()
|
|||||||
|
|
||||||
<h2 class="archives-title">
|
<h2 class="archives-title">
|
||||||
<span class="vpi-archive icon" />
|
<span class="vpi-archive icon" />
|
||||||
<span>{{ archiveLink.text }}</span>
|
<span>{{ archiveLink?.text ?? 'Archives' }}</span>
|
||||||
</h2>
|
</h2>
|
||||||
<div v-if="archives.length" class="archives">
|
<div v-if="archives.length" class="archives">
|
||||||
<template v-for="archive in archives" :key="archive.label">
|
<template v-for="archive in archives" :key="archive.label">
|
||||||
|
|||||||
@ -12,7 +12,7 @@ const { categories } = useBlogCategory()
|
|||||||
|
|
||||||
<h2 class="categories-title">
|
<h2 class="categories-title">
|
||||||
<span class="vpi-category icon" />
|
<span class="vpi-category icon" />
|
||||||
<span>{{ categoriesLink.text }}</span>
|
<span>{{ categoriesLink?.text ?? 'Categories' }}</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<slot name="blog-categories-content-before" />
|
<slot name="blog-categories-content-before" />
|
||||||
|
|||||||
@ -13,7 +13,7 @@ const { tags, currentTag, postList, handleTagClick } = useTags()
|
|||||||
<div class="tags-nav">
|
<div class="tags-nav">
|
||||||
<h2 class="tags-title">
|
<h2 class="tags-title">
|
||||||
<span class="vpi-tag icon" />
|
<span class="vpi-tag icon" />
|
||||||
<span>{{ tagsLink.text }}</span>
|
<span>{{ tagsLink?.text ?? 'Tags' }}</span>
|
||||||
</h2>
|
</h2>
|
||||||
<slot name="blog-tags-title-after" />
|
<slot name="blog-tags-title-after" />
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
|
|||||||
@ -20,20 +20,20 @@ export function useBlogExtract() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const tags = computed(() => ({
|
const tags = computed(() => ({
|
||||||
link: links.tags.value.link,
|
link: links.tags.value?.link,
|
||||||
text: links.tags.value.text,
|
text: links.tags.value?.text,
|
||||||
total: tagsList.value.length,
|
total: tagsList.value.length,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const archives = computed(() => ({
|
const archives = computed(() => ({
|
||||||
link: links.archive.value.link,
|
link: links.archive.value?.link,
|
||||||
text: links.archive.value.text,
|
text: links.archive.value?.text,
|
||||||
total: postList.value.length,
|
total: postList.value.length,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const categories = computed(() => ({
|
const categories = computed(() => ({
|
||||||
link: links.categories.value.link,
|
link: links.categories.value?.link,
|
||||||
text: links.categories.value.text,
|
text: links.categories.value?.text,
|
||||||
total: getCategoriesTotal(categoryList.value),
|
total: getCategoriesTotal(categoryList.value),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user