Skip to content

Commit ff76c72

Browse files
committed
Normalizing whitespace for consistency.
1 parent 803fbda commit ff76c72

File tree

5 files changed

+93
-82
lines changed

5 files changed

+93
-82
lines changed

composer.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
2-
"name": "pattern-lab/styleguidekit-twig-default",
3-
"description": "The default Twig-based StyleguideKit for Pattern Lab. Contains styles and mark-up for Pattern Lab's front-end.",
4-
"keywords": ["twig", "pattern lab", "styleguide"],
5-
"homepage": "http://patternlab.io",
6-
"license": "MIT",
7-
"type": "patternlab-styleguidekit",
8-
"authors": [
2+
"name": "pattern-lab/styleguidekit-twig-default",
3+
"description": "The default Twig-based StyleguideKit for Pattern Lab. Contains styles and mark-up for Pattern Lab's front-end.",
4+
"keywords": ["twig", "pattern lab", "styleguide"],
5+
"homepage": "http://patternlab.io",
6+
"license": "MIT",
7+
"type": "patternlab-styleguidekit",
8+
"authors": [
99
{
10-
"name": "Dave Olsen",
11-
"email": "[email protected]",
12-
"homepage": "http://dmolsen.com",
13-
"role": "Lead Developer"
10+
"name": "Dave Olsen",
11+
"email": "[email protected]",
12+
"homepage": "http://dmolsen.com",
13+
"role": "Lead Developer"
1414
},
1515
{
16-
"name": "Brad Frost",
17-
"homepage": "http://bradfrostweb.com",
18-
"role": "Creator"
16+
"name": "Brad Frost",
17+
"homepage": "http://bradfrostweb.com",
18+
"role": "Creator"
1919
}
20-
],
20+
],
2121
"support": {
22-
"issues": "https://github.com/pattern-lab/styleguidekit-twig-default/issues",
22+
"issues": "https://github.com/pattern-lab/styleguidekit-twig-default/issues",
2323
"wiki": "http://patternlab.io/docs/",
2424
"source": "https://github.com/pattern-lab/styleguidekit-twig-default/releases"
2525
},
2626
"require": {
27-
"pattern-lab/styleguidekit-assets-default": "^3.0.0"
27+
"pattern-lab/styleguidekit-assets-default": "dev-dev"
2828
}
29-
}
29+
}

views/partials/general-footer.twig

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,57 @@
1-
<script type="text/json" id="sg-pattern-data-footer" class="sg-pattern-data">
2-
{{ patternData | raw }}
3-
</script>
1+
<script type="text/json" id="sg-pattern-data-footer" class="sg-pattern-data">
2+
{{ patternData | raw }}
3+
</script>
44

