Skip to content

Commit

Permalink
修复,优化样式,更新依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
zeng-y-l committed Sep 28, 2024
1 parent 1d8f175 commit 153797d
Show file tree
Hide file tree
Showing 11 changed files with 635 additions and 318 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
.vitepress/cache
.vitepress/dist
.vitepress/.temp

.vscode
12 changes: 10 additions & 2 deletions .vitepress/theme/style.styl
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ mjx-container
button
input
textarea
select
font-size inherit
line-height 1.4
line-height normal
color inherit

padding 0.3rem 0.5rem
Expand All @@ -122,8 +123,13 @@ textarea
bd-color border-color
border-radius 0.3rem

transition box-shadow 0.2s
&:focus
bd-color box-shadow 0 0 0.2rem

button
input
select
margin 0.3rem

textarea
Expand All @@ -132,13 +138,15 @@ textarea
max-width 100%

button
select
font-family inherit

button
input[type=checkbox]
select
cursor pointer

input[type=checkbox]
width 1rem
height 1rem
vertical-align middle
vertical-align middle
28 changes: 14 additions & 14 deletions lib/design.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ icon-copied = url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'

fullwidth-range = U+00B7 /* · */, U+201C-201D /* “” */, U+2018-2019 /* ‘’ */, U+2014 /**/, U+2026 /**/

theme(attr, light, dark)
theme(attr, light, dark, args...)
sel = 'html[class~="dark"] &' // 可以适应module、scoped
fork sel attr dark light
fork sel attr dark light args

blend-color(attr, t, lt, lb, dt, db)
theme attr blend(alpha(lt, t), lb) blend(alpha(dt, t), db)
blend-color(attr, t, lt, lb, dt, db, args...)
theme attr blend(alpha(lt, t), lb) blend(alpha(dt, t), db) args

txt-color(t, attr = 'color')
blend-color attr t #222 #EFD #DDD #315
txt-color(t, attr = 'color', args...)
blend-color attr t #222 #EFD #DDD #315 args

bg-color(t, attr = 'background-color')
blend-color attr t #FFFAF4 #542 #262438 #CBD
bg-color(t, attr = 'background-color', args...)
blend-color attr t #FFFAF4 #542 #262438 #CBD args

bd-color(attr)
bg-color 0.7 attr
bd-color(attr, args...)
bg-color 0.7 attr args

gray-color(attr = 'color')
txt-color 0.5 attr
gray-color(attr = 'color', args...)
txt-color 0.5 attr args

txt2-color(attr = 'color')
txt-color 0.7 attr
txt2-color(attr = 'color', args...)
txt-color 0.7 attr args

heading()
font-weight bold
Expand Down
6 changes: 3 additions & 3 deletions lib/utils.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fork(selector, attr, consequent, alternative)
{attr} alternative
fork(selector, attr, consequent, alternative, args...)
{attr} args alternative
{selector}
{attr} consequent
{attr} args consequent

vmargin(size)
margin size 0
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
"preview": "vitepress preview"
},
"devDependencies": {
"@types/node": "^22.1.0",
"@types/node": "^22.7.4",
"stylus": "^0.63.0",
"vitepress": "1.3.2"
"vitepress": "1.3.4"
},
"dependencies": {
"feed": "^4.2.2",
"markdown-it-mathjax3": "^4.3.2",
"markdown-it-ruby": "^0.1.1",
"markdown-it-underline": "^1.0.1",
"rambda": "^9.2.1",
"vue": "^3.4.35"
"rambda": "^9.3.0",
"vue": "^3.5.10"
}
}
Loading

0 comments on commit 153797d

Please sign in to comment.