-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: composer.json
- Loading branch information
Showing
7 changed files
with
137 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
trim_trailing_whitespace = false | ||
end_of_line = lf | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,29 @@ | ||
{ | ||
"name": "pattern-lab/styleguidekit-twig-default", | ||
"description": "The default Twig-based StyleguideKit for Pattern Lab. Contains styles and mark-up for Pattern Lab's front-end.", | ||
"keywords": ["twig", "pattern lab", "styleguide"], | ||
"homepage": "http://patternlab.io", | ||
"license": "MIT", | ||
"type": "patternlab-styleguidekit", | ||
"authors": [ | ||
{ | ||
"name": "Dave Olsen", | ||
"email": "dmolsen@gmail.com", | ||
"homepage": "http://dmolsen.com", | ||
"role": "Lead Developer" | ||
}, | ||
{ | ||
"name": "Brad Frost", | ||
"homepage": "http://bradfrostweb.com", | ||
"role": "Creator" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/pattern-lab/styleguidekit-twig-default/issues", | ||
"wiki": "http://patternlab.io/docs/", | ||
"source": "https://github.com/pattern-lab/styleguidekit-twig-default/releases" | ||
}, | ||
"require": { | ||
"pattern-lab/core": "^2.0.0", | ||
"pattern-lab/patternengine-twig": "^2.0.0", | ||
"pattern-lab/styleguidekit-assets-default": "^2.0.0" | ||
} | ||
"name": "pattern-lab/styleguidekit-twig-default", | ||
"description": "The default Twig-based StyleguideKit for Pattern Lab. Contains styles and mark-up for Pattern Lab's front-end.", | ||
"keywords": ["twig", "pattern lab", "styleguide"], | ||
"homepage": "http://patternlab.io", | ||
"license": "MIT", | ||
"type": "patternlab-styleguidekit", | ||
"authors": [ | ||
{ | ||
"name": "Dave Olsen", | ||
"email": "dmolsen@gmail.com", | ||
"homepage": "http://dmolsen.com", | ||
"role": "Lead Developer" | ||
}, | ||
{ | ||
"name": "Brad Frost", | ||
"homepage": "http://bradfrostweb.com", | ||
"role": "Creator" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/pattern-lab/styleguidekit-twig-default/issues", | ||
"wiki": "http://patternlab.io/docs/", | ||
"source": "https://github.com/pattern-lab/styleguidekit-twig-default/releases" | ||
}, | ||
"require": { | ||
"pattern-lab/styleguidekit-assets-default": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,57 @@ | ||
<script> | ||
var patternData = {{ patternData | raw }}; | ||
<script type="text/json" id="sg-pattern-data-footer" class="sg-pattern-data"> | ||
{{ patternData | raw }} | ||
</script> | ||
|
||
<script> | ||
/*! | ||
* scriptLoader - v0.1 | ||
* | ||
* Copyright (c) 2014 Dave Olsen, http://dmolsen.com | ||
* Licensed under the MIT license | ||
* | ||
*/ | ||
var scriptLoader = { | ||
run: function(js,cb,target) { | ||
var s = document.getElementById(target+'-'+cb); | ||
for (var i = 0; i < js.length; i++) { | ||
var src = (typeof js[i] != "string") ? js[i].src : js[i]; | ||
var c = document.createElement('script'); | ||
c.src = '../../'+src+'?'+cb; | ||
if (typeof js[i] != "string") { | ||
if (js[i].dep !== undefined) { | ||
c.onload = function(dep,cb,target) { | ||
return function() { | ||
scriptLoader.run(dep,cb,target); | ||
} | ||
}(js[i].dep,cb,target); | ||
} | ||
} | ||
s.parentNode.insertBefore(c,s); | ||
} | ||
} | ||
} | ||
/*! | ||
* scriptLoader - v0.1 | ||
* | ||
* Copyright (c) 2014 Dave Olsen, http://dmolsen.com | ||
* Licensed under the MIT license | ||
* | ||
*/ | ||
var scriptLoader = { | ||
run: function(js,cb,target) { | ||
var s = document.getElementById(target+'-'+cb); | ||
for (var i = 0; i < js.length; i++) { | ||
var src = (typeof js[i] != 'string') ? js[i].src : js[i]; | ||
var c = document.createElement('script'); | ||
c.src = '../../'+src+'?'+cb; | ||
if (typeof js[i] != 'string') { | ||
if (js[i].dep !== undefined) { | ||
c.onload = function(dep,cb,target) { | ||
return function() { | ||
scriptLoader.run(dep,cb,target); | ||
} | ||
}(js[i].dep,cb,target); | ||
} | ||
} | ||
s.parentNode.insertBefore(c,s); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<script id="pl-js-polyfill-insert-{{ cacheBuster }}"> | ||
(function() { | ||
if (self != top) { | ||
var cb = '{{ cacheBuster}}'; | ||
var js = []; | ||
if (typeof document !== "undefined" && !("classList" in document.documentElement)) { | ||
js.push("styleguide/bower_components/classList.min.js"); | ||
} | ||
scriptLoader.run(js,cb,'pl-js-polyfill-insert'); | ||
} | ||
})(); | ||
(function() { | ||
if (self != top) { | ||
var cb = '{{ cacheBuster}}'; | ||
var js = []; | ||
if (typeof document !== 'undefined' && !('classList' in document.documentElement)) { | ||
js.push('styleguide/bower_components/classList.min.js'); | ||
} | ||
scriptLoader.run(js,cb,'pl-js-polyfill-insert'); | ||
} | ||
})(); | ||
</script> | ||
|
||
<script id="pl-js-insert-{{ cacheBuster }}"> | ||
(function() { | ||
if (self != top) { | ||
var cb = '{{ cacheBuster}}'; | ||
var js = [ { "src": "styleguide/bower_components/jwerty.min.js", "dep": [ { "src": "annotations/annotations.js", "dep": [ "styleguide/js/patternlab-pattern.min.js" ] } ] } ]; | ||
scriptLoader.run(js,cb,'pl-js-insert'); | ||
} | ||
})(); | ||
</script> | ||
(function() { | ||
if (self != top) { | ||
var cb = '{{ cacheBuster}}'; | ||
var js = [ { 'src': 'styleguide/bower_components/jwerty.min.js', 'dep': [ 'styleguide/js/patternlab-pattern.min.js' ] } ]; | ||
scriptLoader.run(js,cb,'pl-js-insert'); | ||
} | ||
})(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,33 @@ | ||
<div id="{{ partial.patternPartial }}" class="sg-pattern"> | ||
<div class="sg-pattern-head"> | ||
<h3><a href="../../patterns/{{ partial.patternLink }}" class="patternLink" data-patternpartial="{{ partial.patternPartial }}">{{ partial.patternName }}</a></h3> | ||
<div class="sg-pattern-head-actions"> | ||
<!--Pattern header options--> | ||
</div> | ||
</div> | ||
{% if partial.patternDescExists %} | ||
<div class="sg-pattern-desc"> | ||
<p>{{ partial.patternDesc | raw }}</p> | ||
{% for patternDescAddition in partial.patternDescAdditions %} | ||
{{ patternDescAddition | raw }} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
<div class="sg-pattern-example"> | ||
{{ partial.patternPartialCode | raw }} | ||
</div> | ||
{% for patternExampleAddition in partial.patternExampleAdditions %} | ||
{{ patternExampleAddition | raw }} | ||
{% endfor %} | ||
<div class="sg-pattern-extra"> | ||
<div class="sg-pattern-extra-annotations" style="display: none"> | ||
<span class="sg-pattern-extra-name">Annotations</span> | ||
<div id="sg-pattern-extra-annotations-container"> | ||
</div> | ||
</div> | ||
<div class="sg-pattern-extra-html" style="display: none"> | ||
<span class="sg-pattern-extra-name">HTML</span> | ||
<pre> | ||
<code id="sg-pattern-extra-html-container"> | ||
{{ partial.patternPartialCodeE | raw }} | ||
</code> | ||
</pre> | ||
</div> | ||
<div class="sg-pattern-extra-engine" style="display: none"> | ||
<span class="sg-pattern-extra-name">{{ partial.patternEngineName }}</span> | ||
<pre> | ||
<code id="sg-pattern-extra-engine-container"> | ||
</code> | ||
</pre> | ||
</div> | ||
<div class="sg-pattern-extra-lineage" style="display: none"> | ||
<span class="sg-pattern-extra-name">Lineages</span> | ||
{% if partial.patternLineageExists %} | ||
<div class="sg-pattern-extra-lineage"> | ||
The <span class="sg-pattern-extra-lineage-name">{{ partial.patternPartial }}</span> pattern contains the following pattern(s): | ||
<ul> | ||
{% for patternLineage in partial.patternLineages %} | ||
<li> <a href="{{ patternLineage.lineagePath }}" class="{% if patternLineage.lineageState %}sg-pattern-state {{ patternLineage.lineageState }} {% endif %}" data-patternpartial="{{ patternLineage.lineagePattern }}">{{ patternLineage.lineagePattern }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
{% if partial.patternLineageRExists %} | ||
<div class="sg-pattern-extra-lineage"> | ||
The <span class="sg-pattern-extra-lineage-name">{{ partial.patternPartial }}</span> pattern is included in the following pattern(s): | ||
<ul> | ||
{% for patternLineageR in partial.patternLineagesR %} | ||
<li> <a href="{{ patternLineageR.lineagePath }}" class="{% if patternLineageR.lineageState %}sg-pattern-state {{ patternLineageR.lineageState }} {% endif %}" data-patternpartial="{{ patternLineageR.lineagePattern }}">{{ patternLineageR.lineagePattern }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
{% if not partial.patternLineageEExists %} | ||
The <span class="sg-pattern-extra-lineage-name">{{ partial.patternPartial }}</span> pattern doesn't have any lineage information. | ||
{% endif %} | ||
</div> | ||
{% if partial.patternCSSExists %} | ||
<div class="sg-pattern-extra-css" style="display: none"> | ||
<span class="sg-pattern-extra-name">{{ partial.patternEngineName }}</span> | ||
<pre> | ||
<code id="sg-pattern-extra-engine-container"> | ||
{{ partial.patternCSS }} | ||
</code> | ||
</pre> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
<div class="sg-pattern-head"> | ||
<h3 class="sg-pattern-title"> | ||
<a href="../../patterns/{{ partial.patternLink }}" class="patternLink" data-patternpartial="{{ partial.patternPartial }}" title="Link to Pattern"> | ||
{{ partial.patternName }} | ||
|
||
{% if partial.patternState %} | ||
<span class="sg-pattern-state {{ partial.patternState }}"> | ||
{{ partial.patternState }} | ||
</span> | ||
{% endif %} | ||
</a> | ||
</h3> | ||
|
||
<div class="sg-pattern-breadcrumb"> | ||
{{ partial.patternBreadcrumb }} | ||
</div> | ||
|
||
<a href="#" data-patternpartial="{{ partial.patternPartial }}" title="View Pattern Info" id="sg-pattern-extra-toggle-{{partial.patternPartial}}" class="sg-pattern-extra-toggle"> | ||
<span>▼</span> | ||
</a> | ||
</div> | ||
|
||
<div class="sg-pattern-extra" id="sg-pattern-extra-{{ partial.patternPartial }}"></div> | ||
|
||
<div class="sg-pattern-example"> | ||
{{ partial.patternPartialCode | raw }} | ||
</div> | ||
|
||
<script type="text/json" id="sg-pattern-data-{{partial.patternPartial}}" class="sg-pattern-data"> | ||
{{ partial.patternData | raw }} | ||
</script> | ||
</div><!--end .sg-pattern--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
<div id="{{ partial.patternPartial }}" class="sg-subtype"> | ||
<h2><a href="../../patterns/{{ partial.patternLink }}" class="patternLink" data-patternpartial="{{ partial.patternPartial }}">{{ partial.patternName }}</a></h2> | ||
<div class="sg-pattern-body"> | ||
{{ partial.patternDesc | raw }} | ||
</div> | ||
<h2> | ||
<a href="../../patterns/{{ partial.patternLink }}" class="patternLink" data-patternpartial="{{ partial.patternPartial }}"> | ||
{{ partial.patternName }} | ||
</a> | ||
</h2> | ||
|
||
<div class="sg-pattern-body"> | ||
{{ partial.patternDesc | raw }} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
|
||
<!-- View All Patterns in a Pattern Sub-Type --> | ||
<div class="sg-main" role="main"> | ||
|
||
<!-- Patterns --> | ||
<div id="sg-patterns"> | ||
{% for partial in partials %} | ||
{% if partial.patternSectionSubtype %} | ||
{% include "patternSectionSubtype.twig" %} | ||
{% else %} | ||
{% include "patternSection.twig" %} | ||
{% endif %} | ||
{% endfor %} | ||
</div> <!--end #sg-patterns--> | ||
|
||
</div><!--end .sg-main--> | ||
|
||
<!-- JS to hook everything together and do annotations --> | ||
<script> | ||
// handle injection of items from builder | ||
var patternPartial = "{{ patternPartial }}"; | ||
var lineage = ""; | ||
</script> | ||
<!-- Patterns --> | ||
<div id="sg-patterns"> | ||
{% for partial in partials %} | ||
{% if partial.patternSectionSubtype %} | ||
{% include "patternSectionSubtype.twig" %} | ||
{% else %} | ||
{% include "patternSection.twig" %} | ||
{% endif %} | ||
{% endfor %} | ||
</div> <!--end #sg-patterns--> | ||
</div><!--end .sg-main--> |