diff --git a/docs/.vitepress/theme/DarkLayout.vue b/docs/.vitepress/theme/DarkLayout.vue new file mode 100644 index 00000000..8b11bd59 --- /dev/null +++ b/docs/.vitepress/theme/DarkLayout.vue @@ -0,0 +1,38 @@ + + + \ No newline at end of file diff --git a/docs/.vitepress/theme/dark-theme.css b/docs/.vitepress/theme/dark-theme.css new file mode 100644 index 00000000..18e237c4 --- /dev/null +++ b/docs/.vitepress/theme/dark-theme.css @@ -0,0 +1,89 @@ +body.dark { + --c-divider: var(--c-divider-dark); + --c-text: var(--c-text-dark-1); + --c-text-light: var(--c-text-dark-2); + --c-text-lighter: var(--c-text-dark-3); + --c-bg: var(--c-white); + --c-bg-accent: var(--c-white-light); + --code-font-family: var(--font-family-mono); + --code-inline-bg-color: rgba(27, 31, 35, 0.05); + --code-bg-color: #282c34; + --c-white: var(--c-black); + --c-white-dark: #f8f8f8; + --c-black: #1a1a1a; + --c-divider-light: rgba(60, 60, 67, 0.12); + --c-divider-dark: rgba(84, 84, 88, 0.48); + --c-text-light-1: #2c3e50; + --c-text-light-2: #476582; + --c-text-light-3: #90a4b7; + + --c-text-dark-1: #fff; + --c-text-dark-2: #607385; + --c-text-dark-3: #445666; + + --c-brand: #3eaf7c; + --c-brand-light: #4abf8a; + --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06); + --shadow-2: 0 3px 12px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.07); + --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08); + --shadow-4: 0 14px 44px rgba(0, 0, 0, 0.12), 0 3px 9px rgba(0, 0, 0, 0.12); + --shadow-5: 0 18px 56px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.16); + --header-height: 3.6rem; + + --docsearch-searchbox-focus-background: #242424; + --docsearch-container-background: rgba(101, 108, 133, 0.8); + --docsearch-modal-background: #242424; + --docsearch-modal-shadow: inset 1px 1px 0 0 hsla(0, 0%, 100%, 0.5), + 0 3px 8px 0 #555a64; + --docsearch-searchbox-background: #ebedf0; + --docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color); + --docsearch-hit-color: #444950; + --docsearch-hit-active-color: #333; + --docsearch-hit-background: #333; + --docsearch-hit-shadow: 0 1px 3px 0 #d4d9e1; + --docsearch-key-gradient: linear-gradient(-225deg, #d5dbe4, #f8f8f8); + --docsearch-key-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #333, + 0 1px 2px 1px rgba(30, 35, 90, 0.4); + --docsearch-footer-background: #333; + --docsearch-footer-shadow: 0 -1px 0 0 #e0e3e8, + 0 -3px 6px 0 rgba(69, 98, 155, 0.12); +} + +body.dark tr:nth-child(2n) { + background-color: #2a2a2a; +} + +body.dark .DocSearch { + --docsearch-primary-color: var(--c-brand); + --docsearch-highlight-color: var(--docsearch-primary-color); + --docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color); + --docsearch-text-color: var(--c-text-light); + --docsearch-muted-color: var(--c-text-lighter); + --docsearch-searchbox-background: #333; +} + +body.dark .DocSearch-Button:hover { + box-shadow: var(--docsearch-searchbox-shadow); + color: var(--docsearch-text-color); + outline: none; +} + +body.dark .custom-block.details, +body.dark .custom-block.info, +body.dark .custom-block.tip { + background-color: #2f2f2f; +} + +body.dark .custom-block.warning { + background-color: #ffe56436; + color: #ccc18c; +} + +body.dark .custom-block.danger { + background-color: #6e4f4fd2; + color: #f5d3d3; +} + +body.dark .custom-block.danger .custom-block-title { + color: #f6b9b9; +} \ No newline at end of file diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts new file mode 100644 index 00000000..32a7beaf --- /dev/null +++ b/docs/.vitepress/theme/index.ts @@ -0,0 +1,11 @@ +import DefaultTheme from 'vitepress/theme' +import DarkLayout from './DarkLayout.vue' +import DarkStyles from './dark-theme.css' + +export { DarkStyles } + +export default { + ...DefaultTheme, + // override the Layout with a wrapper component that injects the slots + Layout: DarkLayout +} diff --git a/docs/index.md b/docs/index.md index cce3cfc0..90ac3d27 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,4 +14,4 @@ features: details: 支持在线SSH,支持流量循环监控,支持设置定时任务、服务器批量执行任务 footer: Copyright © 2022-present Nezhahq --- -
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。 \ No newline at end of file +
本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。