From 96c2a2c72688d926a4589e08eb42a2fd5804000e Mon Sep 17 00:00:00 2001 From: Rizumu Ayaka Date: Wed, 13 Mar 2024 20:45:21 +0800 Subject: [PATCH] feat: theme color and navbar logo (#286) --- docs/.vitepress/config.ts | 6 +++++- docs/.vitepress/theme/index.ts | 2 +- docs/.vitepress/theme/style.css | 19 +++++++++++++++---- docs/index.md | 4 ++-- docs/public/logo-horizontal.svg | 19 +++++++++++++++++++ 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 docs/public/logo-horizontal.svg diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 73d77b3..6ce2b6b 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -30,7 +30,11 @@ export default defineConfig({ ], themeConfig: { // https://vitepress.dev/reference/default-theme-config - siteTitle: 'RLE.wiki', + siteTitle: false, + logo: { + src: '/logo-horizontal.svg', + alt: 'Logo: RLE.wiki', + }, nav, sidebar, socialLinks: [ diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index f5d6ce2..93936cc 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -22,8 +22,8 @@ import '@nolebase/vitepress-plugin-enhanced-readabilities/dist/style.css' import '@nolebase/vitepress-plugin-highlight-targeted-heading/dist/style.css' import '@nolebase/vitepress-plugin-git-changelog/client/style.css' -import './style.css' import 'uno.css' +import './style.css' export default { extends: DefaultTheme, diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css index 893d3ee..9fb99e3 100644 --- a/docs/.vitepress/theme/style.css +++ b/docs/.vitepress/theme/style.css @@ -49,10 +49,10 @@ --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-brand-1: #0baaa4; + --vp-c-brand-2: #0cada7; + --vp-c-brand-3: #0cada7; + --vp-c-brand-soft: rgb(9 138 133 / 16%); --vp-c-tip-1: var(--vp-c-brand-1); --vp-c-tip-2: var(--vp-c-brand-2); @@ -70,6 +70,13 @@ --vp-c-danger-soft: var(--vp-c-red-soft); } +.dark:root { + --vp-c-brand-1: #0a938e; + --vp-c-brand-2: #087470; + --vp-c-brand-3: #087470; + --vp-c-brand-soft: rgb(8 116 112 / 16%); +} + /** * Component: Button * -------------------------------------------------------------------------- */ @@ -147,3 +154,7 @@ --docsearch-primary-color: var(--vp-c-brand-1) !important; } +.VPButton.medium { + border-radius: 8px !important; +} + diff --git a/docs/index.md b/docs/index.md index 809674a..93e1d93 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,10 +10,10 @@ hero: - theme: brand text: 大学指南 🏫 link: /campus/ - - theme: brand + - theme: alt text: Fashion 👕 link: /fashion/ - - theme: brand + - theme: alt text: 防护 🚨 link: /personal-safety/ image: diff --git a/docs/public/logo-horizontal.svg b/docs/public/logo-horizontal.svg new file mode 100644 index 0000000..9019d75 --- /dev/null +++ b/docs/public/logo-horizontal.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +