@voidzero-dev/vitepress-theme 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -25,6 +25,13 @@ defineOptions({ inheritAttrs: false })
|
|
|
25
25
|
<VPLink
|
|
26
26
|
v-bind="$attrs"
|
|
27
27
|
class="flex items-center justify-between rounded-md px-3 py-2 text-sm font-heading text-primary dark:text-white text-left whitespace-nowrap hover:opacity-70 transition-opacity"
|
|
28
|
+
:class="{
|
|
29
|
+
active: isActive(
|
|
30
|
+
page.relativePath,
|
|
31
|
+
item.activeMatch || href,
|
|
32
|
+
!!item.activeMatch
|
|
33
|
+
)
|
|
34
|
+
}"
|
|
28
35
|
:href
|
|
29
36
|
:target="item.target"
|
|
30
37
|
:rel="item.rel"
|
|
@@ -42,4 +49,13 @@ defineOptions({ inheritAttrs: false })
|
|
|
42
49
|
border-top: 1px solid var(--vp-c-divider);
|
|
43
50
|
padding: 12px 12px 0;
|
|
44
51
|
}
|
|
52
|
+
|
|
53
|
+
.link:hover {
|
|
54
|
+
color: var(--vp-c-brand-1);
|
|
55
|
+
background-color: var(--vp-c-default-soft);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.link.active {
|
|
59
|
+
color: var(--vp-c-brand-1);
|
|
60
|
+
}
|
|
45
61
|
</style>
|
|
@@ -20,13 +20,25 @@ const href = computed(() =>
|
|
|
20
20
|
|
|
21
21
|
<template>
|
|
22
22
|
<VPLink
|
|
23
|
-
class="flex items-center px-3 py-2 text-base font-heading text-primary
|
|
24
|
-
|
|
25
|
-
:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
class="flex items-center px-3 py-2 text-base font-heading text-primary
|
|
24
|
+
dark:text-white hover:opacity-85 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis"
|
|
25
|
+
:class="{
|
|
26
|
+
active: isActive(
|
|
27
|
+
page.relativePath,
|
|
28
|
+
item.activeMatch || href,
|
|
29
|
+
!!item.activeMatch
|
|
30
|
+
)
|
|
31
|
+
}" :href :target="item.target" :rel="item.rel" :no-icon="item.noIcon" tabindex="0">
|
|
30
32
|
<span v-html="item.text"></span>
|
|
31
33
|
</VPLink>
|
|
32
34
|
</template>
|
|
35
|
+
|
|
36
|
+
<style scoped>
|
|
37
|
+
.link.active {
|
|
38
|
+
color: var(--vp-c-brand-1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.link:hover {
|
|
42
|
+
color: var(--vp-c-brand-1);
|
|
43
|
+
}
|
|
44
|
+
</style>
|