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.
@@ -67,7 +67,7 @@ onMounted(async () => {
67
67
  :title="themeConfig.banner.title"
68
68
  :chars="chars"
69
69
  />
70
- <PrologueSquare v-else class="z-1" />
70
+ <YunPrologueSquare v-else class="z-1" />
71
71
  </template>
72
72
  <template v-if="yun.isStrato">
73
73
  <YunBannerCharContainer
@@ -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-16 object-center object-cover m-0!"
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/" icon="i-ri-archive-line" :title="t('menu.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/" icon="i-ri-folder-2-line" :title="t('menu.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/" icon="i-ri-price-tag-3-line" :title="t('menu.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>
@@ -5,6 +5,7 @@
5
5
  <template>
6
6
  <YunCard class="p-4 min-h-sm" flex="~ col gap-1">
7
7
  <YunSiteInfo class="text-center" />
8
+ <YunGradientDivider class="my-2 op-20" />
8
9
  <YunPostsInfo />
9
10
  <YunGradientDivider class="my-2 op-20" />
10
11
  <YunSocialLinks />
@@ -1,5 +1,10 @@
1
1
  <script lang="ts" setup>
2
- defineProps<{
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" :title="title"
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 class="text-2xl" :class="icon" />
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
- >{{ total }}</span>
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>
@@ -91,7 +91,8 @@ const showContent = ref(false)
91
91
  </div>
92
92
  </template>
93
93
 
94
- <style lang="scss">
94
+ <style lang="scss" scoped>
95
+ // use scoped for css injection
95
96
  @use 'sass:map';
96
97
  @use 'valaxy-theme-yun/styles/vars.scss' as *;
97
98
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
3
  "type": "module",
4
- "version": "0.20.3",
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.20.3",
37
- "valaxy-addon-waline": "0.2.0"
36
+ "valaxy-addon-waline": "0.2.0",
37
+ "valaxy": "0.20.4"
38
38
  },
39
39
  "scripts": {
40
40
  "release": "bumpp && npm publish"