valaxy-theme-yun 0.14.14 → 0.14.15
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/components/YunLinks.vue +2 -2
- package/components/YunPostCard.vue +3 -3
- package/components/YunPostCategories.vue +5 -3
- package/components/YunPostList.vue +0 -4
- package/components/YunPostTags.vue +1 -1
- package/package.json +2 -2
- package/styles/layout/post.scss +5 -0
- package/utils/index.ts +8 -2
package/components/YunLinks.vue
CHANGED
@@ -37,7 +37,7 @@ const { data } = useRandomData(props.links, props.random)
|
|
37
37
|
</div>
|
38
38
|
</template>
|
39
39
|
|
40
|
-
<stye lang="scss">
|
40
|
+
<stye lang="scss" scoped>
|
41
41
|
.link-item {
|
42
42
|
display: inline-flex;
|
43
43
|
}
|
@@ -53,7 +53,7 @@ const { data } = useRandomData(props.links, props.random)
|
|
53
53
|
}
|
54
54
|
|
55
55
|
.link-url {
|
56
|
-
--smc-
|
56
|
+
--smc-link-color: var(--primary-color);
|
57
57
|
|
58
58
|
display: inline-flex;
|
59
59
|
text-align: center;
|
@@ -57,11 +57,11 @@ const { icon, styles } = usePostProperty(props.post.type)
|
|
57
57
|
|
58
58
|
<!-- always show -->
|
59
59
|
<div w="full" class="yun-card-actions flex justify-between" border="t" text="sm">
|
60
|
-
<div class="inline-flex">
|
61
|
-
<YunPostCategories m="l-
|
60
|
+
<div class="post-categories inline-flex" flex="wrap 1">
|
61
|
+
<YunPostCategories m="l-1" :categories="post.categories" />
|
62
62
|
</div>
|
63
63
|
|
64
|
-
<div class="post-tags inline-flex" m="
|
64
|
+
<div class="post-tags inline-flex" flex="wrap 1" justify="end" m="1">
|
65
65
|
<template v-if="post.tags">
|
66
66
|
<YunPostTags :tags="post.tags" />
|
67
67
|
</template>
|
@@ -12,9 +12,11 @@ defineProps<{
|
|
12
12
|
path: '/categories/',
|
13
13
|
query: { category: Array.isArray(categories) ? categories[categories.length - 1] : categories },
|
14
14
|
}"
|
15
|
-
class="post-
|
15
|
+
class="post-category inline-flex-center"
|
16
16
|
>
|
17
|
-
<div m="x-1" i-ri-folder-2-line />
|
18
|
-
|
17
|
+
<div m="x-1" inline-flex i-ri-folder-2-line />
|
18
|
+
<span>
|
19
|
+
{{ Array.isArray(categories) ? categories.join(' > ') : categories }}
|
20
|
+
</span>
|
19
21
|
</router-link>
|
20
22
|
</template>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"version": "0.14.
|
3
|
+
"version": "0.14.15",
|
4
4
|
"author": {
|
5
5
|
"email": "me@yunyoujun.cn",
|
6
6
|
"name": "YunYouJun",
|
@@ -22,6 +22,6 @@
|
|
22
22
|
"valaxy-addon-waline": "0.1.0"
|
23
23
|
},
|
24
24
|
"devDependencies": {
|
25
|
-
"valaxy": "0.14.
|
25
|
+
"valaxy": "0.14.15"
|
26
26
|
}
|
27
27
|
}
|
package/styles/layout/post.scss
CHANGED
package/utils/index.ts
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
export const anonymousImage = 'https://cdn.yunyoujun.cn/img/avatar/none.jpg'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
/**
|
4
|
+
* set default img
|
5
|
+
* @param e
|
6
|
+
*/
|
7
|
+
export const onImgError = (e: Event, defaultImg = anonymousImage) => {
|
8
|
+
const targetEl = e.target as HTMLImageElement
|
9
|
+
targetEl.setAttribute('data-src', targetEl.src)
|
10
|
+
targetEl.src = defaultImg
|
5
11
|
}
|