76 lines
1.2 KiB
YAML

# 长文阅读模板
name: "长文阅读"
id: "long-text"
width: 80mm
description: "打印长篇文章或阅读材料"
defaults:
fontSize: normal
lineHeight: 1.2
marginBottom: 0
page:
marginTop: 2
marginBottom: 3
blocks:
# 标题
- type: text
content: "{{title}}"
align: center
fontSize: xlarge
bold: true
marginBottom: 0
# 作者
- type: text
content: "作者: {{author}}"
align: center
fontSize: small
marginBottom: 0
# 日期
- type: text
content: "{{publishDate}}"
align: center
fontSize: small
marginBottom: 1
# 分隔线
- type: divider
char: "="
marginBottom: 1
# 正文段落
- type: list
data: "{{paragraphs}}"
itemTemplate:
- type: text
content: "{{content}}"
align: left
lineHeight: 1.3
marginBottom: 1
# 空行
- type: space
lines: 2
# 分隔线
- type: divider
char: "="
marginBottom: 1
# 阅读统计
- type: text
content: "共 {{wordCount}} 字 | {{paragraphs.length}} 段落"
align: right
fontSize: small
marginBottom: 0
- type: text
content: "打印于 {{printDate}}"
align: right
fontSize: small
marginBottom: 0