@wot-ui/vitepress-theme 2.0.0-alpha.10
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/README.md +153 -0
- package/dist/config.js +118 -0
- package/dist/index.js +68 -0
- package/dist/locales/md-component-links.js +15 -0
- package/dist/plugins/md-component-links.js +34 -0
- package/dist/plugins/md-scss-vars.js +73 -0
- package/dist/plugins/md-version-badge.js +51 -0
- package/dist/plugins/virtual-version-data.js +83 -0
- package/dist/src/config.d.ts +3 -0
- package/dist/src/index.d.ts +21 -0
- package/dist/src/locales/md-component-links.d.ts +13 -0
- package/dist/src/plugins/md-component-links.d.ts +3 -0
- package/dist/src/plugins/md-scss-vars.d.ts +3 -0
- package/dist/src/plugins/md-version-badge.d.ts +6 -0
- package/dist/src/plugins/virtual-version-data.d.ts +3 -0
- package/dist/src/theme/composables/adSponsor.d.ts +30 -0
- package/dist/src/theme/composables/adsData.d.ts +16 -0
- package/dist/src/theme/composables/banner.d.ts +16 -0
- package/dist/src/theme/composables/cases.d.ts +16 -0
- package/dist/src/theme/composables/friendly.d.ts +19 -0
- package/dist/src/theme/composables/sponsor.d.ts +3 -0
- package/dist/src/theme/composables/team.d.ts +28 -0
- package/dist/src/theme/options.d.ts +3 -0
- package/dist/src/types.d.ts +86 -0
- package/dist/theme/Layout.vue +45 -0
- package/dist/theme/components/AsideSponsors.vue +105 -0
- package/dist/theme/components/Banner.vue +377 -0
- package/dist/theme/components/CustomFooter.vue +123 -0
- package/dist/theme/components/ExternalLink.vue +36 -0
- package/dist/theme/components/HomeCases.vue +122 -0
- package/dist/theme/components/HomeFriendly.vue +96 -0
- package/dist/theme/components/HomeTeam.vue +250 -0
- package/dist/theme/components/QrCode.vue +45 -0
- package/dist/theme/components/SidebarAds.vue +86 -0
- package/dist/theme/components/SpecialSponsor.vue +115 -0
- package/dist/theme/components/SvgImage.vue +22 -0
- package/dist/theme/components/VPContent.vue +92 -0
- package/dist/theme/components/VPDoc.vue +222 -0
- package/dist/theme/components/VPFeature.vue +150 -0
- package/dist/theme/components/VPIframe.vue +445 -0
- package/dist/theme/components/VPLocalNav.vue +151 -0
- package/dist/theme/components/VPNavBar.vue +253 -0
- package/dist/theme/components/VPSidebar.vue +120 -0
- package/dist/theme/components/VPSidebarItem.vue +271 -0
- package/dist/theme/components/WwAds.vue +74 -0
- package/dist/theme/composables/adSponsor.js +29 -0
- package/dist/theme/composables/adsData.js +35 -0
- package/dist/theme/composables/banner.js +35 -0
- package/dist/theme/composables/cases.js +43 -0
- package/dist/theme/composables/friendly.js +35 -0
- package/dist/theme/composables/sponsor.js +35 -0
- package/dist/theme/composables/team.js +48 -0
- package/dist/theme/options.js +4 -0
- package/dist/theme/styles/custom.css +206 -0
- package/dist/theme/styles/vars.css +136 -0
- package/dist/types.js +0 -0
- package/package.json +41 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!-- eslint-disable quotes -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
import { onMounted, ref, inject } from 'vue'
|
|
4
|
+
import AsideSponsors from './AsideSponsors.vue'
|
|
5
|
+
import { wotThemeOptionsKey } from '../options.js'
|
|
6
|
+
|
|
7
|
+
const showTemp = ref(false)
|
|
8
|
+
const options = inject(wotThemeOptionsKey)
|
|
9
|
+
const wwadsId = options?.ads !== false ? options?.ads?.wwadsId : null
|
|
10
|
+
|
|
11
|
+
// function called if wwads is blocked
|
|
12
|
+
function ABDetected() {
|
|
13
|
+
const wwadsElement = document.getElementsByClassName('aside-temp')[0]
|
|
14
|
+
if (wwadsElement) {
|
|
15
|
+
wwadsElement.insertAdjacentHTML(
|
|
16
|
+
'beforeend',
|
|
17
|
+
"<style>.wwads-horizontal,.wwads-vertical{background-color:#f4f8fa;padding:5px;min-height:120px;margin-top:20px;box-sizing:border-box;border-radius:3px;font-family:sans-serif;display:flex;min-width:150px;position:relative;overflow:hidden;}.wwads-horizontal{flex-wrap:wrap;justify-content:center}.wwads-vertical{flex-direction:column;align-items:center;padding-bottom:32px}.wwads-horizontal a,.wwads-vertical a{text-decoration:none}.wwads-horizontal .wwads-img,.wwads-vertical .wwads-img{margin:5px}.wwads-horizontal .wwads-content,.wwads-vertical .wwads-content{margin:5px}.wwads-horizontal .wwads-content{flex:130px}.wwads-vertical .wwads-content{margin-top:10px}.wwads-horizontal .wwads-text,.wwads-content .wwads-text{font-size:14px;line-height:1.4;color:#0e1011;-webkit-font-smoothing:antialiased}.wwads-horizontal .wwads-poweredby,.wwads-vertical .wwads-poweredby{display:block;font-size:11px;color:#a6b7bf;margin-top:1em}.wwads-vertical .wwads-poweredby{position:absolute;left:10px;bottom:10px}.wwads-horizontal .wwads-poweredby span,.wwads-vertical .wwads-poweredby span{transition:all 0.2s ease-in-out;margin-left:-1em}.wwads-horizontal .wwads-poweredby span:first-child,.wwads-vertical .wwads-poweredby span:first-child{opacity:0}.wwads-horizontal:hover .wwads-poweredby span,.wwads-vertical:hover .wwads-poweredby span{opacity:1;margin-left:0}.wwads-horizontal .wwads-hide,.wwads-vertical .wwads-hide{position:absolute;right:-23px;bottom:-23px;width:46px;height:46px;border-radius:23px;transition:all 0.3s ease-in-out;cursor:pointer;}.wwads-horizontal .wwads-hide:hover,.wwads-vertical .wwads-hide:hover{background:rgb(0 0 0 /0.05)}.wwads-horizontal .wwads-hide svg,.wwads-vertical .wwads-hide svg{position:absolute;left:10px;top:10px;fill:#a6b7bf}.wwads-horizontal .wwads-hide:hover svg,.wwads-vertical .wwads-hide:hover svg{fill:#3E4546}</style><a href='https://wwads.cn/page/whitelist-wwads' class='wwads-img' target='_blank' rel='nofollow'><img src='https://creatives-1301677708.file.myqcloud.com/images/placeholder/wwads-friendly-ads.png' width='130'></a><div class='wwads-content'><a href='https://wwads.cn/page/whitelist-wwads' class='wwads-text' target='_blank' rel='nofollow'>为了本站的长期运营,请将我们的网站加入广告拦截器的白名单,感谢您的支持!</a><a href='https://wwads.cn/page/end-user-privacy' class='wwads-poweredby' title='万维广告 ~ 让广告更优雅,且有用' target='_blank'><span>万维</span><span>广告</span></a></div><a class='wwads-hide' onclick='parentNode.remove()' title='隐藏广告'><svg xmlns='http://www.w3.org/2000/svg' width='6' height='7'><path d='M.879.672L3 2.793 5.121.672a.5.5 0 11.707.707L3.708 3.5l2.12 2.121a.5.5 0 11-.707.707l-2.12-2.12-2.122 2.12a.5.5 0 11-.707-.707l2.121-2.12L.172 1.378A.5.5 0 01.879.672z'></path></svg></a>"
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// check document ready
|
|
23
|
+
function docReady(callback: () => void) {
|
|
24
|
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
25
|
+
setTimeout(callback, 1)
|
|
26
|
+
} else {
|
|
27
|
+
document.addEventListener('DOMContentLoaded', callback)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
onMounted(() => {
|
|
32
|
+
if (!wwadsId) return
|
|
33
|
+
|
|
34
|
+
const s = document.createElement('script')
|
|
35
|
+
s.type = 'text/javascript'
|
|
36
|
+
s.src = 'https://cdn.wwads.cn/js/makemoney.js'
|
|
37
|
+
document.querySelector('.wwads-container')!.appendChild(s)
|
|
38
|
+
|
|
39
|
+
// check if wwads' fire function was blocked after document is ready with 3s timeout (waiting the ad loading)
|
|
40
|
+
docReady(() => {
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
if ((window as any)._AdBlockInit === undefined) {
|
|
43
|
+
showTemp.value = true
|
|
44
|
+
ABDetected()
|
|
45
|
+
}
|
|
46
|
+
}, 3000)
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<AsideSponsors></AsideSponsors>
|
|
53
|
+
<template v-if="wwadsId">
|
|
54
|
+
<div class="wwads-container" v-if="!showTemp">
|
|
55
|
+
<div class="wwads-cn wwads-vertical" :data-id="wwadsId"></div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="aside-temp wwads-vertical" v-if="showTemp"></div>
|
|
58
|
+
</template>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<style>
|
|
62
|
+
.wwads-container,
|
|
63
|
+
.aside-temp {
|
|
64
|
+
padding: 1px 15px 10px;
|
|
65
|
+
margin-top: 20px;
|
|
66
|
+
background-color: var(--vp-c-bg-soft);
|
|
67
|
+
}
|
|
68
|
+
.wwads-vertical {
|
|
69
|
+
background-color: transparent !important;
|
|
70
|
+
}
|
|
71
|
+
.wwads-text {
|
|
72
|
+
color: var(--vp-c-text-2) !important;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ref, onMounted } from "vue";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
const data = ref([]);
|
|
4
|
+
function useAdSponsor() {
|
|
5
|
+
onMounted(async () => {
|
|
6
|
+
const urls = ["https://sponsor.wot-ui.cn/sponsor.json", "https://wot-sponsors.pages.dev/sponsor.json"];
|
|
7
|
+
const fetchData = async () => {
|
|
8
|
+
for (const url of urls) {
|
|
9
|
+
try {
|
|
10
|
+
const response = await axios.get(url + "?t=" + Date.now(), {
|
|
11
|
+
timeout: 5e3
|
|
12
|
+
// 设置5秒超时
|
|
13
|
+
});
|
|
14
|
+
return response?.data?.data;
|
|
15
|
+
} catch (error) {
|
|
16
|
+
console.warn(`Failed to fetch from ${url}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return [];
|
|
20
|
+
};
|
|
21
|
+
data.value = await fetchData();
|
|
22
|
+
});
|
|
23
|
+
return {
|
|
24
|
+
data
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
useAdSponsor
|
|
29
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ref, onMounted, inject } from "vue";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { wotThemeOptionsKey } from "../options.js";
|
|
4
|
+
const data = ref([]);
|
|
5
|
+
function useAds() {
|
|
6
|
+
const options = inject(wotThemeOptionsKey);
|
|
7
|
+
const adsOptions = options?.ads;
|
|
8
|
+
onMounted(async () => {
|
|
9
|
+
if (!adsOptions || data.value.length) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const urls = adsOptions.urls || [];
|
|
13
|
+
const fetchData = async () => {
|
|
14
|
+
for (const url of urls) {
|
|
15
|
+
try {
|
|
16
|
+
const response = await axios.get(url + "?t=" + Date.now(), {
|
|
17
|
+
timeout: 5e3
|
|
18
|
+
// 设置5秒超时
|
|
19
|
+
});
|
|
20
|
+
return response.data && response.data.ads ? response.data.ads : [];
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.warn(`Failed to fetch from ${url}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return [];
|
|
26
|
+
};
|
|
27
|
+
data.value = await fetchData();
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
data
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
useAds
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ref, onMounted, inject } from "vue";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { wotThemeOptionsKey } from "../options.js";
|
|
4
|
+
const data = ref([]);
|
|
5
|
+
function useBanner() {
|
|
6
|
+
const options = inject(wotThemeOptionsKey);
|
|
7
|
+
const bannerOptions = options?.banner;
|
|
8
|
+
onMounted(async () => {
|
|
9
|
+
if (!bannerOptions || data.value.length) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const urls = bannerOptions.urls || [];
|
|
13
|
+
const fetchData = async () => {
|
|
14
|
+
for (const url of urls) {
|
|
15
|
+
try {
|
|
16
|
+
const response = await axios.get(url + "?t=" + Date.now(), {
|
|
17
|
+
timeout: 5e3
|
|
18
|
+
// 设置5秒超时
|
|
19
|
+
});
|
|
20
|
+
return response.data && response.data.data ? response.data.data : [];
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.warn(`Failed to fetch from ${url}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return [];
|
|
26
|
+
};
|
|
27
|
+
data.value = await fetchData();
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
data
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
useBanner
|
|
35
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ref, onMounted, inject } from "vue";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { wotThemeOptionsKey } from "../options.js";
|
|
4
|
+
const data = ref([]);
|
|
5
|
+
function useCaseData() {
|
|
6
|
+
const options = inject(wotThemeOptionsKey);
|
|
7
|
+
const casesOptions = options?.cases;
|
|
8
|
+
onMounted(async () => {
|
|
9
|
+
if (!casesOptions || data.value.length) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const urls = casesOptions.urls || [];
|
|
13
|
+
const fetchData = async () => {
|
|
14
|
+
for (const url of urls) {
|
|
15
|
+
try {
|
|
16
|
+
const path = "/cases.json";
|
|
17
|
+
const response = await axios.get(url + path + "?t=" + Date.now(), {
|
|
18
|
+
timeout: 5e3
|
|
19
|
+
// 设置5秒超时
|
|
20
|
+
});
|
|
21
|
+
const data2 = response.data && response.data.data ? response.data.data : [];
|
|
22
|
+
return data2.map((item) => {
|
|
23
|
+
return {
|
|
24
|
+
name: item.name,
|
|
25
|
+
image: item.image ? url + item.image : "",
|
|
26
|
+
description: item.description
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.warn(`Failed to fetch from ${url}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return [];
|
|
34
|
+
};
|
|
35
|
+
data.value = await fetchData();
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
data
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
useCaseData
|
|
43
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ref, onMounted, inject } from "vue";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { wotThemeOptionsKey } from "../options.js";
|
|
4
|
+
const data = ref([]);
|
|
5
|
+
function useFriendly() {
|
|
6
|
+
const options = inject(wotThemeOptionsKey);
|
|
7
|
+
const friendlyOptions = options?.friendly;
|
|
8
|
+
onMounted(async () => {
|
|
9
|
+
if (!friendlyOptions || data.value.length) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const urls = friendlyOptions.urls || [];
|
|
13
|
+
const fetchData = async () => {
|
|
14
|
+
for (const url of urls) {
|
|
15
|
+
try {
|
|
16
|
+
const response = await axios.get(url + "?t=" + Date.now(), {
|
|
17
|
+
timeout: 5e3
|
|
18
|
+
// 设置5秒超时
|
|
19
|
+
});
|
|
20
|
+
return response.data && response.data.links ? response.data.links : [];
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.warn(`Failed to fetch from ${url}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return [];
|
|
26
|
+
};
|
|
27
|
+
data.value = await fetchData();
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
data
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
useFriendly
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ref, onMounted, inject } from "vue";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { wotThemeOptionsKey } from "../options.js";
|
|
4
|
+
const data = ref();
|
|
5
|
+
function useSponsor() {
|
|
6
|
+
const options = inject(wotThemeOptionsKey);
|
|
7
|
+
const sponsorOptions = options?.sponsors;
|
|
8
|
+
onMounted(async () => {
|
|
9
|
+
if (!sponsorOptions || data.value) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const urls = sponsorOptions.urls || [];
|
|
13
|
+
const fetchData = async () => {
|
|
14
|
+
for (const url of urls) {
|
|
15
|
+
try {
|
|
16
|
+
const response = await axios.get(url + "?t=" + Date.now(), {
|
|
17
|
+
timeout: 5e3
|
|
18
|
+
// 设置5秒超时
|
|
19
|
+
});
|
|
20
|
+
return response.data;
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.warn(`Failed to fetch from ${url}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
};
|
|
27
|
+
data.value = await fetchData();
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
data
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
useSponsor
|
|
35
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ref, onMounted, inject } from "vue";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { wotThemeOptionsKey } from "../options.js";
|
|
4
|
+
const data = ref([]);
|
|
5
|
+
function useTeam() {
|
|
6
|
+
const options = inject(wotThemeOptionsKey);
|
|
7
|
+
const teamOptions = options?.team;
|
|
8
|
+
onMounted(async () => {
|
|
9
|
+
if (!teamOptions || data.value.length) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const urls = teamOptions.urls || [];
|
|
13
|
+
const MOCK_MEMBERS = [];
|
|
14
|
+
const normalizeMembers = (members) => {
|
|
15
|
+
return members.map((member) => {
|
|
16
|
+
const tags = Array.isArray(member.tags) ? member.tags : member.status ? [member.status] : [];
|
|
17
|
+
return {
|
|
18
|
+
avatar: member.avatar,
|
|
19
|
+
name: member.name,
|
|
20
|
+
title: member.title,
|
|
21
|
+
tags,
|
|
22
|
+
desc: member.desc,
|
|
23
|
+
github: member.github,
|
|
24
|
+
twitter: member.twitter
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const fetchData = async () => {
|
|
29
|
+
for (const url of urls) {
|
|
30
|
+
try {
|
|
31
|
+
const response = await axios.get(url + "/team.json?t=" + Date.now(), {
|
|
32
|
+
timeout: 5e3
|
|
33
|
+
});
|
|
34
|
+
const members = response.data && response.data.members ? response.data.members : [];
|
|
35
|
+
return normalizeMembers(members);
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.warn(`Failed to fetch team from ${url}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return normalizeMembers(MOCK_MEMBERS);
|
|
41
|
+
};
|
|
42
|
+
data.value = await fetchData();
|
|
43
|
+
});
|
|
44
|
+
return { data };
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
useTeam
|
|
48
|
+
};
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
ul {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
ul {
|
|
7
|
+
list-style: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
a {
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
a,
|
|
15
|
+
a:active {
|
|
16
|
+
color: var(--vp-c-text-2);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
.style-block {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
width: 180px;
|
|
23
|
+
padding: 15px;
|
|
24
|
+
margin-right: 20px;
|
|
25
|
+
margin-bottom: 20px;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
color: var(--vp-c-white);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.style-block p {
|
|
31
|
+
margin: 0;
|
|
32
|
+
color: var(--vp-c-white);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.a-dot,
|
|
36
|
+
.b-dot {
|
|
37
|
+
position: absolute;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
width: 12px;
|
|
40
|
+
height: 12px;
|
|
41
|
+
background: var(--vp-c-brand-1);
|
|
42
|
+
z-index: 10;
|
|
43
|
+
border: 2px solid var(--vp-c-white);
|
|
44
|
+
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.a-dot {
|
|
48
|
+
left: -6px;
|
|
49
|
+
top: -6px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.a-dot:before {
|
|
53
|
+
content: "A";
|
|
54
|
+
display: inline-block;
|
|
55
|
+
color: var(--vp-c-text-1);
|
|
56
|
+
font-size: 17px;
|
|
57
|
+
-webkit-transform: translate(14px, -22px);
|
|
58
|
+
transform: translate(14px, -22px);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.b-dot {
|
|
62
|
+
right: -6px;
|
|
63
|
+
bottom: -6px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.b-dot:before {
|
|
67
|
+
content: "B";
|
|
68
|
+
display: inline-block;
|
|
69
|
+
color: var(--vp-c-text-1);
|
|
70
|
+
font-size: 17px;
|
|
71
|
+
-webkit-transform: translate(14px, -22px);
|
|
72
|
+
transform: translate(14px, -22px);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.liner-color {
|
|
76
|
+
width: 160px;
|
|
77
|
+
height: 160px;
|
|
78
|
+
position: relative;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.liner-color:after {
|
|
82
|
+
position: absolute;
|
|
83
|
+
content: "";
|
|
84
|
+
width: 2px;
|
|
85
|
+
height: 250px;
|
|
86
|
+
right: 79px;
|
|
87
|
+
top: 50%;
|
|
88
|
+
background-color: var(--vp-c-white);
|
|
89
|
+
-webkit-transform: translateY(-50%) rotate(-45deg);
|
|
90
|
+
transform: translateY(-50%) rotate(-45deg);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.color-wrapper {
|
|
94
|
+
position: relative;
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.color-block {
|
|
100
|
+
width: 65px;
|
|
101
|
+
vertical-align: middle;
|
|
102
|
+
display: inline-block;
|
|
103
|
+
text-align: center;
|
|
104
|
+
height: 20px;
|
|
105
|
+
color: var(--vp-c-white);
|
|
106
|
+
font-size: 14px;
|
|
107
|
+
margin-left: 5px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.liner-color1:after {
|
|
111
|
+
-webkit-transform: translateY(-50%) rotate(45deg);
|
|
112
|
+
transform: translateY(-50%) rotate(45deg);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.liner-color1 .a-dot {
|
|
116
|
+
right: -6px;
|
|
117
|
+
top: -6px;
|
|
118
|
+
left: inherit;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.liner-color1 .b-dot {
|
|
122
|
+
left: -6px;
|
|
123
|
+
bottom: -6px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.liner-color1 .b-dot:before {
|
|
127
|
+
-webkit-transform: translate(25px, -15px);
|
|
128
|
+
transform: translate(25px, -15px);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.demo-right {
|
|
132
|
+
position: absolute;
|
|
133
|
+
left: 250px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.color-group {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-wrap: wrap;
|
|
139
|
+
padding-left: 0 !important;
|
|
140
|
+
box-sizing: border-box;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.color-group.dark {
|
|
144
|
+
background: var(--vp-c-bg-alt);
|
|
145
|
+
border: 3px solid var(--vp-c-bg-alt);
|
|
146
|
+
border-radius: 4px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.color-group li {
|
|
150
|
+
width: 120px;
|
|
151
|
+
height: 120px;
|
|
152
|
+
list-style: none;
|
|
153
|
+
display: inline-block;
|
|
154
|
+
padding: 8px 0 0 8px;
|
|
155
|
+
}
|
|
156
|
+
.color-group-line{
|
|
157
|
+
margin-top:0 !important;
|
|
158
|
+
margin-bottom: 8px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.color-group li div {
|
|
162
|
+
font-weight: 500;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.VPSidebar {
|
|
166
|
+
overflow: hidden !important;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.VPSidebar:hover {
|
|
170
|
+
overflow-y: auto !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
* {
|
|
174
|
+
scrollbar-color: var(--el-scrollbar-bg-color) var(--el-fill-color-light);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
::-webkit-scrollbar {
|
|
178
|
+
width: 6px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
::-webkit-scrollbar:horizontal {
|
|
182
|
+
height: 6px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
::-webkit-scrollbar-track {
|
|
186
|
+
border-radius: 10px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
::-webkit-scrollbar-thumb {
|
|
190
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
191
|
+
border-radius: 10px;
|
|
192
|
+
transition: all 0.2s ease-in-out;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
::-webkit-scrollbar-thumb:hover {
|
|
196
|
+
cursor: pointer;
|
|
197
|
+
background-color: rgba(0, 0, 0, 0.45);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
html.dark ::-webkit-scrollbar-thumb {
|
|
201
|
+
background-color: rgba(255, 255, 255, 0.22);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
html.dark ::-webkit-scrollbar-thumb:hover {
|
|
205
|
+
background-color: rgba(255, 255, 255, 0.38);
|
|
206
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colors
|
|
3
|
+
* -------------------------------------------------------------------------- */
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--vt-c-brand-1: #1c64fd;
|
|
7
|
+
--vt-c-brand-2: #4480ff;
|
|
8
|
+
--vt-c-brand-3: #7ca4ff;
|
|
9
|
+
--vt-c-brand-4: #b8cfff;
|
|
10
|
+
--vt-c-brand-dark-1: #164ed1;
|
|
11
|
+
--vt-c-brand-dark-2: #1341ad;
|
|
12
|
+
--vt-c-brand-soft: #1c64fd14;
|
|
13
|
+
--vt-c-accent-purple: #8059f3;
|
|
14
|
+
--vt-c-accent-cyan: #6ed8ff;
|
|
15
|
+
--vt-c-accent-mint: #64cddd;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dark {
|
|
19
|
+
--vt-c-brand-1: #4480ff;
|
|
20
|
+
--vt-c-brand-2: #7ca4ff;
|
|
21
|
+
--vt-c-brand-3: #b8cfff;
|
|
22
|
+
--vt-c-brand-4: #e5edff;
|
|
23
|
+
--vt-c-brand-dark-1: #1c64fd;
|
|
24
|
+
--vt-c-brand-dark-2: #164ed1;
|
|
25
|
+
--vt-c-brand-soft: #1c64fd14;
|
|
26
|
+
--vt-c-accent-purple: #9775fa;
|
|
27
|
+
--vt-c-accent-cyan: #45c7ff;
|
|
28
|
+
--vt-c-accent-mint: #90dbe7;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:root {
|
|
32
|
+
--vp-c-brand-1: var(--vt-c-brand-1);
|
|
33
|
+
--vp-c-brand-2: var(--vt-c-brand-2);
|
|
34
|
+
--vp-c-brand-3: var(--vt-c-brand-3);
|
|
35
|
+
--vp-c-brand-soft: var(--vt-c-brand-soft);
|
|
36
|
+
|
|
37
|
+
--vp-c-brand: var(--vp-c-brand-1);
|
|
38
|
+
--vp-c-brand-light: var(--vp-c-brand-2);
|
|
39
|
+
--vp-c-brand-lighter: var(--vt-c-brand-3);
|
|
40
|
+
--vp-c-brand-lightest: var(--vt-c-brand-4);
|
|
41
|
+
--vp-c-brand-dark: var(--vt-c-brand-dark-1);
|
|
42
|
+
--vp-c-brand-darker: var(--vt-c-brand-dark-2);
|
|
43
|
+
--vp-c-brand-dimm: var(--vt-c-brand-soft);
|
|
44
|
+
|
|
45
|
+
--vp-button-brand-bg: var(--vp-c-brand-1);
|
|
46
|
+
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
|
|
47
|
+
--vp-button-brand-active-border: var(--vp-c-brand-3);
|
|
48
|
+
--vp-button-brand-active-text: var(--vp-c-white);
|
|
49
|
+
--vp-button-brand-active-bg: var(--vp-c-brand-dark);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Component: Home
|
|
54
|
+
* -------------------------------------------------------------------------- */
|
|
55
|
+
|
|
56
|
+
:root {
|
|
57
|
+
--vp-home-hero-name-color: transparent;
|
|
58
|
+
--vp-home-hero-name-background: -webkit-linear-gradient(120deg,
|
|
59
|
+
var(--vt-c-brand-1) 30%,
|
|
60
|
+
var(--vt-c-accent-purple));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@media (min-width: 640px) {
|
|
64
|
+
:root {
|
|
65
|
+
--vp-home-hero-image-filter: blur(56px);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (min-width: 960px) {
|
|
70
|
+
:root {
|
|
71
|
+
--vp-home-hero-image-filter: blur(72px);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Component: Custom Block
|
|
77
|
+
* -------------------------------------------------------------------------- */
|
|
78
|
+
|
|
79
|
+
:root {
|
|
80
|
+
--vp-custom-block-tip-border: var(--vp-c-brand-1);
|
|
81
|
+
--vp-custom-block-tip-text: var(--vp-c-brand-darker);
|
|
82
|
+
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Component: Algolia
|
|
87
|
+
* -------------------------------------------------------------------------- */
|
|
88
|
+
|
|
89
|
+
.DocSearch {
|
|
90
|
+
--docsearch-primary-color: var(--vp-c-brand) !important;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* VitePress: Custom fix
|
|
95
|
+
* -------------------------------------------------------------------------- */
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
Use lighter colors for links in dark mode for a11y.
|
|
99
|
+
Also specify some classes twice to have higher specificity
|
|
100
|
+
over scoped class data attribute.
|
|
101
|
+
*/
|
|
102
|
+
.dark .vp-doc a,
|
|
103
|
+
.dark .vp-doc a>code,
|
|
104
|
+
.dark .VPNavBarMenuLink.VPNavBarMenuLink:hover,
|
|
105
|
+
.dark .VPNavBarMenuLink.VPNavBarMenuLink.active,
|
|
106
|
+
.dark .link.link:hover,
|
|
107
|
+
.dark .link.link.active,
|
|
108
|
+
.dark .edit-link-button.edit-link-button,
|
|
109
|
+
.dark .pager-link .title {
|
|
110
|
+
color: var(--vp-c-brand-lighter);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.dark .vp-doc a:hover,
|
|
114
|
+
.dark .vp-doc a>code:hover {
|
|
115
|
+
color: var(--vp-c-brand-lightest);
|
|
116
|
+
opacity: 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Transition by color instead of opacity */
|
|
120
|
+
.dark .vp-doc .custom-block a {
|
|
121
|
+
transition: color 0.25s;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.vp-sponsor.aside .vp-sponsor-grid.mini .vp-sponsor-grid-image {
|
|
125
|
+
max-width: 124px;
|
|
126
|
+
}
|
|
127
|
+
/* side bar */
|
|
128
|
+
|
|
129
|
+
:root {
|
|
130
|
+
--vp-sidebar-width: 338px;
|
|
131
|
+
--vp-sidebar-bg-color: var(--vp-c-bg);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.dark {
|
|
135
|
+
--vp-sidebar-bg-color: var(--vp-c-bg-alt);
|
|
136
|
+
}
|
package/dist/types.js
ADDED
|
File without changes
|