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

Commit fe27628

Browse files
committed
Merge branch 'feature-patternsearch' into dev
2 parents 9cd93c8 + b22ecda commit fe27628

File tree

19 files changed

+332
-142
lines changed

19 files changed

+332
-142
lines changed

core/templates/index.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313

1414
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1515
<link rel="stylesheet" href="styleguide/css/styleguide.css?{{ cacheBuster }}" media="all" />
16+
<link rel="stylesheet" href="styleguide/css/vendor/typeahead.css?{{ cacheBuster }}" media="all" />
1617
<link rel="stylesheet" href="styleguide/css/states.css?{{ cacheBuster }}" media="all" />
1718
<link rel="stylesheet" href="styleguide/css/vendor/prism.css?{{ cacheBuster }}" media="all" />
19+
1820
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
1921
<script>window.jQuery || document.write('<script src="styleguide/js/vendor/jquery.js"><\/script>')</script>
2022
</head>
@@ -84,13 +86,15 @@
8486
<script src="styleguide/js/vendor/prism.js?{{ cacheBuster }}"></script>
8587
<script src="styleguide/js/vendor/jwerty.js?{{ cacheBuster }}"></script>
8688
<script src="styleguide/js/vendor/classlist-polyfill.js?{{ cacheBuster}}"></script>
89+
<script src="styleguide/js/vendor/typeahead.bundle.min.js?{{ cacheBuster}}"></script>
8790
<script src="styleguide/js/data-saver.js?{{ cacheBuster }}"></script>
8891
{{> ipAddress }}
8992
{{> patternPaths }}
9093
{{> viewAllPaths }}
9194
<script src="styleguide/js/url-handler.js?{{ cacheBuster }}"></script>
9295
<script src="styleguide/js/qrcode-generator.js?{{ cacheBuster }}"></script>
9396
<script src="styleguide/js/styleguide.js?{{ cacheBuster }}"></script>
97+
<script src="styleguide/js/pattern-finder.js?{{ cacheBuster }}"></script>
9498
<script src="styleguide/js/annotations-viewer.js?{{ cacheBuster }}"></script>
9599
<script src="styleguide/js/code-viewer.js?{{ cacheBuster }}"></script>
96100
{{> websockets }}

core/templates/partials/ishControls.mustache

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,31 @@
2929
{{/ ishControlsHide.mqs }}
3030
</ul>
3131
</li>
32+
{{^ ishControlsHide.find }}
33+
<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>
35+
<ul class="sg-view sg-acc-panel sg-right sg-checklist" id="sg-find" style="margin-top: 33px;">
36+
<li><input class="typeahead" type="text" placeholder="search for a pattern..."></li>
37+
</ul>
38+
</li>
39+
{{/ ishControlsHide.find }}
3240
{{^ ishControlsHide.views-all }}
3341
<li class="sg-view">
3442
<a href="#" class="sg-acc-handle sg-control-trigger sg-icon icon-eye" id="sg-t-toggle"><span class="is-vishidden">View</span></a>
3543
<ul class="sg-view sg-acc-panel sg-right sg-checklist" id="sg-view">
36-
{{^ ishControlsHide.views-annotations }}<li><a href="#" class="sg-checkbox" id="sg-t-annotations">Annotations</a></li>{{/ ishControlsHide.views-annotations }}
37-
{{^ ishControlsHide.views-code }}<li><a href="#" class="sg-checkbox" id="sg-t-code">Code</a></li>{{/ ishControlsHide.views-code }}
38-
{{^ ishControlsHide.views-new }}<li><a href="#" target="_blank" id="sg-raw">Open in New Window</a></li>{{/ ishControlsHide.views-new }}
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 }}
3947
</ul>
4048
</li>
4149
{{/ ishControlsHide.views-all }}
4250
{{^ ishControlsHide.tools-all }}
4351
<li class="sg-tools">
4452
<a href="#" class="sg-acc-handle sg-tools-toggle sg-icon icon-cog" id="sg-tools-toggle"><span class="is-vishidden">Tools</span></a>
4553
<ul class="sg-acc-panel sg-right sg-checklist">
46-
{{^ ishControlsHide.tools-follow }}<li><a href="#" id="navSyncButton" class="sg-checkbox sg-page-follow" data-state="off">Page Follow</a></li>{{/ ishControlsHide.tools-follow }}
47-
{{^ ishControlsHide.tools-reload }}<li><a href="#" id="contentSyncButton" class="sg-checkbox sg-auto-reload" data-state="off">Auto-reload</a></li>{{/ ishControlsHide.tools-reload }}
48-
{{^ ishControlsHide.tools-docs }}<li><a href="http://pattern-lab.info/docs/" target="_blank">Pattern Lab Documentation</a>{{/ ishControlsHide.tools-docs }}
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-docs }}<li><a href="http://pattern-lab.info/docs/" class="icon-file sg-iconitem" target="_blank">Pattern Lab Docs</a>{{/ ishControlsHide.tools-docs }}
4957
</ul>
5058
</li>
5159
{{/ ishControlsHide.tools-all }}

