valaxy-theme-yun 0.15.6 → 0.15.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.
@@ -37,7 +37,7 @@ defineProps<{
37
37
  height: 96%;
38
38
  border: 0.25rem solid white;
39
39
  background-color: #666;
40
- box-shadow: 0 5px 10px rgba(#000000, 0.3);
40
+ box-shadow: 0 5px 10px rgba(#000, 0.3);
41
41
  transform: rotate(-3deg);
42
42
  }
43
43
 
@@ -45,7 +45,7 @@ defineProps<{
45
45
  vertical-align: bottom;
46
46
  display: inline-flex;
47
47
  border: 0.25rem solid white;
48
- box-shadow: 0 8px 10px rgba(#000000, 0.3);
48
+ box-shadow: 0 8px 10px rgba(#000, 0.3);
49
49
  padding: 0;
50
50
  transform: rotate(2deg);
51
51
  width: 100%;
@@ -51,9 +51,7 @@ const app = useAppStore()
51
51
 
52
52
  // need fixed width
53
53
  width: var(--va-sidebar-width, 300px);
54
-
55
54
  transform: translateX(100%);
56
-
57
55
  transition: box-shadow var(--va-transition-duration),
58
56
  background-color var(--va-transition-duration), opacity 0.25s,
59
57
  transform var(--va-transition-duration) cubic-bezier(0.19, 1, 0.22, 1);
@@ -33,9 +33,9 @@ const strokeOffset = computed(() => {
33
33
  z-index: var(--yun-z-go-up-btn);
34
34
  opacity: 0;
35
35
  pointer-events: none;
36
-
37
36
  color: var(--va-c-primary);
38
37
  transform: translateX(0) rotate(270deg);
38
+
39
39
  // override yun-icon-btn transition
40
40
  transition: transform var(--va-transition-duration), opacity var(--va-transition-duration-fast) !important;
41
41
 
@@ -37,14 +37,14 @@ if (typeof themeConfig.value.bg_image.url !== 'undefined') {
37
37
  width: 100%;
38
38
  height: 100%;
39
39
  z-index: -1;
40
-
41
40
  background-image: var(--yun-bg-img);
42
41
  background-size: cover;
43
42
  background-position: center;
44
43
  background-repeat: no-repeat;
44
+
45
45
  // avoid scroll flicker but not compatible with ios
46
46
  background-attachment: fixed;
47
- animation-name: bgFadeIn;
47
+ animation-name: bg-fade-in;
48
48
  animation-duration: 2s;
49
49
  opacity: var(--yun-bg-img-opacity, 1);
50
50
  }
@@ -56,7 +56,7 @@ if (typeof themeConfig.value.bg_image.url !== 'undefined') {
56
56
  }
57
57
  }
58
58
 
59
- @keyframes bgFadeIn {
59
+ @keyframes bg-fade-in {
60
60
  from {
61
61
  opacity: 0;
62
62
  }
@@ -1,8 +1,10 @@
1
1
  <script lang="ts" setup>
2
2
  import type { Categories } from 'valaxy'
3
- import { ref } from 'vue'
3
+ import { computed } from 'vue'
4
4
 
5
- const props = withDefaults(defineProps<{
5
+ import { useRoute } from 'vue-router'
6
+
7
+ withDefaults(defineProps<{
6
8
  categories: Categories
7
9
  /**
8
10
  * 当前层级
@@ -14,7 +16,11 @@ const props = withDefaults(defineProps<{
14
16
  collapsable: true,
15
17
  })
16
18
 
17
- const collapsable = ref(props.collapsable)
19
+ const route = useRoute()
20
+ const categoryList = computed(() => {
21
+ const c = route.query.category || ''
22
+ return Array.isArray(c) ? [c] : c.split('/')
23
+ })
18
24
  </script>
19
25
 
20
26
  <template>
@@ -23,7 +29,7 @@ const collapsable = ref(props.collapsable)
23
29
  :parent-key="category.name"
24
30
  :category="category"
25
31
  :level="level + 1"
26
- :collapsable="collapsable"
32
+ :collapsable="!categoryList.includes(category.name)"
27
33
  />
28
34
  </ul>
29
35
  </template>
@@ -45,6 +51,7 @@ const collapsable = ref(props.collapsable)
45
51
  color: var(--va-c-primary);
46
52
  }
47
53
  }
54
+
48
55
  .category-name {
49
56
  &:hover {
50
57
  color: var(--va-c-primary);
@@ -1,11 +1,11 @@
1
1
  <script lang="ts" setup>
2
- import { onMounted, ref } from 'vue'
2
+ import { computed, onMounted, ref } from 'vue'
3
3
  import type { Category, Post } from 'valaxy'
4
4
  import { isCategoryList, useInvisibleElement } from 'valaxy'
5
5
  import { useI18n } from 'vue-i18n'
6
- import { useRouter } from 'vue-router'
6
+ import { useRoute, useRouter } from 'vue-router'
7
7
 
8
- withDefaults(defineProps<{
8
+ const props = withDefaults(defineProps<{
9
9
  parentKey: string
10
10
  // to eliminate the warning
11
11
  category: Category
@@ -20,8 +20,13 @@ withDefaults(defineProps<{
20
20
  })
21
21
 
22
22
  const router = useRouter()
23
+ const route = useRoute()
24
+ const categoryList = computed(() => {
25
+ const c = (route.query.category as string) || ''
26
+ return Array.isArray(c) ? [c] : c.split('/')
27
+ })
23
28
 
24
- const collapse = ref(true)
29
+ const collapse = ref(props.collapsable)
25
30
  const { t } = useI18n()
26
31
 
27
32
  /**
@@ -60,7 +65,8 @@ onMounted(() => {
60
65
  <li class="category-list-item inline-flex items-center cursor-pointer">
61
66
  <span class="folder-action inline-flex" @click="collapse = !collapse">
62
67
  <div v-if="collapse" i-ri-folder-add-line />
63
- <div v-else style="color:var(--va-c-primary)" i-ri-folder-reduce-line /></span>
68
+ <div v-else style="color:var(--va-c-primary)" i-ri-folder-reduce-line />
69
+ </span>
64
70
  <span class="category-name" m="l-1" @click="jumpToDisplayCategory(parentKey)">
65
71
  {{ category.name === 'Uncategorized' ? t('category.uncategorized') : category.name }} [{{ category.total }}]
66
72
  </span>
@@ -73,6 +79,7 @@ onMounted(() => {
73
79
  <YunCategory
74
80
  :parent-key="parentKey ? `${parentKey}/${categoryItem.name}` : categoryItem.name"
75
81
  :category="categoryItem"
82
+ :collapsable="!categoryList.includes(categoryItem.name)"
76
83
  />
77
84
  </template>
78
85
 
@@ -31,26 +31,31 @@ const AsyncYunTwikoo = runtimeConfig.value.addons['valaxy-addon-twikoo']
31
31
  font-weight: 600;
32
32
  margin-bottom: 1rem;
33
33
  }
34
+
34
35
  h2 {
35
36
  font-size: 1.75rem;
36
37
  font-weight: 600;
37
38
  margin-bottom: 1rem;
38
39
  }
40
+
39
41
  h3 {
40
42
  font-size: 1.5rem;
41
43
  font-weight: 600;
42
44
  margin-bottom: 1rem;
43
45
  }
46
+
44
47
  h4 {
45
48
  font-size: 1.2rem;
46
49
  font-weight: 600;
47
50
  margin-bottom: 1rem;
48
51
  }
52
+
49
53
  h5 {
50
54
  font-size: 1rem;
51
55
  font-weight: 600;
52
56
  margin-bottom: 1rem;
53
57
  }
58
+
54
59
  h6 {
55
60
  font-size: 0.875rem;
56
61
  font-weight: 600;
@@ -127,15 +127,13 @@ onClickOutside(searchInputRef, () => {
127
127
  left: 0;
128
128
  width: 100%;
129
129
  height: 100%;
130
-
131
130
  backdrop-filter: blur(30px);
131
+ /* stylelint-disable-next-line property-no-vendor-prefix */
132
132
  -webkit-backdrop-filter: blur(30px);
133
-
134
133
  text-align: center;
135
134
  margin: 0;
136
135
  z-index: var(--yun-z-search-popup);
137
136
  transition: 0.6s;
138
-
139
137
  background-color: var(--va-c-bg-opacity);
140
138
  }
141
139
 
@@ -177,7 +175,6 @@ onClickOutside(searchInputRef, () => {
177
175
  .yun-fuse-result-item {
178
176
  // padding: 0.5rem;
179
177
  cursor: pointer;
180
-
181
178
  border-top: 1px dashed #ccc;
182
179
  }
183
180
  }
@@ -7,19 +7,15 @@
7
7
  <style lang="scss">
8
8
  .go-down {
9
9
  cursor: pointer;
10
-
11
10
  display: inline-flex;
12
11
  justify-content: center;
13
12
  align-items: center;
14
-
15
13
  position: absolute;
16
14
  bottom: 1rem;
17
15
  z-index: var(--yun-z-go-down);
18
16
  animation: float 2s ease-in-out infinite;
19
-
20
17
  font-size: 2.5rem;
21
18
  color: var(--va-c-primary);
22
-
23
19
  transition: color var(--va-transition-duration);
24
20
 
25
21
  &:hover {
@@ -21,17 +21,14 @@
21
21
  @keyframes rotateplane {
22
22
  0% {
23
23
  transform: perspective(120px) rotateX(0deg) rotateY(0deg);
24
- -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg);
25
24
  }
26
25
 
27
26
  50% {
28
- transform: perspective(120px) rotateX(-180deg) rotateY(0deg);
29
- -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
27
+ transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
30
28
  }
31
29
 
32
30
  100% {
33
31
  transform: perspective(120px) rotateX(-180deg) rotateY(-180deg);
34
- -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-180deg);
35
32
  }
36
33
  }
37
34
  </style>
@@ -15,7 +15,6 @@ defineProps<{
15
15
  .yun-notice {
16
16
  border: 1px solid var(--va-c-text);
17
17
  width: calc(100% - 2rem);
18
-
19
18
  display: flex;
20
19
  flex-direction: column;
21
20
  justify-content: center;
@@ -62,7 +62,7 @@ const router = useRouter()
62
62
  height: 96px;
63
63
  width: 96px;
64
64
  max-width: 100%;
65
- margin: 0px;
65
+ margin: 0;
66
66
  padding: 4px;
67
67
  background-color: white;
68
68
  box-shadow: 0 0 10px rgba(black, 0.2);
@@ -84,7 +84,6 @@ const router = useRouter()
84
84
  border-radius: 50%;
85
85
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
86
86
  background-color: var(--va-c-bg-light);
87
-
88
87
  border: 1px solid rgba(255, 255, 255, 0.1);
89
88
  }
90
89
 
@@ -9,8 +9,8 @@ defineProps<{
9
9
  <template>
10
10
  <router-link
11
11
  :to="{
12
- path: '/categories/',
13
- query: { category: Array.isArray(categories) ? categories[categories.length - 1] : categories },
12
+ path: '/categories',
13
+ query: { category: Array.isArray(categories) ? categories.join('/') : categories },
14
14
  }"
15
15
  class="transition post-category inline-flex-center text-xs border-$va-c-divider hover:(text-blue-500 border-blue-500)"
16
16
  px-2 h="7"
@@ -33,12 +33,9 @@ const [prev, next] = usePrevNext()
33
33
  display: inline-flex;
34
34
  justify-content: center;
35
35
  align-items: center;
36
-
37
36
  color: var(--va-c-primary);
38
-
39
37
  outline: none;
40
38
  font-size: 1.5rem;
41
-
42
39
  font-weight: bold;
43
40
  text-transform: uppercase;
44
41
  height: 3rem;
@@ -61,9 +58,7 @@ const [prev, next] = usePrevNext()
61
58
  &-prev, &-next {
62
59
  display: inline-flex;
63
60
  align-items: center;
64
-
65
61
  height: 3rem;
66
-
67
62
  font-size: 1rem;
68
63
 
69
64
  .title {
@@ -31,7 +31,6 @@ function onClick() {
31
31
  position: fixed;
32
32
  top: 0.6rem;
33
33
  right: 0.8rem;
34
-
35
34
  color: var(--va-c-primary);
36
35
  z-index: var(--yun-z-search-btn);
37
36
  }
@@ -56,10 +56,8 @@ const showOverview = ref(false)
56
56
  .sidebar {
57
57
  width: calc(100vw - 64px);
58
58
  max-width: var(--va-sidebar-width);
59
-
60
59
  background-image: var(--yun-sidebar-bg-img);
61
60
  background-position: bottom 1rem center;
62
-
63
61
  transform: translateX(-100%);
64
62
  transition: box-shadow var(--va-transition-duration),
65
63
  background-color var(--va-transition-duration), opacity 0.25s,
@@ -77,7 +75,6 @@ const showOverview = ref(false)
77
75
 
78
76
  &.active {
79
77
  border: 1px solid var(--va-c-primary);
80
-
81
78
  color: white;
82
79
  background-color: var(--va-c-primary);
83
80
  }
@@ -55,9 +55,7 @@ const tags = useTags()
55
55
  padding: 0 15px;
56
56
  align-items: center;
57
57
  border-left: 1px solid get-css-var('c-gray');
58
-
59
58
  flex-direction: column;
60
-
61
59
  color: var(--va-c-text);
62
60
 
63
61
  &:first-child, &:last-child {
@@ -42,6 +42,7 @@ const sponsorBtnTitle = computed(() => {
42
42
 
43
43
  <style lang="scss">
44
44
  @use "valaxy/client/styles/mixins/index.scss" as *;
45
+
45
46
  .sponsor-button {
46
47
  background-color: rgba(255, 255, 255, 0.1);
47
48
 
@@ -49,6 +50,7 @@ const sponsorBtnTitle = computed(() => {
49
50
  transform: scale(1.1);
50
51
  transition: transform var(--va-transition-duration) ease-in-out;
51
52
  }
53
+
52
54
  &:hover {
53
55
  background-color: rgba(255, 255, 255, 0.9);
54
56
 
@@ -67,7 +69,6 @@ const sponsorBtnTitle = computed(() => {
67
69
  .qrcode-container {
68
70
  overflow: hidden;
69
71
  height: 0;
70
-
71
72
  transition: height var(--va-transition-duration) ease-in-out;
72
73
 
73
74
  &.show {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.15.6",
3
+ "version": "0.15.7",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -19,12 +19,12 @@
19
19
  "dependencies": {
20
20
  "@explosions/fireworks": "^0.0.2",
21
21
  "@iconify-json/ant-design": "^1.1.10",
22
- "@iconify-json/simple-icons": "^1.1.73",
22
+ "@iconify-json/simple-icons": "^1.1.74",
23
23
  "animejs": "^3.2.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/animejs": "^3.1.8",
27
- "valaxy": "0.15.6",
27
+ "valaxy": "0.15.7",
28
28
  "valaxy-addon-waline": "0.1.1"
29
29
  }
30
30
  }
@@ -1,17 +1,13 @@
1
1
  .yun-icon-btn {
2
2
  background-color: transparent;
3
3
  cursor: pointer;
4
-
5
4
  display: inline-flex;
6
5
  align-items: center;
7
6
  justify-content: center;
8
-
9
7
  border: none;
10
8
  width: 3rem;
11
9
  height: 3rem;
12
-
13
10
  border-radius: 50%;
14
-
15
11
  transition: background-color var(--va-transition-duration);
16
12
 
17
13
  div {
@@ -11,6 +11,7 @@
11
11
  }
12
12
  }
13
13
 
14
+ /* stylelint-disable-next-line no-duplicate-selectors */
14
15
  .markdown-body {
15
16
  word-wrap: break-word;
16
17
 
@@ -26,6 +27,7 @@
26
27
 
27
28
  ul {
28
29
  list-style: initial;
30
+
29
31
  li > p {
30
32
  margin-bottom: 0;
31
33
  }
@@ -48,12 +50,10 @@
48
50
 
49
51
  // alone image
50
52
  figure {
51
-
52
53
  figcaption {
53
54
  text-align: center;
54
55
  font-size: 0.8rem;
55
56
  color: var(--va-c-text-2);
56
-
57
57
  margin-bottom: 1rem;
58
58
  }
59
59
  }
@@ -64,11 +64,10 @@
64
64
  border-top-width: 0;
65
65
  background-color: var(--va-c-text);
66
66
  }
67
- }
68
67
 
69
- .markdown-body {
68
+ // lang
70
69
  div[class*='language-'].line-numbers-mode {
71
- /*rtl:ignore*/
70
+ /* rtl:ignore */
72
71
  padding-left: 32px;
73
72
  }
74
73
 
@@ -76,10 +75,12 @@
76
75
  position: absolute;
77
76
  top: 0;
78
77
  bottom: 0;
79
- /*rtl:ignore*/
78
+
79
+ /* rtl:ignore */
80
80
  left: 0;
81
81
  z-index: 3;
82
- /*rtl:ignore*/
82
+
83
+ /* rtl:ignore */
83
84
  border-right: 1px solid var(--va-code-block-divider-color);
84
85
  padding-top: 20px;
85
86
  width: 32px;
@@ -92,9 +93,8 @@
92
93
  border-color 0.5s,
93
94
  color 0.5s;
94
95
  }
95
- }
96
96
 
97
- .markdown-body {
97
+ // table
98
98
  .table-container {
99
99
  table {
100
100
  thead {
@@ -1,3 +1,4 @@
1
+ /* stylelint-disable no-duplicate-selectors */
1
2
  @use "./vars" as *;
2
3
  @use "valaxy/client/styles/mixins/index.scss" as * with($namespace: "yun");
3
4
 
package/styles/index.scss CHANGED
@@ -1,6 +1,5 @@
1
1
  @use "./layout" as *;
2
2
  @use "./common/button.scss" as *;
3
-
4
3
  @forward "star-markdown-css/src/scss/theme/yun.scss" with (
5
4
  $colors: (
6
5
  "primary": $c-primary,
@@ -6,7 +6,8 @@
6
6
  }
7
7
 
8
8
  .post-card-image {
9
- @extend .post-card;
9
+ position: relative;
10
+ max-width: var(--yun-post-card-max-width);
10
11
 
11
12
  @include mobile {
12
13
  .post-card-info {
@@ -71,12 +72,10 @@
71
72
  padding: 0.5rem 1rem;
72
73
  color: white;
73
74
  font-size: 14px;
74
-
75
75
  margin-top: -0.2rem;
76
-
77
76
  transition: box-shadow var(--va-transition-duration);
78
77
 
79
- &:before {
78
+ &::before {
80
79
  content: none;
81
80
  }
82
81
  }
package/styles/vars.scss CHANGED
@@ -4,15 +4,12 @@
4
4
  $light: () !default;
5
5
  $light: map.merge(
6
6
  (
7
- "bg-img":
8
- url("../assets/images/light/bg-img.jpg"),
7
+ "bg-img": url("../assets/images/light/bg-img.jpg"),
9
8
  "sidebar-bg-color": var(--va-c-bg-light),
10
- "sidebar-bg-img":
11
- url("../assets/images/light/sidebar-bg-img.webp"),
9
+ "sidebar-bg-img": url("../assets/images/light/sidebar-bg-img.webp"),
12
10
  ),
13
11
  $light
14
12
  );
15
-
16
13
  $dark: () !default;
17
14
  $dark: map.merge(
18
15
  (
@@ -31,7 +28,6 @@ $common: map.merge(
31
28
  ),
32
29
  $common
33
30
  );
34
-
35
31
  $z-index: () !default;
36
32
  $z-index: map.merge(
37
33
  (
@@ -76,7 +76,6 @@ $char-animation-duration: 0.4s;
76
76
  font-size: var(--banner-char-size, 1rem);
77
77
  background-color: var(--banner-char-bg-color);
78
78
  line-height: 1;
79
-
80
79
  transition: all 0.3s ease-in-out;
81
80
  transition-delay: 0s;
82
81
 
@@ -94,8 +93,9 @@ $char-animation-duration: 0.4s;
94
93
 
95
94
  &-left {
96
95
  border-left: 1px solid var(--banner-line-color);
97
- border-right: 0px solid rgba(var(--va-c-primary-rgb), 0.1);
98
- border-right-width: 0px;
96
+ /* stylelint-disable-next-line color-function-notation */
97
+ border-right: 0 solid rgba(var(--va-c-primary-rgb), 0.1);
98
+ border-right-width: 0;
99
99
  animation-name: char-move-left;
100
100
  animation-duration: $char-animation-duration;
101
101
  animation-delay: var(--line-animation-duration);
@@ -104,9 +104,10 @@ $char-animation-duration: 0.4s;
104
104
  }
105
105
 
106
106
  &-right {
107
- border-left: 0px solid rgba(var(--va-c-primary-rgb), 0.1);
107
+ /* stylelint-disable-next-line color-function-notation */
108
+ border-left: 0 solid rgba(var(--va-c-primary-rgb), 0.1);
108
109
  border-right: 1px solid var(--banner-line-color);
109
- border-left-width: 0px;
110
+ border-left-width: 0;
110
111
  animation-name: char-move-right;
111
112
  animation-duration: $char-animation-duration;
112
113
  animation-delay: var(--line-animation-duration);
@@ -138,6 +139,9 @@ $char-animation-duration: 0.4s;
138
139
 
139
140
  to {
140
141
  opacity: 1;
141
- border-left-width: var(--banner-empty-border-size, var(--banner-char-size));
142
+ border-left-width: var(
143
+ --banner-empty-border-size,
144
+ var(--banner-char-size)
145
+ );
142
146
  }
143
147
  }
package/unocss.config.ts CHANGED
@@ -27,6 +27,7 @@ export default defineConfig({
27
27
  serif: 'DM Serif Display',
28
28
  mono: 'DM Mono',
29
29
  },
30
+ provider: 'fontshare',
30
31
  }),
31
32
  ],
32
33
  })