-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.html
224 lines (214 loc) · 7.45 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>区块链系统实现</title>
<link rel="icon" href="_media/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="doc,docs,documentation,blockchain,database,bitcoin,区块链,数据库,比特币">
<meta name="description" content="《区块链系统实现》开源书籍。The book about learning blockchain by code">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="/_media/lib/vue.min.css" title="vue">
<link rel="stylesheet" href="/_media/lib/prism.css">
<link rel="stylesheet" href="/_media/lib/katex.min.css" />
<link rel="stylesheet" href="/_media/lib/mermaid.min.css">
<script src="/_media/lib/mermaid.min.js"></script>
<link rel="stylesheet" href="/_media/lib/docsify-sidebar.min.css" />
<!-- <script src="/_media/lib/lodash.min.js"></script> -->
<style>
nav.app-nav li ul {
min-width: 100px;
}
article > p, article blockquote > p, .docsify-tabs__content > p {
text-indent: 2em;
}
article > p > img, article blockquote > p > img, .docsify-tabs__content > p > img {
margin-left: -2em;
}
article > ul > li, article > ol > li
article blockquote > ul > li, article blockquote > ol > li {
margin-left: 2em;
}
pre > code.lang-csharp .token.comment {
color: green;
}
article > div.tip {
border-bottom-right-radius: 2px;
border-top-right-radius: 2px;
position: relative;
border-left: 4px solid rgb(255, 102, 102);
margin: 2em 0px;
padding: 12px 24px 12px 30px;
background-color: rgb(248, 248, 248);
}
article > .footer, article > .footer a{
color: #ccc;
font-weight: normal;
text-decoration: none;
}
.markdown-section pre + p.coderef {
margin-top: -1.2em;
}
.markdown-section p.coderef {
background: rgba(66,185,131,.1);
border-radius: 2px;
padding: 1rem;
}
</style>
</head>
<body>
<div id="app">Loading ...</div>
<script>
var glossary = [
{
name: '哈希',
detail: 'Hash',
ref: '#/section1/1-Overview'
},
{
name: '协因子',
detail: 'cofactor',
},
{
name: '未使用交易',
detail: 'UTXO: Unspent Transaction(TX) Output',
},
{
name: '公钥哈希值支付',
detail: 'P2PKH: Pay To Public Key Hash',
},
];
var num = 0;
mermaid.initialize({ startOnLoad: false });
window.$docsify = {
markdown: {
renderer: {
code: function(code, lang) {
if (lang === "mermaid") {
return (
'<div class="mermaid">' + mermaid.render('mermaid-svg-' + num++, code) + "</div>"
);
}
if (lang === "cs") {
return this.origin.code.apply(this, [code, "csharp"]);
}
return this.origin.code.apply(this, arguments);
}
}
},
alias: {
'/.*/_navbar.md': '/_navbar.md',
},
auto2top: true,
coverpage: false,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 2,
// logo: '_media/logo.png',
subMaxLevel: 3,
name: '区块链系统实现',
search: {
noData: {
'/': '没有结果!'
},
paths: 'auto',
placeholder: {
'/': '搜索'
}
},
copyCode: {
buttonText : '复制代码',
errorText : '复制出错了',
successText: '已复制'
},
plantuml: {
skin: 'classic',
serverPath: '//www.plantuml.com/plantuml/svg/',
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function (hook, vm) {
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master')
} else {
url = 'https://github.com/uchaindb/LearnBlockchainByCode/blob/gh-pages/' + vm.route.file
}
var editHtml = '[:memo: 编辑此文档](' + url + ')\n'
return editHtml
+ html
+ '\n\n----\n\n'
+ `<div class="footer">
作者:
<a href="https://github.com/uchaindb" target="_blank">优链数据库</a>
<a href="https://www.icerdesign.com" target="_blank">梁爽</a>
| 主题: <a href="https://docsify.js.org" target="_blank">docsify</a>
</div>`
})
},
function (hook, vm) {
hook.beforeEach(function (html) {
return html.replace(
/<!-- code:(.*?)(?:;branch:(.*?))?(?:;line:(\d+?)-(\d+?))? -->/g,
function(match, path, branch, lstart, lend){
branch = branch || "master";
const loc = (lstart && lend) ? `#L${lstart}-L${lend}` : "";
const locDesc = (lstart && lend) ? `\n代码行:${lstart}-${lend}` : "";
return `<p class="coderef">
:octocat: 参考代码:
<a href="https://github.com/uchaindb/LearnBlockchainByCode/blob/${branch}/${path}${loc}"
title="分支:\[${branch}\]${locDesc}" target="_blank">
${path}
</a>
</p>`;
});
})
},
function (hook, vm) {
hook.beforeEach(function (html) {
return html.replace(/\^(.+?)\^(?!(.*end-(block|inline)-katex))/g, "<sup>$1</sup>");
})
},
function (hook, vm) {
hook.beforeEach(function (html) {
for (var i = 0, len = glossary.length; i < len; i++) {
var re = new RegExp('`' + glossary[i].name + '`', 'g');
html = html.replace(re, `<abbr title="${glossary[i].detail}">${glossary[i].name}</abbr>`);
}
return html;
})
},
function (hook, vm) {
hook.beforeEach(function (html) {
return html.replace(/读书提示:.*?。/g, "");
})
}
]
}
</script>
<script src="/_media/lib/docsify-katex.js"></script>
<script src="/_media/lib/vue.min.js"></script>
<script src="/_media/lib/docsify.min.js"></script>
<script src="/_media/lib/docsify-search.min.js"></script>
<script src="/_media/lib/prism-csharp.min.js"></script>
<script src="/_media/lib/docsify-copy-code.min.js"></script>
<script src="/_media/lib/[email protected]"></script>
<script src="/_media/lib/docsify-plantuml.min.js"></script>
<script src="/_media/lib/docsify-sidebar-collapse.min.js"></script>
<!-- <script type="text/javascript" src="/_media/lib/docsify-example-panels.min.js"></script> -->
<!-- <script> -->
<!-- ((window.gitter = {}).chat = {}).options = { -->
<!-- room: 'uchaindb/Lobby' -->
<!-- }; -->
<!-- </script> -->
<!-- <script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script> -->
<div style="display: none;">
<script type="text/javascript" src="//js.users.51.la/19865727.js"></script>
<script type="text/javascript" src="//s96.cnzz.com/z_stat.php?id=1276086405&web_id=1276086405"></script>
</div>
</body>
</html>