valaxy-theme-yun 0.14.5 → 0.14.7

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.
@@ -22,7 +22,11 @@ const { data } = useRandomData(props.girls, props.random)
22
22
  <div class="girls">
23
23
  <ul class="girl-items">
24
24
  <li v-for="girl, i in data" :key="girl.name" class="girl-item">
25
- <a :href="girl.url || `https://zh.moegirl.org/${girl.name}`" :title="girl.reason" alt="portrait" target="_blank" rel="noopener">
25
+ <a
26
+ class="girl-item-link"
27
+ :href="girl.url || `https://zh.moegirl.org/${girl.name}`"
28
+ :title="girl.reason" alt="portrait" target="_blank" rel="noopener"
29
+ >
26
30
  <figure class="girl-info">
27
31
  <img class="girl-avatar" loading="lazy" :src="girl.avatar" :alt="girl.name" :onError="onImgError">
28
32
  <figcaption class="girl-name" :title="(i + 1).toString()">{{ girl.name }}</figcaption>
@@ -1,3 +1,13 @@
1
1
  # valaxy-theme-yun 文档
2
2
 
3
- - [主题配置](./config.md)
3
+ ## 配置
4
+
5
+ ### 主题配置
6
+
7
+ 主题特殊配制请参见 [主题配置](./config.md)。
8
+
9
+ ### 通用配置
10
+
11
+ 如「作者头像」、「站点名称」等属于通用信息,请在 `site.config.ts` 中配置。
12
+
13
+ 可参见 [Site Config | Valaxy Docs](https://valaxy.site/guide/config#site-config)。
@@ -2,6 +2,10 @@
2
2
  title: 主题配置
3
3
  ---
4
4
 
5
+ 配置 `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)。
6
+
7
+ 如您需要更详细的描述/示例,再阅读下方内容。
8
+
5
9
  ## 首页
6
10
 
7
11
  ### 标语动画
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.14.5",
3
+ "version": "0.14.7",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -22,6 +22,6 @@
22
22
  "valaxy-addon-waline": "0.0.9"
23
23
  },
24
24
  "devDependencies": {
25
- "valaxy": "0.14.5"
25
+ "valaxy": "0.14.7"
26
26
  }
27
27
  }
package/types/index.d.ts CHANGED
@@ -5,11 +5,15 @@ export namespace YunTheme {
5
5
  export type Sidebar = any
6
6
 
7
7
  export type Banner = {
8
+ /**
9
+ * 是否启用
10
+ */
8
11
  enable: boolean
9
12
  /**
10
- * 标题
13
+ * @en Banner title
14
+ * @zh 标题,默认每个字分割,你也可以通过数组的方式来自定义分割,如 ['Hello', 'World']
11
15
  */
12
- title: string
16
+ title: string | string[]
13
17
 
14
18
  /**
15
19
  * 首页下方的动态云
@@ -21,6 +25,13 @@ export namespace YunTheme {
21
25
  }
22
26
  }
23
27
 
28
+ export interface Page {
29
+ name: string
30
+ url: string
31
+ icon: string
32
+ color: string
33
+ }
34
+
24
35
  /**
25
36
  * Theme Config
26
37
  */
@@ -31,9 +42,14 @@ export interface ThemeConfig {
31
42
  */
32
43
  outlineTitle: string
33
44
 
45
+ /**
46
+ * @zh 配色
47
+ */
34
48
  colors: {
35
49
  /**
36
- * primary color
50
+ * @en primary color
51
+ *
52
+ * @zh 主题色
37
53
  * @default '#0078E7'
38
54
  */
39
55
  primary: string
@@ -44,16 +60,37 @@ export interface ThemeConfig {
44
60
  */
45
61
  banner: YunTheme.Banner
46
62
 
63
+ /**
64
+ * @en Background image
65
+ * @zh 背景图
66
+ */
47
67
  bg_image: {
68
+ /**
69
+ * @en Enable background image
70
+ */
48
71
  enable: boolean
72
+ /**
73
+ * @en Image url
74
+ */
49
75
  url: string
76
+ /**
77
+ * @en Image url when dark mode
78
+ */
50
79
  dark?: string
80
+ /**
81
+ * @en Image opacity
82
+ */
51
83
  opacity?: number
52
84
  }
53
85
 
54
86
  /**
87
+ * @en
55
88
  * say something
56
- * https://say.elpsy.cn
89
+ *
90
+ * @zh 说点什么
91
+ * - 自定义 API 链接,如 https://el-bot-api.elpsy.cn/api/words/young
92
+ * 你可以通过在 public 下新建 json 的方式来使用, 如 public/young.json
93
+ * ["Hello, World!", "Bye, World!"]
57
94
  */
58
95
  say: {
59
96
  enable: boolean
@@ -72,12 +109,11 @@ export interface ThemeConfig {
72
109
  content: string
73
110
  }
74
111
 
75
- pages: {
76
- name: string
77
- url: string
78
- icon: string
79
- color: string
80
- }[]
112
+ /**
113
+ * @en - Pages
114
+ * @zh - 页面,显示在社交导航栏下方
115
+ */
116
+ pages: Page[]
81
117
 
82
118
  sidebar: YunTheme.Sidebar
83
119
 
@@ -126,7 +162,8 @@ export interface ThemeConfig {
126
162
  }>
127
163
 
128
164
  /**
129
- * post card types
165
+ * @en Custom Post Card Types
166
+ * @zh 自定义文章卡片类型
130
167
  */
131
168
  types: Record<string, {
132
169
  color: string
@@ -134,9 +171,13 @@ export interface ThemeConfig {
134
171
  }>
135
172
 
136
173
  /**
137
- * 菜单栏
174
+ * @en Menu Bar
175
+ * @zh 菜单栏
138
176
  */
139
177
  menu: {
178
+ /**
179
+ * @zh 最右侧的导航图标
180
+ */
140
181
  custom: {
141
182
  title: string
142
183
  url: string
@@ -1,25 +0,0 @@
1
- <script lang="ts" setup>
2
- import { useRouter } from 'vue-router'
3
- import { useI18n } from 'vue-i18n'
4
-
5
- const router = useRouter()
6
- const { t } = useI18n()
7
- </script>
8
-
9
- <template>
10
- <Layout>
11
- <template #content>
12
- <div text="center">
13
- <div text-4xl>
14
- <div i-ri-alarm-warning-line inline-block />
15
- </div>
16
- <router-view />
17
- <div>
18
- <button btn text-sm m="3 t8" @click="router.back()">
19
- {{ t('button.back') }}
20
- </button>
21
- </div>
22
- </div>
23
- </template>
24
- </Layout>
25
- </template>