Skip to content

Commit

Permalink
Fix UI theme details
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Dec 14, 2023
1 parent 7fe57e6 commit 615e241
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 4 deletions.
47 changes: 45 additions & 2 deletions .vitepress/theme/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,31 @@
@tailwind components;
@tailwind utilities;

/* .vitepress/theme/custom.css */
/*
.vitepress/theme/custom.css
https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/
:root {
--vp-c-brand-1: #5622cf;
--vp-c-brand-2: #7350ff;
--vp-font-family-base: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji,
Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;

--vp-c-divider: #e4e4eb;
--vp-c-sidebar-border: #e0e0e9;

--vp-c-text-2: #202020;

--vp-sidebar-width: 300px;
--vp-sidebar-bg-color: #f8f9fa;

--vp-layout-max-width: 1800px;
}

.VPDoc .content-container {
max-width: 820px !important;
}

ul {
Expand Down Expand Up @@ -33,6 +54,10 @@ ol {
border-radius: 5px;
font-size: 1em;

& > p {
margin: 0;
}

&-bg-1 {
@apply bg-red-50 dark:bg-red-950;
}
Expand Down Expand Up @@ -103,7 +128,20 @@ ol {
}
}
.VPSidebar {
border-right: 1px solid var(--vp-c-divider);
border-right: 1px solid var(--vp-c-sidebar-border);

.VPSidebarItem.level-1 .text {
color: var(--vp-c-text-2) !important;
font-size: 0.9em;
}

.VPSidebarItem.level-2 .text,
.VPSidebarItem.level-3 .text,
.VPSidebarItem.level-4 .text,
.VPSidebarItem.level-5 .text {
font-weight: normal;
color: var(--vp-c-text-2) !important;
}
}
.VPSidebarItem.level-0 {
.VPLink {
Expand All @@ -119,3 +157,8 @@ ol {
}
}
}

.vp-doc table tr td > p {
margin: 0;
line-height: 1.7;
}
Binary file modified bun.lockb
Binary file not shown.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
},
"dependencies": {
"autocorrect-node": "^2.8.4",
"autoprefixer": "^10.4.16",
"feishu-pages": "0.6.3",
"glob": "^10.3.10",
"medium-zoom": "^1.0.8",
"opencc-js": "^1.0.5",
"postcss": "^8.4.30",
"sass": "^1.69.3",
"vitepress": "^1.0.0-rc.22"
"tailwindcss": "^3.3.3",
"vitepress": "^1.0.0-rc.31"
},
"devDependencies": {
"prettier": "^3.0.3"
}
}
}
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
9 changes: 9 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['**/*.md'],
theme: {
extend: {},
},
darkMode: 'class',
plugins: [],
};

0 comments on commit 615e241

Please sign in to comment.