diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 186e6b8..09faff3 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -17,6 +17,10 @@ export default defineConfig({ head: [ // favicon.ico 图标等 ['link', { rel: "shortcut icon", href: `${VITE_BASE_URL}/logo.svg` }], ['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }], + [ + 'link', + { href: 'https://fonts.googleapis.com/css2?family=Roboto&display=swap', rel: 'stylesheet' } + ], [ 'script', { id: 'register-sw' }, diff --git a/docs/.vitepress/theme/style/blockquote.css b/docs/.vitepress/theme/style/blockquote.css new file mode 100644 index 0000000..261776c --- /dev/null +++ b/docs/.vitepress/theme/style/blockquote.css @@ -0,0 +1,77 @@ +:root { + --vp-c-brand-1: #18794e; + --vp-c-brand-2: #299764; + --vp-c-brand-3: #30a46c; + + --vp-custom-block-note: #cccccc; + --vp-custom-block-note-bg: #EFF0F3; + --vp-custom-block-tip: #009400; + --vp-custom-block-tip-bg: #e6f6e6; + --vp-custom-block-warning: #e6a700; + --vp-custom-block-warning-bg: #fff8e6; + --vp-custom-block-danger: #e13238; + --vp-custom-block-danger-bg: #ffebec; + --vp-custom-block-important: #a371f7; + --vp-custom-block-important-bg: #f4eefe; +} + +.dark { + --vp-c-brand-1: #3dd68c; + --vp-c-brand-2: #30a46c; + --vp-c-brand-3: #298459; + + --vp-custom-block-note: #cccccc; + --vp-custom-block-note-bg: #474748; + --vp-custom-block-tip: #009400; + --vp-custom-block-tip-bg: #003100; + --vp-custom-block-warning: #e6a700; + --vp-custom-block-warning-bg: #4d3800; + --vp-custom-block-danger: #e13238; + --vp-custom-block-danger-bg: #4b1113; + --vp-custom-block-important: #a371f7; + --vp-custom-block-important-bg: #230555; +} + +h1 { + background: -webkit-linear-gradient(10deg, #bd34fe 5%, #e43498 15%); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} + +/* 提醒 */ +.note.custom-block.github-alert{ + background-color: var(--vp-custom-block-note-bg); + border-left: 5px solid var(--vp-custom-block-note); + box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); +} + +/* 建议 */ +.tip.custom-block.github-alert { + background-color: var(--vp-custom-block-tip-bg); + border-left: 5px solid var(--vp-custom-block-tip); + box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); +} + +/* 重要框 */ +.important.custom-block.github-alert { + background-color: var(--vp-custom-block-important-bg); + border-left: 5px solid var(--vp-custom-block-important); + box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); +} + +/* 警告 */ +.warning.custom-block.github-alert { + background-color: var(--vp-custom-block-warning-bg); + border-left: 5px solid var(--vp-custom-block-warning); + box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); + +} + +/* 注意 */ +.caution.custom-block.github-alert { + border-color: var(--vp-c-red-soft); + border-left: 5px solid var(--vp-c-red-3); + box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); +} + diff --git a/docs/.vitepress/theme/style/index.css b/docs/.vitepress/theme/style/index.css index aee9a82..c5193e2 100644 --- a/docs/.vitepress/theme/style/index.css +++ b/docs/.vitepress/theme/style/index.css @@ -1 +1,2 @@ +@import './blockquote.css'; @import './var.css'; \ No newline at end of file diff --git a/docs/.vitepress/theme/style/var.css b/docs/.vitepress/theme/style/var.css index 5b8c74d..3e9600f 100644 --- a/docs/.vitepress/theme/style/var.css +++ b/docs/.vitepress/theme/style/var.css @@ -1,15 +1,3 @@ -:root { - --vp-c-brand-1: #18794e; - --vp-c-brand-2: #299764; - --vp-c-brand-3: #30a46c; -} - -.dark { - --vp-c-brand-1: #3dd68c; - --vp-c-brand-2: #30a46c; - --vp-c-brand-3: #298459; -} - .medium-zoom-overlay { z-index: 20; } @@ -22,78 +10,15 @@ /* hero标题渐变色 */ --vp-home-hero-name-color: transparent; --vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe, #41d1ff); - - /*hero logo背景渐变色 */ + /* hero logo 背景渐变色 */ --vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%); --vp-home-hero-image-filter: blur(40px); } - -h1 { - background: -webkit-linear-gradient(-45deg, #e43498 5%, #5ad7dd 15%); - background-clip: text; - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; -} - -/* 提醒 */ -.note.custom-block.github-alert{ - border-color: var(--vp-c-indigo-3); - box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); - transition: transform 0.3s ease; -} - -.note.custom-block.github-alert:hover { - transform: translateY(-5px); -} - -/* 建议 */ -.tip.custom-block.github-alert { - border-color: var(--vp-c-brand-1); - box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); - transition: transform 0.3s ease; -} - -.tip.custom-block.github-alert:hover { - transform: translateY(-5px); -} - -/* 重要框 */ -.important.custom-block.github-alert { - border-color: var(--vp-c-purple-1); - box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); - transition: transform 0.3s ease; -} - -.important.custom-block.github-alert:hover { - transform: translateY(-5px); -} - -/* 警告 */ -.warning.custom-block.github-alert { - border-color: var(--vp-c-yellow-1); - box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); - transition: transform 0.3s ease; -} - -.warning.custom-block.github-alert:hover { - transform: translateY(-5px); -} - -/* 注意 */ -.caution.custom-block.github-alert { - border-color: var(--vp-c-red-1); - box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3); - transition: transform 0.3s ease; -} - -.caution.custom-block.github-alert:hover { - transform: translateY(-5px); -} - /* 禁止双指缩放 */ body, html { touch-action: manipulation; -webkit-touch-callout: none; -ms-touch-action: manipulation; -} \ No newline at end of file +} +