-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
150 lines (143 loc) · 5.89 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css">
<!--mermaid-->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.css">
<!--mermaid-->
<script src="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<!--prism-heme-->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism-tomorrow.min.css" rel="stylesheet" />
<link href="plugin/prism-treeview/prism-treeview.css" rel="stylesheet">
<title>Cobalt</title>
</head>
<body>
<div id="app"></div>
<script>
let num = 0;
mermaid.initialize({startOnLoad: false});
window.$docsify = {
repo: "https://github.com/zomb-676/CobaltDocs",
executeScript: true,
name: "Cobalt",
loadSidebar: true,
subMaxLevel: 5,
// themeColor: '#24a3ff',
smartypants: true,
coverpage : true,
pagination: {
previousText: '上一章节',
nextText: '下一章节',
crossChapter: true,
crossChapterText: true,
},
plugins: [
function (hook, vm) {
hook.beforeEach(function (content) {
return "<link rel=\"stylesheet\" type=\"text/css\" href=\"customTags.css\">\n\n"
+ content
});
hook.doneEach(function () {
switchLanguageShow()
});
hook.mounted(function () {
let insertDom = `
<div style="position: fixed;z-index: 999;top: 10px;right: 10%">
<label class="switch" onclick="switchLanguageShow()">
<input type="checkbox" id="languageSwitcher">
<span class="slider"></span>
</label>
<span class="tooltiptext" style="z-index: 1000">Kotlin<=>Java</span>
</div>
`
let mainDOM = document.getElementsByTagName("body")[0]
mainDOM.innerHTML += insertDom
});
},
],
markdown: {
renderer: {
code: function (code, lang) {
if (lang === "mmd") {
return (
'<div class="mermaid">' + mermaid.render('mermaid-svg-' + num++, code) + "</div>"
);
}
if (arguments[1] === "java-s"){
arguments[1] = "java"
return "<div class='languageChangeAware-java'>" + this.origin.code.apply(this, arguments) + "</div>"
}
if (arguments[1] === "kotlin-s"){
arguments[1] = "kotlin"
return "<div class='languageChangeAware-kotlin'>" + this.origin.code.apply(this, arguments) + "</div>"
}
return this.origin.code.apply(this, arguments);
}
}
},
'flexible-alerts': {
style: 'callout', //or flat
note: {
label: "note"
},
tip: {
label: "tip"
},
warning: {
label: "warning"
},
attention: {
label: "attention"
}
},
tabs:{
theme : "material"
}
}
</script>
<!--<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/dark.css">-->
<!--emoji-->
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<!--execute-external-script-->
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/external-script.min.js"></script>
<!--zoom-image-->
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.min.js"></script>
<!--docsify-edit-on-github-->
<script src="//cdn.jsdelivr.net/npm/docsify-edit-on-github"></script>
<!--copy-code-->
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
<!--turn-page-->
<script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
<!--tabs-->
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
<!--search-->
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
<!--word-count-->
<script src="//unpkg.com/docsify-count/dist/countable.min.js"></script>
<!--alerts-->
<script src="https://unpkg.com/docsify-plugin-flexible-alerts"></script>
<!--katex-->
<script src="//cdn.jsdelivr.net/npm/docsify-katex@latest/dist/docsify-katex.js"></script>
<!--katex-->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css"/>
<!--read-progress-bar-->
<script src="https://cdn.jsdelivr.net/npm/docsify-progress@latest/dist/progress.min.js"></script>
<!--select-->
<script src="https://cdn.jsdelivr.net/npm/docsify-select@1"></script>
<!--pangu plugin-->
<script src="//cdn.jsdelivr.net/npm/docsify-pangu/lib/pangu.min.js"></script>
<!--prism-support-language-add-->
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-c.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-cpp.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-kotlin.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-clike.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-java.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-glsl.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-json.min.js"></script>
<script src="plugin/prism-treeview/prism-treeview.js"></script>
<script src="functions.js"></script>
</body>
</html>