public/styleguide/assets/icons.dev.svg

Lines changed: 0 additions & 37 deletions
This file was deleted.

public/styleguide/assets/icons.eot

-2.23 KB
Binary file not shown.

public/styleguide/assets/icons.svg

Lines changed: 0 additions & 37 deletions
This file was deleted.

public/styleguide/assets/icons.ttf

-2.08 KB
Binary file not shown.

public/styleguide/assets/icons.woff

-1.99 KB
Binary file not shown.

public/styleguide/css/styleguide.css

Lines changed: 57 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@
224224
min-width: 0; }
225225
.sg-controls .sg-nav-phases .sg-acc-panel.active {
226226
max-height: none; }
227-
@media all and (min-width: 69.5em) {
228-
.sg-controls {
229-
width: 41.5em; } }
230227

231228
.sg-control-trigger {
232229
border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
@@ -263,7 +260,7 @@
263260
.sg-current-size:hover .sg-input {
264261
background: #999999;
265262
color: #000; }
266-
@media all and (min-width: 69.5em) {
263+
@media all and (min-width: 72.5em) {
267264
.sg-current-size {
268265
float: left; } }
269266

@@ -273,7 +270,7 @@
273270
.sg-size {
274271
width: auto; } }
275272

276-
@media all and (min-width: 69.5em) {
273+
@media all and (min-width: 72.5em) {
277274
.sg-size-options {
278275
float: left;
279276
position: static;
@@ -312,7 +309,7 @@
312309
top: 2em;
313310
left: 0; }
314311

315-
.sg-checkbox:before {
312+
.sg-iconitem:before {
316313
display: inline-block;
317314
margin-right: 0.4em; }
318315

@@ -633,51 +630,72 @@ div.clear {
633630
margin-left: auto; margin-right: auto;
634631
background-position: center center;
635632
background-repeat: no-repeat;
636-
background: url('../assets/spinner.gif');
633+
background: url('../images/spinner.gif');
637634
border-radius: 50%;
638635
opacity: .7; }
639636

640637
/* Pattern Lab icon fonts */
641638
@font-face {
642-
font-family: 'icons';
643-
src: url("../assets/icons.eot");
644-
src: url("../assets/icons.eot?#iefix") format("embedded-opentype"), url("../assets/icons.woff") format("woff"), url("../assets/icons.ttf") format("truetype"), url("../assets/icons.svg#icons") format("svg");
645-
font-weight: normal;
646-
font-style: normal; }
647-
648-
.icon-reload, .icon-cog, .icon-minus, .icon-plus, .icon-menu, .icon-checkbox-unchecked, .sg-checkbox, .icon-checkbox-checked, .sg-checkbox.active, .icon-eye {
649-
font-family: 'icons';
650-
speak: none;
651-
font-style: normal;
652-
font-weight: normal;
653-
font-variant: normal;
654-
text-transform: none;
655-
line-height: 1;
656-
-webkit-font-smoothing: antialiased; }
639+
font-family: 'icomoon';
640+
src:url('../fonts/icomoon.eot?srsv7g');
641+
src:url('../fonts/icomoon.eot?#iefixsrsv7g') format('embedded-opentype'),
642+
url('../fonts/icomoon.woff?srsv7g') format('woff'),
643+
url('../fonts/icomoon.ttf?srsv7g') format('truetype'),
644+
url('../fonts/icomoon.svg?srsv7g#icomoon') format('svg');
645+
font-weight: normal;
646+
font-style: normal;
647+
}
657648

658-
.icon-reload:before {
659-
content: "\e002"; }
649+
.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-iconitem {
650+
font-family: 'icomoon';
651+
speak: none;
652+
font-style: normal;
653+
font-weight: normal;
654+
font-variant: normal;
655+
text-transform: none;
656+
line-height: 1;
657+
658+
/* Better Font Rendering =========== */
659+
-webkit-font-smoothing: antialiased;
660+
-moz-osx-font-smoothing: grayscale;
661+
}
660662

663+
.icon-search:before {
664+
content: "\e600";
665+
}
661666
.icon-cog:before {
662-
content: "\e000"; }
663-
667+
content: "\e601";
668+
}
664669
.icon-minus:before {
665-
content: "\e003"; }
666-
670+
content: "\e602";
671+
}
667672
.icon-plus:before {
668-
content: "\e004"; }
669-
673+
content: "\e603";
674+
}
670675
.icon-menu:before {
671-
content: "\e005"; }
672-
673-
.icon-checkbox-unchecked:before, .sg-checkbox:before {
674-
content: "\e006"; }
675-
676-
.icon-checkbox-checked:before, .sg-checkbox.active:before {
677-
content: "\e007"; }
678-
676+
content: "\e604";
677+
}
678+
.icon-radio-checked:before, .sg-checkbox.active:before {
679+
content: "\e605";
680+
}
681+
.icon-radio-unchecked:before, .sg-checkbox:before {
682+
content: "\e606";
683+
}
684+
.icon-file:before {
685+
content: "\e607";
686+
}
687+
.icon-link:before {
688+
content: "\e608";
689+
}
690+
.icon-keyboard:before {
691+
content: "\e609";
692+
}
693+
.icon-qrcode:before {
694+
content: "\e60a";
695+
}
679696
.icon-eye:before {
680-
content: "\e001"; }
697+
content: "\e60b";
698+
}
681699

