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.
- package/App.vue +3 -1
- package/README.md +3 -1
- package/components/YunAside.vue +0 -1
- package/components/YunDropdownMenu.vue +1 -0
- package/components/YunGoDown.vue +1 -1
- package/components/YunLocalSearch.vue +113 -0
- package/components/YunPostCard.vue +2 -1
- package/components/YunPostCollapse.vue +2 -2
- package/components/YunPostCollapseItem.vue +2 -2
- package/components/YunPostMeta.vue +1 -1
- package/components/YunPostNav.vue +2 -2
- package/components/YunSay.vue +1 -0
- package/components/YunSearchTrigger.vue +3 -1
- package/components/YunTooltip.vue +2 -1
- package/components/author/YunAuthorAvatar.vue +2 -2
- package/components/collection/YunCollectionCard.vue +0 -1
- package/components/collection/YunCollectionSidebar.vue +0 -2
- package/components/layout/YunLayoutLeft.vue +1 -1
- package/components/layout/YunLayoutWrapper.vue +1 -1
- package/components/menu/YunPostClassifyNavItem.vue +2 -1
- package/components/prologue/YunPrologueSquare.vue +2 -0
- package/components/site/YunFullscreenMenuList.vue +1 -1
- package/components/theme/nimbo/YunNimboNavMenu.vue +1 -1
- package/components/ui/YunGradientDivider.vue +4 -4
- package/composables/post.ts +24 -25
- package/docs/README.md +2 -0
- package/docs/en-US/README.md +3 -0
- package/docs/zh-CN/README.md +2 -0
- package/docs/zh-CN/config.md +2 -0
- package/package.json +2 -2
- package/styles/common/button.scss +2 -2
- package/styles/common/markdown.scss +7 -11
- package/styles/common/scrollbar.scss +5 -5
- package/styles/css-vars.scss +2 -5
- package/styles/global.scss +1 -1
- package/styles/layout/post.scss +1 -1
- package/styles/main.scss +1 -0
- 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
package/components/YunAside.vue
CHANGED
|
@@ -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));
|
package/components/YunGoDown.vue
CHANGED
|
@@ -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
|
+
› {{ 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
|
|
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:
|
|
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:
|
|
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:
|
|
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 (
|
|
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:
|
|
49
|
-
box-shadow: 0 0 15px
|
|
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
|
|
package/components/YunSay.vue
CHANGED
|
@@ -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:
|
|
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
|
|
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
|
|
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
|
}
|
|
@@ -42,11 +42,12 @@ defineProps<{
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&.router-link-active {
|
|
45
|
-
background-color:
|
|
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 (
|
|
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:
|
|
8
|
-
--c-mid:
|
|
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:
|
|
14
|
-
--c-mid:
|
|
13
|
+
--c-end: rgb(255 255 255 / 0);
|
|
14
|
+
--c-mid: rgb(255 255 255 / 1);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
package/composables/post.ts
CHANGED
|
@@ -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:
|
|
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
|
-
|
|
25
|
-
|
|
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
|
|
28
|
-
|
|
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
|
-
|
|
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
package/docs/en-US/README.md
CHANGED
package/docs/zh-CN/README.md
CHANGED
package/docs/zh-CN/config.md
CHANGED
|
@@ -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.
|
|
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.
|
|
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:
|
|
18
|
+
background-color: rgb(var(--va-c-primary-rgb), 0.08);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&:active {
|
|
22
|
-
background-color:
|
|
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
|
-
|
|
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
|
|
112
|
-
background-color:
|
|
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
|
|
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:
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
20
|
+
background-color: rgb(122 122 122 / 0.3);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
&:hover {
|
|
24
|
-
background-color:
|
|
24
|
+
background-color: rgb(122 122 122 / 0.7);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&:active {
|
|
28
|
-
background-color:
|
|
28
|
+
background-color: rgb(122 122 122 / 0.9);
|
|
29
29
|
}
|
|
30
30
|
}
|
package/styles/css-vars.scss
CHANGED
|
@@ -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:
|
|
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
|
package/styles/global.scss
CHANGED
package/styles/layout/post.scss
CHANGED
|
@@ -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 (
|
|
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
|
|
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
|
|
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;
|