Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 271d12a

Browse files
committed
Merge branch 'release-0.6.1'
2 parents 8ac6e19 + 06f19bf commit 271d12a

File tree

8 files changed

+26
-5
lines changed

8 files changed

+26
-5
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.
22

3+
PL-v0.6.1
4+
- FIX: fixed the height of the HTML pre element on the pattern detail view
5+
- ADD: added in support for viewing the generated CSS on the pattern detail view
6+
37
PL-v0.6.0
48
- ADD: a UI list of the current media query widths from the CSS
59
- ADD: a pattern's "lineage" now displays in the UI under code view

builder/builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*!
4-
* Pattern Lab Builder CLI - v0.6.0
4+
* Pattern Lab Builder CLI - v0.6.1
55
*
66
* Copyright (c) 2013 Dave Olsen, http://dmolsen.com
77
* Licensed under the MIT license

builder/lib/builder.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*!
4-
* Pattern Lab Builder Class - v0.6.0
4+
* Pattern Lab Builder Class - v0.6.1
55
*
66
* Copyright (c) 2013 Dave Olsen, http://dmolsen.com
77
* Licensed under the MIT license

builder/lib/generator.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*!
4-
* Pattern Lab Generator Class - v0.6.0
4+
* Pattern Lab Generator Class - v0.6.1
55
*
66
* Copyright (c) 2013 Dave Olsen, http://dmolsen.com
77
* Licensed under the MIT license

builder/lib/watcher.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*!
4-
* Pattern Lab Watcher Class - v0.6.0
4+
* Pattern Lab Watcher Class - v0.6.1
55
*
66
* Copyright (c) 2013 Dave Olsen, http://dmolsen.com
77
* Licensed under the MIT license

public/styleguide/css/styleguide.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,13 @@
553553
#sg-annotation-container a, #sg-code-container a {
554554
color: #dddddd; }
555555

556+
#sg-code-container pre {
557+
max-height: 300px;
558+
padding: 0 1em; }
559+
560+
#sg-code-container .with-css pre {
561+
max-height: 200px; }
562+
556563
#sg-annotation-close-btn, #sg-code-close-btn {
557564
color: #fff;
558565
position: absolute;

public/styleguide/css/styleguide.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,15 @@ $animate-quick: 0.2s;
794794
}
795795
}
796796

797+
#sg-code-container pre {
798+
max-height: 300px;
799+
padding: 0 1em;
800+
}
801+
802+
#sg-code-container .with-css pre {
803+
max-height: 200px;
804+
}
805+
797806
#sg-annotation-close-btn, #sg-code-close-btn {
798807
color: #fff;
799808
position: absolute;

public/styleguide/js/code-viewer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ var codeViewer = {
5555
codeContainerInit: function() {
5656

5757
if (document.getElementById("sg-code-container") == undefined) {
58-
$('<div id="sg-code-container" style="display: none;"></div>').html('<a href="#" id="sg-code-close-btn">Close</a><div id="sg-code-lineage" style="display: none;"><h2>Lineage</h2><p>This pattern contains the following patterns: <span id="sg-code-lineage-fill"></span></p></div><div id="sg-code-html"><h2>HTML</h2><pre><code id="sg-code-html-fill" class="language-markup"></code></pre></div>').appendTo('body').css('bottom',-$(document).outerHeight());
58+
$('<div id="sg-code-container" style="display: none;"></div>').html('<a href="#" id="sg-code-close-btn">Close</a><div id="sg-code-lineage" style="display: none;"><h2>Lineage</h2><p>This pattern contains the following patterns: <span id="sg-code-lineage-fill"></span></p></div><div id="sg-code-html"><h2>HTML</h2><pre><code id="sg-code-html-fill" class="language-markup"></code></pre></div><div id="sg-code-css" class="with-css" style="display: none;"><h2>CSS</h2><pre><code id="sg-code-css-fill" class="language-css"></code></pre></div>').appendTo('body').css('bottom',-$(document).outerHeight());
5959
}
6060

6161
if (codeViewer.sw < codeViewer.breakpoint) {
@@ -111,6 +111,7 @@ var codeViewer = {
111111

112112
// draw CSS
113113
if (css.indexOf("{{ patternCSS }}") == -1) {
114+
$("#sg-code-html").addClass("with-css");
114115
$("#sg-code-css").css("display","block");
115116
$("#sg-code-css-fill").text(css);
116117
Prism.highlightElement(document.getElementById("sg-code-css-fill"));

0 commit comments

Comments
 (0)