Skip to content

Commit d76f336

Browse files
committed
Finalize docs for 2.3.0
1 parent c4e27d9 commit d76f336

6 files changed

Lines changed: 91 additions & 76 deletions

File tree

server/documents/introduction/new.html.eco

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ type : 'Main'
2424
<div class="no icon example">
2525

2626
<h4 class="ui header">Font Awesome 5.0 &amp; Better Icon Searching</h4>
27-
<p><code>2.3</code> includes a <a href="/elements/icon.html">new port of Font Awesome</a> <code>5.0.6</code>, including <code>929 icons</code>. Icon categories now match icon categories in Font Awesome's documentation, making it easier to find icons between docs.</p>
27+
<p>In <code>2.3</code> <a href="/elements/icon.html">icons</a> now include a full port of <a href="https://fontawesome.com/" target="_blank">Font Awesome</a> <code>5.0.6</code>, including 929 icons.</p>
28+
<p>Icon categories now match icon categories in Font Awesome's documentation, making it easier to find icons between docs.</p>
2829
<div class="ui doubling five column vertically padded grid">
2930
<div class="column"><i class="smile icon"></i>Smile</div>
3031
<div class="column"><i class="smile outline icon"></i>Smile Outline</div>

server/documents/modules/accordion.html.eco

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@ themes : ['Default', 'Chubby']
534534
<td>active content</td>
535535
<td>Callback after element is closed</td>
536536
</tr>
537+
<tr>
538+
<td>onChanging</td>
539+
<td>active content</td>
540+
<td>Callback before element opens or closes</td>
541+
</tr>
537542
<tr>
538543
<td>onChange</td>
539544
<td>active content</td>

server/documents/modules/modal.html.eco

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ themes : ['Default', 'Material']
105105
<div class="content">
106106
<img class="ui wireframe image" src="/images/wireframe/paragraph.png">
107107
<div class="ui hidden divider"></div>
108-
<img class="ui wireframe image" src="/images/wireframe/paragraph.png">
109-
<div class="ui hidden divider"></div>
110-
<img class="ui wireframe image" src="/images/wireframe/paragraph.png">
111-
<div class="ui hidden divider"></div>
112-
<img class="ui wireframe image" src="/images/wireframe/paragraph.png">
113108
</div>
114109
<div class="actions">
115110
<div class="ui negative button">

