valaxy-theme-yun 0.0.9 → 0.1.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/components/YunAlgoliaSearch.vue +10 -10
- package/components/YunBackToTop.vue +2 -3
- package/components/YunBase.vue +3 -0
- package/components/YunBoard.vue +23 -0
- package/components/YunCard.vue +1 -1
- package/components/YunCategories.vue +4 -4
- package/components/YunCategory.vue +1 -1
- package/components/YunConfig.vue +2 -2
- package/components/YunGirls.vue +2 -3
- package/components/YunGoDown.vue +3 -3
- package/components/YunPostCollapse.vue +10 -10
- package/components/YunPostNav.vue +2 -2
- package/components/YunSay.vue +6 -5
- package/components/YunSidebar.vue +5 -5
- package/components/YunSidebarNav.vue +4 -4
- package/components/YunSponsor.vue +2 -2
- package/components/YunWaline.vue +2 -2
- package/composables/index.ts +5 -3
- package/config/index.ts +15 -5
- package/dist/index.d.ts +16 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/index.ts +31 -0
- package/layouts/base.vue +4 -2
- package/layouts/home.vue +5 -1
- package/layouts/post.vue +3 -1
- package/layouts/tags.vue +1 -1
- package/locales/en.yml +1 -0
- package/locales/zh-CN.yml +1 -0
- package/package.json +3 -3
- package/styles/css-vars.scss +17 -0
- package/styles/layout/index.scss +2 -2
- package/styles/layout/post.scss +5 -6
- package/styles/markdown.scss +2 -22
- package/styles/vars.scss +32 -6
@@ -60,8 +60,8 @@ watch(showPopup, () => {
|
|
60
60
|
top: 0.6rem;
|
61
61
|
right: 0.8rem;
|
62
62
|
|
63
|
-
color: var(--
|
64
|
-
z-index:
|
63
|
+
color: var(--va-c-primary);
|
64
|
+
z-index: var(--yun-z-search-btn);
|
65
65
|
}
|
66
66
|
|
67
67
|
.search-popup {
|
@@ -77,7 +77,7 @@ watch(showPopup, () => {
|
|
77
77
|
text-align: center;
|
78
78
|
padding-top: 3.5rem;
|
79
79
|
margin: 0;
|
80
|
-
z-index:
|
80
|
+
z-index: var(--yun-z-search-popup);
|
81
81
|
transition: 0.6s;
|
82
82
|
}
|
83
83
|
|
@@ -91,15 +91,15 @@ watch(showPopup, () => {
|
|
91
91
|
|
92
92
|
.search-input {
|
93
93
|
background: transparent;
|
94
|
-
color: var(--
|
94
|
+
color: var(--va-c-text);
|
95
95
|
font-size: 1.5rem;
|
96
96
|
border-radius: 3rem;
|
97
97
|
padding: 1rem 1.5rem;
|
98
|
-
border: 1px solid var(--
|
98
|
+
border: 1px solid var(--va-c-gray);
|
99
99
|
box-sizing: border-box;
|
100
100
|
width: 90%;
|
101
101
|
max-width: 800px;
|
102
|
-
font-family: var(--
|
102
|
+
font-family: var(--va-font-serif);
|
103
103
|
font-weight: 900;
|
104
104
|
text-align: center;
|
105
105
|
}
|
@@ -169,13 +169,13 @@ watch(showPopup, () => {
|
|
169
169
|
width: 100%;
|
170
170
|
padding: 0.5rem;
|
171
171
|
border-bottom: 1px dashed #ccc;
|
172
|
-
font-family: var(--
|
172
|
+
font-family: var(--va-font-serif);
|
173
173
|
font-weight: 900;
|
174
174
|
font-size: 1.2rem;
|
175
175
|
max-width: 800px;
|
176
176
|
|
177
177
|
mark {
|
178
|
-
color: var(--
|
178
|
+
color: var(--va-c-danger);
|
179
179
|
font-family: 900;
|
180
180
|
background-color: transparent;
|
181
181
|
text-decoration: underline;
|
@@ -185,7 +185,7 @@ watch(showPopup, () => {
|
|
185
185
|
display: flex;
|
186
186
|
font-size: 12px;
|
187
187
|
justify-content: center;
|
188
|
-
font-family: var(--
|
188
|
+
font-family: var(--va-font-sans);
|
189
189
|
font-weight: normal;
|
190
190
|
line-height: 1;
|
191
191
|
margin-top: -0.2rem;
|
@@ -215,7 +215,7 @@ watch(showPopup, () => {
|
|
215
215
|
.active {
|
216
216
|
.page-number {
|
217
217
|
background: var(--page-btn-active-bg-color);
|
218
|
-
color: var(--
|
218
|
+
color: var(--va-c-bg);
|
219
219
|
}
|
220
220
|
}
|
221
221
|
}
|
@@ -25,16 +25,15 @@ const strokeOffset = computed(() => {
|
|
25
25
|
|
26
26
|
<style lang="scss">
|
27
27
|
@use "sass:map";
|
28
|
-
@use "~/styles/vars" as *;
|
29
28
|
|
30
29
|
.back-to-top {
|
31
30
|
position: relative;
|
32
31
|
position: fixed;
|
33
32
|
right: -0.9rem;
|
34
33
|
bottom: 1.1rem;
|
35
|
-
z-index:
|
34
|
+
z-index: var(--yun-z-go-up-btn);
|
36
35
|
opacity: 0;
|
37
|
-
color: var(--
|
36
|
+
color: var(--va-c-primary);
|
38
37
|
|
39
38
|
&.show {
|
40
39
|
transform: translateX(-30px) rotate(360deg);
|
package/components/YunBase.vue
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="yun-board">
|
3
|
+
<slot />
|
4
|
+
</div>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<style>
|
8
|
+
.yun-board {
|
9
|
+
border: 1px solid var(--va-c-text);
|
10
|
+
width: calc(100% - 2rem);
|
11
|
+
|
12
|
+
display: flex;
|
13
|
+
flex-direction: column;
|
14
|
+
justify-content: center;
|
15
|
+
align-items: center;
|
16
|
+
font-family: var(--va-font-serif);
|
17
|
+
font-weight: bold;
|
18
|
+
padding: 1rem;
|
19
|
+
margin: 1rem auto;
|
20
|
+
max-width: var(--yun-post-card-max-width);
|
21
|
+
background-color: rgba(200, 200, 200, 0.1);
|
22
|
+
}
|
23
|
+
</style>
|
package/components/YunCard.vue
CHANGED
@@ -22,10 +22,10 @@ withDefaults(defineProps<{
|
|
22
22
|
<style lang="scss">
|
23
23
|
.post-list-item {
|
24
24
|
a {
|
25
|
-
color: var(--
|
25
|
+
color: var(--va-c-text);
|
26
26
|
|
27
27
|
&:hover {
|
28
|
-
color: var(--
|
28
|
+
color: var(--va-c-primary);
|
29
29
|
}
|
30
30
|
}
|
31
31
|
}
|
@@ -33,12 +33,12 @@ withDefaults(defineProps<{
|
|
33
33
|
.category-list-item {
|
34
34
|
.folder-action {
|
35
35
|
&:hover {
|
36
|
-
color: var(--
|
36
|
+
color: var(--va-c-primary);
|
37
37
|
}
|
38
38
|
}
|
39
39
|
.category-name {
|
40
40
|
&:hover {
|
41
|
-
color: var(--
|
41
|
+
color: var(--va-c-primary);
|
42
42
|
}
|
43
43
|
}
|
44
44
|
}
|
@@ -19,7 +19,7 @@ const { t } = useI18n()
|
|
19
19
|
<li v-if="category.total" class="category-list-item inline-flex items-center cursor-pointer">
|
20
20
|
<span class="folder-action inline-flex" @click="showChild = !showChild">
|
21
21
|
<div v-if="!showChild" i-ri-folder-add-line />
|
22
|
-
<div v-else style="color:var(--
|
22
|
+
<div v-else style="color:var(--va-c-primary)" i-ri-folder-reduce-line /></span>
|
23
23
|
<span class="category-name" m="l-1" @click="displayCategory(name)">
|
24
24
|
{{ name === 'Uncategorized' ? t('category.uncategorized') : name }} [{{ category.total }}]
|
25
25
|
</span>
|
package/components/YunConfig.vue
CHANGED
@@ -17,8 +17,8 @@ const toggleLocales = () => {
|
|
17
17
|
<div i="ri-sun-line dark:ri-moon-line" />
|
18
18
|
</button>
|
19
19
|
|
20
|
-
<
|
20
|
+
<button class="yun-icon-btn" :title="t('button.toggle_langs')" style="color:var(--va-c-text)" @click="toggleLocales">
|
21
21
|
<div i-ri-translate class="transition transform" :class="locale === 'en' ? 'rotate-y-180' : ''" />
|
22
|
-
</
|
22
|
+
</button>
|
23
23
|
</div>
|
24
24
|
</template>
|
package/components/YunGirls.vue
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<script lang="ts" setup>
|
3
2
|
import { useRandomData } from 'valaxy-theme-yun/composables'
|
4
3
|
import { onImgError } from '../utils'
|
@@ -87,9 +86,9 @@ const { data } = useRandomData(props.girls, props.random)
|
|
87
86
|
|
88
87
|
&-from {
|
89
88
|
font-size: 12px;
|
90
|
-
font-family: var(--
|
89
|
+
font-family: var(--va-font-serif);
|
91
90
|
font-weight: bold;
|
92
|
-
color: var(--
|
91
|
+
color: var(--va-c-text-light);
|
93
92
|
|
94
93
|
&::before {
|
95
94
|
content: '「';
|
package/components/YunGoDown.vue
CHANGED
@@ -18,12 +18,12 @@
|
|
18
18
|
animation: float 2s ease-in-out infinite;
|
19
19
|
|
20
20
|
font-size: 2.5rem;
|
21
|
-
color: var(--
|
21
|
+
color: var(--va-c-primary);
|
22
22
|
|
23
|
-
transition: color var(--
|
23
|
+
transition: color var(--va-transition-duration);
|
24
24
|
|
25
25
|
&:hover {
|
26
|
-
color: rgba(var(--
|
26
|
+
color: rgba(var(--va-c-primary-rgb), 0.6);
|
27
27
|
}
|
28
28
|
}
|
29
29
|
|
@@ -85,7 +85,7 @@ const sortedYears = computed(() => {
|
|
85
85
|
.collection-title {
|
86
86
|
position: relative;
|
87
87
|
margin: 0;
|
88
|
-
border-bottom: 2px solid rgba(var(--
|
88
|
+
border-bottom: 2px solid rgba(var(--va-c-primary-rgb), 0.6);
|
89
89
|
|
90
90
|
&::before {
|
91
91
|
content: '';
|
@@ -93,11 +93,11 @@ const sortedYears = computed(() => {
|
|
93
93
|
top: 50%;
|
94
94
|
width: 2px;
|
95
95
|
height: 50%;
|
96
|
-
background: rgba(var(--
|
96
|
+
background: rgba(var(--va-c-primary-rgb), 0.3);
|
97
97
|
}
|
98
98
|
|
99
99
|
.archive-year {
|
100
|
-
color: var(--
|
100
|
+
color: var(--va-c-primary);
|
101
101
|
margin: 0 1.5rem;
|
102
102
|
|
103
103
|
&::before {
|
@@ -109,7 +109,7 @@ const sortedYears = computed(() => {
|
|
109
109
|
margin-top: -4px;
|
110
110
|
width: 1.5rem;
|
111
111
|
height: 1.5rem;
|
112
|
-
background: var(--
|
112
|
+
background: var(--va-c-primary);
|
113
113
|
border-radius: 50%;
|
114
114
|
}
|
115
115
|
}
|
@@ -123,7 +123,7 @@ const sortedYears = computed(() => {
|
|
123
123
|
position: absolute;
|
124
124
|
width: 2px;
|
125
125
|
height: 100%;
|
126
|
-
background: rgba(var(--
|
126
|
+
background: rgba(var(--va-c-primary-rgb), 0.3);
|
127
127
|
}
|
128
128
|
}
|
129
129
|
|
@@ -132,7 +132,7 @@ const sortedYears = computed(() => {
|
|
132
132
|
align-items: center;
|
133
133
|
|
134
134
|
position: relative;
|
135
|
-
border-bottom: 1px solid rgba(var(--
|
135
|
+
border-bottom: 1px solid rgba(var(--va-c-primary-rgb), 0.3);
|
136
136
|
display: flex;
|
137
137
|
|
138
138
|
&::before {
|
@@ -143,15 +143,15 @@ const sortedYears = computed(() => {
|
|
143
143
|
height: 10px;
|
144
144
|
margin-left: -4px;
|
145
145
|
border-radius: 50%;
|
146
|
-
border: 1px solid var(--
|
147
|
-
background-color: var(--
|
146
|
+
border: 1px solid var(--va-c-primary);
|
147
|
+
background-color: var(--va-c-bg-light);
|
148
148
|
z-index: 1;
|
149
|
-
transition: background var(--
|
149
|
+
transition: background var(--va-transition-duration);
|
150
150
|
}
|
151
151
|
|
152
152
|
&:hover {
|
153
153
|
&::before {
|
154
|
-
background: var(--
|
154
|
+
background: var(--va-c-primary);
|
155
155
|
}
|
156
156
|
}
|
157
157
|
|
@@ -33,7 +33,7 @@ const [prev, next] = usePrevNext()
|
|
33
33
|
justify-content: center;
|
34
34
|
align-items: center;
|
35
35
|
|
36
|
-
color: var(--
|
36
|
+
color: var(--va-c-primary);
|
37
37
|
|
38
38
|
outline: none;
|
39
39
|
font-size: 1.5rem;
|
@@ -44,7 +44,7 @@ const [prev, next] = usePrevNext()
|
|
44
44
|
transition: 0.4s;
|
45
45
|
|
46
46
|
&:hover {
|
47
|
-
background-color: rgba(var(--
|
47
|
+
background-color: rgba(var(--va-c-primary-rgb), 0.1);
|
48
48
|
box-shadow: 0 0 15px rgba(black, 0.1);
|
49
49
|
}
|
50
50
|
}
|
package/components/YunSay.vue
CHANGED
@@ -13,7 +13,8 @@ const sayFrom = ref('')
|
|
13
13
|
*/
|
14
14
|
function fetchApiToSay() {
|
15
15
|
const api = themeConfig.value.say.hitokoto.enable ? themeConfig.value.say.hitokoto.api : themeConfig.value.say.api
|
16
|
-
if (!api)
|
16
|
+
if (!api)
|
17
|
+
return
|
17
18
|
|
18
19
|
fetch(api)
|
19
20
|
.then((res) => {
|
@@ -63,14 +64,14 @@ onMounted(() => {
|
|
63
64
|
|
64
65
|
<style lang="scss">
|
65
66
|
.say {
|
66
|
-
color: var(--
|
67
|
+
color: var(--va-c-text);
|
67
68
|
display: block;
|
68
69
|
text-align: center;
|
69
|
-
font-family: var(--
|
70
|
+
font-family: var(--va-font-serif);
|
70
71
|
font-weight: bold;
|
71
72
|
padding: 0.5rem;
|
72
|
-
border-top: var(--
|
73
|
-
border-bottom: var(--
|
73
|
+
border-top: var(--va-border-width) solid var(--va-c-text-light);
|
74
|
+
border-bottom: var(--va-border-width) solid var(--va-c-text-light);
|
74
75
|
|
75
76
|
.say-content {
|
76
77
|
display: block;
|
@@ -9,7 +9,7 @@ const router = useRouter()
|
|
9
9
|
<template>
|
10
10
|
<div class="sidebar-panel">
|
11
11
|
<div class="site-info" m="t-6">
|
12
|
-
<a class="site-author-avatar">
|
12
|
+
<a class="site-author-avatar" href="/about">
|
13
13
|
<img class="rounded-full" :src="config.author.avatar" alt="avatar">
|
14
14
|
<span class="site-author-status">{{ config.author.status.emoji }}</span>
|
15
15
|
</a>
|
@@ -68,7 +68,7 @@ const router = useRouter()
|
|
68
68
|
transition: 0.4s;
|
69
69
|
|
70
70
|
&:hover {
|
71
|
-
box-shadow: 0 0 30px rgba(var(--
|
71
|
+
box-shadow: 0 0 30px rgba(var(--va-c-primary-rgb), 0.2);
|
72
72
|
}
|
73
73
|
}
|
74
74
|
}
|
@@ -88,13 +88,13 @@ const router = useRouter()
|
|
88
88
|
line-height: 1.8rem;
|
89
89
|
border-radius: 50%;
|
90
90
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
91
|
-
background-color: var(--
|
91
|
+
background-color: var(--va-c-bg-light);
|
92
92
|
|
93
93
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
94
94
|
}
|
95
95
|
|
96
96
|
.site-name {
|
97
|
-
color: var(--
|
97
|
+
color: var(--va-c-text);
|
98
98
|
font-family: get-css-var('font-serif');
|
99
99
|
font-weight: get-css-var('font-serif-weight');
|
100
100
|
}
|
@@ -105,7 +105,7 @@ const router = useRouter()
|
|
105
105
|
}
|
106
106
|
|
107
107
|
.site-description {
|
108
|
-
color: var(--
|
108
|
+
color: var(--va-c-text);
|
109
109
|
font-size: 0.8rem;
|
110
110
|
}
|
111
111
|
</style>
|
@@ -55,7 +55,7 @@ const tags = useTag()
|
|
55
55
|
|
56
56
|
flex-direction: column;
|
57
57
|
|
58
|
-
color: var(--
|
58
|
+
color: var(--va-c-text);
|
59
59
|
|
60
60
|
&:first-child, &:last-child {
|
61
61
|
line-height: 1;
|
@@ -76,8 +76,8 @@ const tags = useTag()
|
|
76
76
|
}
|
77
77
|
|
78
78
|
.count {
|
79
|
-
color: var(--
|
80
|
-
font-family: var(--
|
79
|
+
color: var(--va-c-text);
|
80
|
+
font-family: var(--va-font-sans);
|
81
81
|
display: block;
|
82
82
|
text-align: center;
|
83
83
|
font-size: 1rem;
|
@@ -88,7 +88,7 @@ const tags = useTag()
|
|
88
88
|
height: 1.5rem;
|
89
89
|
|
90
90
|
&:hover {
|
91
|
-
color: var(--
|
91
|
+
color: var(--va-c-primary-light);
|
92
92
|
}
|
93
93
|
}
|
94
94
|
}
|
@@ -39,7 +39,7 @@ const showQr = ref(false)
|
|
39
39
|
|
40
40
|
div {
|
41
41
|
transform: scale(1.1);
|
42
|
-
transition: transform var(--
|
42
|
+
transition: transform var(--va-transition-duration) ease-in-out;
|
43
43
|
}
|
44
44
|
&:hover {
|
45
45
|
background-color: rgba(255, 255, 255, 0.9);
|
@@ -60,7 +60,7 @@ const showQr = ref(false)
|
|
60
60
|
overflow: hidden;
|
61
61
|
height: 0;
|
62
62
|
|
63
|
-
transition: height var(--
|
63
|
+
transition: height var(--va-transition-duration) ease-in-out;
|
64
64
|
|
65
65
|
&.show {
|
66
66
|
height: 220px;
|
package/components/YunWaline.vue
CHANGED
@@ -13,8 +13,8 @@ useWaline({
|
|
13
13
|
|
14
14
|
<style lang="scss">
|
15
15
|
#waline {
|
16
|
-
--waline-theme-color: var(--
|
17
|
-
--waline-active-color: var(--
|
16
|
+
--waline-theme-color: var(--va-c-primary);
|
17
|
+
--waline-active-color: var(--va-c-primary-light);
|
18
18
|
|
19
19
|
.v[data-class=v] {
|
20
20
|
.veditor {
|
package/composables/index.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ref, watch } from 'vue'
|
2
|
+
import { isClient } from '@vueuse/core'
|
2
3
|
|
3
4
|
/**
|
4
5
|
* fetch data from source, and random
|
@@ -11,10 +12,11 @@ export function useRandomData<T>(source: string | T[], random = false) {
|
|
11
12
|
|
12
13
|
watch(() => source, async() => {
|
13
14
|
let rawData: T[]
|
14
|
-
if (typeof source === 'string')
|
15
|
+
if (typeof source === 'string') {
|
16
|
+
if (!isClient) return
|
15
17
|
rawData = await fetch(source).then(res => res.json()) as T[]
|
16
|
-
|
17
|
-
|
18
|
+
}
|
19
|
+
else { rawData = source }
|
18
20
|
|
19
21
|
data.value = random ? Array.from(rawData).sort(() => Math.random() - 0.5) : rawData
|
20
22
|
}, { immediate: true })
|
package/config/index.ts
CHANGED
@@ -4,6 +4,13 @@ export const anonymousImage = 'https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/ava
|
|
4
4
|
* Theme Config
|
5
5
|
*/
|
6
6
|
export interface ThemeConfig {
|
7
|
+
colors: {
|
8
|
+
/**
|
9
|
+
* primary color
|
10
|
+
*/
|
11
|
+
primary: string
|
12
|
+
}
|
13
|
+
|
7
14
|
/**
|
8
15
|
* 首页标语
|
9
16
|
*/
|
@@ -100,6 +107,9 @@ export type ThemeUserConfig = Partial<ThemeConfig>
|
|
100
107
|
* Default Config
|
101
108
|
*/
|
102
109
|
export const defaultThemeConfig: ThemeConfig = {
|
110
|
+
colors: {
|
111
|
+
primary: '#0078E7',
|
112
|
+
},
|
103
113
|
banner: {
|
104
114
|
enable: true,
|
105
115
|
title: '云游君的小站',
|
@@ -128,9 +138,9 @@ export const defaultThemeConfig: ThemeConfig = {
|
|
128
138
|
icon: {
|
129
139
|
name: 'i-ri-cloud-line',
|
130
140
|
animated: true,
|
131
|
-
color: 'var(--
|
141
|
+
color: 'var(--va-c-primary)',
|
132
142
|
url: 'https://sponsors.yunyoujun.cn',
|
133
|
-
title: '',
|
143
|
+
title: 'Sponsor YunYouJun',
|
134
144
|
},
|
135
145
|
|
136
146
|
powered: true,
|
@@ -143,7 +153,7 @@ export const defaultThemeConfig: ThemeConfig = {
|
|
143
153
|
|
144
154
|
types: {
|
145
155
|
'link': {
|
146
|
-
color: 'var(--
|
156
|
+
color: 'var(--va-c-primary)',
|
147
157
|
icon: 'i-ri-external-link-line',
|
148
158
|
},
|
149
159
|
'bilibili': {
|
@@ -155,7 +165,7 @@ export const defaultThemeConfig: ThemeConfig = {
|
|
155
165
|
icon: 'i-ri-douban-line',
|
156
166
|
},
|
157
167
|
'github': {
|
158
|
-
color: 'var(--
|
168
|
+
color: 'var(--va-c-text)',
|
159
169
|
icon: 'i-ri-github-line',
|
160
170
|
},
|
161
171
|
'netease-cloud-music': {
|
@@ -163,7 +173,7 @@ export const defaultThemeConfig: ThemeConfig = {
|
|
163
173
|
icon: 'i-ri-netease-cloud-music-line',
|
164
174
|
},
|
165
175
|
'notion': {
|
166
|
-
color: 'var(--
|
176
|
+
color: 'var(--va-c-text)',
|
167
177
|
icon: 'i-simple-icons-notion',
|
168
178
|
},
|
169
179
|
'twitter': {
|
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,16 @@
|
|
1
|
+
import { Plugin } from 'vite';
|
2
|
+
|
1
3
|
declare const anonymousImage = "https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/avatar/none.jpg";
|
2
4
|
/**
|
3
5
|
* Theme Config
|
4
6
|
*/
|
5
7
|
interface ThemeConfig {
|
8
|
+
colors: {
|
9
|
+
/**
|
10
|
+
* primary color
|
11
|
+
*/
|
12
|
+
primary: string;
|
13
|
+
};
|
6
14
|
/**
|
7
15
|
* 首页标语
|
8
16
|
*/
|
@@ -90,4 +98,11 @@ declare type ThemeUserConfig = Partial<ThemeConfig>;
|
|
90
98
|
*/
|
91
99
|
declare const defaultThemeConfig: ThemeConfig;
|
92
100
|
|
93
|
-
|
101
|
+
interface UserOptions {
|
102
|
+
colors: {
|
103
|
+
primary: string;
|
104
|
+
};
|
105
|
+
}
|
106
|
+
declare function yunPlugin(userOptions?: Partial<ThemeConfig>): Plugin;
|
107
|
+
|
108
|
+
export { ThemeConfig, ThemeUserConfig, UserOptions, anonymousImage, yunPlugin as default, defaultThemeConfig, yunPlugin };
|
package/dist/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var t="https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/avatar/none.jpg",e= exports.defaultThemeConfig ={colors:{primary:"#0078E7"},banner:{enable:!0,title:"\u4E91\u6E38\u541B\u7684\u5C0F\u7AD9"},bg_image:{enable:!0,url:"https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/bg/stars-timing-0-blur-30px.jpg",dark:"https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/bg/galaxy.jpg",opacity:1},say:{enable:!0,api:"https://el-bot-api.vercel.app/api/words/young",hitokoto:{enable:!1,api:"https://v1.hitokoto.cn"}},pages:[],footer:{since:2022,icon:{name:"i-ri-cloud-line",animated:!0,color:"var(--va-c-primary)",url:"https://sponsors.yunyoujun.cn",title:"Sponsor YunYouJun"},powered:!0,beian:{enable:!1,icp:""}},types:{link:{color:"var(--va-c-primary)",icon:"i-ri-external-link-line"},bilibili:{color:"#FF8EB3",icon:"i-ri-bilibili-line"},douban:{color:"#007722",icon:"i-ri-douban-line"},github:{color:"var(--va-c-text)",icon:"i-ri-github-line"},"netease-cloud-music":{color:"#C10D0C",icon:"i-ri-netease-cloud-music-line"},notion:{color:"var(--va-c-text)",icon:"i-simple-icons-notion"},twitter:{color:"#1da1f2",icon:"i-ri-twitter-line"},wechat:{color:"#1AAD19",icon:"i-ri-wechat-2-line"},weibo:{color:"#E6162D",icon:"i-ri-weibo-line"},yuque:{color:"#25b864",icon:"i-ant-design-yuque-outlined"},zhihu:{color:"#0084FF",icon:"i-ri-zhihu-line"}}};function r(n=e){return{name:"valaxy-theme-yun",enforce:"pre",config(){var i;return{css:{preprocessorOptions:{scss:{additionalData:`$yun-c-primary: ${((i=n.colors)==null?void 0:i.primary)||"#0078E7"} !default;`}}}}}}}var c=r;exports.anonymousImage = t; exports.default = c; exports.defaultThemeConfig = e; exports.yunPlugin = r;
|
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
1
|
+
var a="https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/avatar/none.jpg",e={colors:{primary:"#0078E7"},banner:{enable:!0,title:"\u4E91\u6E38\u541B\u7684\u5C0F\u7AD9"},bg_image:{enable:!0,url:"https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/bg/stars-timing-0-blur-30px.jpg",dark:"https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/bg/galaxy.jpg",opacity:1},say:{enable:!0,api:"https://el-bot-api.vercel.app/api/words/young",hitokoto:{enable:!1,api:"https://v1.hitokoto.cn"}},pages:[],footer:{since:2022,icon:{name:"i-ri-cloud-line",animated:!0,color:"var(--va-c-primary)",url:"https://sponsors.yunyoujun.cn",title:"Sponsor YunYouJun"},powered:!0,beian:{enable:!1,icp:""}},types:{link:{color:"var(--va-c-primary)",icon:"i-ri-external-link-line"},bilibili:{color:"#FF8EB3",icon:"i-ri-bilibili-line"},douban:{color:"#007722",icon:"i-ri-douban-line"},github:{color:"var(--va-c-text)",icon:"i-ri-github-line"},"netease-cloud-music":{color:"#C10D0C",icon:"i-ri-netease-cloud-music-line"},notion:{color:"var(--va-c-text)",icon:"i-simple-icons-notion"},twitter:{color:"#1da1f2",icon:"i-ri-twitter-line"},wechat:{color:"#1AAD19",icon:"i-ri-wechat-2-line"},weibo:{color:"#E6162D",icon:"i-ri-weibo-line"},yuque:{color:"#25b864",icon:"i-ant-design-yuque-outlined"},zhihu:{color:"#0084FF",icon:"i-ri-zhihu-line"}}};function t(n=e){return{name:"valaxy-theme-yun",enforce:"pre",config(){var i;return{css:{preprocessorOptions:{scss:{additionalData:`$yun-c-primary: ${((i=n.colors)==null?void 0:i.primary)||"#0078E7"} !default;`}}}}}}}var s=t;export{a as anonymousImage,s as default,e as defaultThemeConfig,t as yunPlugin};
|
package/index.ts
CHANGED
@@ -1 +1,32 @@
|
|
1
|
+
import type { Plugin } from 'vite'
|
2
|
+
import type { ThemeConfig } from './config'
|
3
|
+
import { defaultThemeConfig } from './config'
|
4
|
+
|
1
5
|
export * from './config'
|
6
|
+
|
7
|
+
export interface UserOptions {
|
8
|
+
colors: {
|
9
|
+
primary: string
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
export function yunPlugin(userOptions: Partial<ThemeConfig> = defaultThemeConfig): Plugin {
|
14
|
+
return {
|
15
|
+
name: 'valaxy-theme-yun',
|
16
|
+
enforce: 'pre',
|
17
|
+
|
18
|
+
config() {
|
19
|
+
return {
|
20
|
+
css: {
|
21
|
+
preprocessorOptions: {
|
22
|
+
scss: {
|
23
|
+
additionalData: `$yun-c-primary: ${userOptions.colors?.primary || '#0078E7'} !default;`,
|
24
|
+
},
|
25
|
+
},
|
26
|
+
},
|
27
|
+
}
|
28
|
+
},
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
export default yunPlugin
|
package/layouts/base.vue
CHANGED
@@ -8,7 +8,9 @@ const { styles, icon, color } = usePostProperty(frontmatter.value.type)
|
|
8
8
|
</script>
|
9
9
|
|
10
10
|
<template>
|
11
|
-
<ValaxySidebar
|
11
|
+
<ValaxySidebar>
|
12
|
+
<slot name="sidebar" />
|
13
|
+
</ValaxySidebar>
|
12
14
|
|
13
15
|
<main class="yun-main flex lt-md:ml-0">
|
14
16
|
<div flex="~ 1 col" w="full" p="l-4 lt-md:0">
|
@@ -58,7 +60,7 @@ const { styles, icon, color } = usePostProperty(frontmatter.value.type)
|
|
58
60
|
@include xl {
|
59
61
|
.page-card {
|
60
62
|
// 8px scrollbar width
|
61
|
-
max-width: calc(100vw - 2 * var(--
|
63
|
+
max-width: calc(100vw - 2 * var(--va-sidebar-width-mobile) - 2rem - 8px);
|
62
64
|
}
|
63
65
|
}
|
64
66
|
</style>
|
package/layouts/home.vue
CHANGED
package/layouts/post.vue
CHANGED
@@ -13,7 +13,9 @@ const url = useFullUrl()
|
|
13
13
|
<slot name="header">
|
14
14
|
<YunPostMeta :frontmatter="frontmatter" />
|
15
15
|
</slot>
|
16
|
-
<
|
16
|
+
<Transition appear>
|
17
|
+
<router-view />
|
18
|
+
</Transition>
|
17
19
|
<YunSponsor v-if="frontmatter.sponsor || config.sponsor.enable" />
|
18
20
|
<ValaxyCopyright v-if="frontmatter.copyright || config.license.enabled" :url="url" m="y-4" />
|
19
21
|
</main>
|
package/layouts/tags.vue
CHANGED
package/locales/en.yml
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
valaxy_theme_yun: Valaxy Theme Yun
|
package/locales/zh-CN.yml
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
valaxy_theme_yun: Valaxy 主题 云
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.1.2",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"types": "dist/index.d.ts",
|
6
6
|
"repository": {
|
@@ -10,7 +10,7 @@
|
|
10
10
|
"homepage": "https://valaxy.yyj.moe/",
|
11
11
|
"dependencies": {
|
12
12
|
"@iconify-json/ant-design": "^1.1.1",
|
13
|
-
"@iconify-json/simple-icons": "^1.1.
|
13
|
+
"@iconify-json/simple-icons": "^1.1.7"
|
14
14
|
},
|
15
15
|
"author": {
|
16
16
|
"email": "me@yunyoujun.cn",
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"url": "https://www.yunyoujun.cn"
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
|
-
"valaxy": "0.
|
21
|
+
"valaxy": "0.1.2"
|
22
22
|
},
|
23
23
|
"scripts": {
|
24
24
|
"build": "tsup",
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@use './vars' as *;
|
2
|
+
@use '~/styles/mixins' as * with(
|
3
|
+
$namespace: 'yun'
|
4
|
+
);
|
5
|
+
|
6
|
+
:root {
|
7
|
+
@include set-css-var-from-map($common);
|
8
|
+
@include set-css-var-from-map($z-index, 'z');
|
9
|
+
}
|
10
|
+
|
11
|
+
:root {
|
12
|
+
@include set-css-var-from-map($light);
|
13
|
+
}
|
14
|
+
|
15
|
+
html.dark {
|
16
|
+
@include set-css-var-from-map($dark);
|
17
|
+
}
|
package/styles/layout/index.scss
CHANGED
package/styles/layout/post.scss
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
@use 'sass:map';
|
2
1
|
@use '~/styles/mixins' as *;
|
3
|
-
@use '~/styles/palette.scss' as *;
|
4
2
|
|
5
3
|
.post-card {
|
6
4
|
position: relative;
|
7
|
-
max-width:
|
5
|
+
max-width: var(--yun-post-card-max-width);
|
8
6
|
}
|
9
7
|
|
10
8
|
|
@@ -21,7 +19,8 @@
|
|
21
19
|
.post-title-link {
|
22
20
|
position: relative;
|
23
21
|
padding: 0.7rem 1.2rem;
|
24
|
-
color: var(--card-c-primary, var(--
|
22
|
+
color: var(--card-c-primary, var(--va-c-link));
|
23
|
+
font-weight: 900;
|
25
24
|
|
26
25
|
.icon {
|
27
26
|
width: 1.6rem;
|
@@ -64,7 +63,7 @@
|
|
64
63
|
position: absolute;
|
65
64
|
top: 1rem;
|
66
65
|
right: 1rem;
|
67
|
-
color: var(--
|
66
|
+
color: var(--va-c-warning);
|
68
67
|
font-size: 1.2rem;
|
69
68
|
}
|
70
69
|
|
@@ -78,7 +77,7 @@
|
|
78
77
|
|
79
78
|
margin-top: -0.2rem;
|
80
79
|
|
81
|
-
transition: box-shadow var(--
|
80
|
+
transition: box-shadow var(--va-transition-duration);
|
82
81
|
|
83
82
|
&:before {
|
84
83
|
content: none;
|
package/styles/markdown.scss
CHANGED
@@ -1,31 +1,11 @@
|
|
1
1
|
@use "~/styles/mixins" as *;
|
2
2
|
|
3
3
|
.markdown-body {
|
4
|
-
--
|
5
|
-
|
6
|
-
--c-toc-link: var(--yun-c-text-light);
|
4
|
+
--c-toc-link: var(--va-c-text-light);
|
7
5
|
}
|
8
6
|
|
9
7
|
html.dark {
|
10
8
|
.markdown-body {
|
11
|
-
--
|
12
|
-
|
13
|
-
--c-toc-link: var(--yun-c-text-dark);
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
.markdown-body {
|
18
|
-
ul {
|
19
|
-
> li {
|
20
|
-
list-style-type: disc;
|
21
|
-
|
22
|
-
li {
|
23
|
-
list-style-type: circle;
|
24
|
-
|
25
|
-
li {
|
26
|
-
list-style-type: square;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
9
|
+
--c-toc-link: var(--va-c-text-dark);
|
30
10
|
}
|
31
11
|
}
|
package/styles/vars.scss
CHANGED
@@ -1,7 +1,33 @@
|
|
1
|
-
:
|
2
|
-
--yun-sidebar-bg-image: url("https://cdn.jsdelivr.net/gh/YunYouJun/cdn@master/img/bg/alpha-stars-timing-1.webp")
|
3
|
-
}
|
1
|
+
@use 'sass:map';
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
// palette
|
4
|
+
$light: () !default;
|
5
|
+
$light: map.merge((
|
6
|
+
'bg-image': url('https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/bg/stars-timing-0-blur-30px.jpg'),
|
7
|
+
'sidebar-bg-color': var(--va-c-bg-light),
|
8
|
+
'sidebar-bg-image': url("https://cdn.jsdelivr.net/gh/YunYouJun/cdn@master/img/bg/alpha-stars-timing-1.webp")
|
9
|
+
), $light);
|
10
|
+
|
11
|
+
$dark: () !default;
|
12
|
+
$dark: map.merge((
|
13
|
+
'bg-image': none,
|
14
|
+
'sidebar-bg-image': none
|
15
|
+
), $dark);
|
16
|
+
|
17
|
+
// common
|
18
|
+
$common: () !default;
|
19
|
+
$common: map.merge((
|
20
|
+
'post-card-max-width': 900px
|
21
|
+
), $common);
|
22
|
+
|
23
|
+
$z-index: () !default;
|
24
|
+
$z-index: map.merge((
|
25
|
+
'cloud': 8,
|
26
|
+
'go-down': 9,
|
27
|
+
'sidebar': 10,
|
28
|
+
'fireworks': 11,
|
29
|
+
'menu-btn': 20,
|
30
|
+
'go-up-btn': 20,
|
31
|
+
'search-popup': 30,
|
32
|
+
'search-btn': 31,
|
33
|
+
), $z-index);
|