themepile-abstractio 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +28 -0
  3. data/.rbenv-version +1 -0
  4. data/CONTRIBUTING.md +53 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +22 -0
  7. data/README.md +136 -0
  8. data/Rakefile +2 -0
  9. data/abstractio.gemspec +18 -0
  10. data/js/foundation/foundation.alerts.js +50 -0
  11. data/js/foundation/foundation.clearing.js +516 -0
  12. data/js/foundation/foundation.cookie.js +74 -0
  13. data/js/foundation/foundation.dropdown.js +159 -0
  14. data/js/foundation/foundation.forms.js +516 -0
  15. data/js/foundation/foundation.joyride.js +842 -0
  16. data/js/foundation/foundation.js +403 -0
  17. data/js/foundation/foundation.magellan.js +130 -0
  18. data/js/foundation/foundation.orbit.js +373 -0
  19. data/js/foundation/foundation.placeholder.js +159 -0
  20. data/js/foundation/foundation.reveal.js +276 -0
  21. data/js/foundation/foundation.section.js +409 -0
  22. data/js/foundation/foundation.tooltips.js +206 -0
  23. data/js/foundation/foundation.topbar.js +252 -0
  24. data/js/foundation/index.js +16 -0
  25. data/js/vendor/custom.modernizr.js +4 -0
  26. data/js/vendor/jquery.js +9597 -0
  27. data/js/vendor/zepto.js +1884 -0
  28. data/lib/abstractio.rb +17 -0
  29. data/lib/abstractio/engine.rb +20 -0
  30. data/lib/abstractio/generators/USAGE +15 -0
  31. data/lib/abstractio/generators/install_generator.rb +54 -0
  32. data/lib/abstractio/generators/templates/application.html.erb +46 -0
  33. data/lib/abstractio/generators/templates/application.html.haml +31 -0
  34. data/lib/abstractio/generators/templates/application.html.slim +28 -0
  35. data/lib/abstractio/version.rb +3 -0
  36. data/lib/themepile-abstractio.rb +17 -0
  37. data/scss/abstractio.scss +46 -0
  38. data/scss/abstractio/_variables.scss +1224 -0
  39. data/scss/abstractio/components/_alert-boxes.scss +107 -0
  40. data/scss/abstractio/components/_block-grid.scss +68 -0
  41. data/scss/abstractio/components/_breadcrumbs.scss +125 -0
  42. data/scss/abstractio/components/_button-groups.scss +89 -0
  43. data/scss/abstractio/components/_buttons.scss +227 -0
  44. data/scss/abstractio/components/_clearing.scss +224 -0
  45. data/scss/abstractio/components/_custom-forms.scss +263 -0
  46. data/scss/abstractio/components/_dropdown-buttons.scss +115 -0
  47. data/scss/abstractio/components/_dropdown.scss +150 -0
  48. data/scss/abstractio/components/_flex-video.scss +46 -0
  49. data/scss/abstractio/components/_forms.scss +362 -0
  50. data/scss/abstractio/components/_global.scss +280 -0
  51. data/scss/abstractio/components/_grid.scss +186 -0
  52. data/scss/abstractio/components/_inline-lists.scss +53 -0
  53. data/scss/abstractio/components/_joyride.scss +215 -0
  54. data/scss/abstractio/components/_keystrokes.scss +57 -0
  55. data/scss/abstractio/components/_labels.scss +85 -0
  56. data/scss/abstractio/components/_magellan.scss +23 -0
  57. data/scss/abstractio/components/_orbit.scss +213 -0
  58. data/scss/abstractio/components/_pagination.scss +100 -0
  59. data/scss/abstractio/components/_panels.scss +77 -0
  60. data/scss/abstractio/components/_pricing-tables.scss +131 -0
  61. data/scss/abstractio/components/_progress-bars.scss +71 -0
  62. data/scss/abstractio/components/_reveal.scss +132 -0
  63. data/scss/abstractio/components/_section.scss +318 -0
  64. data/scss/abstractio/components/_side-nav.scss +69 -0
  65. data/scss/abstractio/components/_split-buttons.scss +167 -0
  66. data/scss/abstractio/components/_sub-nav.scss +68 -0
  67. data/scss/abstractio/components/_switch.scss +251 -0
  68. data/scss/abstractio/components/_tables.scss +84 -0
  69. data/scss/abstractio/components/_thumbs.scss +48 -0
  70. data/scss/abstractio/components/_tooltips.scss +117 -0
  71. data/scss/abstractio/components/_top-bar.scss +495 -0
  72. data/scss/abstractio/components/_type.scss +426 -0
  73. data/scss/abstractio/components/_visibility.scss +322 -0
  74. data/scss/normalize.scss +402 -0
  75. data/templates/project/.gitignore +44 -0
  76. data/templates/project/MIT-LICENSE.txt +20 -0
  77. data/templates/project/config.rb +26 -0
  78. data/templates/project/humans.txt +8 -0
  79. data/templates/project/index.html +124 -0
  80. data/templates/project/manifest.rb +45 -0
  81. data/templates/project/robots.txt +4 -0
  82. data/templates/project/scss/app.scss +48 -0
  83. data/templates/upgrade/manifest.rb +34 -0
  84. metadata +153 -0
