iconly 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +76 -0
- data/Rakefile +33 -0
- data/app/assets/config/iconly_manifest.js +2 -0
- data/app/assets/images/iconly/Noto-Sans-700.eot +0 -0
- data/app/assets/images/iconly/Noto-Sans-700.svg +336 -0
- data/app/assets/images/iconly/Noto-Sans-700.ttf +0 -0
- data/app/assets/images/iconly/Noto-Sans-700.woff +0 -0
- data/app/assets/images/iconly/Noto-Sans-700.woff2 +0 -0
- data/app/assets/images/iconly/Noto-Sans-regular.eot +0 -0
- data/app/assets/images/iconly/Noto-Sans-regular.svg +335 -0
- data/app/assets/images/iconly/Noto-Sans-regular.ttf +0 -0
- data/app/assets/images/iconly/Noto-Sans-regular.woff +0 -0
- data/app/assets/images/iconly/Noto-Sans-regular.woff2 +0 -0
- data/app/assets/images/iconly/Source-Sans-Pro-600.eot +0 -0
- data/app/assets/images/iconly/Source-Sans-Pro-600.svg +339 -0
- data/app/assets/images/iconly/Source-Sans-Pro-600.ttf +0 -0
- data/app/assets/images/iconly/Source-Sans-Pro-600.woff +0 -0
- data/app/assets/images/iconly/Source-Sans-Pro-600.woff2 +0 -0
- data/app/assets/images/iconly/Source-Sans-Pro-regular.eot +0 -0
- data/app/assets/images/iconly/Source-Sans-Pro-regular.svg +345 -0
- data/app/assets/images/iconly/Source-Sans-Pro-regular.ttf +0 -0
- data/app/assets/images/iconly/Source-Sans-Pro-regular.woff +0 -0
- data/app/assets/images/iconly/Source-Sans-Pro-regular.woff2 +0 -0
- data/app/assets/images/iconly/favicon.png +0 -0
- data/app/assets/images/iconly/iconly.eot +0 -0
- data/app/assets/images/iconly/iconly.svg +157 -0
- data/app/assets/images/iconly/iconly.ttf +0 -0
- data/app/assets/images/iconly/iconly.woff +0 -0
- data/app/assets/javascripts/iconly/application.js +24 -0
- data/app/assets/javascripts/iconly/iconly.coffee +5 -0
- data/app/assets/javascripts/iconly/jquery.sticky.js +268 -0
- data/app/assets/javascripts/iconly/package.coffee +25 -0
- data/app/assets/javascripts/iconly/project.coffee +68 -0
- data/app/assets/javascripts/iconly/scroller.coffee +17 -0
- data/app/assets/stylesheets/iconly/application.scss +21 -0
- data/app/assets/stylesheets/iconly/buttons.scss +314 -0
- data/app/assets/stylesheets/iconly/file_input.scss +25 -0
- data/app/assets/stylesheets/iconly/header.scss +179 -0
- data/app/assets/stylesheets/iconly/iconly.scss.erb +61 -0
- data/app/assets/stylesheets/iconly/layout.scss +269 -0
- data/app/assets/stylesheets/iconly/overrides.scss +58 -0
- data/app/assets/stylesheets/iconly/typography.scss.erb +48 -0
- data/app/controllers/iconly/application_controller.rb +8 -0
- data/app/controllers/iconly/packages_controller.rb +54 -0
- data/app/controllers/iconly/project_icons_controller.rb +24 -0
- data/app/controllers/iconly/projects_controller.rb +67 -0
- data/app/helpers/iconly/application_helper.rb +35 -0
- data/app/helpers/iconly/packages_helper.rb +29 -0
- data/app/helpers/iconly/project_icons_helper.rb +4 -0
- data/app/helpers/iconly/projects_helper.rb +4 -0
- data/app/helpers/iconly/sessions_helper.rb +43 -0
- data/app/jobs/iconly/application_job.rb +4 -0
- data/app/mailers/iconly/application_mailer.rb +6 -0
- data/app/models/iconly/application_record.rb +5 -0
- data/app/models/iconly/icon.rb +44 -0
- data/app/models/iconly/package.rb +5 -0
- data/app/models/iconly/project.rb +5 -0
- data/app/models/iconly/project/downloader.rb +50 -0
- data/app/models/iconly/project/font_generator.rb +65 -0
- data/app/models/iconly/project_icon.rb +23 -0
- data/app/models/iconly/user.rb +5 -0
- data/app/uploaders/iconly/svg_uploader.rb +51 -0
- data/app/views/iconly/packages/_form.html.erb +48 -0
- data/app/views/iconly/packages/new.html.erb +5 -0
- data/app/views/iconly/projects/_form.html.erb +25 -0
- data/app/views/iconly/projects/_packages.html.erb +91 -0
- data/app/views/iconly/projects/edit.html.erb +5 -0
- data/app/views/iconly/projects/index.html.erb +37 -0
- data/app/views/iconly/projects/new.html.erb +5 -0
- data/app/views/iconly/projects/show.html.erb +53 -0
- data/app/views/layouts/iconly/_footer.html.erb +18 -0
- data/app/views/layouts/iconly/_header.html.erb +89 -0
- data/app/views/layouts/iconly/application.html.erb +29 -0
- data/config/fontcustom/fontcustom_manifest.yml +53 -0
- data/config/fontcustom/templates/iconly.css +28 -0
- data/config/routes.rb +13 -0
- data/db/migrate/20170130210746_enable_uuid_extension.rb +5 -0
- data/db/migrate/20170130211049_create_iconly_users.rb +9 -0
- data/db/migrate/20170130220400_create_iconly_packages.rb +12 -0
- data/db/migrate/20170131002414_create_iconly_icons.rb +13 -0
- data/db/migrate/20170131081131_create_iconly_projects.rb +11 -0
- data/db/migrate/20170131084626_create_iconly_project_icons.rb +10 -0
- data/db/migrate/20170203144731_add_icon_count_to_packages.rb +5 -0
- data/lib/iconly.rb +22 -0
- data/lib/iconly/concerns/models/package.rb +41 -0
- data/lib/iconly/concerns/models/project.rb +27 -0
- data/lib/iconly/concerns/models/user.rb +23 -0
- data/lib/iconly/engine.rb +5 -0
- data/lib/iconly/version.rb +3 -0
- data/lib/iconly/zip_file_generator.rb +58 -0
- data/lib/tasks/iconly_tasks.rake +4 -0
- metadata +374 -0
Binary file
|
Binary file
|
@@ -0,0 +1,24 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
16
|
+
//= require tether
|
17
|
+
//= require bootstrap-sprockets
|
18
|
+
//
|
19
|
+
//= require iconly/jquery.sticky
|
20
|
+
//= require iconly/iconly
|
21
|
+
//= require iconly/project
|
22
|
+
//= require iconly/package
|
23
|
+
//= require iconly/scroller
|
24
|
+
|
@@ -0,0 +1,268 @@
|
|
1
|
+
// Sticky Plugin v1.0.3 for jQuery
|
2
|
+
// =============
|
3
|
+
// Author: Anthony Garand
|
4
|
+
// Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk)
|
5
|
+
// Improvements by Leonardo C. Daronco (daronco)
|
6
|
+
// Created: 02/14/2011
|
7
|
+
// Date: 07/20/2015
|
8
|
+
// Website: http://stickyjs.com/
|
9
|
+
// Description: Makes an element on the page stick on the screen as you scroll
|
10
|
+
// It will only set the 'top' and 'position' of your element, you
|
11
|
+
// might need to adjust the width in some cases.
|
12
|
+
|
13
|
+
(function (factory) {
|
14
|
+
if (typeof define === 'function' && define.amd) {
|
15
|
+
// AMD. Register as an anonymous module.
|
16
|
+
define(['jquery'], factory);
|
17
|
+
} else if (typeof module === 'object' && module.exports) {
|
18
|
+
// Node/CommonJS
|
19
|
+
module.exports = factory(require('jquery'));
|
20
|
+
} else {
|
21
|
+
// Browser globals
|
22
|
+
factory(jQuery);
|
23
|
+
}
|
24
|
+
}(function ($) {
|
25
|
+
var slice = Array.prototype.slice; // save ref to original slice()
|
26
|
+
var splice = Array.prototype.splice; // save ref to original slice()
|
27
|
+
|
28
|
+
var defaults = {
|
29
|
+
topSpacing: 0,
|
30
|
+
bottomSpacing: 0,
|
31
|
+
className: 'is-sticky',
|
32
|
+
wrapperClassName: 'sticky-wrapper',
|
33
|
+
center: false,
|
34
|
+
getWidthFrom: '',
|
35
|
+
widthFromWrapper: true, // works only when .getWidthFrom is empty
|
36
|
+
responsiveWidth: false
|
37
|
+
},
|
38
|
+
$window = $(window),
|
39
|
+
$document = $(document),
|
40
|
+
sticked = [],
|
41
|
+
windowHeight = $window.height(),
|
42
|
+
scroller = function() {
|
43
|
+
var scrollTop = $window.scrollTop(),
|
44
|
+
documentHeight = $document.height(),
|
45
|
+
dwh = documentHeight - windowHeight,
|
46
|
+
extra = (scrollTop > dwh) ? dwh - scrollTop : 0;
|
47
|
+
|
48
|
+
for (var i = 0, l = sticked.length; i < l; i++) {
|
49
|
+
var s = sticked[i],
|
50
|
+
elementTop = s.stickyWrapper.offset().top,
|
51
|
+
etse = elementTop - s.topSpacing - extra;
|
52
|
+
|
53
|
+
//update height in case of dynamic content
|
54
|
+
s.stickyWrapper.css('height', s.stickyElement.outerHeight());
|
55
|
+
|
56
|
+
if (scrollTop <= etse) {
|
57
|
+
if (s.currentTop !== null) {
|
58
|
+
s.stickyElement
|
59
|
+
.css({
|
60
|
+
'width': '',
|
61
|
+
'position': '',
|
62
|
+
'top': ''
|
63
|
+
});
|
64
|
+
s.stickyElement.parent().removeClass(s.className);
|
65
|
+
s.stickyElement.trigger('sticky-end', [s]);
|
66
|
+
s.currentTop = null;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
else {
|
70
|
+
var newTop = documentHeight - s.stickyElement.outerHeight()
|
71
|
+
- s.topSpacing - s.bottomSpacing - scrollTop - extra;
|
72
|
+
if (newTop < 0) {
|
73
|
+
newTop = newTop + s.topSpacing;
|
74
|
+
} else {
|
75
|
+
newTop = s.topSpacing;
|
76
|
+
}
|
77
|
+
if (s.currentTop !== newTop) {
|
78
|
+
var newWidth;
|
79
|
+
if (s.getWidthFrom) {
|
80
|
+
newWidth = $(s.getWidthFrom).width() || null;
|
81
|
+
} else if (s.widthFromWrapper) {
|
82
|
+
newWidth = s.stickyWrapper.width();
|
83
|
+
}
|
84
|
+
if (newWidth == null) {
|
85
|
+
newWidth = s.stickyElement.width();
|
86
|
+
}
|
87
|
+
s.stickyElement
|
88
|
+
.css('width', newWidth)
|
89
|
+
.css('position', 'fixed')
|
90
|
+
.css('top', newTop);
|
91
|
+
|
92
|
+
s.stickyElement.parent().addClass(s.className);
|
93
|
+
|
94
|
+
if (s.currentTop === null) {
|
95
|
+
s.stickyElement.trigger('sticky-start', [s]);
|
96
|
+
} else {
|
97
|
+
// sticky is started but it have to be repositioned
|
98
|
+
s.stickyElement.trigger('sticky-update', [s]);
|
99
|
+
}
|
100
|
+
|
101
|
+
if (s.currentTop === s.topSpacing && s.currentTop > newTop || s.currentTop === null && newTop < s.topSpacing) {
|
102
|
+
// just reached bottom || just started to stick but bottom is already reached
|
103
|
+
s.stickyElement.trigger('sticky-bottom-reached', [s]);
|
104
|
+
} else if(s.currentTop !== null && newTop === s.topSpacing && s.currentTop < newTop) {
|
105
|
+
// sticky is started && sticked at topSpacing && overflowing from top just finished
|
106
|
+
s.stickyElement.trigger('sticky-bottom-unreached', [s]);
|
107
|
+
}
|
108
|
+
|
109
|
+
s.currentTop = newTop;
|
110
|
+
}
|
111
|
+
|
112
|
+
// Check if sticky has reached end of container and stop sticking
|
113
|
+
var stickyWrapperContainer = s.stickyWrapper.parent();
|
114
|
+
var unstick = (s.stickyElement.offset().top + s.stickyElement.outerHeight() >= stickyWrapperContainer.offset().top + stickyWrapperContainer.outerHeight()) && (s.stickyElement.offset().top <= s.topSpacing);
|
115
|
+
|
116
|
+
if( unstick ) {
|
117
|
+
s.stickyElement
|
118
|
+
.css('position', 'absolute')
|
119
|
+
.css('top', '')
|
120
|
+
.css('bottom', 0);
|
121
|
+
} else {
|
122
|
+
s.stickyElement
|
123
|
+
.css('position', 'fixed')
|
124
|
+
.css('top', newTop)
|
125
|
+
.css('bottom', '');
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
},
|
130
|
+
resizer = function() {
|
131
|
+
windowHeight = $window.height();
|
132
|
+
|
133
|
+
for (var i = 0, l = sticked.length; i < l; i++) {
|
134
|
+
var s = sticked[i];
|
135
|
+
var newWidth = null;
|
136
|
+
if (s.getWidthFrom) {
|
137
|
+
if (s.responsiveWidth) {
|
138
|
+
newWidth = $(s.getWidthFrom).width();
|
139
|
+
}
|
140
|
+
} else if(s.widthFromWrapper) {
|
141
|
+
newWidth = s.stickyWrapper.width();
|
142
|
+
}
|
143
|
+
if (newWidth != null) {
|
144
|
+
s.stickyElement.css('width', newWidth);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
},
|
148
|
+
methods = {
|
149
|
+
init: function(options) {
|
150
|
+
var o = $.extend({}, defaults, options);
|
151
|
+
return this.each(function() {
|
152
|
+
var stickyElement = $(this);
|
153
|
+
|
154
|
+
var stickyId = stickyElement.attr('id');
|
155
|
+
var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName;
|
156
|
+
var wrapper = $('<div></div>')
|
157
|
+
.attr('id', wrapperId)
|
158
|
+
.addClass(o.wrapperClassName);
|
159
|
+
|
160
|
+
stickyElement.wrapAll(wrapper);
|
161
|
+
|
162
|
+
var stickyWrapper = stickyElement.parent();
|
163
|
+
|
164
|
+
if (o.center) {
|
165
|
+
stickyWrapper.css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"});
|
166
|
+
}
|
167
|
+
|
168
|
+
if (stickyElement.css("float") === "right") {
|
169
|
+
stickyElement.css({"float":"none"}).parent().css({"float":"right"});
|
170
|
+
}
|
171
|
+
|
172
|
+
o.stickyElement = stickyElement;
|
173
|
+
o.stickyWrapper = stickyWrapper;
|
174
|
+
o.currentTop = null;
|
175
|
+
|
176
|
+
sticked.push(o);
|
177
|
+
|
178
|
+
methods.setWrapperHeight(this);
|
179
|
+
methods.setupChangeListeners(this);
|
180
|
+
});
|
181
|
+
},
|
182
|
+
|
183
|
+
setWrapperHeight: function(stickyElement) {
|
184
|
+
var element = $(stickyElement);
|
185
|
+
var stickyWrapper = element.parent();
|
186
|
+
if (stickyWrapper) {
|
187
|
+
stickyWrapper.css('height', element.outerHeight());
|
188
|
+
}
|
189
|
+
},
|
190
|
+
|
191
|
+
setupChangeListeners: function(stickyElement) {
|
192
|
+
if (window.MutationObserver) {
|
193
|
+
var mutationObserver = new window.MutationObserver(function(mutations) {
|
194
|
+
if (mutations[0].addedNodes.length || mutations[0].removedNodes.length) {
|
195
|
+
methods.setWrapperHeight(stickyElement);
|
196
|
+
}
|
197
|
+
});
|
198
|
+
mutationObserver.observe(stickyElement, {subtree: true, childList: true});
|
199
|
+
} else {
|
200
|
+
stickyElement.addEventListener('DOMNodeInserted', function() {
|
201
|
+
methods.setWrapperHeight(stickyElement);
|
202
|
+
}, false);
|
203
|
+
stickyElement.addEventListener('DOMNodeRemoved', function() {
|
204
|
+
methods.setWrapperHeight(stickyElement);
|
205
|
+
}, false);
|
206
|
+
}
|
207
|
+
},
|
208
|
+
update: scroller,
|
209
|
+
unstick: function(options) {
|
210
|
+
return this.each(function() {
|
211
|
+
var that = this;
|
212
|
+
var unstickyElement = $(that);
|
213
|
+
|
214
|
+
var removeIdx = -1;
|
215
|
+
var i = sticked.length;
|
216
|
+
while (i-- > 0) {
|
217
|
+
if (sticked[i].stickyElement.get(0) === that) {
|
218
|
+
splice.call(sticked,i,1);
|
219
|
+
removeIdx = i;
|
220
|
+
}
|
221
|
+
}
|
222
|
+
if(removeIdx !== -1) {
|
223
|
+
unstickyElement.unwrap();
|
224
|
+
unstickyElement
|
225
|
+
.css({
|
226
|
+
'width': '',
|
227
|
+
'position': '',
|
228
|
+
'top': '',
|
229
|
+
'float': ''
|
230
|
+
})
|
231
|
+
;
|
232
|
+
}
|
233
|
+
});
|
234
|
+
}
|
235
|
+
};
|
236
|
+
|
237
|
+
// should be more efficient than using $window.scroll(scroller) and $window.resize(resizer):
|
238
|
+
if (window.addEventListener) {
|
239
|
+
window.addEventListener('scroll', scroller, false);
|
240
|
+
window.addEventListener('resize', resizer, false);
|
241
|
+
} else if (window.attachEvent) {
|
242
|
+
window.attachEvent('onscroll', scroller);
|
243
|
+
window.attachEvent('onresize', resizer);
|
244
|
+
}
|
245
|
+
|
246
|
+
$.fn.sticky = function(method) {
|
247
|
+
if (methods[method]) {
|
248
|
+
return methods[method].apply(this, slice.call(arguments, 1));
|
249
|
+
} else if (typeof method === 'object' || !method ) {
|
250
|
+
return methods.init.apply( this, arguments );
|
251
|
+
} else {
|
252
|
+
$.error('Method ' + method + ' does not exist on jQuery.sticky');
|
253
|
+
}
|
254
|
+
};
|
255
|
+
|
256
|
+
$.fn.unstick = function(method) {
|
257
|
+
if (methods[method]) {
|
258
|
+
return methods[method].apply(this, slice.call(arguments, 1));
|
259
|
+
} else if (typeof method === 'object' || !method ) {
|
260
|
+
return methods.unstick.apply( this, arguments );
|
261
|
+
} else {
|
262
|
+
$.error('Method ' + method + ' does not exist on jQuery.sticky');
|
263
|
+
}
|
264
|
+
};
|
265
|
+
$(function() {
|
266
|
+
setTimeout(scroller, 0);
|
267
|
+
});
|
268
|
+
}));
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class iconly.Package
|
2
|
+
constructor: (@fileInputSelector, @messageSelector) ->
|
3
|
+
$(document).on 'change', @fileInputSelector, (e) => @_addFiles(e)
|
4
|
+
|
5
|
+
_addFiles: (e) ->
|
6
|
+
@_showMessage $.map(e.target.files, (f) => @_badge(f.name))
|
7
|
+
|
8
|
+
_showMessage: (fileNames) ->
|
9
|
+
$(@messageSelector).html """
|
10
|
+
<h4 class="mt-0">#{fileNames.length} #{@_pluralize(fileNames.length, 'file')} selected</h4>
|
11
|
+
#{fileNames.join('')}
|
12
|
+
"""
|
13
|
+
|
14
|
+
_badge: (fileName) ->
|
15
|
+
"""
|
16
|
+
<span class="badge badge-pale">#{fileName}</span>
|
17
|
+
"""
|
18
|
+
|
19
|
+
_pluralize: (count, text) ->
|
20
|
+
message = text
|
21
|
+
message += 's' if count != 1
|
22
|
+
message
|
23
|
+
|
24
|
+
@start: (fileInputSelector, messageSelector) ->
|
25
|
+
iconly.package ||= new iconly.Package(fileInputSelector, messageSelector)
|
@@ -0,0 +1,68 @@
|
|
1
|
+
class iconly.Project
|
2
|
+
constructor: (@projectId, @rootUrl) ->
|
3
|
+
self = this
|
4
|
+
$(document)
|
5
|
+
.on('click', '[data-action="add-to-project"]', -> self._toggleInProject(this))
|
6
|
+
.on('click', '[data-action="remove-from-project"]', -> self._toggleInProject(this, true))
|
7
|
+
.on('click', '[data-action="share-package"]', (e) -> self._sharePackage(e, this))
|
8
|
+
|
9
|
+
_toggleInProject: (target, remove) ->
|
10
|
+
target = $(target)
|
11
|
+
iconId = target.data('id')
|
12
|
+
if remove || target.hasClass('selected')
|
13
|
+
target.removeClass 'selected'
|
14
|
+
@_remove iconId
|
15
|
+
if remove
|
16
|
+
target.remove()
|
17
|
+
$("[data-id='#{iconId}']").removeClass('selected')
|
18
|
+
else
|
19
|
+
el = $("[data-id='#{iconId}'][data-action='remove-from-project']")
|
20
|
+
el.fadeOut -> el.remove()
|
21
|
+
@_updateIconCount(-1)
|
22
|
+
else
|
23
|
+
target.addClass 'selected'
|
24
|
+
@_add iconId
|
25
|
+
@_updateIconCount(1)
|
26
|
+
@_addToProjectIcons(target.html(), iconId)
|
27
|
+
|
28
|
+
_add: (iconId) ->
|
29
|
+
$.post @rootUrl,
|
30
|
+
project_id: @projectId,
|
31
|
+
icon_id: iconId
|
32
|
+
|
33
|
+
_remove: (iconId) ->
|
34
|
+
$.post "#{@rootUrl}/#{iconId}",
|
35
|
+
_method: 'DELETE'
|
36
|
+
project_id: @projectId
|
37
|
+
|
38
|
+
_updateIconCount: (factor) ->
|
39
|
+
el = $('#project-icons-count')
|
40
|
+
count = parseInt(el.text())
|
41
|
+
el.text Math.max(count + factor, 0)
|
42
|
+
|
43
|
+
_addToProjectIcons: (svg, iconId)->
|
44
|
+
markup = """
|
45
|
+
<div class="btn btn-svg btn-sm float-left remove" title="Remove from project" data-action="remove-from-project" data-id="#{iconId}">
|
46
|
+
#{svg}
|
47
|
+
<i class="bg-danger text-white rm"></i>
|
48
|
+
</div>
|
49
|
+
"""
|
50
|
+
$(markup)
|
51
|
+
.css(display: 'none')
|
52
|
+
.appendTo($('#project-icons'))
|
53
|
+
.fadeIn()
|
54
|
+
|
55
|
+
_sharePackage: (e, target) ->
|
56
|
+
e.preventDefault()
|
57
|
+
url = target.href
|
58
|
+
target = $(target)
|
59
|
+
shared = true
|
60
|
+
if target.hasClass('shared')
|
61
|
+
shared = false
|
62
|
+
target.removeClass 'shared'
|
63
|
+
else
|
64
|
+
target.addClass 'shared'
|
65
|
+
$.post url
|
66
|
+
|
67
|
+
@start: (projectId, rootUrl) ->
|
68
|
+
iconly.project ||= new iconly.Project(projectId, rootUrl)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class iconly.Scroller
|
2
|
+
constructor: (options = {}) ->
|
3
|
+
@_topSpacing = options.topSpacing
|
4
|
+
@_root = $('html body')
|
5
|
+
that = this
|
6
|
+
$('[data-scroll-to]').on 'click', (e) -> that._onScroll(e, this)
|
7
|
+
|
8
|
+
_onScroll: (e, link) ->
|
9
|
+
el = $(link.hash)
|
10
|
+
|
11
|
+
return unless el.length
|
12
|
+
e.preventDefault()
|
13
|
+
|
14
|
+
@_root.animate({
|
15
|
+
scrollTop: el.offset().top - @_topSpacing
|
16
|
+
}, 200)
|
17
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
$brand-primary: #5d9cec;
|
2
|
+
$brand-success: #81c868;
|
3
|
+
$brand-info: #34d3eb;
|
4
|
+
$brand-warning: #ffbd4a;
|
5
|
+
$brand-danger: #f05050;
|
6
|
+
$brand-default: #5fbeaa;
|
7
|
+
|
8
|
+
$color-dark: #505458;
|
9
|
+
$color-pale: #98a6ad;
|
10
|
+
|
11
|
+
$body-font: 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
12
|
+
$heading-font: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
13
|
+
|
14
|
+
@import 'bootstrap';
|
15
|
+
@import 'overrides';
|
16
|
+
@import 'buttons';
|
17
|
+
@import 'typography';
|
18
|
+
@import 'iconly';
|
19
|
+
@import 'layout';
|
20
|
+
@import 'header';
|
21
|
+
@import 'file_input';
|
@@ -0,0 +1,314 @@
|
|
1
|
+
.btn {
|
2
|
+
border-radius: 3px;
|
3
|
+
outline: none !important;
|
4
|
+
}
|
5
|
+
.btn-md {
|
6
|
+
padding: 8px 16px;
|
7
|
+
}
|
8
|
+
.btn-primary,
|
9
|
+
.btn-success,
|
10
|
+
.btn-default,
|
11
|
+
.btn-info,
|
12
|
+
.btn-warning,
|
13
|
+
.btn-danger,
|
14
|
+
.btn-inverse,
|
15
|
+
.btn-purple,
|
16
|
+
.btn-pink {
|
17
|
+
color: #fff !important;
|
18
|
+
}
|
19
|
+
.btn-default,
|
20
|
+
.btn-default:hover,
|
21
|
+
.btn-default:focus,
|
22
|
+
.btn-default:active,
|
23
|
+
.btn-default.active,
|
24
|
+
.btn-default.focus,
|
25
|
+
.btn-default:active,
|
26
|
+
.btn-default:focus,
|
27
|
+
.btn-default:hover,
|
28
|
+
.open > .dropdown-toggle.btn-default {
|
29
|
+
background-color: $brand-default !important;
|
30
|
+
border: 1px solid $brand-default !important;
|
31
|
+
}
|
32
|
+
.btn-white,
|
33
|
+
.btn-white:hover,
|
34
|
+
.btn-white:focus,
|
35
|
+
.btn-white:active,
|
36
|
+
.btn-white.active,
|
37
|
+
.btn-white.focus,
|
38
|
+
.btn-white:active,
|
39
|
+
.btn-white:focus,
|
40
|
+
.btn-white:hover,
|
41
|
+
.open > .dropdown-toggle.btn-white {
|
42
|
+
border: 1px solid #eaeaea !important;
|
43
|
+
background-color: #ffffff;
|
44
|
+
color: #4c5667;
|
45
|
+
}
|
46
|
+
.btn-white:hover,
|
47
|
+
.btn-white:hover:hover,
|
48
|
+
.btn-white:focus:hover,
|
49
|
+
.btn-white:active:hover,
|
50
|
+
.btn-white.active:hover,
|
51
|
+
.btn-white.focus:hover,
|
52
|
+
.btn-white:active:hover,
|
53
|
+
.btn-white:focus:hover,
|
54
|
+
.btn-white:hover:hover,
|
55
|
+
.open > .dropdown-toggle.btn-white:hover {
|
56
|
+
background-color: #f9f9f9;
|
57
|
+
}
|
58
|
+
.btn-white:focus,
|
59
|
+
.btn-white:hover:focus,
|
60
|
+
.btn-white:focus:focus,
|
61
|
+
.btn-white:active:focus,
|
62
|
+
.btn-white.active:focus,
|
63
|
+
.btn-white.focus:focus,
|
64
|
+
.btn-white:active:focus,
|
65
|
+
.btn-white:focus:focus,
|
66
|
+
.btn-white:hover:focus,
|
67
|
+
.open > .dropdown-toggle.btn-white:focus {
|
68
|
+
background-color: #f9f9f9;
|
69
|
+
}
|
70
|
+
.btn-white:active,
|
71
|
+
.btn-white:hover:active,
|
72
|
+
.btn-white:focus:active,
|
73
|
+
.btn-white:active:active,
|
74
|
+
.btn-white.active:active,
|
75
|
+
.btn-white.focus:active,
|
76
|
+
.btn-white:active:active,
|
77
|
+
.btn-white:focus:active,
|
78
|
+
.btn-white:hover:active,
|
79
|
+
.open > .dropdown-toggle.btn-white:active {
|
80
|
+
background-color: #f9f9f9;
|
81
|
+
}
|
82
|
+
.btn-primary,
|
83
|
+
.btn-primary:hover,
|
84
|
+
.btn-primary:focus,
|
85
|
+
.btn-primary:active,
|
86
|
+
.btn-primary.active,
|
87
|
+
.btn-primary.focus,
|
88
|
+
.btn-primary:active,
|
89
|
+
.btn-primary:focus,
|
90
|
+
.btn-primary:hover,
|
91
|
+
.open > .dropdown-toggle.btn-primary {
|
92
|
+
background-color: #5d9cec !important;
|
93
|
+
border: 1px solid #5d9cec !important;
|
94
|
+
}
|
95
|
+
.btn-success,
|
96
|
+
.btn-success:hover,
|
97
|
+
.btn-success:focus,
|
98
|
+
.btn-success:active,
|
99
|
+
.btn-success.active,
|
100
|
+
.btn-success.focus,
|
101
|
+
.btn-success:active,
|
102
|
+
.btn-success:focus,
|
103
|
+
.btn-success:hover,
|
104
|
+
.open > .dropdown-toggle.btn-success {
|
105
|
+
background-color: #81c868 !important;
|
106
|
+
border: 1px solid #81c868 !important;
|
107
|
+
}
|
108
|
+
.btn-info,
|
109
|
+
.btn-info:hover,
|
110
|
+
.btn-info:focus,
|
111
|
+
.btn-info:active,
|
112
|
+
.btn-info.active,
|
113
|
+
.btn-info.focus,
|
114
|
+
.btn-info:active,
|
115
|
+
.btn-info:focus,
|
116
|
+
.btn-info:hover,
|
117
|
+
.open > .dropdown-toggle.btn-info {
|
118
|
+
background-color: #34d3eb !important;
|
119
|
+
border: 1px solid #34d3eb !important;
|
120
|
+
}
|
121
|
+
.btn-warning,
|
122
|
+
.btn-warning:hover,
|
123
|
+
.btn-warning:focus,
|
124
|
+
.btn-warning:active,
|
125
|
+
.btn-warning.active,
|
126
|
+
.btn-warning.focus,
|
127
|
+
.btn-warning:active,
|
128
|
+
.btn-warning:focus,
|
129
|
+
.btn-warning:hover,
|
130
|
+
.open > .dropdown-toggle.btn-warning {
|
131
|
+
background-color: #ffbd4a !important;
|
132
|
+
border: 1px solid #ffbd4a !important;
|
133
|
+
}
|
134
|
+
.btn-danger,
|
135
|
+
.btn-danger:active,
|
136
|
+
.btn-danger:focus,
|
137
|
+
.btn-danger:hover,
|
138
|
+
.btn-danger.active,
|
139
|
+
.btn-danger.focus,
|
140
|
+
.btn-danger:active,
|
141
|
+
.btn-danger:focus,
|
142
|
+
.btn-danger:hover,
|
143
|
+
.open > .dropdown-toggle.btn-danger {
|
144
|
+
background-color: #f05050 !important;
|
145
|
+
border: 1px solid #f05050 !important;
|
146
|
+
}
|
147
|
+
.btn-inverse,
|
148
|
+
.btn-inverse:hover,
|
149
|
+
.btn-inverse:focus,
|
150
|
+
.btn-inverse:active,
|
151
|
+
.btn-inverse.active,
|
152
|
+
.btn-inverse.focus,
|
153
|
+
.btn-inverse:active,
|
154
|
+
.btn-inverse:focus,
|
155
|
+
.btn-inverse:hover,
|
156
|
+
.open > .dropdown-toggle.btn-inverse {
|
157
|
+
background-color: #4c5667 !important;
|
158
|
+
border: 1px solid #4c5667 !important;
|
159
|
+
color: #ffffff;
|
160
|
+
}
|
161
|
+
.btn-purple,
|
162
|
+
.btn-purple:hover,
|
163
|
+
.btn-purple:focus,
|
164
|
+
.btn-purple:active {
|
165
|
+
background-color: #7266ba !important;
|
166
|
+
border: 1px solid #7266ba !important;
|
167
|
+
color: #ffffff;
|
168
|
+
}
|
169
|
+
.btn-pink,
|
170
|
+
.btn-pink:hover,
|
171
|
+
.btn-pink:focus,
|
172
|
+
.btn-pink:active {
|
173
|
+
background-color: #fb6d9d !important;
|
174
|
+
border: 1px solid #fb6d9d !important;
|
175
|
+
color: #ffffff;
|
176
|
+
}
|
177
|
+
.open > .dropdown-toggle.btn-primary.btn-custom,
|
178
|
+
.open > .dropdown-toggle.btn-success.btn-custom,
|
179
|
+
.open > .dropdown-toggle.btn-info.btn-custom,
|
180
|
+
.open > .dropdown-toggle.btn-warning.btn-custom,
|
181
|
+
.open > .dropdown-toggle.btn-danger.btn-custom,
|
182
|
+
.open > .dropdown-toggle.btn-default.btn-custom {
|
183
|
+
border-width: 2px !important;
|
184
|
+
color: #ffffff !important;
|
185
|
+
}
|
186
|
+
.open > .dropdown-toggle.btn-white.btn-custom {
|
187
|
+
border-width: 2px !important;
|
188
|
+
}
|
189
|
+
.btn-custom.btn-default {
|
190
|
+
color: #5fbeaa !important;
|
191
|
+
}
|
192
|
+
.btn-custom.btn-primary {
|
193
|
+
color: #5d9cec !important;
|
194
|
+
}
|
195
|
+
.btn-custom.btn-success {
|
196
|
+
color: #81c868 !important;
|
197
|
+
}
|
198
|
+
.btn-custom.btn-info {
|
199
|
+
color: #34d3eb !important;
|
200
|
+
}
|
201
|
+
.btn-custom.btn-warning {
|
202
|
+
color: #ffbd4a !important;
|
203
|
+
}
|
204
|
+
.btn-custom.btn-danger {
|
205
|
+
color: #f05050 !important;
|
206
|
+
}
|
207
|
+
.btn-custom.btn-inverse {
|
208
|
+
color: #4c5667 !important;
|
209
|
+
}
|
210
|
+
.btn-custom.btn-purple {
|
211
|
+
color: #7266ba !important;
|
212
|
+
}
|
213
|
+
.btn-custom.btn-white {
|
214
|
+
color: #4c5667 !important;
|
215
|
+
}
|
216
|
+
.btn-custom.btn-white:hover,
|
217
|
+
.btn-custom.btn-white:focus,
|
218
|
+
.btn-custom.btn-white:active {
|
219
|
+
color: #4c5667 !important;
|
220
|
+
background-color: #f4f8fb !important;
|
221
|
+
}
|
222
|
+
.btn-custom.btn-pink {
|
223
|
+
color: #fb6d9d !important;
|
224
|
+
}
|
225
|
+
.btn-rounded {
|
226
|
+
border-radius: 2em !important;
|
227
|
+
padding: 6px 20px;
|
228
|
+
}
|
229
|
+
.btn-rounded .btn-label {
|
230
|
+
padding: 7px 15px 7px 20px;
|
231
|
+
margin-left: -20px;
|
232
|
+
}
|
233
|
+
.btn-rounded .btn-label-right {
|
234
|
+
margin-right: -20px;
|
235
|
+
margin-left: 12px;
|
236
|
+
}
|
237
|
+
.btn-custom {
|
238
|
+
-moz-border-radius: 2px;
|
239
|
+
-moz-transition: all 400ms ease-in-out;
|
240
|
+
-o-transition: all 400ms ease-in-out;
|
241
|
+
-webkit-border-radius: 2px;
|
242
|
+
-webkit-transition: all 400ms ease-in-out;
|
243
|
+
background: transparent;
|
244
|
+
background-color: transparent !important;
|
245
|
+
-webkit-border-radius: 5px;
|
246
|
+
border-radius: 5px;
|
247
|
+
-moz-border-radius: 5px;
|
248
|
+
background-clip: padding-box;
|
249
|
+
border-width: 2px !important;
|
250
|
+
font-weight: 600;
|
251
|
+
transition: all 400ms ease-in-out;
|
252
|
+
background-clip: inherit;
|
253
|
+
}
|
254
|
+
.btn-custom:hover {
|
255
|
+
color: #ffffff !important;
|
256
|
+
border-width: 2px !important;
|
257
|
+
}
|
258
|
+
.btn-custom:focus {
|
259
|
+
color: #ffffff !important;
|
260
|
+
border-width: 2px !important;
|
261
|
+
}
|
262
|
+
.btn-label {
|
263
|
+
background: rgba(0, 0, 0, 0.05);
|
264
|
+
display: inline-block;
|
265
|
+
padding: 7px 15px;
|
266
|
+
border-radius: 3px 0 0 3px;
|
267
|
+
margin: -7px -13px;
|
268
|
+
margin-right: 12px;
|
269
|
+
}
|
270
|
+
.btn-label-right {
|
271
|
+
margin-left: 12px;
|
272
|
+
margin-right: -13px;
|
273
|
+
border-radius: 0px 3px 3px 0px;
|
274
|
+
}
|
275
|
+
.btn-group.open .dropdown-toggle {
|
276
|
+
box-shadow: none;
|
277
|
+
}
|
278
|
+
/* File Upload */
|
279
|
+
.fileupload {
|
280
|
+
overflow: hidden;
|
281
|
+
position: relative;
|
282
|
+
}
|
283
|
+
.fileupload input.upload {
|
284
|
+
cursor: pointer;
|
285
|
+
filter: alpha(opacity=0);
|
286
|
+
font-size: 20px;
|
287
|
+
margin: 0;
|
288
|
+
opacity: 0;
|
289
|
+
padding: 0;
|
290
|
+
position: absolute;
|
291
|
+
right: 0;
|
292
|
+
top: 0;
|
293
|
+
}
|
294
|
+
/* Social Buttons */
|
295
|
+
.btn-facebook {
|
296
|
+
color: #ffffff !important;
|
297
|
+
background-color: #3b5998 !important;
|
298
|
+
}
|
299
|
+
.btn-twitter {
|
300
|
+
color: #ffffff !important;
|
301
|
+
background-color: #00aced !important;
|
302
|
+
}
|
303
|
+
.btn-linkedin {
|
304
|
+
color: #ffffff !important;
|
305
|
+
background-color: #007bb6 !important;
|
306
|
+
}
|
307
|
+
.btn-dribbble {
|
308
|
+
color: #ffffff !important;
|
309
|
+
background-color: #ea4c89 !important;
|
310
|
+
}
|
311
|
+
.btn-googleplus {
|
312
|
+
color: #ffffff !important;
|
313
|
+
background-color: #dd4b39 !important;
|
314
|
+
}
|