From 1a53c72365dca6efa54994b596c6772cb9448c96 Mon Sep 17 00:00:00 2001 From: haoziqaq <357229046@qq.com> Date: Mon, 28 Oct 2024 02:09:59 +0800 Subject: [PATCH] feat: theme customization --- docs/.vitepress/config.ts | 2 ++ docs/.vitepress/theme/custom.css | 5 +++++ docs/.vitepress/theme/index.js | 4 ++++ docs/index.md | 1 + docs/public/favicon.ico | Bin 0 -> 4286 bytes docs/public/logo.svg | 9 +++++++++ 6 files changed, 21 insertions(+) create mode 100644 docs/.vitepress/theme/custom.css create mode 100644 docs/.vitepress/theme/index.js create mode 100644 docs/public/favicon.ico create mode 100644 docs/public/logo.svg diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index a82aadc..0e667ea 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -3,6 +3,7 @@ import { defineConfig } from 'vitepress' export default defineConfig({ title: 'Rattail', description: 'A utilities library for front-end developers, lightweight and ts-friendly', + head: [['link', { rel: 'icon', href: '/favicon.ico' }]], locales: { root: { label: 'English', @@ -31,6 +32,7 @@ export default defineConfig({ }, }, themeConfig: { + logo: { src: '/logo.svg', style: { height: '44px' } }, nav: [{ text: 'Home', link: '/' }], sidebar: [ diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css new file mode 100644 index 0000000..2192423 --- /dev/null +++ b/docs/.vitepress/theme/custom.css @@ -0,0 +1,5 @@ +:root { + --vp-c-brand-1: #cf8040; + --vp-c-brand-2: #a06433; + --vp-button-brand-bg: #cf8040; +} \ No newline at end of file diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js new file mode 100644 index 0000000..508d8b4 --- /dev/null +++ b/docs/.vitepress/theme/index.js @@ -0,0 +1,4 @@ +import DefaultTheme from 'vitepress/theme' +import './custom.css' + +export default DefaultTheme \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 73d42f5..39f7b99 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,6 +5,7 @@ hero: name: 'Rattail' text: 'A Utilities Library' tagline: A utilities library for front-end developers, lightweight and ts-friendly + logo: /logo.svg actions: - theme: brand text: Get Started diff --git a/docs/public/favicon.ico b/docs/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..6e917e34c4e05802c59868f096e69e1604a2c6a2 GIT binary patch literal 4286 zcmeHLS#J_i6dwP9Pd@k2pW(mp)x^X^(^n(bLKlrq>e3pQxD;x4QL4r^ZKKwxEW$8t zL4mRtD9Zpd{XFM3Rf`V-Gx9Wt9F{xxY~T6Lc|ej*(5tUc;&e%6%T5+d|-b@mK1# zx`uQ?#csa#mnP|qpPMD2SV`25g9A~&=W`m483jY6Bb3+m`QJK9-$&_8j+fdFuan<> znq^ES%vQvd!y9p?X64evN&BbjjQjAwr-{f)>gT(crSp{duys*z~Veokv{SSk<>xqi` zhiCar5qB9A=H}Sa4jgn(Cd}Fu?iJUn=?BM5O4SD9xhk$q$->{bJAxH|2IX2q)ScX` zf$#h&I{9E%{+6d|4|U@ z#ECNTq*&qlYhXSMxWeF_Xtuohnil(p_YU*(;)5U@)Nf5czH?UtS@!Xd8AeM>9^ECkF!p!NTNUjP0Hg=m@6 literal 0 HcmV?d00001 diff --git a/docs/public/logo.svg b/docs/public/logo.svg new file mode 100644 index 0000000..c430a2e --- /dev/null +++ b/docs/public/logo.svg @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file