@@ -0,0 +1,206 @@
1
+ /*jslint unparam: true, browser: true, indent: 2 */
2
+
3
+ ;(function ($, window, document, undefined) {
4
+ 'use strict';
5
+
6
+ Foundation.libs.tooltips = {
7
+ name: 'tooltips',
8
+
9
+ version : '4.1.7',
10
+
11
+ settings : {
12
+ selector : '.has-tip',
13
+ additionalInheritableClasses : [],
14
+ tooltipClass : '.tooltip',
15
+ appendTo: 'body',
16
+ 'disable-for-touch': false,
17
+ tipTemplate : function (selector, content) {
18
+ return '<span data-selector="' + selector + '" class="'
19
+ + Foundation.libs.tooltips.settings.tooltipClass.substring(1)
20
+ + '">' + content + '<span class="nub"></span></span>';
21
+ }
22
+ },
23
+
24
+ cache : {},
25
+
26
+ init : function (scope, method, options) {
27
+ Foundation.inherit(this, 'data_options');
28
+ var self = this;
29
+
30
+ if (typeof method === 'object') {
31
+ $.extend(true, this.settings, method);
32
+ } else if (typeof options !== 'undefined') {
33
+ $.extend(true, this.settings, options);
34
+ }
35
+
36
+ if (typeof method != 'string') {
37
+ if (Modernizr.touch) {
38
+ $(this.scope)
39
+ .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip',
40
+ '[data-tooltip]', function (e) {
41
+ var settings = $.extend({}, self.settings, self.data_options($(this)));
42
+ if (!settings['disable-for-touch']) {
43
+ e.preventDefault();
44
+ $(settings.tooltipClass).hide();
45
+ self.showOrCreateTip($(this));
46
+ }
47
+ })
48
+ .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip',
49
+ this.settings.tooltipClass, function (e) {
50
+ e.preventDefault();
51
+ $(this).fadeOut(150);
52
+ });
53
+ } else {
54
+ $(this.scope)
55
+ .on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip',
56
+ '[data-tooltip]', function (e) {
57
+ var $this = $(this);
58
+
59
+ if (e.type === 'mouseover' || e.type === 'mouseenter') {
60
+ self.showOrCreateTip($this);
61
+ } else if (e.type === 'mouseout' || e.type === 'mouseleave') {
62
+ self.hide($this);
63
+ }
64
+ });
65
+ }
66
+
67
+ // $(this.scope).data('fndtn-tooltips', true);
68
+ } else {
69
+ return this[method].call(this, options);
70
+ }
71
+
72
+ },
73
+
74
+ showOrCreateTip : function ($target) {
75
+ var $tip = this.getTip($target);
76
+
77
+ if ($tip && $tip.length > 0) {
78
+ return this.show($target);
79
+ }
80
+
81
+ return this.create($target);
82
+ },
83
+
84
+ getTip : function ($target) {
85
+ var selector = this.selector($target),
86
+ tip = null;
87
+
88
+ if (selector) {
89
+ tip = $('span[data-selector=' + selector + ']' + this.settings.tooltipClass);
90
+ }
91
+
92
+ return (typeof tip === 'object') ? tip : false;
93
+ },
94
+
95
+ selector : function ($target) {
96
+ var id = $target.attr('id'),
97
+ dataSelector = $target.attr('data-tooltip') || $target.attr('data-selector');
98
+
99
+ if ((id && id.length < 1 || !id) && typeof dataSelector != 'string') {
100
+ dataSelector = 'tooltip' + Math.random().toString(36).substring(7);
101
+ $target.attr('data-selector', dataSelector);
102
+ }
103
+
104
+ return (id && id.length > 0) ? id : dataSelector;
105
+ },
106
+
107
+ create : function ($target) {
108
+ var $tip = $(this.settings.tipTemplate(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
109
+ classes = this.inheritable_classes($target);
110
+
111
+ $tip.addClass(classes).appendTo(this.settings.appendTo);
112
+ if (Modernizr.touch) {
113
+ $tip.append('<span class="tap-to-close">tap to close </span>');
114
+ }
115
+ $target.removeAttr('title').attr('title','');
116
+ this.show($target);
117
+ },
118
+
119
+ reposition : function (target, tip, classes) {
120
+ var width, nub, nubHeight, nubWidth, column, objPos;
121
+
122
+ tip.css('visibility', 'hidden').show();
123
+
124
+ width = target.data('width');
125
+ nub = tip.children('.nub');
126
+ nubHeight = this.outerHeight(nub);
127
+ nubWidth = this.outerHeight(nub);
128
+
129
+ objPos = function (obj, top, right, bottom, left, width) {
130
+ return obj.css({
131
+ 'top' : (top) ? top : 'auto',
132
+ 'bottom' : (bottom) ? bottom : 'auto',
133
+ 'left' : (left) ? left : 'auto',
134
+ 'right' : (right) ? right : 'auto',
135
+ 'width' : (width) ? width : 'auto'
136
+ }).end();
137
+ };
138
+
139
+ objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', target.offset().left, width);
140
+
141
+ if ($(window).width() < 767) {
142
+ objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', 12.5, $(this.scope).width());
143
+ tip.addClass('tip-override');
144
+ objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
145
+ } else {
146
+ var left = target.offset().left;
147
+ if (Foundation.rtl) {
148
+ left = target.offset().left + target.offset().width - this.outerWidth(tip);
149
+ }
150
+ objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', left, width);
151
+ tip.removeClass('tip-override');
152
+ if (classes && classes.indexOf('tip-top') > -1) {
153
+ objPos(tip, (target.offset().top - this.outerHeight(tip)), 'auto', 'auto', left, width)
154
+ .removeClass('tip-override');
155
+ } else if (classes && classes.indexOf('tip-left') > -1) {
156
+ objPos(tip, (target.offset().top + (this.outerHeight(target) / 2) - nubHeight*2.5), 'auto', 'auto', (target.offset().left - this.outerWidth(tip) - nubHeight), width)
157
+ .removeClass('tip-override');
158
+ } else if (classes && classes.indexOf('tip-right') > -1) {
159
+ objPos(tip, (target.offset().top + (this.outerHeight(target) / 2) - nubHeight*2.5), 'auto', 'auto', (target.offset().left + this.outerWidth(target) + nubHeight), width)
160
+ .removeClass('tip-override');
161
+ }
162
+ }
163
+
164
+ tip.css('visibility', 'visible').hide();
165
+ },
166
+
167
+ inheritable_classes : function (target) {
168
+ var inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'noradius'].concat(this.settings.additionalInheritableClasses),
169
+ classes = target.attr('class'),
170
+ filtered = classes ? $.map(classes.split(' '), function (el, i) {
171
+ if ($.inArray(el, inheritables) !== -1) {
172
+ return el;
173
+ }
174
+ }).join(' ') : '';
175
+
176
+ return $.trim(filtered);
177
+ },
178
+
179
+ show : function ($target) {
180
+ var $tip = this.getTip($target);
181
+
182
+ this.reposition($target, $tip, $target.attr('class'));
183
+ $tip.fadeIn(150);
184
+ },
185
+
186
+ hide : function ($target) {
187
+ var $tip = this.getTip($target);
188
+
189
+ $tip.fadeOut(150);
190
+ },
191
+
192
+ // deprecate reload
193
+ reload : function () {
194
+ var $self = $(this);
195
+
196
+ return ($self.data('fndtn-tooltips')) ? $self.foundationTooltips('destroy').foundationTooltips('init') : $self.foundationTooltips('init');
197
+ },
198
+
199
+ off : function () {
200
+ $(this.scope).off('.fndtn.tooltip');
201
+ $(this.settings.tooltipClass).each(function (i) {
202
+ $('[data-tooltip]').get(i).attr('title', $(this).text());
203
+ }).remove();
204
+ }
205
+ };
206
+ }(Foundation.zj, this, this.document));
@@ -0,0 +1,252 @@
1
+ /*jslint unparam: true, browser: true, indent: 2 */
2
+
3
+ ;(function ($, window, document, undefined) {
4
+ 'use strict';
5
+
6
+ Foundation.libs.topbar = {
7
+ name : 'topbar',
8
+
9
+ version : '4.1.7',
10
+
11
+ settings : {
12
+ index : 0,
13
+ stickyClass : 'sticky',
14
+ custom_back_text: true,
15
+ back_text: 'Back',
16
+ scrolltop : true, // jump to top when sticky nav menu toggle is clicked
17
+ init : false
18
+ },
19
+
20
+ init : function (section, method, options) {
21
+ Foundation.inherit(this, 'data_options');
22
+ var self = this;
23
+
24
+ if (typeof method === 'object') {
25
+ $.extend(true, this.settings, method);
26
+ } else if (typeof options !== 'undefined') {
27
+ $.extend(true, this.settings, options);
28
+ }
29
+
30
+ if (typeof method != 'string') {
31
+
32
+ $('.top-bar, [data-topbar]').each(function () {
33
+ $.extend(true, self.settings, self.data_options($(this)));
34
+ self.settings.$w = $(window);
35
+ self.settings.$topbar = $(this);
36
+ self.settings.$section = self.settings.$topbar.find('section');
37
+ self.settings.$titlebar = self.settings.$topbar.children('ul').first();
38
+
39
+
40
+ self.settings.$topbar.data('index', 0);
41
+
42
+ var breakpoint = $("<div class='top-bar-js-breakpoint'/>").insertAfter(self.settings.$topbar);
43
+ self.settings.breakPoint = breakpoint.width();
44
+ breakpoint.remove();
45
+
46
+ self.assemble();
47
+
48
+ if (self.settings.$topbar.parent().hasClass('fixed')) {
49
+ $('body').css('padding-top', self.outerHeight(self.settings.$topbar));
50
+ }
51
+ });
52
+
53
+ if (!self.settings.init) {
54
+ this.events();
55
+ }
56
+
57
+ return this.settings.init;
58
+ } else {
59
+ // fire method
60
+ return this[method].call(this, options);
61
+ }
62
+ },
63
+
64
+ events : function () {
65
+ var self = this;
66
+ var offst = this.outerHeight($('.top-bar, [data-topbar]'));
67
+ $(this.scope)
68
+ .on('click.fndtn.topbar', '.top-bar .toggle-topbar, [data-topbar] .toggle-topbar', function (e) {
69
+ var topbar = $(this).closest('.top-bar, [data-topbar]'),
70
+ section = topbar.find('section, .section'),
71
+ titlebar = topbar.children('ul').first();
72
+
73
+ if (!topbar.data('height')) self.largestUL();
74
+
75
+ e.preventDefault();
76
+
77
+ if (self.breakpoint()) {
78
+ topbar
79
+ .toggleClass('expanded')
80
+ .css('min-height', '');
81
+ }
82
+
83
+ if (!topbar.hasClass('expanded')) {
84
+ if (!self.rtl) {
85
+ section.css({left: '0%'});
86
+ section.find('>.name').css({left: '100%'});
87
+ } else {
88
+ section.css({right: '0%'});
89
+ section.find('>.name').css({right: '100%'});
90
+ }
91
+ section.find('li.moved').removeClass('moved');
92
+ topbar.data('index', 0);
93
+
94
+ if (topbar.hasClass('fixed')) {
95
+ topbar.parent().addClass('fixed');
96
+ topbar.removeClass('fixed');
97
+ $('body').css('padding-top',offst);
98
+ }
99
+ } else if (topbar.parent().hasClass('fixed')) {
100
+ topbar.parent().removeClass('fixed');
101
+ topbar.addClass('fixed');
102
+ $('body').css('padding-top','0');
103
+ if (self.settings.scrolltop) {
104
+ window.scrollTo(0,0);
105
+ }
106
+ }
107
+ })
108
+
109
+ .on('click.fndtn.topbar', '.top-bar .has-dropdown>a, [data-topbar] .has-dropdown>a', function (e) {
110
+ var topbar = $(this).closest('.top-bar, [data-topbar]'),
111
+ section = topbar.find('section, .section'),
112
+ titlebar = topbar.children('ul').first(),
113
+ dropdownHeight = $(this).next('.dropdown').outerHeight();
114
+
115
+ if (Modernizr.touch || self.breakpoint()) {
116
+ e.preventDefault();
117
+ }
118
+
119
+ if (self.breakpoint()) {
120
+ var $this = $(this),
121
+ $selectedLi = $this.closest('li');
122
+
123
+ topbar.data('index', topbar.data('index') + 1);
124
+ $selectedLi.addClass('moved');
125
+ if (!self.rtl) {
126
+ section.css({left: -(100 * topbar.data('index')) + '%'});
127
+ section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
128
+ } else {
129
+ section.css({right: -(100 * topbar.data('index')) + '%'});
130
+ section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
131
+ }
132
+
133
+ $('.top-bar, [data-topbar]').css('min-height', dropdownHeight);
134
+
135
+ $this.siblings('ul')
136
+ .height(topbar.data('height') + self.outerHeight(titlebar, true));
137
+ topbar
138
+ .css('min-height', topbar.data('height') + self.outerHeight(titlebar, true) * 2)
139
+ }
140
+ });
141
+
142
+ $(window).on('resize.fndtn.topbar', function () {
143
+ if (!self.breakpoint()) {
144
+ $('.top-bar, [data-topbar]')
145
+ .css('min-height', '')
146
+ .removeClass('expanded');
147
+ }
148
+ }.bind(this));
149
+
150
+ // Go up a level on Click
151
+ $(this.scope).on('click.fndtn', '.top-bar .has-dropdown .back, [data-topbar] .has-dropdown .back', function (e) {
152
+ e.preventDefault();
153
+
154
+ var $this = $(this),
155
+ topbar = $this.closest('.top-bar, [data-topbar]'),
156
+ section = topbar.find('section, .section'),
157
+ $movedLi = $this.closest('li.moved'),
158
+ $previousLevelUl = $movedLi.parent();
159
+
160
+ topbar.data('index', topbar.data('index') - 1);
161
+ if (!self.rtl) {
162
+ section.css({left: -(100 * topbar.data('index')) + '%'});
163
+ section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
164
+ } else {
165
+ section.css({right: -(100 * topbar.data('index')) + '%'});
166
+ section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
167
+ }
168
+
169
+ if (topbar.data('index') === 0) {
170
+ topbar.css('min-height', 0);
171
+ }
172
+
173
+ setTimeout(function () {
174
+ $movedLi.removeClass('moved');
175
+ }, 300);
176
+ });
177
+ },
178
+
179
+ breakpoint : function () {
180
+ return $(window).width() <= this.settings.breakPoint || $('html').hasClass('lt-ie9');
181
+ },
182
+
183
+ assemble : function () {
184
+ var self = this;
185
+ // Pull element out of the DOM for manipulation
186
+ this.settings.$section.detach();
187
+
188
+ this.settings.$section.find('.has-dropdown>a').each(function () {
189
+ var $link = $(this),
190
+ $dropdown = $link.siblings('.dropdown'),
191
+ $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li>');
192
+
193
+ // Copy link to subnav
194
+ if (self.settings.custom_back_text == true) {
195
+ $titleLi.find('h5>a').html('&laquo; ' + self.settings.back_text);
196
+ } else {
197
+ $titleLi.find('h5>a').html('&laquo; ' + $link.html());
198
+ }
199
+ $dropdown.prepend($titleLi);
200
+ });
201
+
202
+ // Put element back in the DOM
203
+ this.settings.$section.appendTo(this.settings.$topbar);
204
+
205
+ // check for sticky
206
+ this.sticky();
207
+ },
208
+
209
+ largestUL : function () {
210
+ var uls = this.settings.$topbar.find('section ul ul'),
211
+ largest = uls.first(),
212
+ total = 0,
213
+ self = this;
214
+
215
+ uls.each(function () {
216
+ if ($(this).children('li').length > largest.children('li').length) {
217
+ largest = $(this);
218
+ }
219
+ });
220
+
221
+ largest.children('li').each(function () { total += self.outerHeight($(this), true); });
222
+
223
+ this.settings.$topbar.data('height', total);
224
+ },
225
+
226
+ sticky : function () {
227
+ var klass = '.' + this.settings.stickyClass;
228
+ if ($(klass).length > 0) {
229
+ var distance = $(klass).length ? $(klass).offset().top: 0,
230
+ $window = $(window);
231
+ var offst = this.outerHeight($('.top-bar'));
232
+
233
+ $window.scroll(function() {
234
+ if ($window.scrollTop() >= (distance)) {
235
+ $(klass).addClass("fixed");
236
+ $('body').css('padding-top',offst);
237
+ }
238
+
239
+ else if ($window.scrollTop() < distance) {
240
+ $(klass).removeClass("fixed");
241
+ $('body').css('padding-top','0');
242
+ }
243
+ });
244
+ }
245
+ },
246
+
247
+ off : function () {
248
+ $(this.scope).off('.fndtn.topbar');
249
+ $(window).off('.fndtn.topbar');
250
+ }
251
+ };
252
+ }(Foundation.zj, this, this.document));