mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-08-01 07:09:50 +00:00
✨ 添加 VitePress 配置和主题支持;更新 .gitignore 文件以排除不必要的目录;新增中英文文档首页
This commit is contained in:
3
docs/.vitepress/config/common.ts
Normal file
3
docs/.vitepress/config/common.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export const gitea = {
|
||||
svg: '<svg t="1725391346807" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5067" width="256" height="256"><path d="M1004.692673 466.396616l-447.094409-447.073929c-25.743103-25.763582-67.501405-25.763582-93.264987 0l-103.873521 103.873521 78.171378 78.171378c12.533635-6.00058 26.562294-9.359266 41.389666-9.359266 53.02219 0 96.00928 42.98709 96.00928 96.00928 0 14.827372-3.358686 28.856031-9.359266 41.389666l127.97824 127.97824c12.533635-6.00058 26.562294-9.359266 41.389666-9.359266 53.02219 0 96.00928 42.98709 96.00928 96.00928s-42.98709 96.00928-96.00928 96.00928-96.00928-42.98709-96.00928-96.00928c0-14.827372 3.358686-28.856031 9.359266-41.389666l-127.97824-127.97824c-3.051489 1.454065-6.184898 2.744293-9.379746 3.870681l0 266.97461c37.273227 13.188988 63.99936 48.721433 63.99936 90.520695 0 53.02219-42.98709 96.00928-96.00928 96.00928s-96.00928-42.98709-96.00928-96.00928c0-41.799262 26.726133-77.331707 63.99936-90.520695l0-266.97461c-37.273227-13.188988-63.99936-48.721433-63.99936-90.520695 0-14.827372 3.358686-28.856031 9.359266-41.389666l-78.171378-78.171378-295.892081 295.871601c-25.743103 25.784062-25.743103 67.542365 0 93.285467l447.114889 447.073929c25.743103 25.743103 67.480925 25.743103 93.264987 0l445.00547-445.00547c25.763582-25.763582 25.763582-67.542365 0-93.285467z" fill="#a2d8f4" p-id="5068"></path></svg>'
|
||||
}
|
19
docs/.vitepress/config/en.ts
Normal file
19
docs/.vitepress/config/en.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import {defineConfig} from 'vitepress'
|
||||
|
||||
export const en = defineConfig({
|
||||
lang: "en-US",
|
||||
title: "Marsho AI",
|
||||
description: "Kawaii, Intelligent and Easy to Extend",
|
||||
themeConfig: {
|
||||
docFooter: {
|
||||
prev: 'Prev',
|
||||
next: 'Next'
|
||||
},
|
||||
langMenuLabel: 'Language',
|
||||
returnToTopLabel: 'To top',
|
||||
sidebarMenuLabel: 'Option',
|
||||
darkModeSwitchLabel: 'Theme',
|
||||
lightModeSwitchTitle: 'Light',
|
||||
darkModeSwitchTitle: 'Dark',
|
||||
},
|
||||
})
|
31
docs/.vitepress/config/index.ts
Normal file
31
docs/.vitepress/config/index.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
import {zh} from './zh'
|
||||
import {en} from './en'
|
||||
import { gitea } from './common'
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
export default defineConfig({
|
||||
head: [
|
||||
['link', { rel: 'icon', type: 'image/x-icon', href: './favicon.ico' }],
|
||||
],
|
||||
rewrites: {
|
||||
[`zh/:rest*`]: ":rest*",
|
||||
},
|
||||
themeConfig: {
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
logo: {
|
||||
light: './marsho-full.svg',
|
||||
dark: './marsho-full.svg',
|
||||
alt: 'Marsho Logo'
|
||||
},
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/LiteyukiStudio/nonebot-plugin-marshoai' },
|
||||
{ icon: gitea, link: 'https://git.liteyuki.icu/LiteyukiStudio/nonebot-plugin-marshoai'}
|
||||
]
|
||||
},
|
||||
locales: {
|
||||
root: { label: "简体中文", ...zh },
|
||||
en: { label: "English", ...en },
|
||||
},
|
||||
})
|
0
docs/.vitepress/config/ja.ts
Normal file
0
docs/.vitepress/config/ja.ts
Normal file
19
docs/.vitepress/config/zh.ts
Normal file
19
docs/.vitepress/config/zh.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import {defineConfig} from 'vitepress'
|
||||
|
||||
export const zh = defineConfig({
|
||||
lang: "zh-Hans",
|
||||
title: "小棉智能",
|
||||
description: "可爱,智能且易扩展",
|
||||
themeConfig: {
|
||||
docFooter: {
|
||||
prev: '上一页',
|
||||
next: '下一页'
|
||||
},
|
||||
langMenuLabel: '语言',
|
||||
returnToTopLabel: '返回顶部',
|
||||
sidebarMenuLabel: '菜单',
|
||||
darkModeSwitchLabel: '主题',
|
||||
lightModeSwitchTitle: '轻色模式',
|
||||
darkModeSwitchTitle: '深色模式',
|
||||
},
|
||||
})
|
21
docs/.vitepress/theme/LICENSE
Normal file
21
docs/.vitepress/theme/LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 NapCat
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
129
docs/.vitepress/theme/Layout.vue
Normal file
129
docs/.vitepress/theme/Layout.vue
Normal file
@ -0,0 +1,129 @@
|
||||
<!-- 该部分内容来自https://github.com/NapNeko/NapCatDocs,并遵循原仓库 MIT LICENSE 进行修改及分发,详细请参阅 ./LICENSE -->
|
||||
|
||||
<script setup>
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
|
||||
const { Layout } = DefaultTheme
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Layout>
|
||||
<template #home-hero-before>
|
||||
<div
|
||||
class="absolute flex flex-col z-[40] w-full !max-w-full items-center justify-center bg-transparent transition-bg overflow-hidden h-[60vh] -top-16 pointer-events-none opacity-[.35] dark:opacity-50">
|
||||
<div class="jumbo absolute opacity-60 animate"></div>
|
||||
</div>
|
||||
</template>
|
||||
</Layout>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.opacity-\[\.35\] {
|
||||
opacity: .35;
|
||||
}
|
||||
|
||||
.bg-transparent {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.overflow-hidden {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.justify-center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.\!max-w-full {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.h-\[60vh\] {
|
||||
height: 60vh;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.z-\[40\] {
|
||||
z-index: 40;
|
||||
}
|
||||
|
||||
.-top-16 {
|
||||
top: -4rem;
|
||||
}
|
||||
|
||||
.absolute {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.pointer-events-none {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.jumbo {
|
||||
--stripes: repeating-linear-gradient(100deg, #fff 0%, #fff 7%, transparent 10%, transparent 12%, #fff 16%);
|
||||
--stripesDark: repeating-linear-gradient(100deg, #000 0%, #000 7%, transparent 10%, transparent 12%, #000 16%);
|
||||
--rainbow: repeating-linear-gradient(100deg, #60a5fa 10%, #ff6666 16%, #ff7ff4 22%, #60a5fa 30%);
|
||||
contain: strict;
|
||||
contain-intrinsic-size: 100vw 40vh;
|
||||
background-image: var(--stripes), var(--rainbow);
|
||||
background-size: 300%, 200%;
|
||||
background-position: 50% 50%, 50% 50%;
|
||||
height: inherit;
|
||||
-webkit-transform: translateZ(0);
|
||||
-webkit-perspective: 1000;
|
||||
-webkit-backface-visibility: hidden;
|
||||
filter: invert(100%);
|
||||
-webkit-mask-image: radial-gradient(ellipse at 100% 0%, black 40%, transparent 70%);
|
||||
mask-image: radial-gradient(ellipse at 100% 0%, black 40%, transparent 70%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.opacity-60 {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
.absolute {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@keyframes jumbo-5f0d2d0c {
|
||||
0% {
|
||||
background-position: 50% 50%,50% 50%
|
||||
}
|
||||
|
||||
to {
|
||||
background-position: 350% 50%,350% 50%
|
||||
}
|
||||
}
|
||||
|
||||
.jumbo:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-image: var(--stripes),var(--rainbow);
|
||||
background-size: 200%,100%;
|
||||
mix-blend-mode: difference
|
||||
}
|
||||
|
||||
.animate.jumbo:after {
|
||||
animation: jumbo-5f0d2d0c 90s linear infinite
|
||||
}
|
||||
</style>
|
10
docs/.vitepress/theme/index.ts
Normal file
10
docs/.vitepress/theme/index.ts
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import './style.css'
|
||||
import Layout from './Layout.vue'
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
// 使用注入插槽的包装组件覆盖 Layout
|
||||
Layout: Layout
|
||||
}
|
176
docs/.vitepress/theme/style.css
Normal file
176
docs/.vitepress/theme/style.css
Normal file
@ -0,0 +1,176 @@
|
||||
/**
|
||||
* Customize default theme styling by overriding CSS variables:
|
||||
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
|
||||
*/
|
||||
|
||||
/**
|
||||
* Colors
|
||||
*
|
||||
* Each colors have exact same color scale system with 3 levels of solid
|
||||
* colors with different brightness, and 1 soft color.
|
||||
*
|
||||
* - `XXX-1`: The most solid color used mainly for colored text. It must
|
||||
* satisfy the contrast ratio against when used on top of `XXX-soft`.
|
||||
*
|
||||
* - `XXX-2`: The color used mainly for hover state of the button.
|
||||
*
|
||||
* - `XXX-3`: The color for solid background, such as bg color of the button.
|
||||
* It must satisfy the contrast ratio with pure white (#ffffff) text on
|
||||
* top of it.
|
||||
*
|
||||
* - `XXX-soft`: The color used for subtle background such as custom container
|
||||
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
|
||||
* on top of it.
|
||||
*
|
||||
* The soft color must be semi transparent alpha channel. This is crucial
|
||||
* because it allows adding multiple "soft" colors on top of each other
|
||||
* to create a accent, such as when having inline code block inside
|
||||
* custom containers.
|
||||
*
|
||||
* - `default`: The color used purely for subtle indication without any
|
||||
* special meanings attached to it such as bg color for menu hover state.
|
||||
*
|
||||
* - `brand`: Used for primary brand colors, such as link text, button with
|
||||
* brand theme, etc.
|
||||
*
|
||||
* - `tip`: Used to indicate useful information. The default theme uses the
|
||||
* brand color for this by default.
|
||||
*
|
||||
* - `warning`: Used to indicate warning to the users. Used in custom
|
||||
* container, badges, etc.
|
||||
*
|
||||
* - `danger`: Used to show error, or dangerous message to the users. Used
|
||||
* in custom container, badges, etc.
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-c-default-1: var(--vp-c-gray-1);
|
||||
--vp-c-default-2: var(--vp-c-gray-2);
|
||||
--vp-c-default-3: var(--vp-c-gray-3);
|
||||
--vp-c-default-soft: var(--vp-c-gray-soft);
|
||||
|
||||
--vp-c-brand-1: var(--vp-c-indigo-1);
|
||||
--vp-c-brand-2: var(--vp-c-indigo-2);
|
||||
--vp-c-brand-3: var(--vp-c-indigo-3);
|
||||
--vp-c-brand-soft: var(--vp-c-indigo-soft);
|
||||
|
||||
--vp-c-tip-1: var(--vp-c-brand-1);
|
||||
--vp-c-tip-2: var(--vp-c-brand-2);
|
||||
--vp-c-tip-3: var(--vp-c-brand-3);
|
||||
--vp-c-tip-soft: var(--vp-c-brand-soft);
|
||||
|
||||
--vp-c-warning-1: var(--vp-c-yellow-1);
|
||||
--vp-c-warning-2: var(--vp-c-yellow-2);
|
||||
--vp-c-warning-3: var(--vp-c-yellow-3);
|
||||
--vp-c-warning-soft: var(--vp-c-yellow-soft);
|
||||
|
||||
--vp-c-danger-1: var(--vp-c-red-1);
|
||||
--vp-c-danger-2: var(--vp-c-red-2);
|
||||
--vp-c-danger-3: var(--vp-c-red-3);
|
||||
--vp-c-danger-soft: var(--vp-c-red-soft);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Button
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-button-brand-border: transparent;
|
||||
--vp-button-brand-text: var(--vp-c-white);
|
||||
--vp-button-brand-bg: var(--vp-c-brand-3);
|
||||
--vp-button-brand-hover-border: transparent;
|
||||
--vp-button-brand-hover-text: var(--vp-c-white);
|
||||
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
|
||||
--vp-button-brand-active-border: transparent;
|
||||
--vp-button-brand-active-text: var(--vp-c-white);
|
||||
--vp-button-brand-active-bg: var(--vp-c-brand-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Component: Home
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-home-hero-name-color: transparent;
|
||||
--vp-home-hero-name-background: -webkit-linear-gradient(
|
||||
120deg,
|
||||
var(--liteyuki-color-primary) 30%,
|
||||
var(--marsho-color-light)
|
||||
);
|
||||
|
||||
--vp-home-hero-image-background-image: linear-gradient(
|
||||
-45deg,
|
||||
#bd34fe 50%,
|
||||
#47caff 50%
|
||||
);
|
||||
--vp-home-hero-image-filter: blur(44px);
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(56px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(68px);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Custom Block
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-custom-block-tip-border: transparent;
|
||||
--vp-custom-block-tip-text: var(--vp-c-text-1);
|
||||
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
|
||||
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Algolia
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
.DocSearch {
|
||||
--docsearch-primary-color: var(--vp-c-brand-1) !important;
|
||||
}
|
||||
|
||||
|
||||
/* custom 自定义 */
|
||||
:root {
|
||||
--marsho-color-light: #f9a8d4;
|
||||
--marsho-color-primary: #ff7f80;
|
||||
--marsho-color-highlight: #ff5858;
|
||||
--marsho-color-secondary: #ff4c4c;
|
||||
--liteyuki-color-primary: #7dd3fc;
|
||||
--color-pink: #f0abfc;
|
||||
--vp-button-brand-bg: var(--marsho-color-primary);
|
||||
--vp-button-brand-hover-bg: var(--marsho-color-highlight);
|
||||
--vp-button-brand-active-bg: var(--marsho-color-secondary);
|
||||
--vp-home-hero-image-background-image: rgba(0, 0, 0, 0);
|
||||
--tw-gradient-stops: var(--vp-home-hero-image-background);
|
||||
}
|
||||
|
||||
.main .text,.main .name span{
|
||||
--tw-gradient-from: var(--marsho-color-light);
|
||||
--tw-gradient-via: var(--color-pink);
|
||||
--tw-gradient-to: var(--liteyuki-color-primary);
|
||||
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to);
|
||||
background-image: linear-gradient(to right, var(--tw-gradient-stops));
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text; /* 兼容性 */
|
||||
color: transparent; /* 确保文本颜色透明 */
|
||||
}
|
||||
|
||||
.VPButton.brand{
|
||||
background-color: #f472b6 !important;
|
||||
}
|
||||
|
||||
.VPLocalSearchBox #localsearch-list mark {
|
||||
background-color: rgba(255, 138, 128, 0.3);
|
||||
}
|
Reference in New Issue
Block a user