valaxy-theme-yun 0.10.3 → 0.11.0

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.
@@ -62,9 +62,9 @@ const YunTwikoo = config.value.comment.waline.enable
62
62
  </YunCard>
63
63
  </slot>
64
64
 
65
- <YunFooter>
66
- <slot name="footer" />
67
- </YunFooter>
65
+ <slot name="main-footer-before" />
66
+ <YunFooter />
67
+ <slot name="main-footer-after" />
68
68
  </div>
69
69
  </slot>
70
70
 
@@ -2,15 +2,12 @@
2
2
  import { capitalize, computed } from 'vue'
3
3
  import { useConfig } from 'valaxy'
4
4
  import { useI18n } from 'vue-i18n'
5
-
6
5
  import pkg from 'valaxy/package.json'
7
6
  import { useThemeConfig } from '../composables'
8
7
 
9
8
  const { t } = useI18n()
10
-
11
9
  const config = useConfig()
12
10
  const themeConfig = useThemeConfig()
13
-
14
11
  const year = new Date().getFullYear()
15
12
 
16
13
  const isThisYear = computed(() => {
@@ -18,11 +15,15 @@ const isThisYear = computed(() => {
18
15
  })
19
16
 
20
17
  const poweredHtml = computed(() => t('footer.powered', [`<a href="${pkg.repository}" target="_blank" rel="noopener">Valaxy</a> v${pkg.version}`]))
21
- const footerIcon = computed(() => themeConfig.value.footer.icon!)
18
+ const footerIcon = computed(() => themeConfig.value.footer.icon || {
19
+ url: pkg.repository,
20
+ name: 'i-ri-cloud-line',
21
+ title: pkg.name,
22
+ })
22
23
  </script>
23
24
 
24
25
  <template>
25
- <footer class="va-footer p-4" text="center sm" style="color:var(--va-c-text-light)">
26
+ <footer class="va-footer p-4 text-$va-c-text-light" text="center sm">
26
27
  <div v-if="themeConfig.footer.beian?.enable && themeConfig.footer.beian.icp" class="beian" m="y-2">
27
28
  <a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">
28
29
  {{ themeConfig.footer.beian.icp }}
@@ -38,15 +39,14 @@ const footerIcon = computed(() => themeConfig.value.footer.icon!)
38
39
  {{ year }}
39
40
  </span>
40
41
 
41
- <a m="x-2" class="inline-flex animate-pulse" :href="footerIcon.url" target="_blank" :title="footerIcon.title">
42
+ <a v-if="themeConfig.footer.icon" m="x-2" class="inline-flex animate-pulse" :href="footerIcon.url" target="_blank" :title="footerIcon.title">
42
43
  <div :class="footerIcon.name" />
43
44
  </a>
44
-
45
45
  <span>{{ config.author.name }}</span>
46
46
  </div>
47
47
 
48
48
  <div v-if="themeConfig.footer.powered" class="powered" m="2">
49
- <span v-html="poweredHtml" /> | <span>{{ t('footer.theme') }} - <a :href="themeConfig.pkg.homepage" :title="`valaxy-theme-${config.theme}`" target="_blank">{{ capitalize(config.theme) }}</a> v{{ themeConfig.pkg.version }}</span>
49
+ <span v-html="poweredHtml" /> | <span>{{ t('footer.theme') }} - <a :href="themeConfig.pkg.homepage" :title="themeConfig.pkg.name" target="_blank">{{ capitalize(config.theme) }}</a> v{{ themeConfig.pkg.version }}</span>
50
50
  </div>
51
51
 
52
52
  <slot />
@@ -1,26 +1,8 @@
1
1
  <script lang="ts" setup>
2
2
  import { useConfig } from 'valaxy'
3
- // we need import on demand
4
- import { useWaline } from 'valaxy/client/composables/comments/waline'
5
-
6
3
  const config = useConfig()
7
- useWaline(config.value.comment.waline, config.value.cdn.prefix)
8
4
  </script>
9
5
 
10
6
  <template>
11
- <div id="waline" w="full" />
7
+ <WalineClient w="full" :server-u-r-l="config.comment.waline.serverURL" :cdn="config.cdn.prefix" />
12
8
  </template>
13
-
14
- <style lang="scss">
15
- #waline {
16
- --waline-theme-color: var(--va-c-primary);
17
- --waline-active-color: var(--va-c-primary-light);
18
-
19
- .v[data-class=v] {
20
- .veditor {
21
- width: calc(100% - 2em);
22
- padding: 0.5rem;
23
- }
24
- }
25
- }
26
- </style>
package/layouts/home.vue CHANGED
@@ -27,9 +27,7 @@ const isHome = useLayout('home')
27
27
  <router-view />
28
28
  </slot>
29
29
 
30
- <YunFooter>
31
- <slot name="footer" />
32
- </YunFooter>
30
+ <YunFooter />
33
31
  </main>
34
32
 
35
33
  <YunSearch v-if="config.search.enable" />
@@ -45,9 +45,6 @@ const config = useConfig()
45
45
  <template #aside-custom>
46
46
  <slot name="aside-custom" />
47
47
  </template>
48
- <template #footer>
49
- <slot name="footer" />
50
- </template>
51
48
  </component>
52
49
  </router-view>
53
50
 
package/layouts/tags.vue CHANGED
@@ -62,7 +62,7 @@ const title = usePostTitle(frontmatter)
62
62
  {{ t('counter.tags', Array.from(tags).length) }}
63
63
  </div>
64
64
 
65
- <div text="center">
65
+ <div text="center" class="break-words">
66
66
  <span v-for="[key, tag] in Array.from(tags).sort()" :key="key" class="post-tag cursor-pointer" :style="getTagStyle(tag.count)" p="1" @click="displayTag(key.toString())">
67
67
  #{{ key }}<span text="xs">[{{ tag.count }}]</span>
68
68
  </span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.10.3",
3
+ "version": "0.11.0",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -17,12 +17,13 @@
17
17
  "main": "node/index.ts",
18
18
  "types": "types/index.d.ts",
19
19
  "dependencies": {
20
- "@docsearch/css": "^3.1.1",
21
- "@docsearch/js": "^3.1.1",
20
+ "@docsearch/css": "^3.2.1",
21
+ "@docsearch/js": "^3.2.1",
22
22
  "@iconify-json/ant-design": "^1.1.3",
23
- "@iconify-json/simple-icons": "^1.1.19"
23
+ "@iconify-json/simple-icons": "^1.1.28",
24
+ "valaxy-addon-waline": "0.0.2"
24
25
  },
25
26
  "devDependencies": {
26
- "valaxy": "0.10.3"
27
+ "valaxy": "0.11.0"
27
28
  }
28
29
  }
package/valaxy.config.ts CHANGED
@@ -30,6 +30,7 @@ function ThemeVitePlugin(options: ResolvedValaxyOptions<ThemeConfig>): Plugin {
30
30
  export default defineTheme<ThemeConfig>((options) => {
31
31
  return {
32
32
  themeConfig: defaultThemeConfig,
33
+ addons: ['valaxy-addon-waline'],
33
34
  vite: {
34
35
  plugins: [ThemeVitePlugin(options)],
35
36
  },