-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.hbs
198 lines (174 loc) · 6.07 KB
/
index.hbs
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
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<title>{{options.title}}</title>
<meta name="description" content="">
<meta name="generator" content="kss-node">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="kss-assets/kss.css">
{{{styles}}}
</head>
<body id="kss-node" class="kss-offscreen is-moved">
<header class="kss-header">
<h1 class="kss-doc-title">{{options.title}}</h1>
<a class="kss-offscreen__toggle is-active" aria-expanded="true" aria-controls="offscreen-item" role="button">Open or close the menu</a>
</header>
<div class="kss-offscreen__inner">
<div class="kss-sidebar kss-offscreen__item" id="offscreen-item">
<div class="kss-search">
<label for="kss-search" style="display: none;">Search</label>
<input id="kss-search" type="text" />
</div>
<nav class="kss-nav">
<ul class="kss-nav__menu">
<li class="kss-nav__menu-item">
<a class="kss-nav__menu-link" href="./">
<span class="kss-nav__ref">0</span
><span class="kss-nav__name">Overview</span>
</a>
</li>
{{#each menu}}
<li class="kss-nav__menu-item">
<a class="kss-nav__menu-link" href="section-{{referenceURI}}.html">
<span class="kss-nav__ref">{{referenceNumber}}</span><span class="kss-nav__name">{{header}}</span>
</a>
{{#if isActive}}
{{#if children}}
<ul class="kss-nav__menu-child">
{{#each children}}
<li class="kss-nav__menu-item {{#if isGrandChild}}kss-nav__menu-subchild{{/if}}">
<a class="kss-nav__menu-link" href="section-{{../referenceURI}}.html#kssref-{{referenceURI}}">
<span class="kss-nav__ref {{#if isGrandChild}}kss-nav__ref-child{{/if}}">{{referenceNumber}}</span
><span class="kss-nav__name">{{header}}</span>
</a>
</li>
{{/each}}
</ul>
{{/if}}
{{/if}}
</li>
{{/each}}
</ul>
</nav>
</div>
<article role="main" class="kss-main">
{{#if homepage}}
<div id="kssref-0" class="kss-section kss-section--depth-0 kss-overview kss-style">
{{{homepage}}}
</div>
{{else}}
{{!
Display each section, in order.
The "root" element comes first in this loop, and can be detected using
the "#if @first" block as seen below.
}}
{{#each sections}}
<{{#if @first}}div{{else}}section{{/if}} id="kssref-{{referenceURI}}" class="kss-section kss-section--depth-{{depth}}">
<div class="kss-style">
<h{{depth}} class="kss-title kss-title--level-{{depth}}">
<a class="kss-title__permalink" href="#kssref-{{referenceURI}}">
<span class="kss-title__ref">
{{referenceNumber}}
</span>
{{header}}
</a>
</h{{depth}}>
{{#if description}}
<div class="kss-description">
{{{description}}}
</div>
{{/if}}
{{#if parameters}}
<div class="kss-parameters__title">Parameters:</div>
<ul class="kss-parameters">
{{#each parameters}}
<li class="kss-parameters__item">
<div class="kss-parameters__name"><code>{{name}}</code></div>
<div class="kss-parameters__description">
{{{description}}}
{{#if defaultValue}}
<div class="kss-parameters__default-value">
Defaults to: <code>{{defaultValue}}</code>
</div>
{{/if}}
</div>
</li>
{{/each}}
</ul>
{{/if}}
</div>
{{#if example}}
<div class="kss-modifier__wrapper">
<div class="kss-modifier__heading kss-style">
Example{{#if modifiers}}s{{/if}}
</div>
{{#if modifiers}}
<div class="kss-modifier__default-name kss-style">
Default styling
</div>
{{/if}}
<div class="kss-modifier__example">
{{{example}}}
</div>
{{#each modifiers}}
<div class="kss-modifier__name kss-style">
{{name}}
</div>
<div class="kss-modifier__description kss-style">
{{{description}}}
</div>
<div class="kss-modifier__example">
{{{markup}}}
</div>
{{/each}}
</div>
{{#if example}}
<div class="kss-markup kss-style">
<pre class="prettyprint linenums lang-html"><code data-language="html">{{markup}}</code></pre>
</div>
{{/if}}
{{/if}}
{{#if sourceFile.name}}
<div class="kss-source kss-style">
Source: <code>{{sourceFile.name}}</code>, line {{sourceFile.line}}
</div>
{{/if}}
</{{#if @first}}div{{else}}section{{/if}}>
{{/each}}
{{/if}}
</article>
<ul id="kss-toc" style="display: none;">
{{#each menu}}
<li data-url="./section-{{referenceURI}}.html#kssref-{{referenceURI}}" data-name="{{header}}"></li>
{{#each children}}
<li data-url="./section-{{../referenceURI}}.html#kssref-{{referenceURI}}" data-name="{{header}}"></li>
{{/each}}
{{/each}}
</ul>
</div>
<!-- SCRIPTS -->
<script src="kss-assets/kss.js"></script>
<script src="kss-assets/scrollspy.js"></script>
<script src="kss-assets/prettify.js"></script>
<script src="kss-assets/jquery.min.js"></script>
<script src="kss-assets/jquery.easy-autocomplete.min.js"></script>
<script src="kss-assets/offscreen.js"></script>
<script src="kss-assets/search.js"></script>
<script>
prettyPrint();
var spy = new ScrollSpy('#kss-node', {
nav: '.kss-nav__menu-child > li > a',
className: 'is-in-viewport'
});
</script>
{{{scripts}}}
{{! This will only be included in the demo page. }}
{{#if options.demo}}
<footer class="kss-github">
<!-- https://github.com/blog/273-github-ribbons -->
<a href="https://github.com/previousnext/kss-node-offscreen-template"><img src="kss-assets/github-fork--black.png" alt="Fork me on GitHub"></a>
</footer>
{{/if}}
</body>
</html>