|
|
@ -1,4 +1,5 @@
|
|
|
|
<script setup lang="ts">
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
|
|
import { computed } from 'vue'
|
|
|
|
import { useData } from '../composables/data'
|
|
|
|
import { useData } from '../composables/data'
|
|
|
|
import { useLangs } from '../composables/langs'
|
|
|
|
import { useLangs } from '../composables/langs'
|
|
|
|
import { useSidebar } from '../composables/sidebar'
|
|
|
|
import { useSidebar } from '../composables/sidebar'
|
|
|
@ -8,11 +9,34 @@ import VPImage from './VPImage.vue'
|
|
|
|
const { site, theme } = useData()
|
|
|
|
const { site, theme } = useData()
|
|
|
|
const { hasSidebar } = useSidebar()
|
|
|
|
const { hasSidebar } = useSidebar()
|
|
|
|
const { currentLang } = useLangs()
|
|
|
|
const { currentLang } = useLangs()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const link = computed(() =>
|
|
|
|
|
|
|
|
typeof theme.value.logoLink === 'string'
|
|
|
|
|
|
|
|
? theme.value.logoLink
|
|
|
|
|
|
|
|
: theme.value.logoLink?.link
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const rel = computed(() =>
|
|
|
|
|
|
|
|
typeof theme.value.logoLink === 'string'
|
|
|
|
|
|
|
|
? undefined
|
|
|
|
|
|
|
|
: theme.value.logoLink?.rel
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const target = computed(() =>
|
|
|
|
|
|
|
|
typeof theme.value.logoLink === 'string'
|
|
|
|
|
|
|
|
? undefined
|
|
|
|
|
|
|
|
: theme.value.logoLink?.target
|
|
|
|
|
|
|
|
)
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="VPNavBarTitle" :class="{ 'has-sidebar': hasSidebar }">
|
|
|
|
<div class="VPNavBarTitle" :class="{ 'has-sidebar': hasSidebar }">
|
|
|
|
<a class="title" :href="theme.logoLink ?? normalizeLink(currentLang.link)">
|
|
|
|
<a
|
|
|
|
|
|
|
|
class="title"
|
|
|
|
|
|
|
|
:href="link ?? normalizeLink(currentLang.link)"
|
|
|
|
|
|
|
|
:rel="rel"
|
|
|
|
|
|
|
|
:target="target"
|
|
|
|
|
|
|
|
>
|
|
|
|
<slot name="nav-bar-title-before" />
|
|
|
|
<slot name="nav-bar-title-before" />
|
|
|
|
<VPImage v-if="theme.logo" class="logo" :image="theme.logo" />
|
|
|
|
<VPImage v-if="theme.logo" class="logo" :image="theme.logo" />
|
|
|
|
<template v-if="theme.siteTitle">{{ theme.siteTitle }}</template>
|
|
|
|
<template v-if="theme.siteTitle">{{ theme.siteTitle }}</template>
|
|
|
|