valaxy-theme-yun 0.0.5
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/LICENSE +21 -0
- package/README.md +33 -0
- package/components/YunAlgoliaSearch.vue +228 -0
- package/components/YunBackToTop.vue +59 -0
- package/components/YunBanner.vue +70 -0
- package/components/YunBase.vue +24 -0
- package/components/YunCard.vue +29 -0
- package/components/YunCategories.vue +45 -0
- package/components/YunCategory.vue +39 -0
- package/components/YunCloud.vue +76 -0
- package/components/YunConfig.vue +24 -0
- package/components/YunGirls.vue +104 -0
- package/components/YunGoDown.vue +46 -0
- package/components/YunLinks.vue +109 -0
- package/components/YunPageHeader.vue +16 -0
- package/components/YunPostCollapse.vue +187 -0
- package/components/YunPostMeta.vue +29 -0
- package/components/YunPostNav.vue +89 -0
- package/components/YunSay.vue +83 -0
- package/components/YunSidebar.vue +111 -0
- package/components/YunSidebarLinks.vue +30 -0
- package/components/YunSidebarNav.vue +95 -0
- package/components/YunSocialLinks.vue +31 -0
- package/components/YunSponsor.vue +75 -0
- package/components/YunWaline.vue +26 -0
- package/composables/index.ts +25 -0
- package/config/index.ts +192 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/index.ts +1 -0
- package/layouts/404.vue +25 -0
- package/layouts/archives.vue +21 -0
- package/layouts/base.vue +64 -0
- package/layouts/categories.vue +66 -0
- package/layouts/default.vue +7 -0
- package/layouts/home.vue +27 -0
- package/layouts/post.vue +22 -0
- package/layouts/tags.vue +83 -0
- package/locales/en.yml +0 -0
- package/locales/zh-CN.yml +0 -0
- package/package.json +25 -0
- package/styles/index.scss +2 -0
- package/styles/layout/index.scss +7 -0
- package/styles/layout/post.scss +86 -0
- package/styles/markdown.scss +31 -0
- package/styles/vars.scss +7 -0
- package/tsup.config.ts +13 -0
- package/utils/index.ts +5 -0
@@ -0,0 +1,111 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useConfig } from 'valaxy'
|
3
|
+
import { useRouter } from 'vue-router'
|
4
|
+
|
5
|
+
const config = useConfig()
|
6
|
+
const router = useRouter()
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<template>
|
10
|
+
<div class="sidebar-panel">
|
11
|
+
<div class="site-info" m="t-6">
|
12
|
+
<a class="site-author-avatar">
|
13
|
+
<img class="rounded-full" :src="config.author.avatar" alt="avatar">
|
14
|
+
<span class="site-author-status">{{ config.author.status.emoji }}</span>
|
15
|
+
</a>
|
16
|
+
<div class="site-author-name">
|
17
|
+
<a href="/about">
|
18
|
+
{{ config.author.name }}
|
19
|
+
</a>
|
20
|
+
</div>
|
21
|
+
<router-link v-if="router.hasRoute('about-site')" to="/about/site" class="site-name">
|
22
|
+
{{ config.title }}
|
23
|
+
</router-link>
|
24
|
+
<span v-else class="site-name">{{ config.title }}</span>
|
25
|
+
<h4 v-if="config.subtitle" class="site-subtitle block" text="xs">
|
26
|
+
{{ config.subtitle }}
|
27
|
+
</h4>
|
28
|
+
<div v-if="config.description" class="site-description my-1">
|
29
|
+
{{ config.description }}
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<YunSidebarNav />
|
34
|
+
<hr m="t-4 b-2">
|
35
|
+
<YunSocialLinks />
|
36
|
+
<hr m="y-2">
|
37
|
+
<YunSidebarLinks />
|
38
|
+
<br>
|
39
|
+
</div>
|
40
|
+
</template>
|
41
|
+
|
42
|
+
<style lang="scss">
|
43
|
+
@use "~/styles/mixins" as *;
|
44
|
+
|
45
|
+
.sidebar-panel {
|
46
|
+
padding: 0.5rem;
|
47
|
+
}
|
48
|
+
|
49
|
+
.site-info {
|
50
|
+
&.fix-top {
|
51
|
+
margin-top: -1.5rem;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
.site-author-avatar {
|
56
|
+
display: inline-block;
|
57
|
+
line-height: 0;
|
58
|
+
position: relative;
|
59
|
+
|
60
|
+
img {
|
61
|
+
height: 96px;
|
62
|
+
width: 96px;
|
63
|
+
max-width: 100%;
|
64
|
+
margin: 0px;
|
65
|
+
padding: 4px;
|
66
|
+
background-color: white;
|
67
|
+
box-shadow: 0 0 10px rgba(black, 0.2);
|
68
|
+
transition: 0.4s;
|
69
|
+
|
70
|
+
&:hover {
|
71
|
+
box-shadow: 0 0 30px rgba(var(--yun-c-primary-rgb), 0.2);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
.site-author-name {
|
77
|
+
margin-top: 0;
|
78
|
+
margin-bottom: 1rem;
|
79
|
+
line-height: 1.5;
|
80
|
+
}
|
81
|
+
|
82
|
+
.site-author-status {
|
83
|
+
position: absolute;
|
84
|
+
height: 1.8rem;
|
85
|
+
width: 1.8rem;
|
86
|
+
bottom: 0;
|
87
|
+
right: 0;
|
88
|
+
line-height: 1.8rem;
|
89
|
+
border-radius: 50%;
|
90
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
91
|
+
background-color: var(--yun-c-bg-light);
|
92
|
+
|
93
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
94
|
+
}
|
95
|
+
|
96
|
+
.site-name {
|
97
|
+
color: var(--yun-c-text);
|
98
|
+
font-family: get-css-var('font-serif');
|
99
|
+
font-weight: get-css-var('font-serif-weight');
|
100
|
+
}
|
101
|
+
|
102
|
+
.site-subtitle {
|
103
|
+
color: get-css-var('c-gray');
|
104
|
+
display: block;
|
105
|
+
}
|
106
|
+
|
107
|
+
.site-description {
|
108
|
+
color: var(--yun-c-text);
|
109
|
+
font-size: 0.8rem;
|
110
|
+
}
|
111
|
+
</style>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useThemeConfig } from 'valaxy'
|
3
|
+
const themeConfig = useThemeConfig()
|
4
|
+
</script>
|
5
|
+
|
6
|
+
<template>
|
7
|
+
<div class="links">
|
8
|
+
<a v-for="item, i in themeConfig.pages" :key="i" class="link-item yun-icon-btn" :href="item.url" :title="item.name" :target="item.url.startsWith('http') ? '_blank' : ''" :style="`color:${item.color}`">
|
9
|
+
<div :class="item.icon" class="icon" />
|
10
|
+
</a>
|
11
|
+
</div>
|
12
|
+
</template>
|
13
|
+
|
14
|
+
<style lang="scss">
|
15
|
+
.sidebar {
|
16
|
+
.links {
|
17
|
+
display: flex;
|
18
|
+
justify-content: center;
|
19
|
+
}
|
20
|
+
|
21
|
+
.link-item {
|
22
|
+
display: inline-flex;
|
23
|
+
|
24
|
+
.icon {
|
25
|
+
width: 2rem;
|
26
|
+
height: 2rem;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
</style>
|
@@ -0,0 +1,95 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useCategory, usePostList, useTag } from 'valaxy'
|
3
|
+
import { useI18n } from 'vue-i18n'
|
4
|
+
|
5
|
+
const { t } = useI18n()
|
6
|
+
|
7
|
+
const posts = usePostList()
|
8
|
+
const categories = useCategory()
|
9
|
+
const tags = useTag()
|
10
|
+
</script>
|
11
|
+
|
12
|
+
<template>
|
13
|
+
<nav class="site-nav" text-xl mt-6>
|
14
|
+
<router-link class="site-link-item yun-icon-btn" to="/" :title="t('menu.home')">
|
15
|
+
<div i-ri-home-4-line />
|
16
|
+
</router-link>
|
17
|
+
|
18
|
+
<router-link class="site-link-item" to="/archives/" :title="t('menu.archives')">
|
19
|
+
<div class="icon" i-ri-archive-line />
|
20
|
+
<span class="count">{{ posts.length }}</span>
|
21
|
+
</router-link>
|
22
|
+
<router-link class="site-link-item" to="/categories/" :title="t('menu.categories')">
|
23
|
+
<div class="icon" i-ri-folder-2-line />
|
24
|
+
<span class="count">{{ Array.from(categories.children).length }}</span>
|
25
|
+
</router-link>
|
26
|
+
<router-link class="site-link-item" to="/tags/" :title="t('menu.tags')">
|
27
|
+
<div class="icon" i-ri-price-tag-3-line />
|
28
|
+
<span class="count">{{ Array.from(tags).length }}</span>
|
29
|
+
</router-link>
|
30
|
+
|
31
|
+
<router-link class="site-link-item yun-icon-btn" to="/about" :title="t('button.about')">
|
32
|
+
<div i-ri-clipboard-line />
|
33
|
+
</router-link>
|
34
|
+
</nav>
|
35
|
+
</template>
|
36
|
+
|
37
|
+
<style lang="scss">
|
38
|
+
@use "~/styles/mixins" as *;
|
39
|
+
|
40
|
+
.site-nav {
|
41
|
+
display: flex;
|
42
|
+
justify-content: center;
|
43
|
+
overflow: hidden;
|
44
|
+
line-height: 1.5;
|
45
|
+
white-space: nowrap;
|
46
|
+
text-align: center;
|
47
|
+
margin-top: 1rem;
|
48
|
+
}
|
49
|
+
|
50
|
+
.site-link-item {
|
51
|
+
display: flex;
|
52
|
+
padding: 0 15px;
|
53
|
+
align-items: center;
|
54
|
+
border-left: 1px solid get-css-var('c-gray');
|
55
|
+
|
56
|
+
flex-direction: column;
|
57
|
+
|
58
|
+
color: var(--yun-c-text);
|
59
|
+
|
60
|
+
&:first-child, &:last-child {
|
61
|
+
line-height: 1;
|
62
|
+
padding: 0;
|
63
|
+
}
|
64
|
+
|
65
|
+
&:first-child {
|
66
|
+
border-left: none;
|
67
|
+
border-right: 1px solid get-css-var('c-gray');
|
68
|
+
}
|
69
|
+
|
70
|
+
&:last-child {
|
71
|
+
border-left: 1px solid get-css-var('c-gray');
|
72
|
+
}
|
73
|
+
|
74
|
+
&:nth-child(2) {
|
75
|
+
border: none;
|
76
|
+
}
|
77
|
+
|
78
|
+
.count {
|
79
|
+
color: var(--yun-c-text);
|
80
|
+
font-family: var(--yun-font-sans);
|
81
|
+
display: block;
|
82
|
+
text-align: center;
|
83
|
+
font-size: 1rem;
|
84
|
+
}
|
85
|
+
|
86
|
+
.icon {
|
87
|
+
width: 1.5rem;
|
88
|
+
height: 1.5rem;
|
89
|
+
|
90
|
+
&:hover {
|
91
|
+
color: var(--yun-c-primary-light);
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
</style>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useConfig } from 'valaxy'
|
3
|
+
|
4
|
+
const config = useConfig()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<div class="links-of-author">
|
9
|
+
<a v-for="item, i in config.social" :key="i" class="links-of-author-item yun-icon-btn" rel="noopener" :href="item.link" :title="item.name" target="_blank" :style="`color:${item.color}`">
|
10
|
+
<div class="icon" :class="item.icon" />
|
11
|
+
</a>
|
12
|
+
</div>
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<style lang="scss">
|
16
|
+
.links-of-author {
|
17
|
+
display: flex;
|
18
|
+
flex-wrap: wrap;
|
19
|
+
justify-content: center;
|
20
|
+
|
21
|
+
.icon {
|
22
|
+
width: 1.5rem;
|
23
|
+
height: 1.5rem;
|
24
|
+
}
|
25
|
+
|
26
|
+
&-item {
|
27
|
+
line-height: 1;
|
28
|
+
font-size: 0.9rem;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
</style>
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useConfig } from 'valaxy'
|
3
|
+
import { ref } from 'vue'
|
4
|
+
import { useI18n } from 'vue-i18n'
|
5
|
+
const { t } = useI18n()
|
6
|
+
|
7
|
+
const config = useConfig()
|
8
|
+
|
9
|
+
const showQr = ref(false)
|
10
|
+
</script>
|
11
|
+
|
12
|
+
<template>
|
13
|
+
<div class="yun-sponsor-container flex justify-center items-center flex-col">
|
14
|
+
<!-- <a href="" :title="t('reward.donate')">
|
15
|
+
|
16
|
+
</a> -->
|
17
|
+
<button class="sponsor-button yun-icon-btn shadow hover:shadow-md" :title="t('reward.donate')" text="red-400" @click="showQr = !showQr">
|
18
|
+
<div i-ri-heart-line />
|
19
|
+
</button>
|
20
|
+
|
21
|
+
<div class="qrcode-container qrcode flex justify-around" m="y-4" :class="showQr && 'show'">
|
22
|
+
<a
|
23
|
+
v-for="method, i in config.sponsor.methods" :key="i"
|
24
|
+
class="flex flex-col justify-center items-center animate-iteration-1"
|
25
|
+
:class="showQr && 'animate-fade-in'"
|
26
|
+
:href="method.url" target="_blank"
|
27
|
+
:style="`color:${method.color}`"
|
28
|
+
>
|
29
|
+
<img w="full" class="sponsor-method-img" border="~ rounded" p="1" loading="lazy" :src="method.url" :title="method.name">
|
30
|
+
<div text="xl" m="2" :class="method.icon" />
|
31
|
+
</a>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</template>
|
35
|
+
|
36
|
+
<style lang="scss">
|
37
|
+
.sponsor-button {
|
38
|
+
background-color: rgba(255, 255, 255, 0.1);
|
39
|
+
|
40
|
+
div {
|
41
|
+
transform: scale(1.1);
|
42
|
+
transition: transform var(--yun-transition-duration) ease-in-out;
|
43
|
+
}
|
44
|
+
&:hover {
|
45
|
+
background-color: rgba(255, 255, 255, 0.9);
|
46
|
+
|
47
|
+
div {
|
48
|
+
transform: scale(1.2);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
a {
|
53
|
+
&:hover {
|
54
|
+
border: none;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
.qrcode-container {
|
60
|
+
overflow: hidden;
|
61
|
+
height: 0;
|
62
|
+
|
63
|
+
transition: height var(--yun-transition-duration) ease-in-out;
|
64
|
+
|
65
|
+
&.show {
|
66
|
+
height: 220px;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
.sponsor-method-img {
|
71
|
+
width: 12rem;
|
72
|
+
max-width: 90%;
|
73
|
+
aspect-ratio: 1;
|
74
|
+
}
|
75
|
+
</style>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useConfig, useWaline } from 'valaxy'
|
3
|
+
|
4
|
+
const config = useConfig()
|
5
|
+
useWaline({
|
6
|
+
serverURL: config.value.comment.waline.serverURL,
|
7
|
+
})
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<template>
|
11
|
+
<div id="waline" w="full" />
|
12
|
+
</template>
|
13
|
+
|
14
|
+
<style lang="scss">
|
15
|
+
#waline {
|
16
|
+
--waline-theme-color: var(--yun-c-primary);
|
17
|
+
--waline-active-color: var(--yun-c-primary-light);
|
18
|
+
|
19
|
+
.v[data-class=v] {
|
20
|
+
.veditor {
|
21
|
+
width: calc(100% - 2em);
|
22
|
+
padding: 0.5rem;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
</style>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ref, watch } from 'vue'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* fetch data from source, and random
|
5
|
+
* @param source
|
6
|
+
* @param random
|
7
|
+
* @returns
|
8
|
+
*/
|
9
|
+
export function useRandomData<T>(source: string | T[], random = false) {
|
10
|
+
const data = ref<T[]>()
|
11
|
+
|
12
|
+
watch(() => source, async() => {
|
13
|
+
let rawData: T[]
|
14
|
+
if (typeof source === 'string')
|
15
|
+
rawData = await fetch(source).then(res => res.json()) as T[]
|
16
|
+
else
|
17
|
+
rawData = source
|
18
|
+
|
19
|
+
data.value = random ? Array.from(rawData).sort(() => Math.random() - 0.5) : rawData
|
20
|
+
}, { immediate: true })
|
21
|
+
|
22
|
+
return {
|
23
|
+
data,
|
24
|
+
}
|
25
|
+
}
|
package/config/index.ts
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
export const anonymousImage = 'https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/avatar/none.jpg'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Theme Config
|
5
|
+
*/
|
6
|
+
export interface ThemeConfig {
|
7
|
+
/**
|
8
|
+
* 首页标语
|
9
|
+
*/
|
10
|
+
banner: {
|
11
|
+
enable: boolean
|
12
|
+
/**
|
13
|
+
* 标题
|
14
|
+
*/
|
15
|
+
title: string
|
16
|
+
}
|
17
|
+
|
18
|
+
bg_image: {
|
19
|
+
enable: boolean
|
20
|
+
url: string
|
21
|
+
dark?: string
|
22
|
+
opacity: number
|
23
|
+
}
|
24
|
+
|
25
|
+
/**
|
26
|
+
* say something
|
27
|
+
* https://say.elpsy.cn
|
28
|
+
*/
|
29
|
+
say: {
|
30
|
+
enable: boolean
|
31
|
+
api: string
|
32
|
+
hitokoto: {
|
33
|
+
enable: boolean
|
34
|
+
api: string
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
pages: {
|
39
|
+
name: string
|
40
|
+
url: string
|
41
|
+
icon: string
|
42
|
+
color: string
|
43
|
+
}[]
|
44
|
+
|
45
|
+
/**
|
46
|
+
* footer
|
47
|
+
*/
|
48
|
+
footer: {
|
49
|
+
/**
|
50
|
+
* 建站于
|
51
|
+
*/
|
52
|
+
since: number
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Icon between year and copyright info.
|
56
|
+
*/
|
57
|
+
icon: {
|
58
|
+
/**
|
59
|
+
* icon name, i-xxx
|
60
|
+
*/
|
61
|
+
name: string
|
62
|
+
animated: boolean
|
63
|
+
color: string
|
64
|
+
url: string
|
65
|
+
title: string
|
66
|
+
}
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Powered by valaxy & valaxy-theme-${name}, default is yun
|
70
|
+
*/
|
71
|
+
powered: boolean
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Chinese Users | 中国用户
|
75
|
+
* 备案 ICP
|
76
|
+
* 国内用户需要在网站页脚展示备案 ICP 号
|
77
|
+
* https://beian.miit.gov.cn/
|
78
|
+
*/
|
79
|
+
beian: {
|
80
|
+
enable: boolean
|
81
|
+
/**
|
82
|
+
* 苏ICP备xxxxxxxx号
|
83
|
+
*/
|
84
|
+
icp: string
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
/**
|
89
|
+
* post card types
|
90
|
+
*/
|
91
|
+
types: Record<string, {
|
92
|
+
color: string
|
93
|
+
icon: string
|
94
|
+
}>
|
95
|
+
}
|
96
|
+
|
97
|
+
export type ThemeUserConfig = Partial<ThemeConfig>
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Default Config
|
101
|
+
*/
|
102
|
+
export const defaultThemeConfig: ThemeConfig = {
|
103
|
+
banner: {
|
104
|
+
enable: true,
|
105
|
+
title: '云游君的小站',
|
106
|
+
},
|
107
|
+
|
108
|
+
bg_image: {
|
109
|
+
enable: true,
|
110
|
+
url: 'https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/bg/stars-timing-0-blur-30px.jpg',
|
111
|
+
dark: 'https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/bg/galaxy.jpg',
|
112
|
+
opacity: 1,
|
113
|
+
},
|
114
|
+
|
115
|
+
say: {
|
116
|
+
enable: true,
|
117
|
+
api: 'https://el-bot-api.vercel.app/api/words/young',
|
118
|
+
hitokoto: {
|
119
|
+
enable: false,
|
120
|
+
api: 'https://v1.hitokoto.cn',
|
121
|
+
},
|
122
|
+
},
|
123
|
+
|
124
|
+
pages: [],
|
125
|
+
|
126
|
+
footer: {
|
127
|
+
since: 2022,
|
128
|
+
icon: {
|
129
|
+
name: 'i-ri-cloud-line',
|
130
|
+
animated: true,
|
131
|
+
color: 'var(--yun-c-primary)',
|
132
|
+
url: 'https://sponsors.yunyoujun.cn',
|
133
|
+
title: '',
|
134
|
+
},
|
135
|
+
|
136
|
+
powered: true,
|
137
|
+
|
138
|
+
beian: {
|
139
|
+
enable: false,
|
140
|
+
icp: '',
|
141
|
+
},
|
142
|
+
},
|
143
|
+
|
144
|
+
types: {
|
145
|
+
'link': {
|
146
|
+
color: 'var(--yun-c-primary)',
|
147
|
+
icon: 'i-ri-external-link-line',
|
148
|
+
},
|
149
|
+
'bilibili': {
|
150
|
+
color: '#FF8EB3',
|
151
|
+
icon: 'i-ri-bilibili-line',
|
152
|
+
},
|
153
|
+
'douban': {
|
154
|
+
color: '#007722',
|
155
|
+
icon: 'i-ri-douban-line',
|
156
|
+
},
|
157
|
+
'github': {
|
158
|
+
color: 'var(--yun-c-text)',
|
159
|
+
icon: 'i-ri-github-line',
|
160
|
+
},
|
161
|
+
'netease-cloud-music': {
|
162
|
+
color: '#C10D0C',
|
163
|
+
icon: 'i-ri-netease-cloud-music-line',
|
164
|
+
},
|
165
|
+
'notion': {
|
166
|
+
color: 'var(--yun-c-text)',
|
167
|
+
icon: 'i-simple-icons-notion',
|
168
|
+
},
|
169
|
+
'twitter': {
|
170
|
+
color: '#1da1f2',
|
171
|
+
icon: 'i-ri-twitter-line',
|
172
|
+
},
|
173
|
+
'wechat': {
|
174
|
+
color: '#1AAD19',
|
175
|
+
icon: 'i-ri-wechat-2-line',
|
176
|
+
},
|
177
|
+
'weibo': {
|
178
|
+
color: '#E6162D',
|
179
|
+
icon: 'i-ri-weibo-line',
|
180
|
+
},
|
181
|
+
'yuque': {
|
182
|
+
color: '#25b864',
|
183
|
+
icon: 'i-ant-design-yuque-outlined',
|
184
|
+
},
|
185
|
+
'zhihu': {
|
186
|
+
color: '#0084FF',
|
187
|
+
icon: 'i-ri-zhihu-line',
|
188
|
+
},
|
189
|
+
},
|
190
|
+
}
|
191
|
+
|
192
|
+
export default defaultThemeConfig
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
declare const anonymousImage = "https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/avatar/none.jpg";
|
2
|
+
/**
|
3
|
+
* Theme Config
|
4
|
+
*/
|
5
|
+
interface ThemeConfig {
|
6
|
+
/**
|
7
|
+
* 首页标语
|
8
|
+
*/
|
9
|
+
banner: {
|
10
|
+
enable: boolean;
|
11
|
+
/**
|
12
|
+
* 标题
|
13
|
+
*/
|
14
|
+
title: string;
|
15
|
+
};
|
16
|
+
bg_image: {
|
17
|
+
enable: boolean;
|
18
|
+
url: string;
|
19
|
+
dark?: string;
|
20
|
+
opacity: number;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* say something
|
24
|
+
* https://say.elpsy.cn
|
25
|
+
*/
|
26
|
+
say: {
|
27
|
+
enable: boolean;
|
28
|
+
api: string;
|
29
|
+
hitokoto: {
|
30
|
+
enable: boolean;
|
31
|
+
api: string;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
pages: {
|
35
|
+
name: string;
|
36
|
+
url: string;
|
37
|
+
icon: string;
|
38
|
+
color: string;
|
39
|
+
}[];
|
40
|
+
/**
|
41
|
+
* footer
|
42
|
+
*/
|
43
|
+
footer: {
|
44
|
+
/**
|
45
|
+
* 建站于
|
46
|
+
*/
|
47
|
+
since: number;
|
48
|
+
/**
|
49
|
+
* Icon between year and copyright info.
|
50
|
+
*/
|
51
|
+
icon: {
|
52
|
+
/**
|
53
|
+
* icon name, i-xxx
|
54
|
+
*/
|
55
|
+
name: string;
|
56
|
+
animated: boolean;
|
57
|
+
color: string;
|
58
|
+
url: string;
|
59
|
+
title: string;
|
60
|
+
};
|
61
|
+
/**
|
62
|
+
* Powered by valaxy & valaxy-theme-${name}, default is yun
|
63
|
+
*/
|
64
|
+
powered: boolean;
|
65
|
+
/**
|
66
|
+
* Chinese Users | 中国用户
|
67
|
+
* 备案 ICP
|
68
|
+
* 国内用户需要在网站页脚展示备案 ICP 号
|
69
|
+
* https://beian.miit.gov.cn/
|
70
|
+
*/
|
71
|
+
beian: {
|
72
|
+
enable: boolean;
|
73
|
+
/**
|
74
|
+
* 苏ICP备xxxxxxxx号
|
75
|
+
*/
|
76
|
+
icp: string;
|
77
|
+
};
|
78
|
+
};
|
79
|
+
/**
|
80
|
+
* post card types
|
81
|
+
*/
|
82
|
+
types: Record<string, {
|
83
|
+
color: string;
|
84
|
+
icon: string;
|
85
|
+
}>;
|
86
|
+
}
|
87
|
+
declare type ThemeUserConfig = Partial<ThemeConfig>;
|
88
|
+
/**
|
89
|
+
* Default Config
|
90
|
+
*/
|
91
|
+
declare const defaultThemeConfig: ThemeConfig;
|
92
|
+
|
93
|
+
export { ThemeConfig, ThemeUserConfig, anonymousImage, defaultThemeConfig };
|
package/dist/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var e="https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/avatar/none.jpg",n= exports.defaultThemeConfig ={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(--yun-c-primary)",url:"https://sponsors.yunyoujun.cn",title:""},powered:!0,beian:{enable:!1,icp:""}},types:{link:{color:"var(--yun-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(--yun-c-text)",icon:"i-ri-github-line"},"netease-cloud-music":{color:"#C10D0C",icon:"i-ri-netease-cloud-music-line"},notion:{color:"var(--yun-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"}}};exports.anonymousImage = e; exports.defaultThemeConfig = n;
|
package/dist/index.mjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
var n="https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/avatar/none.jpg",o={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(--yun-c-primary)",url:"https://sponsors.yunyoujun.cn",title:""},powered:!0,beian:{enable:!1,icp:""}},types:{link:{color:"var(--yun-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(--yun-c-text)",icon:"i-ri-github-line"},"netease-cloud-music":{color:"#C10D0C",icon:"i-ri-netease-cloud-music-line"},notion:{color:"var(--yun-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"}}};export{n as anonymousImage,o as defaultThemeConfig};
|
package/index.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './config'
|