valaxy-theme-yun 0.20.3 → 0.20.4
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/components/YunBanner.vue +1 -1
- package/components/YunLinkItem.vue +1 -2
- package/components/YunPostsInfo.vue +12 -3
- package/components/YunSidebarCard.vue +1 -0
- package/components/menu/YunPostClassifyNavItem.vue +34 -6
- package/components/prologue/{PrologueSquare.vue → YunPrologueSquare.vue} +2 -1
- package/package.json +3 -3
package/components/YunBanner.vue
CHANGED
@@ -49,8 +49,7 @@ useMotion(itemRef, {
|
|
49
49
|
<div class="yun-link-left">
|
50
50
|
<div class="yun-link-avatar size-16 overflow-hidden flex-center">
|
51
51
|
<img
|
52
|
-
class="size-
|
53
|
-
width="64" height="64"
|
52
|
+
class="size-full object-center object-cover m-0! max-w-unset!"
|
54
53
|
loading="lazy"
|
55
54
|
:src="link.avatar" :alt="link.name"
|
56
55
|
@error="onError"
|
@@ -13,15 +13,24 @@ const tags = useTags()
|
|
13
13
|
<template>
|
14
14
|
<nav class="site-nav" text-xl mt-2>
|
15
15
|
<YunPostClassifyNavItem
|
16
|
-
to="/archives/"
|
16
|
+
to="/archives/"
|
17
|
+
icon="i-ri-archive-line"
|
18
|
+
active-icon="i-ri-archive-fill"
|
19
|
+
:title="t('menu.archives')"
|
17
20
|
:total="site.postList.length"
|
18
21
|
/>
|
19
22
|
<YunPostClassifyNavItem
|
20
|
-
to="/categories/"
|
23
|
+
to="/categories/"
|
24
|
+
icon="i-ri-folder-2-line"
|
25
|
+
active-icon="i-ri-folder-2-fill"
|
26
|
+
:title="t('menu.categories')"
|
21
27
|
:total="Array.from(categories.children).length"
|
22
28
|
/>
|
23
29
|
<YunPostClassifyNavItem
|
24
|
-
to="/tags/"
|
30
|
+
to="/tags/"
|
31
|
+
icon="i-ri-price-tag-3-line"
|
32
|
+
active-icon="i-ri-price-tag-3-fill"
|
33
|
+
:title="t('menu.tags')"
|
25
34
|
:total="Array.from(tags).length"
|
26
35
|
/>
|
27
36
|
</nav>
|
@@ -1,5 +1,10 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
|
2
|
+
import { computed } from 'vue'
|
3
|
+
|
4
|
+
import { useRoute } from 'vue-router'
|
5
|
+
|
6
|
+
const props = defineProps<{
|
7
|
+
activeIcon?: string
|
3
8
|
icon: string
|
4
9
|
title: string
|
5
10
|
/**
|
@@ -8,23 +13,46 @@ defineProps<{
|
|
8
13
|
total: number
|
9
14
|
to: string
|
10
15
|
}>()
|
16
|
+
|
17
|
+
const route = useRoute()
|
18
|
+
const active = computed(() => route.path === props.to)
|
19
|
+
|
20
|
+
const icon = computed(() => {
|
21
|
+
if (active.value && props.activeIcon)
|
22
|
+
return props.activeIcon
|
23
|
+
return props.icon
|
24
|
+
})
|
11
25
|
</script>
|
12
26
|
|
13
27
|
<template>
|
14
28
|
<RouterLink
|
15
29
|
flex="~ col center"
|
16
|
-
class="gap-1 w-20 p-2 rounded transition op-80"
|
17
|
-
:to="to"
|
30
|
+
class="post-classify-nav-item gap-1 w-20 p-2 rounded transition op-80"
|
31
|
+
:to="to"
|
32
|
+
:title="title"
|
18
33
|
hover="bg-$va-c-bg-soft op-100"
|
19
34
|
>
|
20
35
|
<div flex="~ col" class="text-$va-c-text inline-flex-center gap-1">
|
21
|
-
<div
|
36
|
+
<div
|
37
|
+
class="text-2xl"
|
38
|
+
:class="icon"
|
39
|
+
/>
|
22
40
|
<span class="text-xs">
|
23
41
|
{{ title }}
|
24
42
|
</span>
|
25
43
|
</div>
|
26
44
|
<span
|
27
|
-
class="count text-base dark:text-white/80"
|
28
|
-
>
|
45
|
+
class="count text-base text-black/80 dark:text-white/80"
|
46
|
+
>
|
47
|
+
{{ total }}
|
48
|
+
</span>
|
29
49
|
</RouterLink>
|
30
50
|
</template>
|
51
|
+
|
52
|
+
<style lang="scss">
|
53
|
+
.post-classify-nav-item {
|
54
|
+
&.router-link-active {
|
55
|
+
background-color: rgba(var(--va-c-primary-rgb), 0.08);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
</style>
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.20.
|
4
|
+
"version": "0.20.4",
|
5
5
|
"author": {
|
6
6
|
"email": "me@yunyoujun.cn",
|
7
7
|
"name": "YunYouJun",
|
@@ -33,8 +33,8 @@
|
|
33
33
|
},
|
34
34
|
"devDependencies": {
|
35
35
|
"@types/animejs": "^3.1.12",
|
36
|
-
"valaxy": "0.
|
37
|
-
"valaxy
|
36
|
+
"valaxy-addon-waline": "0.2.0",
|
37
|
+
"valaxy": "0.20.4"
|
38
38
|
},
|
39
39
|
"scripts": {
|
40
40
|
"release": "bumpp && npm publish"
|