5-
<script>
6-
/*!
7-
* scriptLoader - v0.1
8-
*
9-
* Copyright (c) 2014 Dave Olsen, http://dmolsen.com
10-
* Licensed under the MIT license
11-
*
12-
*/
13-
14-
var scriptLoader = {
15-
16-
run: function(js,cb,target) {
17-
var s = document.getElementById(target+'-'+cb);
18-
for (var i = 0; i < js.length; i++) {
19-
var src = (typeof js[i] != 'string') ? js[i].src : js[i];
20-
var c = document.createElement('script');
21-
c.src = '../../'+src+'?'+cb;
22-
if (typeof js[i] != 'string') {
23-
if (js[i].dep !== undefined) {
24-
c.onload = function(dep,cb,target) {
25-
return function() {
26-
scriptLoader.run(dep,cb,target);
27-
}
28-
}(js[i].dep,cb,target);
29-
}
5+
<script>
6+
/*!
7+
* scriptLoader - v0.1
8+
*
9+
* Copyright (c) 2014 Dave Olsen, http://dmolsen.com
10+
* Licensed under the MIT license
11+
*
12+
*/
13+
14+
var scriptLoader = {
15+
run: function(js,cb,target) {
16+
var s = document.getElementById(target+'-'+cb);
17+
for (var i = 0; i < js.length; i++) {
18+
var src = (typeof js[i] != 'string') ? js[i].src : js[i];
19+
var c = document.createElement('script');
20+
c.src = '../../'+src+'?'+cb;
21+
if (typeof js[i] != 'string') {
22+
if (js[i].dep !== undefined) {
23+
c.onload = function(dep,cb,target) {
24+
return function() {
25+
scriptLoader.run(dep,cb,target);
26+
}
27+
}(js[i].dep,cb,target);
3028
}
31-
s.parentNode.insertBefore(c,s);
3229
}
30+
s.parentNode.insertBefore(c,s);
3331
}
34-
3532
}
36-
</script>
33+
}
34+
</script>
3735

38-
<script id="pl-js-polyfill-insert-{{ cacheBuster }}">
39-
(function() {
40-
if (self != top) {
41-
var cb = '{{ cacheBuster}}';
42-
var js = [];
43-
if (typeof document !== 'undefined' && !('classList' in document.documentElement)) {
44-
js.push('styleguide/bower_components/classList.min.js');
45-
}
46-
scriptLoader.run(js,cb,'pl-js-polyfill-insert');
36+
<script id="pl-js-polyfill-insert-{{ cacheBuster }}">
37+
(function() {
38+
if (self != top) {
39+
var cb = '{{ cacheBuster}}';
40+
var js = [];
41+
if (typeof document !== 'undefined' && !('classList' in document.documentElement)) {
42+
js.push('styleguide/bower_components/classList.min.js');
4743
}
48-
})();
49-
</script>
44+
scriptLoader.run(js,cb,'pl-js-polyfill-insert');
45+
}
46+
})();
47+
</script>
5048

51-
<script id="pl-js-insert-{{ cacheBuster }}">
52-
(function() {
53-
if (self != top) {
54-
var cb = '{{ cacheBuster}}';
55-
var js = [ { 'src': 'styleguide/bower_components/jwerty.min.js', 'dep': [ 'styleguide/js/patternlab-pattern.min.js' ] } ];
56-
scriptLoader.run(js,cb,'pl-js-insert');
57-
}
58-
})();
59-
</script>
49+
<script id="pl-js-insert-{{ cacheBuster }}">
50+
(function() {
51+
if (self != top) {
52+
var cb = '{{ cacheBuster}}';
53+
var js = [ { 'src': 'styleguide/bower_components/jwerty.min.js', 'dep': [ 'styleguide/js/patternlab-pattern.min.js' ] } ];
54+
scriptLoader.run(js,cb,'pl-js-insert');
55+
}
56+
})();
57+
</script>

views/partials/patternSection.twig

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,31 @@
22
<div class="sg-pattern-head">
33
<h3 class="sg-pattern-title">
44
<a href="../../patterns/{{ partial.patternLink }}" class="patternLink" data-patternpartial="{{ partial.patternPartial }}" title="Link to Pattern">
5-
{{ partial.patternName }}
6-
{% if partial.patternState %}
7-
<span class="sg-pattern-state {{ partial.patternState }}">{{ partial.patternState }}</span>
8-
{% endif %}
5+
{{ partial.patternName }}
6+
7+
{% if partial.patternState %}
8+
<span class="sg-pattern-state {{ partial.patternState }}">
9+
{{ partial.patternState }}
10+
</span>
11+
{% endif %}
912
</a>
1013
</h3>
11-
<div class="sg-pattern-breadcrumb">{{ partial.patternBreadcrumb }}</div>
12-
<a href="#" data-patternpartial="{{ partial.patternPartial }}" title="View Pattern Info" id="sg-pattern-extra-toggle-{{partial.patternPartial}}" class="sg-pattern-extra-toggle"><span>&#9660;</span></a>
13-
</div>
14-
<div class="sg-pattern-extra" id="sg-pattern-extra-{{ partial.patternPartial }}">
15-
14+
15+
<div class="sg-pattern-breadcrumb">
16+
{{ partial.patternBreadcrumb }}
17+
</div>
18+
19+
<a href="#" data-patternpartial="{{ partial.patternPartial }}" title="View Pattern Info" id="sg-pattern-extra-toggle-{{partial.patternPartial}}" class="sg-pattern-extra-toggle">
20+
<span>&#9660;</span>
21+
</a>
1622
</div>
23+
24+
<div class="sg-pattern-extra" id="sg-pattern-extra-{{ partial.patternPartial }}"></div>
25+
1726
<div class="sg-pattern-example">
1827
{{ partial.patternPartialCode | raw }}
1928
</div>
29+
2030
<script type="text/json" id="sg-pattern-data-{{partial.patternPartial}}" class="sg-pattern-data">
2131
{{ partial.patternData | raw }}
2232
</script>
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<div id="{{ partial.patternPartial }}" class="sg-subtype">
2-
<h2><a href="../../patterns/{{ partial.patternLink }}" class="patternLink" data-patternpartial="{{ partial.patternPartial }}">{{ partial.patternName }}</a></h2>
2+
<h2>
3+
<a href="../../patterns/{{ partial.patternLink }}" class="patternLink" data-patternpartial="{{ partial.patternPartial }}">
4+
{{ partial.patternName }}
5+
</a>
6+
</h2>
7+
38
<div class="sg-pattern-body">
49
{{ partial.patternDesc | raw }}
510
</div>
6-
</div>
11+
</div>

views/viewall.twig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
21
<!-- View All Patterns in a Pattern Sub-Type -->
32
<div class="sg-main" role="main">
4-
53
<!-- Patterns -->
64
<div id="sg-patterns">
75
{% for partial in partials %}

0 commit comments

Comments
 (0)