server/files/javascript/docs.js

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -463,22 +463,25 @@ semantic.ready = function() {
463463
.html($sticky)
464464
.prependTo($container)
465465
;
466-
$sticky.sticky({
467-
silent: true,
468-
context: $container,
469-
offset: 30
466+
requestAnimationFrame(function() {
467+
$sticky.sticky({
468+
silent: true,
469+
context: $container,
470+
container: $('html'),
471+
offset: 30
472+
});
473+
$followMenu
474+
.accordion({
475+
exclusive: false,
476+
animateChildren: false,
477+
onChange: function() {
478+
$('.ui.sticky').sticky('refresh');
479+
}
480+
})
481+
.find('.menu a[href], .title[href]')
482+
.on('click', handler.scrollTo)
483+
;
470484
});
471-
$followMenu
472-
.accordion({
473-
exclusive: false,
474-
animateChildren: false,
475-
onChange: function() {
476-
$('.ui.sticky').sticky('refresh');
477-
}
478-
})
479-
.find('.menu a[href], .title[href]')
480-
.on('click', handler.scrollTo)
481-
;
482485
},
483486

484487
scrollTo: function(event) {
@@ -1253,12 +1256,16 @@ semantic.ready = function() {
12531256
window.less.registerStylesheets();
12541257

12551258
// create sidebar sticky
1256-
$tocSticky
1257-
.sticky({
1258-
silent: true,
1259-
context: $fullHeightContainer
1260-
})
1261-
;
1259+
requestAnimationFrame(function() {
1260+
1261+
$tocSticky
1262+
.sticky({
1263+
silent: true,
1264+
container: $('html'),
1265+
context: $fullHeightContainer
1266+
})
1267+
;
1268+
});
12621269

12631270
// load page tabs
12641271
if( $pageTabs.length > 0 ) {
@@ -1274,13 +1281,16 @@ semantic.ready = function() {
12741281
? $(this).find('.examples')
12751282
: $(this)
12761283
;
1277-
$(this).find('> .rail .ui.sticky, .fixed .ui.sticky')
1278-
.sticky({
1279-
context: $container,
1280-
silent: true,
1281-
offset: 30
1282-
})
1283-
;
1284+
requestAnimationFrame(function() {
1285+
$(this).find('> .rail .ui.sticky, .fixed .ui.sticky')
1286+
.sticky({
1287+
context: $container,
1288+
container: $('html'),
1289+
silent: true,
1290+
offset: 30
1291+
})
1292+
;
1293+
});
12841294
$sectionHeaders = $container.children('h2');
12851295
$sectionExample = $container.find('.example');
12861296
$exampleHeaders = $sectionExample.children('h4');

server/files/javascript/icon.js

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ semantic.icon.ready = function() {
55

66
// selector cache
77
var
8-
$grid = $('.ui.five.column.doubling.grid'),
8+
$iconSearch = $('iconSearch.ui.search'),
9+
$grid = $('.ui.five.column.doubling.grid'),
910
// alias
1011
handler = {
1112
getIconList: function() {
@@ -39,49 +40,52 @@ semantic.icon.ready = function() {
3940
}
4041
;
4142

42-
$('iconSearch.ui.search')
43-
.search({
44-
type : 'category',
45-
minCharacters : 1,
46-
maxResults : 10,
47-
source : handler.getIconList(),
48-
onResults : function(result) {
49-
setTimeout(function() {
50-
var
51-
$results = $('iconSearch.ui.search .result')
52-
;
53-
$results.each(function() {
43+
if($iconSearch.length > 0) {
44+
45+
$iconSearch
46+
.search({
47+
type : 'category',
48+
minCharacters : 1,
49+
maxResults : 10,
50+
source : handler.getIconList(),
51+
onResults : function(result) {
52+
setTimeout(function() {
5453
var
55-
$result = $(this)
54+
$results = $('iconSearch.ui.search .result')
5655
;
57-
new Clipboard(this, {
58-
text: function() {
59-
var
60-
iconHTML = $result.find('i').get(0).outerHTML
61-
;
62-
return iconHTML;
63-
}
64-
});
65-
});
66-
}, 0);
67-
},
68-
onSelect: function() {
69-
var
70-
$search = $('iconSearch .input > input')
71-
;
72-
$search.blur();
73-
setTimeout(function() {
74-
$('iconSearch').transition('glow');
75-
$search.val('Copied to clipboard!');
76-
}, 50)
77-
setTimeout(function() {
78-
$search.val('');
79-
}, 1500)
80-
return false;
81-
}
82-
})
83-
;
56+
$results.each(function() {
57+
var
58+
$result = $(this)
59+
;
60+
new Clipboard(this, {
61+
text: function() {
62+
var
63+
iconHTML = $result.find('i').get(0).outerHTML
64+
;
65+
return iconHTML;
66+
}
67+
});
68+
});
69+
}, 0);
70+
},
71+
onSelect: function() {
72+
var
73+
$search = $('iconSearch .input > input')
74+
;
75+
$search.blur();
76+
setTimeout(function() {
77+
$('iconSearch input').transition('glow');
78+
$search.val('Copied to clipboard!');
79+
}, 50)
80+
setTimeout(function() {
81+
$search.val('');
82+
}, 1500)
83+
return false;
84+
}
85+
})
86+
;
8487

88+
}
8589

8690
};
8791

server/partials/site-menu.html.eco

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<b>Getting Started</b>
1818
</a>
1919
<a class="item" href="/introduction/new.html">
20-
<b>New in 2.2</b>
20+
<b>New in 2.3</b>
2121
</a>
2222
<div class="item">
2323
<div class="<%= if @document.elementType is 'introduction' then 'active ' %>header">Introduction</div>

0 commit comments

Comments
 (0)