valaxy-theme-yun 0.25.3 → 0.25.5
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/YunCard.vue +1 -1
- package/components/YunPostCard.vue +77 -62
- package/components/YunPostList.vue +1 -1
- package/components/menu/YunNavMenuTitle.vue +2 -1
- package/components/project/YunProjects.vue +6 -4
- package/components/ui/YunExcerptBottomGradient.vue +1 -1
- package/package.json +3 -3
- package/styles/common/markdown.scss +40 -2
- package/unocss.config.ts +1 -1
package/components/YunCard.vue
CHANGED
@@ -24,76 +24,67 @@ const postTitleClass = computed(() => {
|
|
24
24
|
</script>
|
25
25
|
|
26
26
|
<template>
|
27
|
-
<
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
:src="post.cover"
|
37
|
-
:alt="t('post.cover')"
|
38
|
-
width="320" height="180"
|
39
|
-
w="40%" h="54"
|
40
|
-
class="cover object-cover object-center md:shadow"
|
41
|
-
loading="lazy"
|
42
|
-
>
|
43
|
-
|
44
|
-
<div class="flex flex-col items-center relative px-6" :class="post.cover && 'h-54'" w="full">
|
45
|
-
<AppLink
|
46
|
-
class="post-title-link cursor-pointer"
|
47
|
-
:to="post.path || ''"
|
48
|
-
m="t-3"
|
49
|
-
:class="postTitleClass"
|
27
|
+
<RouterLink class="post-card-link flex-center w-full" :to="post.path || ''">
|
28
|
+
<YunCard
|
29
|
+
class="w-full hover:scale-102 hover:z-1" mx="4" :class="post.cover ? 'post-card-image' : 'post-card'"
|
30
|
+
overflow="hidden" :style="styles"
|
31
|
+
>
|
32
|
+
<div class="flex flex-1 of-hidden justify-start items-start post-card-info" w="full">
|
33
|
+
<img
|
34
|
+
v-if="post.cover" :src="post.cover" :alt="t('post.cover')" width="320" height="180" w="40%" h="54"
|
35
|
+
class="cover object-cover object-center md:shadow" loading="lazy"
|
50
36
|
>
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
37
|
+
|
38
|
+
<div class="flex flex-col items-center relative" :class="post.cover && 'h-54'" w="full">
|
39
|
+
<AppLink class="post-title-link cursor-pointer" :to="post.path || ''" m="t-3" :class="postTitleClass">
|
40
|
+
<div class="flex-center title text-2xl" text="center" font="serif black">
|
41
|
+
<div v-if="post.type" class="inline-flex" m="r-1" :class="icon" />
|
42
|
+
<span>{{ $tO(post.title) }}</span>
|
43
|
+
</div>
|
44
|
+
</AppLink>
|
45
|
+
|
46
|
+
<YunPostMeta :frontmatter="post" />
|
47
|
+
|
48
|
+
<div flex="~ grow col" w="full" justify="center" items="center">
|
49
|
+
<div v-if="post.excerpt_type === 'text'" py="1" />
|
50
|
+
<template v-if="post.excerpt">
|
51
|
+
<div
|
52
|
+
v-if="post.excerpt_type === 'html'"
|
53
|
+
class="markdown-body" op="90" text="left" w="full" p="x-8 y-2"
|
54
|
+
>
|
55
|
+
<ValaxyDynamicComponent :template-str="post.excerpt" />
|
56
|
+
</div>
|
57
|
+
<div
|
58
|
+
v-else
|
59
|
+
class="markdown-body" op="90" text="left" w="full" p="x-8 y-2"
|
60
|
+
v-html="post.excerpt"
|
61
|
+
/>
|
62
|
+
</template>
|
63
|
+
<div v-else m="b-5" />
|
57
64
|
</div>
|
58
|
-
|
65
|
+
<!-- <div m="b-5" /> -->
|
59
66
|
|
60
|
-
|
67
|
+
<YunExcerptBottomGradient v-if="post.excerpt" />
|
61
68
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
69
|
+
<a
|
70
|
+
v-if="post.url" :href="post.url" class="post-link-btn shadow hover:shadow-md z-2" rounded target="_blank"
|
71
|
+
m="b-4"
|
72
|
+
>
|
73
|
+
{{ t('post.view_link') }}
|
74
|
+
</a>
|
66
75
|
</div>
|
67
|
-
<!-- <div m="b-5" /> -->
|
68
|
-
|
69
|
-
<YunExcerptBottomGradient v-if="post.excerpt" />
|
70
|
-
|
71
|
-
<a
|
72
|
-
v-if="post.url"
|
73
|
-
:href="post.url"
|
74
|
-
class="post-link-btn shadow hover:shadow-md z-2"
|
75
|
-
rounded
|
76
|
-
target="_blank"
|
77
|
-
m="b-4"
|
78
|
-
>
|
79
|
-
{{ t('post.view_link') }}
|
80
|
-
</a>
|
81
76
|
</div>
|
82
|
-
</div>
|
83
77
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
>
|
90
|
-
<div class="post-categories inline-flex" flex="wrap 1" items="center">
|
91
|
-
<YunPostCategories m="l-1" :categories="post.categories" />
|
92
|
-
</div>
|
78
|
+
<!-- always show -->
|
79
|
+
<div w="full" class="yun-card-actions flex justify-between p-4" min-h="10" text="sm">
|
80
|
+
<div class="post-categories inline-flex" flex="wrap 1" items="center">
|
81
|
+
<YunPostCategories m="l-1" :categories="post.categories" />
|
82
|
+
</div>
|
93
83
|
|
94
|
-
|
95
|
-
|
96
|
-
|
84
|
+
<YunPostTags v-if="post.tags" m="1" :tags="post.tags" />
|
85
|
+
</div>
|
86
|
+
</YunCard>
|
87
|
+
</RouterLink>
|
97
88
|
</template>
|
98
89
|
|
99
90
|
<style lang="scss">
|
@@ -104,6 +95,30 @@ const postTitleClass = computed(() => {
|
|
104
95
|
// animation-range: entry, exit;
|
105
96
|
}
|
106
97
|
|
98
|
+
.post-card-link {
|
99
|
+
text-decoration: none;
|
100
|
+
color: inherit;
|
101
|
+
// max-w-$yun-post-card-max-width
|
102
|
+
max-width: calc(var(--yun-post-card-max-width) + 2rem);
|
103
|
+
|
104
|
+
&:hover {
|
105
|
+
text-decoration: none;
|
106
|
+
color: inherit;
|
107
|
+
}
|
108
|
+
|
109
|
+
&:visited {
|
110
|
+
color: inherit;
|
111
|
+
}
|
112
|
+
|
113
|
+
&:focus {
|
114
|
+
outline: none;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
.post-card-link :hover {
|
119
|
+
cursor: var(--cursor-pointer), pointer;
|
120
|
+
}
|
121
|
+
|
107
122
|
@keyframes card-appear {
|
108
123
|
0% {
|
109
124
|
opacity: 0;
|
@@ -28,7 +28,7 @@ const displayedPosts = computed(() =>
|
|
28
28
|
</script>
|
29
29
|
|
30
30
|
<template>
|
31
|
-
<div flex="~ col" class="yun-post-list gap-4" w="full" p="x-4 lt-sm:0">
|
31
|
+
<div flex="~ col" class="yun-post-list gap-4 items-center" w="full" p="x-4 lt-sm:0">
|
32
32
|
<template v-if="!displayedPosts.length">
|
33
33
|
<div py2 op50 text-center>
|
34
34
|
博主还什么都没写哦~
|
@@ -13,11 +13,13 @@ const curCategory = ref('all')
|
|
13
13
|
|
14
14
|
<template>
|
15
15
|
<div flex="~ col center">
|
16
|
-
<
|
17
|
-
|
18
|
-
|
16
|
+
<YunPageHeader
|
17
|
+
:title="fm.title || t('title.projects')"
|
18
|
+
:icon="fm.icon"
|
19
|
+
:page-title-class="fm.pageTitleClass"
|
20
|
+
/>
|
19
21
|
|
20
|
-
<div flex="~ wrap" justify="center">
|
22
|
+
<div class="mt-3" flex="~ wrap" justify="center">
|
21
23
|
<YunProjectToggleButton
|
22
24
|
:active="curCategory === 'all'"
|
23
25
|
@click="curCategory = 'all'"
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.25.
|
4
|
+
"version": "0.25.5",
|
5
5
|
"author": {
|
6
6
|
"email": "me@yunyoujun.cn",
|
7
7
|
"name": "YunYouJun",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"@ctrl/tinycolor": "^4.1.0",
|
25
25
|
"@explosions/fireworks": "^0.2.0",
|
26
26
|
"@iconify-json/ant-design": "^1.2.5",
|
27
|
-
"@iconify-json/simple-icons": "^1.2.
|
27
|
+
"@iconify-json/simple-icons": "^1.2.43",
|
28
28
|
"@vueuse/motion": "^3.0.3",
|
29
29
|
"animejs": "^4.0.2",
|
30
30
|
"gsap": "^3.13.0",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
34
|
"@types/animejs": "^3.1.13",
|
35
|
-
"valaxy": "0.25.
|
35
|
+
"valaxy": "0.25.5",
|
36
36
|
"valaxy-addon-waline": "0.2.1"
|
37
37
|
},
|
38
38
|
"scripts": {
|
@@ -32,13 +32,13 @@
|
|
32
32
|
ul {
|
33
33
|
list-style: initial;
|
34
34
|
|
35
|
-
li
|
35
|
+
li>p {
|
36
36
|
margin-bottom: 0;
|
37
37
|
}
|
38
38
|
}
|
39
39
|
|
40
40
|
ol {
|
41
|
-
>
|
41
|
+
>li {
|
42
42
|
list-style: decimal;
|
43
43
|
}
|
44
44
|
}
|
@@ -122,3 +122,41 @@
|
|
122
122
|
}
|
123
123
|
}
|
124
124
|
}
|
125
|
+
|
126
|
+
@media (width <=767.9px) {
|
127
|
+
.markdown-body {
|
128
|
+
padding: 0.5rem;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
@include mobile {
|
133
|
+
.markdown-body {
|
134
|
+
div[class*="language-"] {
|
135
|
+
position: relative;
|
136
|
+
// left: 50%;
|
137
|
+
// right: 50%;
|
138
|
+
// margin-left: -50vw !important;
|
139
|
+
// margin-right: -50vw !important;
|
140
|
+
// width: 100vw !important;
|
141
|
+
margin-top: 16px;
|
142
|
+
margin-bottom: 0;
|
143
|
+
margin-left: -24px;
|
144
|
+
margin-right: -24px;
|
145
|
+
height: auto;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
@media (width <=639.9px) {
|
151
|
+
|
152
|
+
.markdown-body .vp-code-group .tabs,
|
153
|
+
.markdown-body .vp-code-group div[class*="language-"] {
|
154
|
+
position: relative;
|
155
|
+
left: 50%;
|
156
|
+
right: 50%;
|
157
|
+
margin-left: -50vw !important;
|
158
|
+
margin-right: -50vw !important;
|
159
|
+
width: 100vw !important;
|
160
|
+
height: auto;
|
161
|
+
}
|
162
|
+
}
|
package/unocss.config.ts
CHANGED