Skip to content

Commit a8672d6

Browse files
radxa-chenchongbiaoRadxaYuntian
authored andcommitted
fix: update template by mdbook v0.4.52
mdbook v0.4.41 后修改了加载侧边栏目录的逻辑,需要同步修改模板。目前模板与部署时使用的 mdbook 版本不匹配导致侧边栏链接错误。通过 mdbook init --theme 生成新模板替换目前模板。 link: rust-lang/mdBook#2414
1 parent 2f4b9fd commit a8672d6

File tree

10 files changed

+2123
-7398
lines changed

10 files changed

+2123
-7398
lines changed

theme/book.js

Lines changed: 763 additions & 692 deletions
Large diffs are not rendered by default.

theme/css/chrome.css

Lines changed: 468 additions & 308 deletions
Large diffs are not rendered by default.

theme/css/general.css

Lines changed: 181 additions & 143 deletions
Large diffs are not rendered by default.

theme/css/print.css

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,50 @@
1+
12
#sidebar,
23
#menu-bar,
34
.nav-chapters,
45
.mobile-nav-chapters {
5-
display: none;
6+
display: none;
67
}
78

89
#page-wrapper.page-wrapper {
9-
transform: none;
10-
margin-left: 0px;
11-
overflow-y: initial;
10+
transform: none !important;
11+
margin-inline-start: 0px;
12+
overflow-y: initial;
1213
}
1314

1415
#content {
15-
max-width: none;
16-
margin: 0;
17-
padding: 0;
16+
max-width: none;
17+
margin: 0;
18+
padding: 0;
1819
}
1920

2021
.page {
21-
overflow-y: initial;
22+
overflow-y: initial;
2223
}
2324

2425
code {
25-
background-color: #666666;
26-
border-radius: 5px;
27-
28-
/* Force background to be printed in Chrome */
29-
-webkit-print-color-adjust: exact;
26+
direction: ltr !important;
3027
}
3128

3229
pre > .buttons {
33-
z-index: 2;
30+
z-index: 2;
3431
}
3532

36-
a,
37-
a:visited,
38-
a:active,
39-
a:hover {
40-
color: #4183c4;
41-
text-decoration: none;
33+
a, a:visited, a:active, a:hover {
34+
color: #4183c4;
35+
text-decoration: none;
4236
}
4337

44-
h1,
45-
h2,
46-
h3,
47-
h4,
48-
h5,
49-
h6 {
50-
page-break-inside: avoid;
51-
page-break-after: avoid;
38+
h1, h2, h3, h4, h5, h6 {
39+
page-break-inside: avoid;
40+
page-break-after: avoid;
5241
}
5342

54-
pre,
55-
code {
56-
page-break-inside: avoid;
57-
white-space: pre-wrap;
43+
pre, code {
44+
page-break-inside: avoid;
45+
white-space: pre-wrap;
5846
}
5947

6048
.fa {
61-
display: none !important;
49+
display: none !important;
6250
}

0 commit comments

Comments
 (0)