-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
226 lines (213 loc) · 13.8 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
225
226
<!doctype html>
<html>
<head>
<title>Docs test</title>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
crossorigin="anonymous"
/>
<style type="text/css">
.contents {
max-width: 50em;
margin: 0.5em auto;
}
.packname {
cursor: pointer;
}
.packcontainer {
margin: 1em;
padding: 0.5em 1em;
background-color: #eee;
border-radius: 0.5em;
}
.status-coal > h2 {
color: #666;
}
.status-bronze {
box-shadow: 0px 1px 2px -1px #444;
}
.status-bronze > h2 {
color: #444;
}
.status-silver {
box-shadow: 0px 2px 3px -1px #222;
}
.status-silver > h2 {
color: #222;
}
.path {
font-family: monospace;
}
.fnname {
font-family: monospace;
}
</style>
</head>
<body>
<div class="loading">
Loading...
</div>
<div class="contents">
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.13.0/js-yaml.min.js"></script>
<script type="text/javascript">
$(document).ready(() => {
$('.contents').append(`<h1>Wurstdoktor</h1>`);
$('.contents').append(`<button type="button" class="unfold">Unfold all</button>`);
$('.unfold').click(() => {
$('.package').slideDown();
});
[
["publish/bitwise/Bitwise.wurst.yaml", "bronze"],
["publish/bitwise/BitwiseInit.wurst.yaml", "bronze"],
["publish/bitwise/BitwiseTests.wurst.yaml", "coal"],
["publish/closures/ClosureEvents.wurst.yaml", "bronze"],
["publish/closures/ClosureEventsTests.wurst.yaml", "coal"],
["publish/closures/ClosureForGroups.wurst.yaml", "silver"],
["publish/closures/ClosureTimers.wurst.yaml", "silver"],
["publish/closures/Execute.wurst.yaml", "bronze"],
["publish/data/BitSet.wurst.yaml", "bronze"],
["publish/data/buffer/Buffer.wurst.yaml", "coal"],
["publish/data/buffer/BufferAdapters.wurst.yaml", "bronze"],
["publish/data/buffer/BufferInterface.wurst.yaml", "bronze"],
["publish/data/buffer/BufferTests.wurst.yaml", "coal"],
["publish/data/buffer/HashBuffer.wurst.yaml", "coal"],
["publish/data/buffer/OrderedStringBuffer.wurst.yaml", "coal"],
["publish/data/buffer/StringBuffer.wurst.yaml", "coal"],
["publish/data/HashList.wurst.yaml", "coal"],
["publish/data/HashListTests.wurst.yaml", "coal"],
["publish/data/HashMap.wurst.yaml", "coal"],
["publish/data/HashMapTests.wurst.yaml", "coal"],
["publish/data/HashSet.wurst.yaml", "coal"],
["publish/data/HashSetTests.wurst.yaml", "coal"],
["publish/data/LinkedList.wurst.yaml", "bronze"],
["publish/data/LinkedListModule.wurst.yaml", "bronze"],
["publish/data/LinkedListModuleTests.wurst.yaml", "coal"],
["publish/data/LinkedListTests.wurst.yaml", "coal"],
["publish/data/Table.wurst.yaml", "bronze"],
["publish/dummy/DummyCaster.wurst.yaml", "bronze"],
["publish/dummy/DummyRecycler.wurst.yaml", "bronze"],
["publish/dummy/Fx.wurst.yaml", "bronze"],
["publish/dummy/InstantDummyCaster.wurst.yaml", "coal"],
["publish/event/DamageDetection.wurst.yaml", "silver"],
["publish/event/DamageType.wurst.yaml", "silver"],
["publish/event/EventHelper.wurst.yaml", "bronze"],
["publish/event/LastOrder.wurst.yaml", "silver"],
["publish/event/OnUnitEnterLeave.wurst.yaml", "silver"],
["publish/event/RegisterEvents.wurst.yaml", "bronze"],
["publish/file/DebugFile.wurst.yaml", "bronze"],
["publish/file/legacy/IOTaskExecutor.wurst.yaml", "bronze"],
["publish/file/legacy/LocalFiles.wurst.yaml", "bronze"],
["publish/file/legacy/MultifileIO.wurst.yaml", "bronze"],
["publish/file/Persistable.wurst.yaml", "bronze"],
["publish/file/PreloadIO.wurst.yaml", "bronze"],
["publish/math/Angle.wurst.yaml", "bronze"],
["publish/math/BigNum.wurst.yaml", "bronze"],
["publish/math/Interpolation.wurst.yaml", "bronze"],
["publish/math/Maths.wurst.yaml", "bronze"],
["publish/math/Matrices.wurst.yaml", "bronze"],
["publish/math/MatricesTests.wurst.yaml", "coal"],
["publish/math/Quaternion.wurst.yaml", "bronze"],
["publish/math/QuaternionTests.wurst.yaml", "coal"],
["publish/math/Raycast.wurst.yaml", "bronze"],
["publish/math/Vectors.wurst.yaml", "bronze"],
["publish/network/GamecacheBuffer.wurst.yaml", "bronze"],
["publish/network/GamecacheKeys.wurst.yaml", "bronze"],
["publish/network/Metadata.wurst.yaml", "bronze"],
["publish/network/Network.wurst.yaml", "coal"],
["publish/network/NetworkConfig.wurst.yaml", "bronze"],
["publish/network/StringEncoder.wurst.yaml", "bronze"],
["publish/network/SyncSimple.wurst.yaml", "bronze"],
["publish/objediting/AbilityObjEditing.wurst.yaml", "bronze"],
["publish/objediting/BuffObjEditing.wurst.yaml", "bronze"],
["publish/objediting/DestructableObjEditing.wurst.yaml", "bronze"],
["publish/objediting/ItemObjEditing.wurst.yaml", "bronze"],
["publish/objediting/ObjectIds.wurst.yaml", "bronze"],
["publish/objediting/ObjEditingCommons.wurst.yaml", "bronze"],
["publish/objediting/ObjEditingNatives.wurst.yaml", "bronze"],
["publish/objediting/presets/ChannelAbilityPreset.wurst.yaml", "bronze"],
["publish/objediting/presets/HeroPreset.wurst.yaml", "bronze"],
["publish/objediting/presets/ObjectIdGenerator.wurst.yaml", "bronze"],
["publish/objediting/presets/OrderStringFactory.wurst.yaml", "bronze"],
["publish/objediting/TargetsAllowed.wurst.yaml", "bronze"],
["publish/objediting/UnitObjEditing.wurst.yaml", "bronze"],
["publish/objediting/UpgradeObjEditing.wurst.yaml", "bronze"],
["publish/util/Colors.wurst.yaml", "bronze"],
["publish/util/DialogBox.wurst.yaml", "bronze"],
["publish/util/GameTimer.wurst.yaml", "bronze"],
["publish/util/GroupUtils.wurst.yaml", "silver"],
["publish/util/Knockback3.wurst.yaml", "silver"],
["publish/util/MapBounds.wurst.yaml", "bronze"],
["publish/util/Preloader.wurst.yaml", "bronze"],
["publish/util/Printing.wurst.yaml", "bronze"],
["publish/util/SafetyChecks.wurst.yaml", "bronze"],
["publish/util/Simulate3dSound.wurst.yaml", "bronze"],
["publish/util/SoundUtils.wurst.yaml", "bronze"],
["publish/util/StandardTextTags.wurst.yaml", "silver"],
["publish/util/StringUtils.wurst.yaml", "silver"],
["publish/util/StringUtilsTests.wurst.yaml", "coal"],
["publish/util/TerrainUtils.wurst.yaml", "silver"],
["publish/util/TimerUtils.wurst.yaml", "silver"],
["publish/util/UnitIndexer.wurst.yaml", "bronze"],
["publish/Wurst.wurst.yaml", "coal"],
["publish/_handles/Boolexpr.wurst.yaml", "bronze"],
["publish/_handles/Camera.wurst.yaml", "bronze"],
["publish/_handles/Destructable.wurst.yaml", "bronze"],
["publish/_handles/Dialog.wurst.yaml", "bronze"],
["publish/_handles/Effect.wurst.yaml", "bronze"],
["publish/_handles/Fogmodifier.wurst.yaml", "bronze"],
["publish/_handles/Force.wurst.yaml", "bronze"],
["publish/_handles/ForceTests.wurst.yaml", "coal"],
].forEach(([uri, status]) => {
$.get(uri, (data) => {
$('.loading').hide();
jsyaml.load(data).forEach((package) => {
Object.entries(package).forEach(([package, details]) => {
// Package name and doc.
$('.contents').append(`<div class="packcontainer ctr-${details.name} status-${status}"></div>`);
$(`.ctr-${details.name}`).append(`<h2 class="packname hdr-${details.name}"> <i class="fas fa-archive"></i> ${details.name}</h2>`);
$(`.ctr-${details.name}`).append(`<div class="package pkg-${details.name}"></div>`);
$(`.pkg-${details.name}`).append(`<p class="path"><i class="fas fa-folder-open"></i> ${uri}</p>`);
details.doc !== null ? $(`.pkg-${details.name}`).append(
`${details.doc.split("\n\n").map((line) => "<p>" + line + "</p>").join('')}`
) : null;
$(`.pkg-${details.name}`).hide();
$(`.hdr-${details.name}`).click(() => {
$(`.pkg-${details.name}`).toggle();
});
details.enums.forEach((eenum) => {
const icon = `<i class="fas fa-layer-group"></i>`;
$(`.pkg-${details.name}`).append(`<h3>${icon} enum ${eenum.name}</h3>`);
$(`.pkg-${details.name}`).append(`<p>${eenum.doc}</p>`);
$(`.pkg-${details.name}`).append(`<ul><li>${eenum.variants.join("</li><li>")}</li></ul>`);
});
details.classes.forEach((cls) => {
const icon = `<i class="fas fa-object-group"></i>`;
$(`.pkg-${details.name}`).append(`<h3>${icon} ${cls.name}</h3>`);
$(`.pkg-${details.name}`).append(`<p>${cls.doc}</p>`);
cls.fns.forEach((fn) => {
const icon = `<i class="fas fa-square-root-alt"></i>`;
$(`.pkg-${details.name}`).append(`<h4>${icon} ${fn.extensor !== null ? fn.extensor + "." : ""}${fn.name}()</h4>`);
// TODO: params
$(`.pkg-${details.name}`).append(`<p>${fn.doc}</p>`);
});
});
details.free_fns.forEach((fn) => {
const icon = `<i class="fas fa-square-root-alt"></i>`;
$(`.pkg-${details.name}`).append(`<h3 class="fnname">${icon} ${fn.extensor !== null ? fn.extensor + "." : ""}${fn.name}()</h3>`);
// TODO: params
fn.doc !== null ? $(`.pkg-${details.name}`).append(`<p>${fn.doc}</p>`) : null;
});
})
});
}).fail((e) => {
console.error(`halt ${JSON.stringify(e.status)}`);
});
});
});
</script>
</body>
</html>