diff --git a/README.md b/README.md index 3edaada..5ef0154 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ ttrpg serve [dir] -p 3000 ## 组件语法 +### csv + +所有csv使用英文逗号分割。可使用空行。以#为注释。所有包含#或者英文逗号的字段,都应该使用双引号包裹。 + ### 骰子组件 ```markdown diff --git a/content/deck-test.md b/content/deck-test.md index 12c69ab..e7f2a16 100644 --- a/content/deck-test.md +++ b/content/deck-test.md @@ -1,57 +1,15 @@ # yaml/tag 代码块格式测试 -```yaml/tag -tag: md-deck -body: ./npcs.csv -layers: body:1,6-5,8 -``` :md-deck[./names.csv]{size="54x86" grid="5x8" bleed="1" padding="2" layers="name1:1,1-2,2f12 name2:4,7-5,8f12s num1:1,3-2,4f12 num2:4,5-5,6f12s"} -> [!NOTE] -> Highlights information that users should take into account, even when skimming. - -> [!TIP] -> Optional information to help a user be more successful. - -> [!IMPORTANT] -> Crucial information necessary for users to succeed. - -> [!WARNING] -> Critical content demanding immediate user attention due to potential risks. - -> [!CAUTION] -> Negative potential consequences of an action. - ## 使用 yaml/tag 语法创建 md-deck ```yaml/tag tag: md-deck -body: ./sparks.csv +body: ./names.csv size: 54x86 grid: 5x8 bleed: 1 padding: 2 -font-size: 3 -``` - -## 使用 body 字段添加内容 - -```yaml/tag -tag: tag-box -class: note -body: | - 这是一个提示框 -``` - -## 带引号的值 - -```yaml/tag -tag: tag-alert -type: warning -class: my-alert -body: 这是一个警告信息 -``` - -## 旧的指令语法仍然可用 - -:md-deck[./sparks.csv]{size="54x86" grid="5x8"} +layers: name1:1,1-2,2f12 name2:4,7-5,8f12s num1:1,3-2,4f12 num2:4,5-5,6f12s +``` \ No newline at end of file diff --git a/content/index.md b/content/index.md index d8406f2..c46c9d1 100644 --- a/content/index.md +++ b/content/index.md @@ -36,3 +36,20 @@ bler ### 链接 文本里面可以有:md-link[./stuff.md#啊什么]的啦 + +### 信息框 + +> [!NOTE] +> Highlights information that users should take into account, even when skimming. + +> [!TIP] +> Optional information to help a user be more successful. + +> [!IMPORTANT] +> Crucial information necessary for users to succeed. + +> [!WARNING] +> Critical content demanding immediate user attention due to potential risks. + +> [!CAUTION] +> Negative potential consequences of an action. diff --git a/src/components/md-deck/CardLayer.tsx b/src/components/md-deck/CardLayer.tsx index b99573a..5f746ed 100644 --- a/src/components/md-deck/CardLayer.tsx +++ b/src/components/md-deck/CardLayer.tsx @@ -24,7 +24,7 @@ export function CardLayer(props: CardLayerProps) { return ( <>