-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
159 lines (153 loc) · 8.28 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
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>内置Japi文档</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="内置Japi文档网站">
<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="//unpkg.com/docsify/lib/themes/vue.css"> -->
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css"> -->
<link rel="stylesheet" href="./static/css/theme-simple-dark.css">
<!-- <link rel="stylesheet" href="https://cdn.staticfile.org/docsify/4.12.2/themes/dark.css"> -->
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css"> -->
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/pure.css"> -->
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/dark.css"> -->
<!-- <link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css"> -->
<link rel="stylesheet" href="https://cdn.staticfile.org/gitalk/1.7.2/gitalk.css">
<link rel="stylesheet" href="./static/css/prism.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: '内置 Japi',
repo: 'https://github.com/w4454962/embedded-japi-plugin.git',
loadSidebar: true,
loadNavbar: false,
auto2top: true,
autoHeader: true,
search: {
maxAge: 86400000, // 过期时间,单位毫秒,默认一天
paths: 'auto',
placeholder: '搜索',
noData: '找不到结果',
// 搜索标题的最大层级, 1 - 6
depth: 6,
hideOtherSidebarContent: false, // 是否隐藏其他侧边栏内容
},
copyCode: {
buttonText : '复制',
errorText : '错误',
successText: '复制成功'
},
footer: {
copy: '<span><a href="https://github.com/w4454962/embedded-japi-plugin.git">Embedded-Japi-Plugin</a> © 2016-2022 </span>',
auth: ' ',
pre: '<hr/>',
style: 'text-align: right;',
class: 'side-bar',
},
}
</script>
<!-- <script src="//unpkg.com/docsify/lib/docsify.min.js"></script> -->
<script src="//cdn.staticfile.org/docsify/4.12.2/docsify.min.js"></script>
<!-- <script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script> -->
<script src="//cdn.staticfile.org/docsify/4.12.2/plugins/search.min.js"></script>
<!-- <script src="//unpkg.com/docsify/lib/plugins/gitalk.min.js"></script> -->
<script src="//cdn.staticfile.org/docsify/4.12.2/plugins/gitalk.min.js"></script>
<!-- <script src="//unpkg.com/gitalk/dist/gitalk.min.js"></script> -->
<script src="//cdn.staticfile.org/gitalk/1.7.2/gitalk.min.js"></script>
<script src="//unpkg.com/prismjs@1/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs@1/components/prism-lua.min.js"></script>
<!-- <script src="//unpkg.com/docsify-copy-code"></script> -->
<script src="//cdn.staticfile.org/docsify-copy-code/2.0.0/docsify-copy-code.min.js"></script>
<script src="//unpkg.com/docsify-edit-on-github"></script>
<!-- <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-lua.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-edit-on-github"></script> -->
<script src="//unpkg.com/docsify-footer-enh/dist/docsify-footer-enh.min.js"></script>
<script>
function init() {
var list = location.hash.match(/#(.*?)([?]|$)/)
if (list) {
var path = decodeURI(list[1]);
if (!path) {
path = location.hash.substr(1);
}
if (!path) {
path = location.hash;
}
gitalk = new Gitalk({
clientID: "6ee8116016b1decd846e",
clientSecret: "f9ba53249cf278670e6d0255c1bc2ce27f5056e7",
repo: "embedded-japi-plugin",
owner: "w4454962",
admin: ["w4454962","PhoenixZeng","luciouskami"],
// id: location.pathname,
// facebook-like distraction free mode
distractionFreeMode: false,
title: path,
id: path,
});
}
}
init()
// 监听URL中hash的变化,如果发现换了一个MD文件,那么刷新页面,解决整个网站使用一个gitalk评论issues的问题。
window.onhashchange = function(event){
if(event.newURL.split('?')[0] !== event.oldURL .split('?')[0]) {
// location.reload()
init()
}
}
// 由于docsify/lib/plugins/gitalk.min.js文件中已经有下面代码了,所以不需要在写一次了
// gitalk.render('gitalk-container')
Prism.languages.jass = {
'comment': [{
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
lookbehind: true
}, {
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true
}],
'string': {
pattern: /("|')(?:\\\\|\\?[^\\\r\n])*?\1/,
greedy: true
},
'keyword': /\b(?:and|or|not|globals|endglobals|function|endfunction|constant|native|local|type|set|call|takes|returns|extends|array|debug|if|else|elseif|endif|then|loop|endloop|exitwhen|return|library|initializer|needs|uses|requires|endlibrary|scope|endscope|private|public|static|interface|endinterface|extends|struct|endstruct|method|endmethod|this|delegate|operator|module|endmodule|implement|optional|stub|key|thistype|onInit|onDestroy|hook|defaults|execute|evaluate|create|destroy|allocate|deallocate|library|function|constant|onInit|struct|public|private|static|requires|optional|interface|struct|method|operator|module|type|extends|delegate|not|do)\b/,
'boolean': /\b(?:true|false)\b/,
'builtin': /\b(?:integer|real|boolean|string|handle|code|nothing|agent|event|player|widget|unit|destructable|item|ability|buff|force|group|trigger|triggercondition|triggeraction|timer|location|region|rect|boolexpr|sound|conditionfunc|filterfunc|unitpool|itempool|race|alliancetype|racepreference|gamestate|igamestate|fgamestate|playerstate|playerscore|playergameresult|unitstate|aidifficulty|eventid|gameevent|playerevent|playerunitevent|unitevent|limitop|widgetevent|dialogevent|unittype|gamespeed|gamedifficulty|gametype|mapflag|mapvisibility|mapsetting|mapdensity|mapcontrol|playerslotstate|volumegroup|camerafield|camerasetup|playercolor|placement|startlocprio|raritycontrol|blendmode|texmapflags|effect|effecttype|weathereffect|terraindeformation|fogstate|fogmodifier|dialog|button|quest|questitem|defeatcondition|timerdialog|leaderboard|multiboard|multiboarditem|trackable|gamecache|version|itemtype|texttag|attacktype|damagetype|weapontype|soundtype|lightning|pathingtype|image|ubersplat|hashtable|mousebuttontype|animtype|subanimtype|framehandle|originframetype|framepointtype|textaligntype|frameeventtype|oskeytype|abilityintegerfield|abilityrealfield|abilitybooleanfield|abilitystringfield|abilityintegerlevelfield|abilityreallevelfield|abilitybooleanlevelfield|abilitystringlevelfield|abilityintegerlevelarrayfield|abilityreallevelarrayfield|abilitybooleanlevelarrayfield|abilitystringlevelarrayfield|unitintegerfield|unitrealfield|unitbooleanfield|unitstringfield|unitweaponintegerfield|unitweaponrealfield|unitweaponbooleanfield|unitweaponstringfield|itemintegerfield|itemrealfield|itembooleanfield|itemstringfield|movetype|targetflag|armortype|heroattribute|defensetype|regentype|unitcategory|pathingflag|minimapicon|commandbuttoneffect)\b/,
'number': /\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
'punctuation': /(\.|[..]|->)/,
'annotation': /@\w+(\s|[(])/
};
</script>
<style>
:root {
--content-max-width : 88em;
/* --table-body-border-color : ; */
/* --table-body-border-width : ; */
/* --table-cell-border-color : var(--mono-tint3);
--table-cell-border-width : 1px; */
/* --table-cell-padding : 0.75em 0.5em; */
--table-head-background : var(--mono-shade3);
/* --table-head-border-color : var(--table-cell-border-color); */
/* --table-head-border-width : 1px; */
/* --table-head-font-weight : var(--strong-font-weight); */
--table-row-even-background : var(--mono-tint1);
--table-row-odd-background : var(--mono-shade1);
}
.side-bar {
position: fixed;
bottom: 20px;
right: 25px;
z-index: 100;
background-color: var(--code-theme-comment);
padding: 5px;
border-radius:5px;
}
</style>
</body>
</html>