valaxy-theme-yun 0.7.5 → 0.7.6

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.
@@ -1,21 +1,9 @@
1
1
  <script lang="ts" setup>
2
- import { isClient, useStorage } from '@vueuse/core'
3
2
  import { useI18n } from 'vue-i18n'
4
- const { t, availableLocales, locale } = useI18n()
3
+ import { useLocale } from 'valaxy'
5
4
 
6
- const lang = useStorage('valaxy-locale', locale.value)
7
-
8
- const toggleLocales = () => {
9
- // change to some real logic
10
- const locales = availableLocales
11
-
12
- locale.value = locales[(locales.indexOf(locale.value) + 1) % locales.length]
13
- // for localStorage
14
- lang.value = locale.value
15
-
16
- if (isClient)
17
- document.documentElement.setAttribute('lang', locale.value)
18
- }
5
+ const { t, locale } = useI18n()
6
+ const { toggleLocales } = useLocale()
19
7
  </script>
20
8
 
21
9
  <template>
package/layouts/404.vue CHANGED
@@ -7,7 +7,7 @@ const { t } = useI18n()
7
7
  </script>
8
8
 
9
9
  <template>
10
- <Base>
10
+ <Layout>
11
11
  <template #content>
12
12
  <div text="center">
13
13
  <div text-4xl>
@@ -21,5 +21,5 @@ const { t } = useI18n()
21
21
  </div>
22
22
  </div>
23
23
  </template>
24
- </Base>
24
+ </Layout>
25
25
  </template>
@@ -11,7 +11,7 @@ const title = usePostTitle(frontmatter)
11
11
  </script>
12
12
 
13
13
  <template>
14
- <Base>
14
+ <Layout>
15
15
  <template #main-header>
16
16
  <YunPageHeader :title="title || t('menu.archives')" :icon="frontmatter.icon || 'i-ri-archive-line'" :color="frontmatter.color" />
17
17
  </template>
@@ -19,5 +19,5 @@ const title = usePostTitle(frontmatter)
19
19
  <router-view />
20
20
  <YunPostCollapse :posts="postList" />
21
21
  </template>
22
- </Base>
22
+ </Layout>
23
23
  </template>
@@ -46,7 +46,7 @@ const title = usePostTitle(frontmatter)
46
46
  </script>
47
47
 
48
48
  <template>
49
- <Base>
49
+ <Layout>
50
50
  <template #main-header>
51
51
  <YunPageHeader
52
52
  :title="title || t('menu.categories')"
@@ -68,5 +68,5 @@ const title = usePostTitle(frontmatter)
68
68
  <YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
69
69
  </YunCard>
70
70
  </template>
71
- </Base>
71
+ </Layout>
72
72
  </template>
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <Base>
2
+ <Layout>
3
3
  <template #content>
4
4
  <router-view />
5
5
  </template>
6
- </Base>
6
+ </Layout>
7
7
  </template>
File without changes
package/layouts/post.vue CHANGED
@@ -15,7 +15,7 @@ const showSponsor = computed(() => {
15
15
  </script>
16
16
 
17
17
  <template>
18
- <Base>
18
+ <Layout>
19
19
  <template #main-header-after>
20
20
  <YunPostMeta :frontmatter="frontmatter" />
21
21
  </template>
@@ -28,5 +28,5 @@ const showSponsor = computed(() => {
28
28
  <template #aside-custom>
29
29
  <slot name="aside-custom" />
30
30
  </template>
31
- </Base>
31
+ </Layout>
32
32
  </template>
package/layouts/tags.vue CHANGED
@@ -49,7 +49,7 @@ const title = usePostTitle(frontmatter)
49
49
  </script>
50
50
 
51
51
  <template>
52
- <Base>
52
+ <Layout>
53
53
  <template #main-header>
54
54
  <YunPageHeader
55
55
  :title="title || t('menu.tags')"
@@ -77,5 +77,5 @@ const title = usePostTitle(frontmatter)
77
77
  <YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
78
78
  </YunCard>
79
79
  </template>
80
- </Base>
80
+ </Layout>
81
81
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -21,15 +21,12 @@
21
21
  "main": "dist/index.js",
22
22
  "module": "dist/index.mjs",
23
23
  "types": "dist/index.d.ts",
24
- "peerDependencies": {
25
- "valaxy": "0.7.5"
26
- },
27
24
  "dependencies": {
28
25
  "@iconify-json/ant-design": "^1.1.3",
29
26
  "@iconify-json/simple-icons": "^1.1.19"
30
27
  },
31
28
  "devDependencies": {
32
- "valaxy": "0.7.5"
29
+ "valaxy": "0.7.6"
33
30
  },
34
31
  "scripts": {
35
32
  "build": "rimraf dist && tsup",