/
api_split.pug
86 lines (79 loc) · 2.62 KB
/
api_split.pug
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
extends layout
append style
link(rel="stylesheet", href="/docs/css/api.css")
style.
.api-nav .nav-item-sub {
display: block !important;
}
.api-content {
margin-top: 3em;
}
block content
<a class="edit-docs-link" href="#{editLink}" target="_blank">
<img src="/docs/images/pencil.svg" />
</a>
h1 #{name}
include includes/native
div.api-nav
div.api-nav-content
each item in docs
- if (!item.hideFromNav || item.name === name)
div.nav-item(id='nav-' + item.name)
- if (item.name === name)
div.nav-item-title(style="font-weight: bold")
a(href=item.name.toLowerCase() + '.html')
| #{item.name}
ul.nav-item-sub
each prop in item.props
li
a(href='#' + prop.anchorId)
| <code>#{prop.string}</code>
- else
div.nav-item-title
a(href=item.name.toLowerCase() + '.html')
| #{item.name}
div.api-content
ul
each prop in props
li
a(href='#' + prop.anchorId)
| <code>#{prop.string}</code>
each prop in props
hr.separate-api-elements
h3(id=prop.anchorId)
a(href='#' + prop.anchorId)
| <code>#{prop.string}</code>
if prop.deprecated
<span class="deprecated">~DEPRECATED~</span>
if prop.param != null
h5 Parameters:
ul.params
each param in prop.param
- if (param.nested)
ul(style="margin-top: 0.5em")
li
| <code>#{param.name}</code>
| <span class="method-type">«#{param.types}»</span> !{param.description}
- else
li.param
| <code>#{param.name}</code>
| <span class="method-type">«#{param.types}»</span> !{param.description}
if prop.return != null
h5 Returns:
ul
li <span class="method-type">«#{prop.return.types}»</span> !{prop.return.description}
if prop.type != null && prop.type !== 'method' && prop.type !== 'function'
h5 Type:
ul
li <span class="method-type">«#{prop.type}»</span>
if prop.inherits != null
h5 Inherits:
ul
li <span class="method-type">«#{prop.inherits}»</span>
if prop.see != null
h5 See:
ul
each see in prop.see
li <span class="method-type"><a href="#{see.url}">#{see.text}</a></span>
div
| !{prop.description}