valaxy-theme-yun 0.6.2 → 0.6.3

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.
@@ -25,20 +25,25 @@ const title = usePostTitle(computed(() => props.frontmatter))
25
25
  <slot name="main-header-after" />
26
26
 
27
27
  <div p="x-4 b-8" class="sm:px-6 lg:px-12 xl:px-16" w="full">
28
- <slot name="main-content" />
29
- <ValaxyMd :frontmatter="frontmatter">
30
- <slot name="main-content-md" />
31
- <slot />
32
- </ValaxyMd>
28
+ <slot name="main-content">
29
+ <ValaxyMd :frontmatter="frontmatter">
30
+ <slot name="main-content-md" />
31
+ <slot />
32
+ </ValaxyMd>
33
+ </slot>
34
+
35
+ <slot name="main-content-after" />
33
36
  </div>
34
37
  </YunCard>
35
38
 
36
- <slot name="main-content-after" />
39
+ <slot name="main-nav-before" />
37
40
 
38
41
  <slot name="main-nav">
39
42
  <YunPostNav v-if="frontmatter.nav !== false" />
40
43
  </slot>
41
44
 
45
+ <slot name="main-nav-after" />
46
+
42
47
  <slot v-if="frontmatter.comment !== false" name="comment">
43
48
  <YunCard w="full" p="4" class="comment sm:p-6 lg:px-12 xl:px-16" :class="frontmatter.nav === false ? 'mt-4' : 0">
44
49
  <YunWaline v-if="config.comment.waline.enable" />
@@ -1,13 +1,18 @@
1
1
  <script lang="ts" setup>
2
2
  import { useI18n } from 'vue-i18n'
3
+ import { computed } from 'vue'
3
4
  import { isDark, toggleDark } from '~/composables'
4
5
 
5
6
  const { t } = useI18n()
7
+
8
+ const themeTitle = computed(() => {
9
+ return isDark.value ? t('button.toggle_light') : t('button.toggle_dark')
10
+ })
6
11
  </script>
7
12
 
8
13
  <template>
9
14
  <div>
10
- <button class="yun-icon-btn" :title="t('button.toggle_dark')" :style="{ color: isDark ? '' : '#f1cb64' }" @click="toggleDark()">
15
+ <button class="yun-icon-btn" :title="themeTitle" :style="{ color: isDark ? '' : '#f1cb64' }" @click="toggleDark()">
11
16
  <div i="ri-sun-line dark:ri-moon-line" />
12
17
  </button>
13
18
 
package/layouts/base.vue CHANGED
@@ -36,6 +36,12 @@ const config = useConfig()
36
36
  <template #main-content-after>
37
37
  <slot name="main-content-after" />
38
38
  </template>
39
+ <template #main-nav-before>
40
+ <slot name="main-nav-before" />
41
+ </template>
42
+ <template #main-nav-after>
43
+ <slot name="main-nav-after" />
44
+ </template>
39
45
  <template #aside-custom>
40
46
  <slot name="aside-custom" />
41
47
  </template>
@@ -62,7 +62,7 @@ const title = usePostTitle(frontmatter)
62
62
  <router-view />
63
63
  </template>
64
64
 
65
- <template #main-content-after>
65
+ <template #main-nav-before>
66
66
  <YunCard v-if="curCategory" ref="collapse" m="t-4" w="full">
67
67
  <YunPageHeader :title="curCategory === 'Uncategorized' ? t('category.uncategorized') : curCategory" icon="i-ri-folder-open-line" />
68
68
  <YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
package/layouts/post.vue CHANGED
@@ -20,7 +20,7 @@ const showSponsor = computed(() => {
20
20
  <YunPostMeta :frontmatter="frontmatter" />
21
21
  </template>
22
22
 
23
- <template #main>
23
+ <template #main-content-after>
24
24
  <YunSponsor v-if="showSponsor" />
25
25
  <ValaxyCopyright v-if="frontmatter.copyright || config.license.enabled" :url="url" m="y-4" />
26
26
  </template>
package/layouts/tags.vue CHANGED
@@ -70,7 +70,7 @@ const title = usePostTitle(frontmatter)
70
70
  <router-view />
71
71
  </template>
72
72
 
73
- <template #main-content-after>
73
+ <template #main-nav-before>
74
74
  <YunCard v-if="curTag" ref="collapse" m="t-4" w="full">
75
75
  <YunPageHeader :title="curTag" icon="i-ri-hashtag" />
76
76
  <YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -18,7 +18,7 @@
18
18
  "@iconify-json/simple-icons": "^1.1.16"
19
19
  },
20
20
  "devDependencies": {
21
- "valaxy": "0.6.2"
21
+ "valaxy": "0.6.3"
22
22
  },
23
23
  "scripts": {
24
24
  "build": "tsup",