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

Commit 982de4f

Browse files
committed
Fix style guide icon font namespacing, added vars to default JSON so homepage modules appear in template view.
1 parent f7d9b51 commit 982de4f

File tree

4 files changed

+35
-29
lines changed

4 files changed

+35
-29
lines changed

core/source/_data/_data.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,12 @@
7575
"author" : {
7676
"first-name": "Author",
7777
"last-name": "Name"
78-
}
78+
},
79+
"hero": true,
80+
"emergency" : false,
81+
"touts" : [
82+
{ },
83+
{ },
84+
{ }
85+
]
7986
}

core/styleguide/css/styleguide.scss

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ $animate-quick: 0.2s;
309309
left: auto;
310310
}
311311

312-
[class^="icon-"], [class*=" icon-"] {
312+
[class^="sg-icon-"] {
313313
&:before {
314314
display: inline-block;
315315
margin-right: 0.4em;
@@ -452,15 +452,15 @@ $animate-quick: 0.2s;
452452

453453
//Checklist dropdown lists
454454
.sg-checkbox {
455-
@extend .icon-radio-unchecked;
455+
@extend .sg-icon-radio-unchecked;
456456

457457
&:before {
458458
display: inline-block;
459459
margin-right: 0.4em;
460460
}
461461

462462
&.active {
463-
@extend .icon-radio-checked;
463+
@extend .sg-icon-radio-checked;
464464
}
465465
}
466466

@@ -876,7 +876,6 @@ div.clear {
876876
opacity: .7;
877877
}
878878

879-
/* Pattern Lab icon fonts */
880879
/* Pattern Lab icon fonts */
881880
@font-face {
882881
font-family: 'icomoon';
@@ -889,7 +888,7 @@ div.clear {
889888
font-style: normal;
890889
}
891890

892-
.icon-search, .icon-cog, .icon-minus, .icon-plus, .icon-menu, .icon-radio-checked, .icon-radio-unchecked, .icon-file, .icon-link, .icon-keyboard, .icon-qrcode, .icon-eye, .sg-checkbox {
891+
.sg-icon-search, .sg-icon-cog, .sg-icon-minus, .sg-icon-plus, .sg-icon-menu, .sg-icon-radio-checked, .sg-icon-radio-unchecked, .sg-icon-file, .sg-icon-link, .sg-icon-keyboard, .sg-icon-qrcode, .sg-icon-eye, .sg-checkbox {
893892
font-family: 'icomoon';
894893
speak: none;
895894
font-style: normal;
@@ -903,41 +902,41 @@ div.clear {
903902
-moz-osx-font-smoothing: grayscale;
904903
}
905904

906-
.icon-search:before {
905+
.sg-icon-search:before {
907906
content: "\e600";
908907
font-size: 85%;
909908
}
910-
.icon-cog:before {
909+
.sg-icon-cog:before {
911910
content: "\e601";
912911
}
913-
.icon-minus:before {
912+
.sg-icon-minus:before {
914913
content: "\e602";
915914
}
916-
.icon-plus:before {
915+
.sg-icon-plus:before {
917916
content: "\e603";
918917
}
919-
.icon-menu:before {
918+
.sg-icon-menu:before {
920919
content: "\e604";
921920
}
922-
.icon-radio-checked:before, .sg-checkbox.active:before {
921+
.sg-icon-radio-checked:before, .sg-checkbox.active:before {
923922
content: "\e605";
924923
}
925-
.icon-radio-unchecked:before, .sg-checkbox:before {
924+
.sg-icon-radio-unchecked:before, .sg-checkbox:before {
926925
content: "\e606";
927926
}
928-
.icon-file:before {
927+
.sg-icon-file:before {
929928
content: "\e607";
930929
}
931-
.icon-link:before {
930+
.sg-icon-link:before {
932931
content: "\e608";
933932
}
934-
.icon-keyboard:before {
933+
.sg-icon-keyboard:before {
935934
content: "\e609";
936935
}
937-
.icon-qrcode:before {
936+
.sg-icon-qrcode:before {
938937
content: "\e60a";
939938
}
940-
.icon-eye:before {
939+
.sg-icon-eye:before {
941940
content: "\e60b";
942941
}
943942

core/styleguide/js/annotations-viewer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ var annotationsViewer = {
226226
annotationsViewer.slideComment($('#sg-annotation-container').outerHeight());
227227
}
228228
} else if (data.annotationState !== undefined) {
229-
document.getElementById("annotation-state-"+data.displayNumber).innerHTML = (data.annotationState == true) ? "" : " hidden";
229+
document.getElementById("annotation-state-"+data.displayNumber).innerHTML = (data.annotationState === true) ? "" : " hidden";
230230
} else if (data.displaynumber !== undefined) {
231231
annotationsViewer.moveTo(data.displaynumber);
232232
} else if (data.keyPress !== undefined) {

core/templates/partials/ishControls.mustache

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,30 @@
3131
{{/ ishControlsHide.mqs }}
3232
{{^ ishControlsHide.find }}
3333
<li class="sg-find">
34-
<a href="#" class="sg-acc-handle sg-control-trigger sg-icon icon-search" id="sg-f-toggle" title="Find stuff"><span class="is-vishidden">F</span></a>
34+
<a href="#" class="sg-acc-handle sg-control-trigger sg-icon sg-icon-search" id="sg-f-toggle" title="Find stuff"><span class="is-vishidden">F</span></a>
3535
<ul class="sg-view sg-acc-panel sg-right sg-checklist" id="sg-find" style="margin-top: 33px;">
3636
<li><input class="typeahead" type="text" placeholder="search for a pattern..."></li>
3737
</ul>
3838
</li>
3939
{{/ ishControlsHide.find }}
4040
{{^ ishControlsHide.views-all }}
4141
<li class="sg-view">
42-
<a href="#" class="sg-acc-handle sg-control-trigger sg-icon icon-eye" id="sg-t-toggle"><span class="is-vishidden">View</span></a>
42+
<a href="#" class="sg-acc-handle sg-control-trigger sg-icon sg-icon-eye" id="sg-t-toggle"><span class="is-vishidden">View</span></a>
4343
<ul class="sg-view sg-acc-panel sg-right sg-checklist" id="sg-view">
44-
{{^ ishControlsHide.views-annotations }}<li><a href="#" class="sg-checkbox sg-iconitem" id="sg-t-annotations">Annotations</a></li>{{/ ishControlsHide.views-annotations }}
45-
{{^ ishControlsHide.views-code }}<li><a href="#" class="sg-checkbox sg-iconitem" id="sg-t-code">Code</a></li>{{/ ishControlsHide.views-code }}
46-
{{^ ishControlsHide.views-new }}<li><a href="#" target="_blank" id="sg-raw" class="sg-iconitem icon-link">Open in new window</a></li>{{/ ishControlsHide.views-new }}
44+
{{^ ishControlsHide.views-annotations }}<li><a href="#" class="sg-checkbox" id="sg-t-annotations">Annotations</a></li>{{/ ishControlsHide.views-annotations }}
45+
{{^ ishControlsHide.views-code }}<li><a href="#" class="sg-checkbox" id="sg-t-code">Code</a></li>{{/ ishControlsHide.views-code }}
46+
{{^ ishControlsHide.views-new }}<li><a href="#" target="_blank" id="sg-raw" class="sg-icon-link">Open in new window</a></li>{{/ ishControlsHide.views-new }}
4747
</ul>
4848
</li>
4949
{{/ ishControlsHide.views-all }}
5050
{{^ ishControlsHide.tools-all }}
5151
<li class="sg-tools">
52-
<a href="#" class="sg-acc-handle sg-tools-toggle sg-icon icon-cog" id="sg-tools-toggle"><span class="is-vishidden">Tools</span></a>
52+
<a href="#" class="sg-acc-handle sg-tools-toggle sg-icon sg-icon-cog" id="sg-tools-toggle"><span class="is-vishidden">Tools</span></a>
5353
<ul class="sg-acc-panel sg-right sg-checklist">
54-
{{^ ishControlsHide.tools-follow }}<li><a href="#" id="navSyncButton" class="sg-checkbox sg-iconitem sg-page-follow" data-state="off">Page Follow</a></li>{{/ ishControlsHide.tools-follow }}
55-
{{^ ishControlsHide.tools-reload }}<li><a href="#" id="contentSyncButton" class="sg-checkbox sg-iconitem sg-auto-reload" data-state="off">Auto-reload</a></li>{{/ ishControlsHide.tools-reload }}
56-
{{^ ishControlsHide.tools-shortcuts }}<li><a href="http://pattern-lab.info/docs/advanced-keyboard-shortcuts.html" class="icon-keyboard sg-iconitem" target="_blank">Keyboard Shortcuts</a>{{/ ishControlsHide.tools-shortcuts }}
57-
{{^ ishControlsHide.tools-docs }}<li><a href="http://pattern-lab.info/docs/" class="icon-file sg-iconitem" target="_blank">Pattern Lab Docs</a>{{/ ishControlsHide.tools-docs }}
54+
{{^ ishControlsHide.tools-follow }}<li><a href="#" id="navSyncButton" class="sg-checkbox sg-page-follow" data-state="off">Page Follow</a></li>{{/ ishControlsHide.tools-follow }}
55+
{{^ ishControlsHide.tools-reload }}<li><a href="#" id="contentSyncButton" class="sg-checkbox sg-auto-reload" data-state="off">Auto-reload</a></li>{{/ ishControlsHide.tools-reload }}
56+
{{^ ishControlsHide.tools-shortcuts }}<li><a href="http://pattern-lab.info/docs/advanced-keyboard-shortcuts.html" class="sg-icon-keyboard" target="_blank">Keyboard Shortcuts</a>{{/ ishControlsHide.tools-shortcuts }}
57+
{{^ ishControlsHide.tools-docs }}<li><a href="http://pattern-lab.info/docs/" class="sg-icon-file" target="_blank">Pattern Lab Docs</a>{{/ ishControlsHide.tools-docs }}
5858
</ul>
5959
</li>
6060
{{/ ishControlsHide.tools-all }}

0 commit comments

Comments
 (0)