valaxy-theme-yun 0.28.9 → 0.28.11

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/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
3
  "type": "module",
4
- "version": "0.28.9",
4
+ "version": "0.28.11",
5
+ "description": "Default theme (Yun) for Valaxy — a Vite & Vue powered static blog generator",
5
6
  "author": {
6
7
  "email": "me@yunyoujun.cn",
7
8
  "name": "YunYouJun",
@@ -11,8 +12,15 @@
11
12
  "homepage": "https://yun.valaxy.site",
12
13
  "repository": {
13
14
  "type": "git",
14
- "url": "git+https://github.com/YunYouJun/valaxy/tree/main/packages/valaxy-theme-yun.git"
15
+ "url": "git+https://github.com/YunYouJun/valaxy.git",
16
+ "directory": "packages/valaxy-theme-yun"
15
17
  },
18
+ "keywords": [
19
+ "valaxy",
20
+ "valaxy-theme",
21
+ "theme",
22
+ "blog"
23
+ ],
16
24
  "exports": {
17
25
  "./client": "./client/index.ts",
18
26
  "./theme": "./types/index.d.ts",
@@ -33,8 +41,8 @@
33
41
  },
34
42
  "devDependencies": {
35
43
  "@types/animejs": "^3.1.13",
36
- "valaxy-addon-waline": "0.2.1",
37
- "valaxy": "0.28.9"
44
+ "valaxy": "0.28.11",
45
+ "valaxy-addon-waline": "0.2.1"
38
46
  },
39
47
  "scripts": {
40
48
  "release": "bumpp && pnpm publish"
@@ -1,21 +0,0 @@
1
- # 2026-03-17
2
-
3
- ## 修复:从 post 返回首页时 prologue 和 banner 动画同时播放
4
-
5
- **问题**:从文章页返回首页时,prologue 和 banner 动画同时播放,而不是 banner 先播完再播 prologue。
6
-
7
- **根因**:`bannerAnimationDone` 是 Pinia store 中的 `ref(false)`(单例),首次进入首页后被设为 `true`。SPA 导航回首页时 `YunBanner` 重新挂载,但 store 中 `bannerAnimationDone` 仍为 `true`,导致 `home.vue` 的 `v-if` 条件立即满足,prologue 直接渲染。
8
-
9
- **修复**:在 `YunBanner.vue` 的 `onMounted` 开始时重置 `yun.bannerAnimationDone = false`,确保每次 banner 组件挂载时动画序列从头开始。
10
-
11
- **改动文件**:`packages/valaxy-theme-yun/components/YunBanner.vue`
12
-
13
- ## 修复:E2E banner 测试在 nimbo 模式下失败
14
-
15
- **问题**:`e2e/theme-yun/index.spec.ts` 中的 banner 测试 `.char-box` 断言超时(expected 6, received 0)。
16
-
17
- **根因**:nimbo 模式下 `YunBannerCharContainer` 是短暂存在的(~1s 后 animationStatus 从 'banner' 变为 'prologue' 时被移除)。原测试 `waitForSelector('#yun-banner')` 只等待容器出现,但 `.char-box` 可能在 ClientOnly hydration 延迟 + 动画窗口结束后已被移除。
18
-
19
- **修复**:将 `waitForSelector('#yun-banner')` 改为 `waitForSelector('.char-box', { timeout: 15000 })`,直接等待断言目标元素出现。
20
-
21
- **改动文件**:`e2e/theme-yun/index.spec.ts`
package/bump.config.ts DELETED
@@ -1,7 +0,0 @@
1
- import { defineConfig } from 'bumpp'
2
-
3
- export default defineConfig({
4
- commit: false,
5
- tag: false,
6
- push: false,
7
- })
package/docs/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Docs for valaxy-theme-yun
2
-
3
- 📖 Full documentation: [valaxy.site/themes/yun](https://valaxy.site/themes/yun)
4
-
5
- [English](./en-US/) | [中文](./zh-CN/)
@@ -1,3 +0,0 @@
1
- # valaxy-theme-yun Docs
2
-
3
- 📖 Full documentation: [valaxy.site/themes/yun](https://valaxy.site/themes/yun)
@@ -1,15 +0,0 @@
1
- # valaxy-theme-yun 文档
2
-
3
- 📖 完整文档请参见:[valaxy.site/themes/yun](https://valaxy.site/themes/yun)
4
-
5
- ## 配置
6
-
7
- ### 主题配置
8
-
9
- 主题特殊配制请参见 [主题配置](./config.md)。
10
-
11
- ### 通用配置
12
-
13
- 如「作者头像」、「站点名称」等属于通用信息,请在 `site.config.ts` 中配置。
14
-
15
- 可参见 [Site Config | Valaxy Docs](https://valaxy.site/guide/config/#site-config)。
@@ -1,140 +0,0 @@
1
- ---
2
- title: 主题配置
3
- ---
4
-
5
- > 📖 完整文档请参见:[valaxy.site/themes/yun](https://valaxy.site/themes/yun)
6
-
7
- 配置 `valaxy.config.ts` 中的 `themeConfig` 字段,类型可直接参考 [valaxy-theme-yun/types/index.d.ts](https://github.com/YunYouJun/valaxy/blob/main/packages/valaxy-theme-yun/types/index.d.ts)。
8
-
9
- 如您需要更详细的描述/示例,再阅读下方内容。
10
-
11
- ## 主题类型 {#theme-type}
12
-
13
- Yun 主题支持两种布局类型,通过 `themeConfig.type` 进行切换。
14
-
15
- - `nimbo`(雨云):默认布局。顶部导航栏 + 首页 Banner 动画 + 全屏菜单(移动端)。
16
- - `strato`(层云):经典布局。左侧边栏 + 顶部导航栏,类似传统博客风格。
17
-
18
- ```ts
19
- import type { ThemeConfig } from 'valaxy-theme-yun'
20
- import { defineConfig } from 'valaxy'
21
-
22
- export default defineConfig<ThemeConfig>({
23
- theme: 'yun',
24
-
25
- themeConfig: {
26
- // 'nimbo'(默认)或 'strato'
27
- type: 'strato',
28
- }
29
- })
30
- ```
31
-
32
- ::: tip
33
- `strato` 对应 v1 版本的布局风格,`nimbo` 对应 v2 版本的布局风格。
34
-
35
- 在未来,Yun 主题的不同布局变更将以不同云的名称命名(如 cirro 卷云、cumulo 积云等)。
36
- :::
37
-
38
- ## 首页
39
-
40
- ### 标语动画
41
-
42
- 首页的垂直交错排列文字效果。默认开启。
43
-
44
- - `enable`: 是否开启
45
- - `title`: 设置文字内容
46
- - `cloud`: 在首页下方显示流动的云
47
- - `enable`: 是否开启
48
-
49
- ```ts
50
- import type { ThemeConfig } from 'valaxy-theme-yun'
51
- import { defineConfig } from 'valaxy'
52
-
53
- export default defineConfig<ThemeConfig>({
54
- theme: 'yun',
55
-
56
- themeConfig: {
57
- banner: {
58
- enable: true,
59
- title: '云游君的小站',
60
- // 手动分割
61
- // title: ['云游君的', '小站'],
62
- },
63
- }
64
- })
65
- ```
66
-
67
- > 如果您想要更改云的色彩,请更改 `var(--yun-c-cloud)` 的值
68
-
69
- ```scss
70
- // 新建 styles/vars.css 文件
71
- :root {
72
- --yun-c-cloud: red;
73
- }
74
- ```
75
-
76
- 新建 `styles/index.ts` 文件,引入 `vars.css`。
77
-
78
- ```ts
79
- import './vars.css'
80
- ```
81
-
82
- ## 自定义友情链接
83
-
84
- 新建 `pages/links/index.md` 文件。
85
-
86
- 您可以在 `frontmatter` 编写链接信息。
87
-
88
- - `links`: 友情链接信息(可以是 YAML 数组形式,也可以是一个 JSON 文件链接)
89
- - `random`: 是否随机展示
90
- - `errorImg`: 图片加载失败时的图片链接
91
-
92
- 譬如:
93
-
94
- ```md
95
- ---
96
- title: 我的小伙伴们
97
- keywords: 链接
98
- description: 云游的小伙伴们
99
- links:
100
- - url: https://www.yunyoujun.cn
101
- avatar: https://www.yunyoujun.cn/images/avatar.jpg
102
- name: 云游君
103
- blog: 云游君的小站
104
- desc: 希望能成为一个有趣的人。
105
- email: me@yunyoujun.cn
106
- color: "#0078e7"
107
- - url: https://valaxy.site
108
- avatar: https://valaxy.site/favicon.svg
109
- name: Valaxy Org
110
- blog: Valaxy Site
111
- desc: 下一代静态博客框架
112
- email: i@valaxy.site
113
- color: "#6058d9"
114
- # 也可以是一个 JSON 链接
115
- # links: https://friends.yunyoujun.cn/links.json
116
- random: true
117
- ---
118
-
119
- <YunLinks :links="frontmatter.links" :random="frontmatter.random" errorImg="https://cdn.yunyoujun.cn/img/avatar/none.jpg" />
120
- ```
121
-
122
- ## 样式
123
-
124
- ### 覆盖背景、侧边栏图片
125
-
126
- 您可以新建样式文件并引入,以覆盖默认 CSS 变量。
127
-
128
- ```ts [styles/index.ts]
129
- import './vars.scss'
130
- ```
131
-
132
- ```scss
133
- // styles/vars.scss
134
- :root {
135
- /* 背景图片 */
136
- --yun-bg-img: url("https://cdn.yunyoujun.cn/img/bg/stars-timing-0-blur-30px.jpg");
137
- /* 侧边栏背景图片 */
138
- --yun-sidebar-bg-img: url("https://cdn.yunyoujun.cn/img/bg/alpha-stars-timing-1.webp");
139
- }
140
- ```
package/tsconfig.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- // we need tsconfig.json to compile without
3
- // error: This is likely not portable. A type annotation is necessary.
4
- "compilerOptions": {
5
- "target": "ESNext",
6
- "jsx": "preserve",
7
- "lib": ["DOM", "ESNext"],
8
- "baseUrl": ".",
9
- "module": "ESNext",
10
- "moduleResolution": "Bundler",
11
- "resolveJsonModule": true,
12
- "types": [
13
- "valaxy/client",
14
- "vite/client",
15
- "vite-plugin-vue-layouts-next/client"
16
- ],
17
- "allowJs": true,
18
- "strict": true,
19
- "strictNullChecks": true,
20
- "noUnusedLocals": true,
21
- "esModuleInterop": true,
22
- "forceConsistentCasingInFileNames": true,
23
- "skipLibCheck": true
24
- },
25
- "exclude": ["**/dist/**", "node_modules"]
26
- }