valaxy-theme-yun 0.25.3 → 0.25.4

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.
@@ -4,7 +4,7 @@ defineProps<{ cover?: string }>()
4
4
 
5
5
  <template>
6
6
  <div
7
- class="yun-card flex-center rounded" flex="col"
7
+ class="yun-card flex-center rounded-2" flex="col"
8
8
  min-h="100px"
9
9
  bg="$va-c-bg-light"
10
10
  >
@@ -24,76 +24,67 @@ const postTitleClass = computed(() => {
24
24
  </script>
25
25
 
26
26
  <template>
27
- <YunCard
28
- class="w-full"
29
- m="auto"
30
- :class="post.cover ? 'post-card-image' : 'post-card'"
31
- overflow="hidden" :style="styles"
32
- >
33
- <div class="flex flex-1 of-hidden justify-start items-start post-card-info" w="full">
34
- <img
35
- v-if="post.cover"
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
+ <a class="w-full flex-center post-card-link" :href="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
- <div
52
- class="flex-center title text-2xl"
53
- text="center" font="serif black"
54
- >
55
- <div v-if="post.type" class="inline-flex" m="r-1" :class="icon" />
56
- <span>{{ $tO(post.title) }}</span>
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
- </AppLink>
65
+ <!-- <div m="b-5" /> -->
59
66
 
60
- <YunPostMeta :frontmatter="post" />
67
+ <YunExcerptBottomGradient v-if="post.excerpt" />
61
68
 
62
- <div flex="~ grow col" w="full" justify="center" items="center">
63
- <div v-if="post.excerpt_type === 'text'" py="1" />
64
- <div v-if="post.excerpt" class="markdown-body" op="90" text="left" w="full" p="x-6 lt-sm:4 y-2" v-html="post.excerpt" />
65
- <div v-else m="b-5" />
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
- <!-- always show -->
85
- <div
86
- w="full" class="yun-card-actions flex justify-between px-6"
87
- min-h="10"
88
- text="sm"
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
- <YunPostTags v-if="post.tags" m="1" :tags="post.tags" />
95
- </div>
96
- </YunCard>
84
+ <YunPostTags v-if="post.tags" m="1" :tags="post.tags" />
85
+ </div>
86
+ </YunCard>
87
+ </a>
97
88
  </template>
98
89
 
99
90
  <style lang="scss">
@@ -104,6 +95,28 @@ 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
+
102
+ &:hover {
103
+ text-decoration: none;
104
+ color: inherit;
105
+ }
106
+
107
+ &:visited {
108
+ color: inherit;
109
+ }
110
+
111
+ &:focus {
112
+ outline: none;
113
+ }
114
+ }
115
+
116
+ .post-card-link :hover {
117
+ cursor: var(--cursor-pointer), pointer;
118
+ }
119
+
107
120
  @keyframes card-appear {
108
121
  0% {
109
122
  opacity: 0;
@@ -60,8 +60,9 @@ function goToLink() {
60
60
  >
61
61
  <div class="gap-1" flex="~">
62
62
  <div
63
+ v-if="fm.icon"
63
64
  class="size-4"
64
- :class="fm.icon || 'i-ri-article-line'"
65
+ :class="fm.icon"
65
66
  />
66
67
  <span class="truncate"> {{ $tO(fm.title || '') }}</span>
67
68
  </div>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- w="full" h="10"
3
+ w="full" h="30%"
4
4
  class="absolute bottom-0 bg-gradient-to-t from-$va-c-bg-light to-transparent z-1"
5
5
  />
6
6
  </template>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
3
  "type": "module",
4
- "version": "0.25.3",
4
+ "version": "0.25.4",
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.42",
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.3",
35
+ "valaxy": "0.25.4",
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 > p {
35
+ li>p {
36
36
  margin-bottom: 0;
37
37
  }
38
38
  }
39
39
 
40
40
  ol {
41
- > li {
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
@@ -2,7 +2,7 @@ import { defineConfig } from 'unocss'
2
2
 
3
3
  export default defineConfig({
4
4
  shortcuts: [
5
- ['yun-card', 'transition yun-transition shadow hover:shadow-lg'],
5
+ ['yun-card', 'transition-all yun-transition shadow hover:shadow-2xl'],
6
6
  ],
7
7
  rules: [
8
8
  [