Skip to content

Commit

Permalink
feat: 根据页面宽度调整表格
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Dec 4, 2024
1 parent fb66208 commit 5b868f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/introduction.typ
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ typst watch file.typ
#{
set align(center)
table(
columns: (1fr, 1fr, 1fr, 5em, 5em, 5em, 10em),
columns: if get-page-width() < 600pt {
1fr
} else {
(1fr, 1fr, 1fr, 5em, 5em, 5em, 10em)
},
align: horizon + center,
[名称], [编辑器], [编译器环境], [预览方案], [是否支持即时编译], [语言服务], [备注],
[WebAPP], [Code Mirror], [wasm], [渲染图片], [是], [优秀], align(left)[开箱即用,需要科学上网,无法git],
Expand Down
2 changes: 1 addition & 1 deletion src/mod.typ
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#import "/typ/templates/page.typ"
#import "/typ/templates/term.typ": _term
#import "/typ/templates/side-notes.typ": side-note, side-attrs
#import "/typ/templates/page.typ": main-color
#import "/typ/templates/page.typ": main-color, get-page-width

#import "/typ/typst-meta/docs.typ": typst-v11

Expand Down

0 comments on commit 5b868f0

Please sign in to comment.