682700
/******************************************************************/
683701
/* End Pattern Lab Interface code */

public/styleguide/css/styleguide.scss

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -866,57 +866,73 @@ div.clear {
866866
margin-left: auto; margin-right: auto;
867867
background-position: center center;
868868
background-repeat: no-repeat;
869-
background: url('../assets/spinner.gif');
869+
background: url('../images/spinner.gif');
870870
border-radius: 50%;
871871
opacity: .7;
872872
}
873873

874+
/* Pattern Lab icon fonts */
874875
/* Pattern Lab icon fonts */
875876
@font-face {
876-
font-family: 'icons';
877-
src:url('../assets/icons.eot');
878-
src:url('../assets/icons.eot?#iefix') format('embedded-opentype'),
879-
url('../assets/icons.woff') format('woff'),
880-
url('../assets/icons.ttf') format('truetype'),
881-
url('../assets/icons.svg#icons') format('svg');
877+
font-family: 'icomoon';
878+
src:url('../fonts/icomoon.eot?srsv7g');
879+
src:url('../fonts/icomoon.eot?#iefixsrsv7g') format('embedded-opentype'),
880+
url('../fonts/icomoon.woff?srsv7g') format('woff'),
881+
url('../fonts/icomoon.ttf?srsv7g') format('truetype'),
882+
url('../fonts/icomoon.svg?srsv7g#icomoon') format('svg');
882883
font-weight: normal;
883884
font-style: normal;
884885
}
885886

886-
887-
.icon-reload, .icon-cog, .icon-minus, .icon-plus, .icon-menu, .icon-checkbox-unchecked, .icon-checkbox-checked, .icon-eye {
888-
font-family: 'icons';
887+
.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 {
888+
font-family: 'icomoon';
889889
speak: none;
890890
font-style: normal;
891891
font-weight: normal;
892892
font-variant: normal;
893893
text-transform: none;
894894
line-height: 1;
895+
896+
/* Better Font Rendering =========== */
895897
-webkit-font-smoothing: antialiased;
898+
-moz-osx-font-smoothing: grayscale;
896899
}
897-
.icon-reload:before {
898-
content: "\e002";
900+
901+
.icon-search:before {
902+
content: "\e600";
899903
}
900904
.icon-cog:before {
901-
content: "\e000";
905+
content: "\e601";
902906
}
903907
.icon-minus:before {
904-
content: "\e003";
908+
content: "\e602";
905909
}
906910
.icon-plus:before {
907-
content: "\e004";
911+
content: "\e603";
908912
}
909913
.icon-menu:before {
910-
content: "\e005";
914+
content: "\e604";
915+
}
916+
.icon-radio-checked:before, .sg-checkbox.active:before {
917+
content: "\e605";
918+
}
919+
.icon-radio-unchecked:before, .sg-checkbox:before {
920+
content: "\e606";
921+
}
922+
.icon-file:before {
923+
content: "\e607";
924+
}
925+
.icon-link:before {
926+
content: "\e608";
911927
}
912-
.icon-checkbox-unchecked:before {
913-
content: "\e006";
928+
.icon-keyboard:before {
929+
content: "\e609";
914930
}
915-
.icon-checkbox-checked:before {
916-
content: "\e007";
931+
.icon-qrcode:before {
932+
content: "\e60a";
917933
}
918934
.icon-eye:before {
919-
content: "\e001";
935+
content: "\e60b";
920936
}
921937

922938
/******************************************************************/

0 commit comments

Comments
 (0)