-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs.html
139 lines (130 loc) · 5.19 KB
/
docs.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Abyss Engine</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css">
<link rel="icon" href="abyssbadge.png">
<script src="https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.js"></script>
<script type="text/javascript" src="scripts/xml2json.js"></script>
<script type="text/javascript" src="scripts/dynload.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"
integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body onload="includeHTML()">
<div w3-include-html="views/navbar.html"></div>
<section class="section">
<h1 class="title">Documentation</h1>
<div id="help-content"></div>
</section>
<div w3-include-html="views/footer.html"></div>
<div id="help-template" style="display:none">
<div class="columns">
<div class="column is-one-quarter">
<div class="box">
<ul>
{{#each types}}
<li><a href="#type-{{@key}}" style="font-weight: bold">{{@key}}</a>
<ul style="margin-left: 14px;margin-bottom:16px;">
{{#each tables}}
<li style="font-size: 0.8em;"><a href="#table-{{@../key}}-{{@key}}">.{{@key}}</a></li>
{{/each}}
{{#each properties}}
<li style="font-size: 0.8em;"><a href="#prop-{{@../key}}-{{@key}}">.{{@key}}</a></li>
{{/each}}
{{#if isNode}}
{{#each @root.types.Node.functions}}
<li style="font-size: 0.8em;"><a href="#func-Node-{{@key}}">{{@key}}</a></li>
{{/each}}
{{/if}}
{{#each functions}}
<li style="font-size: 0.8em;"><a href="#func-{{@../key}}-{{@key}}">{{@key}}</a></li>
{{/each}}
</ul>
</li>
{{/each}}
</ul>
</div>
</div>
<div class="column">
{{#each types}}
<div class="box">
<a name="type-{{@key}}"></a>
<h3 class="title is-3">{{@key}}</h3>
<div class="type-description">{{this.description}}</div>
{{#if properties}}
<h5 class="title is-5" style="margin-bottom: 5px;margin-top: 16px;">Properties</h5>
<div class="func-params">
{{#each properties}}
<div class="param-item">
<a name="prop-{{@../key}}-{{@key}}"></a>
<span class="param-name">{{@key}}</span><span class="param-type">{{type}}</span>
<div style="margin-bottom: 6px; font-size:0.9em;">{{description}}</div>
</div>
{{/each}}
</div>
{{/if}}
{{#each tables}}
<hr />
<div>
<a name="table-{{@../key}}-{{@key}}"></a>
<h4 class="title is-4">{{@../key}}.{{@key}}</h4>
<div class="func-description">{{description}}</div>
<h5 class="title is-5" style="margin-bottom: 5px;">Values</h5>
{{#each values}}
<div class="table-item"><span class="table-item-name">{{@key}}</span><span class="table-item-type">{{type}}</span><span class="table-item-value">{{value}}</span></div>
{{/each}}
</div>
{{/each}}
{{#each functions}}
<hr />
<div>
<a name="func-{{@../key}}-{{@key}}"></a>
<h4 class="title is-4">
{{@key}}({{funcparams this.params}}) {{#if returns}}<span
class="func-return-type">{{returns.type}}</span>{{/if}}
</h4>
<div class="func-description">{{this.description}}</div>
{{#if this.params}}
<h5 class="title is-5" style="margin-bottom: 5px;">Parameters</h5>
<div class="func-params">
{{#each this.params}}
<div class="param-item">
<span class="param-name">{{@key}}</span><span class="param-type">{{type}}</span>
</div>
<div class="param-desc">{{description}}</div>
{{/each}}
</div>
{{/if}}
{{#if returns}}
<h5 class="title is-5" style="margin-bottom: 5px;">Returns</h5>
<div class="func-returns">
{{returns.description}}
</div>
{{/if}}
</div>
{{/each}}
</div>
{{/each}}
</div>
</div>
</div>
<script>
$.ajax({
url: "help/spec.json",
dataType: 'json',
success: function (data) {
Handlebars.registerHelper('funcparams', obj => obj == null ? '' : Object.keys(obj).join(", "))
var template = Handlebars.compile(document.getElementById("help-template").innerHTML)
document.getElementById("help-content").innerHTML = template(data)
},
error: function () {
}
})
</script>
</body>
</html>