Skip to content

Commit 458ca8f

Browse files
committed
Merge branch 'hammy2899-fa5' into next
2 parents 90bca5b + 461c76f commit 458ca8f

14 files changed

Lines changed: 4876 additions & 1281 deletions

File tree

docpad.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ docpadConfig = {
2929
# Here are some old site urls that you would like to redirect from
3030
oldUrls: [],
3131

32-
version: "2.2.12",
32+
version: "2.2.14",
3333

3434
branch: "master",
3535

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"dependencies": {
1313
"docpad": "~6.79.0",
14+
"docpad-plugin-babel": "~2.2.1",
1415
"docpad-plugin-copy": "~2.1.3",
1516
"docpad-plugin-eco": "~2.1.0",
1617
"docpad-plugin-partials": "~2.9.2"

server/documents/elements/icon.html.eco

Lines changed: 3197 additions & 1258 deletions
Large diffs are not rendered by default.
File renamed without changes.
File renamed without changes.

server/documents/index.html.eco

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ standalone : true
5555
<div class="introduction">
5656
<a class="ui black version label" href="https://github.com/Semantic-Org/Semantic-UI/blob/<%= @getBranch() %>/RELEASE-NOTES.md">
5757
<%= @getVersion() %>
58+
- Jan 2018
5859
</a>
5960
<h1 class="ui inverted header">
6061
<span class="library">

server/files/javascript/icon.js

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,79 @@ semantic.icon.ready = function() {
77
var
88
$grid = $('.ui.five.column.doubling.grid'),
99
// alias
10-
handler
10+
handler = {
11+
getIconList: function() {
12+
var
13+
$examples = $('.icon .example')
14+
icons = []
15+
;
16+
$examples.each(function() {
17+
var
18+
$header = $(this).children('.ui.header'),
19+
$icons = $(this).find('.grid > .column'),
20+
category = $header.text()
21+
;
22+
$icons.each(function() {
23+
var
24+
$icon = $(this).find('.icon'),
25+
icon = $icon.attr('class').replace(' icon', '')
26+
title = '<i class="' + icon +' icon"></i> ' + icon
27+
;
28+
if(!_.findWhere(icons, { icon: icon})) {
29+
icons.push({
30+
category : category,
31+
title : title,
32+
icon : icon
33+
});
34+
}
35+
});
36+
});
37+
return icons;
38+
}
39+
}
40+
;
41+
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() {
54+
var
55+
$result = $(this)
56+
;
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('bounce');
75+
$search.val('Copied to clipboard!');
76+
}, 50)
77+
setTimeout(function() {
78+
$search.val('');
79+
}, 1500)
80+
return false;
81+
}
82+
})
1183
;
1284

1385

@@ -17,4 +89,4 @@ semantic.icon.ready = function() {
1789
// attach ready event
1890
$(document)
1991
.ready(semantic.icon.ready)
20-
;
92+
;

0 commit comments

Comments
 (0)