valaxy-theme-yun 0.28.1 → 0.28.2

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.
Files changed (38) hide show
  1. package/App.vue +3 -1
  2. package/README.md +3 -1
  3. package/components/YunAside.vue +0 -1
  4. package/components/YunDropdownMenu.vue +1 -0
  5. package/components/YunGoDown.vue +1 -1
  6. package/components/YunLocalSearch.vue +113 -0
  7. package/components/YunPostCard.vue +2 -1
  8. package/components/YunPostCollapse.vue +2 -2
  9. package/components/YunPostCollapseItem.vue +2 -2
  10. package/components/YunPostMeta.vue +1 -1
  11. package/components/YunPostNav.vue +2 -2
  12. package/components/YunSay.vue +1 -0
  13. package/components/YunSearchTrigger.vue +3 -1
  14. package/components/YunTooltip.vue +2 -1
  15. package/components/author/YunAuthorAvatar.vue +2 -2
  16. package/components/collection/YunCollectionCard.vue +0 -1
  17. package/components/collection/YunCollectionSidebar.vue +0 -2
  18. package/components/layout/YunLayoutLeft.vue +1 -1
  19. package/components/layout/YunLayoutWrapper.vue +1 -1
  20. package/components/menu/YunPostClassifyNavItem.vue +2 -1
  21. package/components/prologue/YunPrologueSquare.vue +2 -0
  22. package/components/site/YunFullscreenMenuList.vue +1 -1
  23. package/components/theme/nimbo/YunNimboNavMenu.vue +1 -1
  24. package/components/ui/YunGradientDivider.vue +4 -4
  25. package/composables/post.ts +24 -25
  26. package/docs/README.md +2 -0
  27. package/docs/en-US/README.md +3 -0
  28. package/docs/zh-CN/README.md +2 -0
  29. package/docs/zh-CN/config.md +2 -0
  30. package/package.json +2 -2
  31. package/styles/common/button.scss +2 -2
  32. package/styles/common/markdown.scss +7 -11
  33. package/styles/common/scrollbar.scss +5 -5
  34. package/styles/css-vars.scss +2 -5
  35. package/styles/global.scss +1 -1
  36. package/styles/layout/post.scss +1 -1
  37. package/styles/main.scss +1 -0
  38. package/styles/widgets/banner.scss +2 -2
package/App.vue CHANGED
@@ -7,6 +7,8 @@ import { useRoute } from 'vue-router'
7
7
  import { useThemeConfig } from './composables'
8
8
  import { useYunAppStore } from './stores'
9
9
 
10
+ const isDev = import.meta.env.DEV
11
+
10
12
  const appStore = useAppStore()
11
13
 
12
14
  // Use a safe default for SSR; real themeColor is applied after mount
