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

Commit 44540ac

Browse files
committed
showing the pattern state for the selected pattern
1 parent 33fda58 commit 44540ac

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

core/styleguide/css/states.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* basic styling */
12
.sg-pattern-state:before {
23
margin-right: 4px;
34
content: "\2022";
@@ -7,6 +8,7 @@
78
vertical-align: bottom;
89
}
910

11+
/* nav styling */
1012
.sg-nav .sg-pattern-state:before {
1113
margin-top: -4px;
1214
margin-bottom: 0;
@@ -21,6 +23,17 @@
2123
margin-right: 4px;
2224
}
2325

26+
/* call out for pattern's pattern state */
27+
span.sg-pattern-state {
28+
color: #999;
29+
}
30+
31+
span.sg-pattern-state:before {
32+
margin-bottom: -3px;
33+
margin-left: 4px;
34+
}
35+
36+
/* pattern states */
2437
.inprogress:before {
2538
color: #FF4136 !important;
2639
}

core/templates/index.mustache

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
<div class="spinner"></div>
5353
Loading pattern...
5454
</div>
55+
<div id="sg-code-patternstate" style="display: none;">
56+
<p>
57+
The state of the <span id="sg-code-patternstate-patternname" class="sg-code-patternname"></span> pattern is: <span id="sg-code-patternstate-fill"></span>
58+
</p>
59+
</div>
5560
<div id="sg-code-lineage" style="display: none;">
5661
<p>
5762
The <span id="sg-code-lineager-patternname" class="sg-code-patternname"></span> pattern contains the following patterns: <span id="sg-code-lineage-fill"></span>

core/templates/pattern-header-footer/footer-pattern.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
// handle injection of items from PHP
44
var patternPartial = "{% patternPartial %}";
55
var lineage = {% lineage %};
6-
var lineageR = {% lineager %};
6+
var lineageR = {% lineageR %};
7+
var patternState = "{% patternState %}";
78
var cssEnabled = {% cssEnabled %};
89
</script>
910

0 commit comments

Comments
 (0)