-
Notifications
You must be signed in to change notification settings - Fork 2
/
menu.tpl
51 lines (46 loc) · 1.32 KB
/
menu.tpl
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
<div class="scrollspy">
<div class="brand">
<div class="logo fallback">
<img src="./logo.png" alt="{{ .Name }}" class="logo img-responsive" />
</div>
<h1>{{ .Name }}</h1>
</div>
<ul id="main-menu" data-spy="affix" class="nav">
<li>
<a href="#doc-general-notes">General notes</a>
</li>
{{ with $structures := .Structures }}
<li>
<a href="#doc-api-structures">API structures</a>
<ul>
{{ range $structures }}
<li>
<a href="#struct-{{ .Name }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</li>
{{ end }}
<li>
<a href="#doc-api-detail">API detail</a>
</li>
{{ range .Requests }}
<li>
<a href="#request-{{ slugify .Name }}"><span class="req-{{ .Method }} text-lg">{{ .Method }}</span> {{ .Name }}</a>
</li>
{{ end }}
{{ range .Folders }}
{{ $folder := . }}
<li>
<a href="#folder-{{ slugify $folder.Name }}">{{ $folder.Name }}</a>
<ul>
{{ range $folder.Requests }}
<li>
<a href="#request-{{ slugify $folder.Name }}-{{ slugify .Name }}"><span class="req-{{ .Method }} text-lg">{{ .Method }}</span> {{ .Name }}</a>
</li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
</div>