-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNavBarTitle.vue
51 lines (45 loc) · 964 Bytes
/
NavBarTitle.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<script setup lang="ts">
import { computed } from '@vue/reactivity';
import { useData ,withBase} from 'vitepress';
const {site} = useData()
const themeConfig = computed(()=>site.value.themeConfig)
</script>
<template>
<a
class="nav-bar-title"
:href="site.base"
:aria-label="`${site.title}, back to home`"
>
<img
v-if="themeConfig.logo"
class="logo"
:src="withBase(themeConfig.logo)"
alt="Logo"
>
<span class="title text-primary-deep">
<span class="font-600">Sli</span><span class="font-normal">dev</span>
</span>
</a>
</template>
<style scoped>
.nav-bar-title {
font-size: 1.3rem;
font-weight: 600;
color: var(--c-text);
vertical-align: center;
white-space: nowrap;
margin-right: 2rem;
}
.nav-bar-title:hover {
text-decoration: none;
}
.logo {
margin-right: .5rem;
height: 2.2rem;
vertical-align: middle;
}
.title {
line-height: 2rem;
vertical-align: middle;
}
</style>