-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html
161 lines (150 loc) · 6.74 KB
/
template.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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-3">
<div class="sticky-top" id="nav" style="height: calc(100vh - 3rem); overflow-y: auto">
<h5 style="height: 2rem;" clas="mb-0">Contents</h5>
<nav class="nav navbar-light navbar-light bg-light">
<nav class="nav flex-column">
<a href="#tables" class="nav-link">Tables</a>
<nav class="nav flex-column">
{% for t in tables %}
<a href="#tables-{{ t.title | href }}" class="ml-4 nav-link">{{ t.title }}</a>
{% endfor %}
{% for category, items in categories %}
<a href="#{{ category | href }}" class="nav-link">{{ category }}<a/>
<nav class="nav flex-column">
{% for item in items %}
<a
class="nav-link ml-4"
href="#{{ category | href }}-{{ item['name'] | href }}"
>{{ item['name'] }}</a>
{% endfor %}
</nav>
{% endfor %}
</nav>
</nav>
</div>
</div>
<div class="col-9">
<div>
<a name="tables"></a>
<h2 id="tables">Tables</h2>
{% for t in tables %}
<a name="tables-{{ t.title | href }}"></a>
<h3 id="tables-{{ t.title | href }}">{{ t.title }}</h3>
{% if t.description %}
<p>{{ t.description }}</p>
{% endif %}
{% with table=t %}{% include "_table.html" %}{% endwith %}
{% endfor %}
<h2>Commands</h2>
<table class="table my-5">
{% for category, items in categories %}
<thead>
<tr class="bg-dark text-light">
<th colspan="5">
<a name="{{ category | href }}"></a>
<h3 id="{{ category | href }}">{{ category }}</h3>
</th>
</tr>
<tr class="text-light bg-primary">
<th style="width: 350px">Request</th>
{% if category == "Responses" %}
<th colspan="2">Parameters</th>
{% else %}
<th>Parameters</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for i in items %}
<tr>
<td>
<a name="{{ category | href }}-{{ i.name | href }}"></a>
<h5 class="text-nowrap">{{ i.name }}</h5>
<p class="texxt-nowrap">
{% if i.z_type %}
<div class="small">
Zigbee: <code class="text-dark">{{ i.z_type }}</code>,
{{ i.z_page | spec }}.
</div>
{% endif %}
<code class="text-nowrap"><strong>{{ '0x%04x' | format(i.type) }}</strong></code>
</p>
{% if i.responses %}
<p class="small">
<strong>Response:</strong>
{% for r in i.responses %}
<a href="#Responses-{{ r | href }}">{{ r }}</a>
{%- if not loop.last %},{% endif %}
{% endfor %}
</p>
{% if i.description %}
<p class="small">{{ i.description }}</p>
{% endif %}
{% endif %}
</td>
<td>
{% for p in i.parameters %}
<div class="row mt-3">
<div class="col-8"><code class="text-dark text-nowrap">{{ p.name }}</code></div>
<div class="col-4"><code>{{ p.type }}</code></div>
</div>
{% if p.description %}
<div class="row mt-1">
<div class="col ml-4">
<p class="small">{{ p.description | render(parameter=p) }}</p>
</div>
</div>
{% endif %}
{% if p.table %}
<div class="row">
<div class="col ml-4">
{% with table=p.table %}{% include "_inline_table.html" %}{% endwith %}
</div>
</div>
{% endif %}
{% if p.enum %}
<div class="row mt-1">
<div class="col ml-4">
<strong>Enumerations</strong>
</div>
</div>
{% for e in p.enum %}
<div class="row ml-4 my-2">
<div class="col-4 text-right small text-nowrap">
<code>{{ e.value }}</code>
</div>
<div class="col-8 small">{{ e.name }}</div>
</div>
{% endfor %}
{% endif %}
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
{% endfor %}
</table>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"></script>
</body>
</html>