-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.hbs
332 lines (282 loc) · 11.8 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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<script src="https://use.typekit.net/dng7hco.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>
<meta charset="utf-8">
<title>{{options.title}} - v. {{options.styleguide_version}}</title>
<meta name="description" content="">
<meta name="generator" content="kss-node">
<meta name="viewport" content="width=device-width">
<style media="print">
.kss-style,
.kss-status-bar {
display: none;
}
</style>
{{{styles}}}
<!-- jquery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
</head>
<body id="kss-node" class="show-sidebar">
<div class="kss-status-bar">
<button class="kss-button sidebar-toggle">Menu</button>
<div id="width-marker" class="kss-style"></div>
</div>
{{#unless options.hide_pattern_status}}
<div class="kss-status-bar status-toggles kss-style">
Filter Patterns:
<button class="kss-button status-toggle active" data-status="all">Show All</button>
<button class="kss-button status-toggle" data-status="development">In Development</button>
<button class="kss-button status-toggle" data-status="review">In Review</button>
<button class="kss-button status-toggle" data-status="ready">Production Ready</button>
</div>
{{/unless}}
<div class="kss-sidebar kss-style">
<header class="kss-header">
<h1 class="kss-doc-title">{{options.title}}</h1>
<small>v. {{options.styleguide_version}}</small>
</header>
<nav class="kss-nav">
<ul class="kss-nav__menu">
<li class="kss-nav__menu-item">
<a class="kss-nav__menu-link" href="index.html">
<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">
<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>
<main role="main" class="kss-main{{#unless options.hide_pattern_status}} has-status-toggle{{/unless}}">
{{#if homepage}}
<div id="kssref-0" class="kss-section kss-section--depth-0 kss-overview kss-style">
<div class="version-info">
{{{homepage}}}
</div>
<hr />
<h2 id="dev-notes" class="kss-title">Developer Notes</h2>
<h3 class="kss-title">CSS Naming Conventions</h3>
<p>For this project, BEM (Block Element Modifier) is being utilized as the naming convention. The following
resources can help explain how to read and expand on this way of naming classes:</p>
<ul>
<li><a href="https://blog.decaf.de/2015/06/24/why-bem-in-a-nutshell/">Why BEM?</a></li>
<li><a href="http://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/">Getting your head around BEM syntax</a></li>
</ul>
<p>It's recommended to adhere to these conventions if additional styles need to be added, or if existing ones
need to be expanded. This said, there is some flexibility. Scenarios like states that may toggle, or classes that
otherwise alter an element in a way that may be contextual (say, something that is visually hidden at one breakpoint
but visible in another) may be better suited to classes along the lines of .is-deactivated or .visually-hidden.
You'll see certain classes that follow this thinking in this styleguide.</p>
<h3 class="kss-title">Versioning</h3>
<p>Versioning will work the following way:</p>
<ul>
<li>First digit will increase per sprint.</li>
<li>Second digit will increase as features are added.</li>
<li>Third digit will increase as bug fixes/small adjustments are added.</li>
</ul>
<h3 class="kss-title">Markers/Notation</h3>
<p>As you browse the styleguide you'll notice certain types of notation intended to aid in the implementation of the patterns found here.</p>
<h3 class="kss-title">Pattern Type: Atomic Design</h3>
<p>Patterns will be broken up into different types based on the classifications outlined by <a href="http://atomicdesign.bradfrost.com/chapter-2/">Brad Frost's Atomic Design Methodology</a>.</p>
{{#unless options.hide_pattern_status}}
<h3 class="kss-title">Pattern Status</h3>
<p>For this project, it's important to have a simple way of determining whether or not a pattern is ready to be folded into a production site. Because of this, all patterns will have the following state indicators in place.</p>
<p><span class="kss-status documented development">In Development</span></p>
<p>Pattern is being actively worked on and should not be used outside of the styleguide in its current state.</p>
<p><span class="kss-status documented review">In Review</span></p>
<p>Pattern is complete with regards to active work, but needs review from relevant parties.</p>
<span class="kss-status documented ready">Production Ready</span>
<p>Pattern has been vetted and tested and is ready for use on a production site.</p>
{{/unless}}
</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}}" data-status="{{~status~}}" data-patterntype="{{patterntype}}">
<div class="kss-style">
<div class="kss__content">
<h{{depth}} class="kss-title kss-title--level-{{depth}}">
<a class="kss-title__permalink" href="#kssref-{{referenceURI}}">
<span class="kss-title__ref">
{{referenceNumber}}
<span class="kss-title__permalink-hash"></span>
</span>
{{header}}
</a>
</h{{depth}}>
{{#if patterntype}}
<dl class="pattern-info kss-style">
<dt>Pattern Type:</dt>
<dd class="pattern-type {{patterntype}}">{{patterntype}}</dd>
{{#if containspatterns}}
<br />
<dt>Pattern Can Contain:</dt>
<dd>{{{containspatterns}}}</dd>
{{/if}}
</dl>
{{/if}}
{{#unless @first}}
<a class="jira-button kss-button">Comment on Jira</a>
{{/unless}}
{{#if description}}
<div class="kss-description">
{{{description}}}
</div>
{{/if}}
{{#if devnotes}}
<div class="kss-devnotes">
<strong>Developer's Notes:</strong><br/>
{{devnotes}}
</div>
{{/if}}
{{#if @first}}
<hr />
{{/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>
</div>
{{#if example}}
<div class="kss-modifier__wrapper">
<div class="kss-modifier__heading kss-style">
{{!
Display pattern status.
To encourage mindful documentation, if no status is added
in the css files for a pattern, a pattern will default to
In Development.
}}
{{#unless ../options.hide_pattern_status}}
{{#if status}}
{{{statusMarker status}}}
{{else}}
<span class="kss-status development">In Development</span>
{{/if}}
{{/unless}}
Example{{#if modifiers}}s{{/if}}
</div>
{{#if modifiers}}
<div class="kss-modifier__copy">
<div class="kss-modifier__default-name kss-style">
Default styling
</div>
</div>
{{/if}}
<div class="kss-modifier__example">
{{{example}}}
</div>
{{#each modifiers}}
<div class="kss-modifier__copy">
<div class="kss-modifier__name kss-style">
{{name}}
</div>
<div class="kss-modifier__description kss-style">
{{{description}}}
</div>
</div>
<div class="kss-modifier__example">
{{{markup}}}
</div>
{{/each}}
</div>
{{#unless hidemarkup}}
{{#if example}}
<div class="kss-markup kss-style">
<pre class="prettyprint linenums lang-html"><code data-language="html">{{markup}}</code></pre>
</div>
{{/if}}
{{/unless}}
{{/if}}
{{#unless @first}}
{{#if sourceFile.name}}
<div class="kss-source kss-style">
<small>Source: {{sourceFile.name}}, line {{sourceFile.line}}</small>
</div>
{{/if}}
{{/unless}}
</{{#if @first}}div{{else}}section{{/if}}>
{{/each}}
{{/if}}
</main>
<footer class="kss-footer kss-style">
<img src="kss-assets/images/caxy.png" alt="Caxy Code Creative logo" height="30" />
This styleguide was built with <a href="https://github.com/kss-node/kss-node">KSS Node</a> using <a href="http://caxy.com">Caxy Code Creative</a>'s Zaba theme.
</footer>
<script>
// Set global constant indicating we're on the styleguide.
var __STYLEGUIDE__ = true;
// Hide all KSS elements on page patterns
if($('.kss-section[data-patterntype="page"]').length > 0) {
$('#kss-node').addClass('full-page');
} else {
// Only load KSS JS on non-page pattern pages.
var jsFiles = [
"kss-assets/js/kss.js",
"kss-assets/js/scrollspy.js",
"kss-assets/js/prettify.js",
"kss-assets/js/swatch-text.js"
];
for (var i = 0; i < jsFiles.length; i++) {
$.getScript( jsFiles[i], function( data, textStatus, jqxhr ) {
});
}
$('.sidebar-toggle').on('click', function(){
$(this).toggleClass('active');
$('body').toggleClass('show-sidebar');
});
setTimeout(function(){
prettyPrint();
var spy = new ScrollSpy('#kss-node', {
nav: '.kss-nav__menu-child > li > a',
className: 'is-in-viewport'
});
}, 1000);
}
</script>
<!-- Scripts needed for project -->
{{{scripts}}}
<!-- End project scripts -->
<!-- Automatically built using <a href="https://github.com/kss-node/kss-node">kss-node</a>. -->
</body>
</html>