97 lines
1.4 KiB
Python
97 lines
1.4 KiB
Python
"""Built-in document style data shared by settings and the interface."""
|
|
DOCUMENT_STYLE_PRESETS = {
|
|
"default": {
|
|
"name": "默认阅读",
|
|
"css": "",
|
|
},
|
|
"compact": {
|
|
"name": "紧凑参考",
|
|
"css": """
|
|
.reader {
|
|
max-width: var(--reader-paper-width);
|
|
padding: 24px 34px 44px;
|
|
}
|
|
body {
|
|
line-height: 1.58;
|
|
}
|
|
h1 {
|
|
font-size: 1.78em;
|
|
}
|
|
h2 {
|
|
margin-top: 1.3em;
|
|
}
|
|
p,
|
|
li {
|
|
margin: 0.42em 0;
|
|
}
|
|
""".strip(),
|
|
},
|
|
"serif": {
|
|
"name": "经典书卷",
|
|
"css": """
|
|
:root {
|
|
--reader-font-family: Georgia, "Times New Roman", "SimSun", "Songti SC", serif;
|
|
}
|
|
.reader {
|
|
max-width: var(--reader-paper-width);
|
|
padding: 42px 54px 64px;
|
|
}
|
|
body {
|
|
line-height: 1.82;
|
|
}
|
|
h1,
|
|
h2,
|
|
h3 {
|
|
font-family: Georgia, "Times New Roman", "Microsoft YaHei UI", serif;
|
|
}
|
|
blockquote {
|
|
border-left-width: 3px;
|
|
}
|
|
""".strip(),
|
|
},
|
|
"wide": {
|
|
"name": "宽屏技术文档",
|
|
"css": """
|
|
.reader {
|
|
max-width: var(--reader-paper-width);
|
|
padding: 30px 48px 56px;
|
|
}
|
|
body {
|
|
line-height: 1.65;
|
|
}
|
|
pre,
|
|
code,
|
|
kbd,
|
|
samp {
|
|
font-size: 0.95em;
|
|
}
|
|
table {
|
|
font-size: 0.95em;
|
|
}
|
|
""".strip(),
|
|
},
|
|
"focus": {
|
|
"name": "专注笔记",
|
|
"css": """
|
|
.reader {
|
|
max-width: var(--reader-paper-width);
|
|
padding: 48px 46px 70px;
|
|
}
|
|
body {
|
|
line-height: 1.78;
|
|
}
|
|
h1 {
|
|
text-align: center;
|
|
border-bottom: 0;
|
|
}
|
|
h2 {
|
|
margin-top: 1.8em;
|
|
}
|
|
hr {
|
|
margin: 2.2em auto;
|
|
max-width: 180px;
|
|
}
|
|
""".strip(),
|
|
},
|
|
}
|