@@ -60,7 +62,7 @@ onMounted(() => {
60
62
  <template>
61
63
  <TooltipProvider>
62
64
  <YunStratoApp v-if="yun.isStrato" />
63
- <ValaxyDebug />
65
+ <ValaxyDebug v-if="isDev" />
64
66
 
65
67
  <YunPageHeaderGradient />
66
68
  <YunNavMenu />
package/README.md CHANGED
@@ -8,7 +8,9 @@ Theme-Yun<sup><em>(vue)</em></sup>
8
8
 
9
9
  ## Usage
10
10
 
11
- See [Docs](./docs/README.md).
11
+ 📖 Full documentation: [valaxy.site/themes/yun](https://valaxy.site/themes/yun)
12
+
13
+ See also [local docs](./docs/README.md).
12
14
 
13
15
  ### Development
14
16
 
@@ -57,7 +57,6 @@ const asideEnabled = computed(() => fm.value.aside !== false)
57
57
  bottom: 0;
58
58
  z-index: var(--yun-z-aside);
59
59
  width: 0;
60
- max-height: 100vh;
61
60
  transform: translateX(100%);
62
61
  transition: all var(--va-transition-duration-fast) map.get($cubic-bezier, 'ease-in-out');
63
62
  max-height: calc(100vh - var(--yun-margin-top));
@@ -77,6 +77,7 @@ defineSlots<{
77
77
  opacity: 0;
78
78
  transform: translateY(-4px);
79
79
  }
80
+
80
81
  to {
81
82
  opacity: 1;
82
83
  transform: translateY(0);
@@ -24,7 +24,7 @@ import { goDown } from '../utils'
24
24
  transition: color var(--va-transition-duration);
25
25
 
26
26
  &:hover {
27
- color: rgba(var(--va-c-primary-rgb), 0.6);
27
+ color: rgb(var(--va-c-primary-rgb), 0.6);
28
28
  }
29
29
  }
30
30
 
@@ -0,0 +1,113 @@
1
+ <script lang="ts" setup>
2
+ import { isClient, useScrollLock } from '@vueuse/core'
3
+ import { nextTick, ref, watch } from 'vue'
4
+ import { useI18n } from 'vue-i18n'
5
+
6
+ const props = defineProps<{
7
+ open: boolean
8
+ }>()
9
+ const emit = defineEmits(['close'])
10
+
11
+ const isLocked = useScrollLock(isClient ? document.documentElement : null)
12
+ const { t } = useI18n()
13
+
14
+ const searchInputRef = ref<HTMLInputElement>()
15
+
16
+ watch(() => props.open, (val) => {
17
+ if (val) {
18
+ nextTick(() => {
19
+ searchInputRef.value?.focus()
20
+ })
21
+ }
22
+ })
23
+ </script>
24
+
25
+ <template>
26
+ <Transition
27
+ name="fade"
28
+ @enter="isLocked = true"
29
+ @after-leave="isLocked = false"
30
+ >
31
+ <div
32
+ v-if="open"
33
+ class="yun-popup yun-search-popup yun-local-search flex-center pointer-events-auto" flex="col"
34
+ justify="start"
35
+ pt-12
36
+ >
37
+ <ValaxyLocalSearch :open="open" @close="emit('close')">
38
+ <template #default="{ query, results, loading, selectedIndex, updateQuery, navigate, onKeydown, getPageTitle, getSectionTitle }">
39
+ <div class="yun-search-input-container flex-center" w="full">
40
+ <input
41
+ ref="searchInputRef"
42
+ :value="query"
43
+ class="yun-search-input"
44
+ :placeholder="t('search.placeholder')"
45
+ @input="updateQuery(($event.target as HTMLInputElement).value)"
46
+ @keydown="onKeydown"
47
+ >
48
+ </div>
49
+ <div v-if="loading" class="flex-center" w="full" py="4">
50
+ {{ t('search.loading') }}
51
+ </div>
52
+ <div v-if="query" class="flex-center" w="full" py="4">
53
+ {{ t('search.hits', results.length || 0) }}
54
+ </div>
55
+ <div v-if="results.length > 0" overflow="auto" flex="~" w="full" class="justify-center">
56
+ <div class="yun-local-result-container max-w-3xl" flex="~ col" w="full">
57
+ <a
58
+ v-for="(result, index) in results" :key="result.id"
59
+ class="yun-local-result-item text-left p-2 cursor-pointer"
60
+ :class="{ 'yun-local-result-active': index === selectedIndex }"
61
+ href="javascript:void(0)"
62
+ @click="navigate(result)"
63
+ >
64
+ <div class="yun-local-result-titles" text="xs" font="light" opacity="60">
65
+ {{ getPageTitle(result.id) }}
66
+ <template v-if="result.titles.length > 0">
67
+ <span v-for="(title, i) in result.titles" :key="i">
68
+ &rsaquo; {{ title }}
69
+ </span>
70
+ </template>
71
+ </div>
72
+ <h3 font="medium">
73
+ {{ result.title }}
74
+ </h3>
75
+ <div class="flex justify-between op-50" text-xs mt="1" font="light">
76
+ <span>{{ getSectionTitle(result) }}</span>
77
+ <span flex="~ gap-1">
78
+ <span>Score:</span>
79
+ <div class="text-right w-8">{{ result.score.toFixed(1) }}</div>
80
+ </span>
81
+ </div>
82
+ </a>
83
+
84
+ <div class="flex op-30 justify-end text-xs p-4">
85
+ Search by MiniSearch
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </template>
90
+ </ValaxyLocalSearch>
91
+ </div>
92
+ </Transition>
93
+ </template>
94
+
95
+ <style lang="scss">
96
+ .yun-local-search {
97
+ .yun-local-result-item {
98
+ cursor: pointer;
99
+ border-top: 1px dashed #ccc;
100
+ color: var(--va-c-text);
101
+
102
+ &:hover,
103
+ &.yun-local-result-active {
104
+ color: var(--va-c-bg);
105
+ background-color: var(--va-c-text-dark);
106
+ }
107
+ }
108
+
109
+ .yun-local-result-titles {
110
+ margin-bottom: 0.25rem;
111
+ }
112
+ }
113
+ </style>
@@ -18,7 +18,7 @@ const postCollections = usePostCollections(computed(() => props.post.path || '')
18
18
 
19
19
  const gradientClasses = ref('bg-gradient-to-r gradient-text from-$va-c-primary to-$va-c-primary-lighter')
20
20
  const postTitleClass = computed(() => {
21
- if (color) {
21
+ if (color.value) {
22
22
  return ''
23
23
  }
24
24
  return props.post.postTitleClass || gradientClasses.value
@@ -127,6 +127,7 @@ function guardedNavigate(e: Event, navigate: () => void) {
127
127
  .post-card-link {
128
128
  text-decoration: none;
129
129
  color: inherit;
130
+
130
131
  // max-w-$yun-post-card-max-width
131
132
  max-width: calc(var(--yun-post-card-max-width) + 2rem);
132
133
 
@@ -80,7 +80,7 @@ const sortedYears = computed(() => {
80
80
  <style lang="scss">
81
81
  .post-collapse {
82
82
  .collection-title {
83
- border-bottom: 2px solid rgba(var(--va-c-primary-rgb), 0.6);
83
+ border-bottom: 2px solid rgb(var(--va-c-primary-rgb), 0.6);
84
84
 
85
85
  &::before {
86
86
  content: '';
@@ -88,7 +88,7 @@ const sortedYears = computed(() => {
88
88
  top: 50%;
89
89
  width: 2px;
90
90
  height: 50%;
91
- background: rgba(var(--va-c-primary-rgb), 0.3);
91
+ background: rgb(var(--va-c-primary-rgb), 0.3);
92
92
  }
93
93
 
94
94
  .archive-year {
@@ -84,7 +84,7 @@ const { $tO } = useValaxyI18n()
84
84
  left: 0;
85
85
  width: 0;
86
86
  height: 1px;
87
- background-color: rgba(var(--va-c-primary-rgb), 0.3);
87
+ background-color: rgb(var(--va-c-primary-rgb), 0.3);
88
88
  transition: width 800ms map.get($cubic-bezier, 'ease-in');
89
89
  }
90
90
 
@@ -127,7 +127,7 @@ const { $tO } = useValaxyI18n()
127
127
  position: absolute;
128
128
  width: 2px;
129
129
  height: 0;
130
- background: rgba(var(--va-c-primary-rgb), 0.3);
130
+ background: rgb(var(--va-c-primary-rgb), 0.3);
131
131
  transition: height 600ms map.get($cubic-bezier, 'ease-in');
132
132
  }
133
133
 
@@ -60,7 +60,7 @@ const siteConfig = useSiteConfig()
60
60
 
61
61
  <style>
62
62
  /* Use CSS media query for mobile layout instead of JS isMobile to avoid hydration mismatch */
63
- @media (max-width: 768px) {
63
+ @media (width <= 768px) {
64
64
  .post-meta {
65
65
  flex-direction: column;
66
66
  gap: 0.5rem !important;
@@ -45,8 +45,8 @@ const nextTitle = useLocaleTitle(next)
45
45
  transition: var(--va-transition-duration-moderate);
46
46
 
47
47
  &:hover {
48
- background-color: rgba(var(--va-c-primary-rgb), 0.1);
49
- box-shadow: 0 0 15px rgba(black, 0.1);
48
+ background-color: rgb(var(--va-c-primary-rgb), 0.1);
49
+ box-shadow: 0 0 15px rgb(black, 0.1);
50
50
  }
51
51
  }
52
52
 
@@ -70,6 +70,7 @@ onMounted(() => {
70
70
  font-family: var(--va-font-serif);
71
71
  font-weight: bold;
72
72
  padding: 0.5rem;
73
+
73
74
  // border-top: var(--va-border-width) solid var(--va-c-text-light);
74
75
  border-bottom: var(--va-border-width) solid var(--va-c-text-light);
75
76
 
@@ -7,6 +7,7 @@ const siteConfig = useSiteConfig()
7
7
 
8
8
  const isAlgolia = computed(() => siteConfig.value.search.provider === 'algolia')
9
9
  const isFuse = computed(() => siteConfig.value.search.provider === 'fuse')
10
+ const isLocal = computed(() => siteConfig.value.search.provider === 'local')
10
11
 
11
12
  const open = ref(false)
12
13
 
@@ -17,7 +18,7 @@ function togglePopup() {
17
18
  const algoliaRef = ref()
18
19
  onMounted(() => {
19
20
  // algolia has its own hotkey handling in YunAlgoliaSearch component
20
- if (isFuse.value)
21
+ if (isFuse.value || isLocal.value)
21
22
  useHotKey('k', togglePopup)
22
23
  })
23
24
 
@@ -44,4 +45,5 @@ const YunAlgoliaSearch = isAlgolia.value
44
45
 
45
46
  <YunAlgoliaSearch v-if="isAlgolia" ref="algoliaRef" :open="open" @close="closeSearch" />
46
47
  <YunFuseSearch v-else-if="isFuse" :open="open" @close="closeSearch" />
48
+ <YunLocalSearch v-else-if="isLocal" :open="open" @close="closeSearch" />
47
49
  </template>
@@ -45,7 +45,7 @@ withDefaults(defineProps<{
45
45
  background: var(--va-c-bg);
46
46
  color: var(--va-c-text);
47
47
  padding: 0.25rem 0.75rem;
48
- box-shadow: 0px 4px 6px -1px rgb(0 0 0 / 0.1), 0px 2px 4px -2px rgb(0 0 0 / 0.1);
48
+ box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
49
49
  border-radius: 4px;
50
50
  z-index: 100;
51
51
  user-select: none;
@@ -61,6 +61,7 @@ withDefaults(defineProps<{
61
61
  opacity: 0;
62
62
  transform: translateY(2px);
63
63
  }
64
+
64
65
  to {
65
66
  opacity: 1;
66
67
  transform: translateY(0);
@@ -28,11 +28,11 @@ const siteConfig = useSiteConfig()
28
28
 
29
29
  .site-author-avatar {
30
30
  img {
31
- box-shadow: 0 0 10px rgba(black, 0.2);
31
+ box-shadow: 0 0 10px rgb(black, 0.2);
32
32
  transition: var(--va-transition-duration-moderate);
33
33
 
34
34
  &:hover {
35
- box-shadow: 0 0 30px rgba(var(--va-c-primary-rgb), 0.2);
35
+ box-shadow: 0 0 30px rgb(var(--va-c-primary-rgb), 0.2);
36
36
  }
37
37
  }
38
38
  }
@@ -138,7 +138,6 @@ const hasMoreItems = computed(() => itemCount.value > 3)
138
138
  font-family: var(--va-font-serif);
139
139
  background: linear-gradient(135deg, var(--collection-accent), var(--collection-accent-light));
140
140
  background-clip: text;
141
- -webkit-background-clip: text;
142
141
  -webkit-text-fill-color: transparent;
143
142
  line-height: 1.4;
144
143
  }
@@ -59,10 +59,8 @@ const resolvedItems = computed(() => {
59
59
 
60
60
  .items {
61
61
  border-left: 1px solid var(--va-c-divider);
62
-
63
62
  color: #666;
64
63
  font-size: 0.9em;
65
-
66
64
  padding-left: 16px;
67
65
 
68
66
  .item {
@@ -35,7 +35,7 @@ const sidebarExplicit = computed(() => {
35
35
  display: none;
36
36
  }
37
37
 
38
- @media (min-width: 1024px) {
38
+ @media (width >= 1024px) {
39
39
  .yun-layout-left {
40
40
  display: flex;
41
41
  flex-direction: column;
@@ -45,7 +45,7 @@ const classes = computed(() => {
45
45
  }
46
46
 
47
47
  /* Switch to horizontal three-column layout on large screens */
48
- @media (min-width: 1024px) {
48
+ @media (width >= 1024px) {
49
49
  .yun-layout-wrapper__content {
50
50
  flex-direction: row;
51
51
  align-items: start;
@@ -42,11 +42,12 @@ defineProps<{
42
42
  }
43
43
 
44
44
  &.router-link-active {
45
- background-color: rgba(var(--va-c-primary-rgb), 0.08);
45
+ background-color: rgb(var(--va-c-primary-rgb), 0.08);
46
46
 
47
47
  .icon-default {
48
48
  display: none;
49
49
  }
50
+
50
51
  .icon-active {
51
52
  display: block;
52
53
  }
@@ -113,6 +113,7 @@ const showContent = ref(false)
113
113
 
114
114
  &.enter-from {
115
115
  border-radius: 0%;
116
+
116
117
  // width: var(--total-char-height);
117
118
  // height: var(--total-char-height);
118
119
  transform: rotate(135deg) translateY(0%);
@@ -139,6 +140,7 @@ const showContent = ref(false)
139
140
 
140
141
  &.show {
141
142
  opacity: 1;
143
+
142
144
  // transform: translateY(calc(50% + var(--avatar-size) / 2));
143
145
  }
144
146
  }
@@ -20,7 +20,7 @@ const themeConfig = useThemeConfig()
20
20
 
21
21
  <style>
22
22
  /* Use CSS media query for mobile flex-wrap instead of JS isMobile to avoid hydration mismatch */
23
- @media (max-width: 768px) {
23
+ @media (width <= 768px) {
24
24
  .yun-fullscreen-menu-list {
25
25
  flex-wrap: wrap;
26
26
  }
@@ -115,6 +115,7 @@ const app = useAppStore()
115
115
  // animation-range: 0 calc(30vh), exit;
116
116
  box-shadow: none;
117
117
  display: flex;
118
+
118
119
  // top: var(--rect-margin);
119
120
  // left: var(--rect-margin);
120
121
  // right: var(--rect-margin);
@@ -122,7 +123,6 @@ const app = useAppStore()
122
123
  top: 0;
123
124
  left: 0;
124
125
  right: 0;
125
-
126
126
  align-items: center;
127
127
  justify-content: space-between;
128
128
  height: var(--yun-nav-height, 50px);
@@ -4,14 +4,14 @@
4
4
 
5
5
  <style lang="scss">
6
6
  .yun-gradient-line {
7
- --c-end: rgba(0 0 0 / 0);
8
- --c-mid: rgba(0 0 0 / 1);
7
+ --c-end: rgb(0 0 0 / 0);
8
+ --c-mid: rgb(0 0 0 / 1);
9
9
  }
10
10
 
11
11
  .dark {
12
12
  .yun-gradient-line {
13
- --c-end: rgba(255 255 255 / 0);
14
- --c-mid: rgba(255 255 255 / 1);
13
+ --c-end: rgb(255 255 255 / 0);
14
+ --c-mid: rgb(255 255 255 / 1);
15
15
  }
16
16
  }
17
17
 
@@ -1,38 +1,37 @@
1
- import type { ComputedRef, StyleValue } from 'vue'
2
- import { computed } from 'vue'
1
+ import type { ComputedRef, MaybeRefOrGetter, StyleValue } from 'vue'
2
+ import { computed, toValue } from 'vue'
3
3
  import { useThemeConfig } from './config'
4
4
 
5
5
  /**
6
- * get type card property
7
- * todo: test reactive
6
+ * get type card property (reactive)
8
7
  */
9
- export function usePostProperty(type?: string): {
10
- color: string
11
- icon: string
12
- styles: StyleValue | undefined | ComputedRef<StyleValue | undefined>
8
+ export function usePostProperty(type?: MaybeRefOrGetter<string | undefined>): {
9
+ color: ComputedRef<string>
10
+ icon: ComputedRef<string>
11
+ styles: ComputedRef<StyleValue | undefined>
13
12
  } {
14
- if (!type) {
15
- return {
16
- color: '',
17
- icon: '',
18
- styles: undefined,
19
- }
20
- }
21
-
22
13
  const themeConfig = useThemeConfig()
23
14
 
24
- if (!(type in themeConfig.value.types))
25
- type = 'link'
15
+ const resolvedType = computed(() => {
16
+ const t = toValue(type)
17
+ if (!t)
18
+ return undefined
19
+ return t in themeConfig.value.types ? t : 'link'
20
+ })
21
+
22
+ const color = computed(() => {
23
+ const t = resolvedType.value
24
+ return t ? themeConfig.value.types[t].color : ''
25
+ })
26
26
 
27
- const color = themeConfig.value.types[type].color
28
- const icon = themeConfig.value.types[type].icon
27
+ const icon = computed(() => {
28
+ const t = resolvedType.value
29
+ return t ? themeConfig.value.types[t].icon : ''
30
+ })
29
31
 
30
32
  const styles = computed<StyleValue | undefined>(() => {
31
- return type
32
- ? ({
33
- '--card-c-primary': color,
34
- })
35
- : undefined
33
+ const c = color.value
34
+ return c ? { '--card-c-primary': c } : undefined
36
35
  })
37
36
 
38
37
  return {
package/docs/README.md CHANGED
@@ -1,3 +1,5 @@
1
1
  # Docs for valaxy-theme-yun
2
2
 
3
+ 📖 Full documentation: [valaxy.site/themes/yun](https://valaxy.site/themes/yun)
4
+
3
5
  [English](./en-US/) | [中文](./zh-CN/)
@@ -0,0 +1,3 @@
1
+ # valaxy-theme-yun Docs
2
+
3
+ 📖 Full documentation: [valaxy.site/themes/yun](https://valaxy.site/themes/yun)
@@ -1,5 +1,7 @@
1
1
  # valaxy-theme-yun 文档
2
2
 
3
+ 📖 完整文档请参见:[valaxy.site/themes/yun](https://valaxy.site/themes/yun)
4
+
3
5
  ## 配置
4
6
 
5
7
  ### 主题配置
@@ -2,6 +2,8 @@
2
2
  title: 主题配置
3
3
  ---
4
4
 
5
+ > 📖 完整文档请参见:[valaxy.site/themes/yun](https://valaxy.site/themes/yun)
6
+
5
7
  配置 `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
8
 
7
9
  如您需要更详细的描述/示例,再阅读下方内容。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
3
  "type": "module",
4
- "version": "0.28.1",
4
+ "version": "0.28.2",
5
5
  "author": {
6
6
  "email": "me@yunyoujun.cn",
7
7
  "name": "YunYouJun",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/animejs": "^3.1.13",
36
- "valaxy": "0.28.1",
36
+ "valaxy": "0.28.2",
37
37
  "valaxy-addon-waline": "0.2.1"
38
38
  },
39
39
  "scripts": {
@@ -15,10 +15,10 @@
15
15
  }
16
16
 
17
17
  &:hover {
18
- background-color: rgba(var(--va-c-primary-rgb), 0.08);
18
+ background-color: rgb(var(--va-c-primary-rgb), 0.08);
19
19
  }
20
20
 
21
21
  &:active {
22
- background-color: rgba(var(--va-c-primary-rgb), 0.16);
22
+ background-color: rgb(var(--va-c-primary-rgb), 0.16);
23
23
  }
24
24
  }
@@ -4,7 +4,6 @@
4
4
  --smc-font-sans: var(--va-font-sans);
5
5
  --smc-font-serif: var(--va-font-serif);
6
6
  --smc-font-mono: var(--va-font-mono);
7
-
8
7
  --c-toc-link: var(--va-c-text-light);
9
8
  }
10
9
 
@@ -16,7 +15,7 @@
16
15
 
17
16
  /* stylelint-disable-next-line no-duplicate-selectors */
18
17
  .markdown-body {
19
- word-wrap: break-word;
18
+ overflow-wrap: break-word;
20
19
 
21
20
  a {
22
21
  color: var(--va-c-link);
@@ -108,18 +107,18 @@
108
107
  thead {
109
108
  th {
110
109
  text-align: left;
111
- border: 1px solid rgba(var(--va-c-primary-rgb), 0.3);
112
- background-color: rgba(var(--va-c-primary-rgb), 0.1);
110
+ border: 1px solid rgb(var(--va-c-primary-rgb), 0.3);
111
+ background-color: rgb(var(--va-c-primary-rgb), 0.1);
113
112
  }
114
113
  }
115
114
 
116
115
  td {
117
- border: 1px solid rgba(var(--va-c-primary-rgb), 0.3);
116
+ border: 1px solid rgb(var(--va-c-primary-rgb), 0.3);
118
117
  }
119
118
 
120
119
  tr {
121
120
  &:hover {
122
- background-color: rgba(var(--va-c-primary-rgb), 0.05);
121
+ background-color: rgb(var(--va-c-primary-rgb), 0.05);
123
122
  }
124
123
  }
125
124
  }
@@ -136,22 +135,19 @@
136
135
  .markdown-body {
137
136
  div[class*="language-"] {
138
137
  position: relative;
138
+
139
139
  // left: 50%;
140
140
  // right: 50%;
141
141
  // margin-left: -50vw !important;
142
142
  // margin-right: -50vw !important;
143
143
  // width: 100vw !important;
144
- margin-top: 16px;
145
- margin-bottom: 0;
146
- margin-left: -24px;
147
- margin-right: -24px;
144
+ margin: 16px -24px 0;
148
145
  height: auto;
149
146
  }
150
147
  }
151
148
  }
152
149
 
153
150
  @media (width <=639.9px) {
154
-
155
151
  .markdown-body .vp-code-group .tabs,
156
152
  .markdown-body .vp-code-group div[class*="language-"] {
157
153
  position: relative;
@@ -7,24 +7,24 @@
7
7
 
8
8
  ::-webkit-scrollbar-track {
9
9
  border-radius: 2px;
10
- background-color: rgba(255, 255, 255, 0.1);
10
+ background-color: rgb(255 255 255 / 0.1);
11
11
  }
12
12
 
13
13
  ::-webkit-scrollbar-thumb {
14
14
  border-radius: 2px;
15
- background-color: rgba(122, 122, 122, 0.3);
15
+ background-color: rgb(122 122 122 / 0.3);
16
16
 
17
17
  // transition not work
18
18
 
19
19
  &:window-inactive {
20
- background-color: rgba(122, 122, 122, 0.3);
20
+ background-color: rgb(122 122 122 / 0.3);
21
21
  }
22
22
 
23
23
  &:hover {
24
- background-color: rgba(122, 122, 122, 0.7);
24
+ background-color: rgb(122 122 122 / 0.7);
25
25
  }
26
26
 
27
27
  &:active {
28
- background-color: rgba(122, 122, 122, 0.9);
28
+ background-color: rgb(122 122 122 / 0.9);
29
29
  }
30
30
  }
@@ -5,11 +5,9 @@
5
5
  :root {
6
6
  // yun
7
7
  --yun-margin-top: 68px;
8
-
9
8
  --yun-home-hero-image-filter: blur(48px);
10
- --yun-home-hero-name-background: -webkit-linear-gradient(120deg, var(--va-c-text) 30%, black);
9
+ --yun-home-hero-name-background: linear-gradient(120deg, var(--va-c-text) 30%, black);
11
10
  --yun-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
12
-
13
11
  --yun-nav-height: 50px;
14
12
  }
15
13
 
@@ -32,8 +30,7 @@ html.dark {
32
30
  // gradient
33
31
  --va-c-bg: #1a1a1d;
34
32
  --va-c-bg-soft: #121215;
35
-
36
- --yun-home-hero-name-background: -webkit-linear-gradient(120deg, var(--va-c-primary) 30%, #41d1ff);
33
+ --yun-home-hero-name-background: linear-gradient(120deg, var(--va-c-primary) 30%, #41d1ff);
37
34
  }
38
35
 
39
36
  // animation
@@ -15,7 +15,7 @@ html {
15
15
  }
16
16
 
17
17
  .gradient-text {
18
- background-clip: text;
19
18
  -webkit-background-clip: text;
19
+ background-clip: text;
20
20
  -webkit-text-fill-color: transparent;
21
21
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  // Use md breakpoint (768px) instead of mobile (640px)
23
23
  // because 640~768px screens are still too narrow for side-by-side layout
24
- @media screen and (max-width: 768px) {
24
+ @media screen and (width <= 768px) {
25
25
  .post-card-info {
26
26
  flex-direction: column;
27
27
  }
package/styles/main.scss CHANGED
@@ -11,6 +11,7 @@ $c-primary: #0078e7 !default;
11
11
  @use "./animations/index.scss" as *;
12
12
  @use "./common/button.scss" as *;
13
13
  @use "./common/markdown.scss" as *;
14
+
14
15
  // valaxy client styles
15
16
  @use 'valaxy/client/styles/components/code.scss' as *;
16
17
  @use 'valaxy/client/styles/components/code-group.scss' as *;
@@ -110,7 +110,7 @@ $char-animation-duration: 0.4s;
110
110
  &-left {
111
111
  border-left: 1px solid var(--banner-line-color);
112
112
  /* stylelint-disable-next-line color-function-notation */
113
- border-right: 0 solid rgba(var(--va-c-primary-rgb), 0.1);
113
+ border-right: 0 solid rgb(var(--va-c-primary-rgb), 0.1);
114
114
  border-right-width: 0;
115
115
  animation-name: char-move-left;
116
116
  animation-duration: $char-animation-duration;
@@ -121,7 +121,7 @@ $char-animation-duration: 0.4s;
121
121
 
122
122
  &-right {
123
123
  /* stylelint-disable-next-line color-function-notation */
124
- border-left: 0 solid rgba(var(--va-c-primary-rgb), 0.1);
124
+ border-left: 0 solid rgb(var(--va-c-primary-rgb), 0.1);
125
125
  border-right: 1px solid var(--banner-line-color);
126
126
  border-left-width: 0;
127
127
  animation-name: char-move-right;