kickstart_rails 0.3.411478620741 → 0.3.411508638416

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3efe4d005c5971f401e1570aadbd9a9298f7afd1
4
- data.tar.gz: 527cfcb8cd1d0b4df5dcc8b20504299ed153184f
3
+ metadata.gz: e9a816a57d62ea037d643bcf1ac3bdfd3ae2064c
4
+ data.tar.gz: ff14dceb845412a2db477cd100e52233258fd0c8
5
5
  SHA512:
6
- metadata.gz: 3495434ada238dcdf4fa3df85fa7f81a55e4f4e4e69e9827749eff57f050f3250d3cbd51b606b17c8e69df5f9f6180dc74968d35a98d5211f382fe7db4023fbe
7
- data.tar.gz: 3e11b0760fd1e487dc0e7d319e7aa9912d98129754a64e655cd14f02f6ca066a771bcbd0d12675f8f795cd26868bb8493399f27173c108f47509c41fcc2bc062
6
+ metadata.gz: dbc47d5c8fa42c9dd7a7acd2bdf9e779f4108dff5fce09d2411dc0742e82f0c2792641a317a8123b80bd567026e29ab409972f6ecaa16e5c8e2fc99fa67bbc23
7
+ data.tar.gz: f74f7e92511cd5bb7646222cd1ca205d6e211775d5579029357e37876bc39b78fd13c4d9dbdb3695ca81994ce72b6d004f1e2ef4de315467b93017be84790ebe
@@ -138,70 +138,71 @@ module.exports = modal;
138
138
 
139
139
 
140
140
  },{}],"/Users/adamkochanowicz/Sites/kickstart/lib/coffee/nav.coffee":[function(require,module,exports){
141
- define(['dropdown'], function() {
142
- var nav;
143
- nav = function(el) {
144
- var $menuItem, $menuItems, e, _$menuItems, _fn, _i, _j, _len, _len1;
145
- try {
146
- $menuItems = k$.$(el).querySelectorAll('ul > li');
147
- _$menuItems = new Array();
148
- for (_i = 0, _len = $menuItems.length; _i < _len; _i++) {
149
- $menuItem = $menuItems[_i];
150
- if ($menuItem.querySelectorAll('ul').length) {
151
- _$menuItems.push($menuItem);
152
- }
153
- }
154
- $menuItems = _$menuItems;
155
- _fn = function($menuItem) {
156
- return $menuItem.addEventListener('click', function(e) {
157
- var $subMenu, $ul, _$menuItem, _k, _l, _len2, _len3, _ref, _ref1;
158
- e.stopPropagation();
159
- _ref = document.querySelectorAll('.with-submenu');
160
- for (_k = 0, _len2 = _ref.length; _k < _len2; _k++) {
161
- _$menuItem = _ref[_k];
162
- _$menuItem.classList.remove('open');
163
- }
164
- $ul = $menuItem.querySelector('ul');
165
- _ref1 = document.querySelectorAll('.with-submenu ul');
166
- for (_l = 0, _len3 = _ref1.length; _l < _len3; _l++) {
167
- $subMenu = _ref1[_l];
168
- $subMenu.style.display = 'none';
169
- }
170
- if ($ul) {
171
- $menuItem.classList.add('open');
172
- return $ul.style.display = ($ul.style.display === 'block' ? 'none' : 'block');
173
- }
174
- });
175
- };
176
- for (_j = 0, _len1 = $menuItems.length; _j < _len1; _j++) {
177
- $menuItem = $menuItems[_j];
178
- $menuItem.classList.add('with-submenu');
179
- _fn($menuItem);
141
+ var nav;
142
+
143
+ nav = function(el) {
144
+ var $menuItem, $menuItems, e, _$menuItems, _fn, _i, _j, _len, _len1;
145
+ try {
146
+ $menuItems = k$.$(el).querySelectorAll('ul > li');
147
+ _$menuItems = new Array();
148
+ for (_i = 0, _len = $menuItems.length; _i < _len; _i++) {
149
+ $menuItem = $menuItems[_i];
150
+ if ($menuItem.querySelectorAll('ul').length) {
151
+ _$menuItems.push($menuItem);
180
152
  }
181
- document.body.addEventListener('click', function() {
182
- var $li, $ul, _k, _l, _len2, _len3, _ref, _ref1, _results;
183
- _ref = k$.$(el).querySelectorAll('ul li ul');
153
+ }
154
+ $menuItems = _$menuItems;
155
+ _fn = function($menuItem) {
156
+ return $menuItem.addEventListener('click', function(e) {
157
+ var $subMenu, $ul, _$menuItem, _k, _l, _len2, _len3, _ref, _ref1;
158
+ e.stopPropagation();
159
+ _ref = document.querySelectorAll('.with-submenu');
184
160
  for (_k = 0, _len2 = _ref.length; _k < _len2; _k++) {
185
- $ul = _ref[_k];
186
- $ul.style.display = 'none';
161
+ _$menuItem = _ref[_k];
162
+ _$menuItem.classList.remove('open');
187
163
  }
188
- _ref1 = k$.$(el).querySelectorAll('ul li');
189
- _results = [];
164
+ $ul = $menuItem.querySelector('ul');
165
+ _ref1 = document.querySelectorAll('.with-submenu ul');
190
166
  for (_l = 0, _len3 = _ref1.length; _l < _len3; _l++) {
191
- $li = _ref1[_l];
192
- _results.push($li.classList.remove('open'));
167
+ $subMenu = _ref1[_l];
168
+ $subMenu.style.display = 'none';
169
+ }
170
+ if ($ul) {
171
+ $menuItem.classList.add('open');
172
+ return $ul.style.display = ($ul.style.display === 'block' ? 'none' : 'block');
193
173
  }
194
- return _results;
195
174
  });
196
- } catch (_error) {
197
- e = _error;
198
- console.error("Could not instantiate as a nav.", e.message);
175
+ };
176
+ for (_j = 0, _len1 = $menuItems.length; _j < _len1; _j++) {
177
+ $menuItem = $menuItems[_j];
178
+ $menuItem.classList.add('with-submenu');
179
+ _fn($menuItem);
199
180
  }
200
- return k$.$(el);
201
- };
202
- k$.nav = nav;
203
- return module.exports = nav;
204
- });
181
+ document.body.addEventListener('click', function() {
182
+ var $li, $ul, _k, _l, _len2, _len3, _ref, _ref1, _results;
183
+ _ref = k$.$(el).querySelectorAll('ul li ul');
184
+ for (_k = 0, _len2 = _ref.length; _k < _len2; _k++) {
185
+ $ul = _ref[_k];
186
+ $ul.style.display = 'none';
187
+ }
188
+ _ref1 = k$.$(el).querySelectorAll('ul li');
189
+ _results = [];
190
+ for (_l = 0, _len3 = _ref1.length; _l < _len3; _l++) {
191
+ $li = _ref1[_l];
192
+ _results.push($li.classList.remove('open'));
193
+ }
194
+ return _results;
195
+ });
196
+ } catch (_error) {
197
+ e = _error;
198
+ console.error("Could not instantiate as a nav.", e.message);
199
+ }
200
+ return k$.$(el);
201
+ };
202
+
203
+ k$.nav = nav;
204
+
205
+ module.exports = nav;
205
206
 
206
207
 
207
208
 
@@ -6320,4 +6321,4 @@ Library.prototype.test = function (obj, type) {
6320
6321
  };
6321
6322
 
6322
6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c30gdG8gdGhyb3cgI3tleHB9IGJ1dCAje2FjdH0gd2FzIHRocm93bidcbiAgICAgICAgICAsICdleHBlY3RlZCAje3RoaXN9IHRvIG5vdCB0aHJvdyAje2V4cH0nXG4gICAgICAgICAgLCAoZGVzaXJlZEVycm9yIGluc3RhbmNlb2YgRXJyb3IgPyBkZXNpcmVkRXJyb3IudG9TdHJpbmcoKSA6IGRlc2lyZWRFcnJvcilcbiAgICAgICAgICAsIChlcnIgaW5zdGFuY2VvZiBFcnJvciA/IGVyci50b1N0cmluZygpIDogZXJyKVxuICAgICAgICApO1xuXG4gICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfVxuXG4gICAgICAvLyBuZXh0LCBjaGVjayBjb25zdHJ1Y3RvclxuICAgICAgaWYgKGNvbnN0cnVjdG9yKSB7XG4gICAgICAgIHRoaXMuYXNzZXJ0KFxuICAgICAgICAgICAgZXJyIGluc3RhbmNlb2YgY29uc3RydWN0b3JcbiAgICAgICAgICAsICdleHBlY3RlZCAje3RoaXN9IHRvIHRocm93ICN7ZXhwfSBidXQgI3thY3R9IHdhcyB0aHJvd24nXG4gICAgICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byBub3QgdGhyb3cgI3tleHB9IGJ1dCAje2FjdH0gd2FzIHRocm93bidcbiAgICAgICAgICAsIG5hbWVcbiAgICAgICAgICAsIChlcnIgaW5zdGFuY2VvZiBFcnJvciA/IGVyci50b1N0cmluZygpIDogZXJyKVxuICAgICAgICApO1xuXG4gICAgICAgIGlmICghZXJyTXNnKSB7XG4gICAgICAgICAgZmxhZyh0aGlzLCAnb2JqZWN0JywgZXJyKTtcbiAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBuZXh0LCBjaGVjayBtZXNzYWdlXG4gICAgICB2YXIgbWVzc2FnZSA9ICdvYmplY3QnID09PSBfLnR5cGU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AgICAgcmV0dXJuIHRoaXM7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvd24gPSB0cnVlO1xuICAgICAgICB0aHJvd25FcnJvciA9IGVycjtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgYWN0dWFsbHlHb3QgPSAnJ1xuICAgICAgLCBleHBlY3RlZFRocm93biA9IG5hbWUgIT09IG51bGxcbiAgICAgICAgPyBuYW1lXG4gICAgICAgIDogZGVzaXJlZEVycm9yXG4gICAgICAgICAgPyAnI3tleHB9JyAvL18uaW5zcGVjdChkZXNpcmVkRXJyb3IpXG4gICAgICAgICAgOiAnYW4gZXJyb3InO1xuXG4gICAgaWYgKHRocm93bikge1xuICAgICAgYWN0dWFsbHlHb3QgPSAnIGJ1dCAje2FjdH0gd2FzIHRocm93bidcbiAgICB9XG5cbiAgICB0aGlzLmFzc2VydChcbiAgICAgICAgdGhyb3duID09PSB0cnVlXG4gICAgICAsICdleHBlY3RlZCAje3RoaXN9IHRvIHRocm93ICcgKyBleHBlY3RlZFRocm93biArIGFjdHVhbGx5R290XG4gICAgICAsICdleHBlY3RlZCAje3RoaXN9IHRvIG5vdCB0aHJvdyAnICsgZXhwZWN0ZWRUaHJvd24gKyBhY3R1YWxseUdvdFxuICAgICAgLCAoZGVzaXJlZEVycm9yIGluc3RhbmNlb2YgRXJyb3IgPyBkZXNpcmVkRXJyb3IudG9TdHJpbmcoKSA6IGRlc2lyZWRFcnJvcilcbiAgICAgICwgKHRocm93bkVycm9yIGluc3RhbmNlb2YgRXJyb3IgPyB0aHJvd25FcnJvci50b1N0cmluZygpIDogdGhyb3duRXJyb3IpXG4gICAgKTtcblxuICAgIGZsYWcodGhpcywgJ29iamVjdCcsIHRocm93bkVycm9yKTtcbiAgfTtcblxuICBBc3NlcnRpb24uYWRkTWV0aG9kKCd0aHJvdycsIGFzc2VydFRocm93cyk7XG4gIEFzc2VydGlvbi5hZGRNZXRob2QoJ3Rocm93cycsIGFzc2VydFRocm93cyk7XG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gPSBmdW5jdGlvbiAob2JqKSB7XG4gIHZhciBzdHIgPSBpbnNwZWN0KG9iailcbiAgICAsIHR5cGUgPSBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwob2JqKTtcblxuICBpZiAoY29uZmlnLnRydW5jYXRlVGhyZXNob2xkICYmIHN0ci5sZW5ndGggPj0gY29uZmlnLnRydW5jYXRlVGhyZXNob2xkKSB7XG4gICAgaWYgKHR5cGUgPT09ICdbb2JqZWN0IEZ1bmN0aW9uXScpIHtcbiAgICAgIHJldHVybiAhb2JqLm5hbWUgfHwgb2JqLm5hbWUgPT09ICcnXG4gICAgICAgID8gJ1tGdW5jdGlvbl0nXG4gICAgICAgIDogJ1tGdW5jdGlvbjogJyArIG9iai5uYW1lICsgJ10nO1xuICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gJ1tvYmplY3QgQXJyYXldJykge1xuICAgICAgcmV0dXJuICdbIEFycmF5KCcgKyBvYmoubGVuZ3RoICsgJykgXSc7XG4gICAgfSBlbHNlIGlmICh0eXBlID09PSAnW29iamVjdCBPYmplY3RdJykge1xuICAgICAgdmFyIGtleXMgPSBPYmplY3Qua2V5cyhvYmopXG4gICAgICAgICwga3N0ciA9IGtleXMubGVuZ3RoID4gMlxuICAgICAgICAgID8ga2V5cy5zcGxpY2UoMCwgMikuam9pbignLCAnKSArICcsIC4uLidcbiAgICAgICAgICA6IGtleXMuam9pbignLCAnKTtcbiAgICAgIHJldHVybiAneyBPYmplY3QgKCcgKyBrc3RyICsgJykgfSc7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBzdHI7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHJldHVybiBzdHI7XG4gIH1cbn07XG4iLCIvKiFcbiAqIENoYWkgLSBvdmVyd3JpdGVDaGFpbmFibGVNZXRob2QgdXRpbGl0eVxuICogQ29weXJpZ2h0KGMpIDIwMTItMjAxNCBKYWtlIEx1ZXIgPGpha2VAYWxvZ2ljYWxwYXJhZG94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AgICAgbmFtZSA9IChuZXcgY29uc3RydWN0b3IoKSkubmFtZTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgY29uc3RydWN0b3IgPSBudWxsO1xuICAgIH1cblxuICAgIHRyeSB7XG4gICAgICBvYmooKTtcbiAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgIC8vIGZpcnN0LCBjaGVjayBkZXNpcmVkIGVycm9yXG4gICAgICBpZiAoZGVzaXJlZEVycm9yKSB7XG4gICAgICAgIHRoaXMuYXNzZXJ0KFxuICAgICAgICAgICAgZXJyID09PSBkZXNpcmVkRXJyb3JcbiAgICAgICAgICAsICdleHBlY3RlZCAje3RoaXN9IHRvIHRocm93ICN7ZXhwfSBidXQgI3thY3R9IHdhcyB0aHJvd24nXG4gICAgICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byBub3QgdGhyb3cgI3tleHB9J1xuICAgICAgICAgICwgKGRlc2lyZWRFcnJvciBpbnN0YW5jZW9mIEVycm9yID8gZGVzaXJlZEVycm9yLnRvU3RyaW5nKCkgOiBkZXNpcmVkRXJyb3IpXG4gICAgICAgICAgLCAoZXJyIGluc3RhbmNlb2YgRXJyb3IgPyBlcnIudG9TdHJpbmcoKSA6IGVycilcbiAgICAgICAgKTtcblxuICAgICAgICBmbGFnKHRoaXMsICdvYmplY3QnLCBlcnIpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgIH1cblxuICAgICAgLy8gbmV4dCwgY2hlY2sgY29uc3RydWN0b3JcbiAgICAgIGlmIChjb25zdHJ1Y3Rvcikge1xuICAgICAgICB0aGlzLmFzc2VydChcbiAgICAgICAgICAgIGVyciBpbnN0YW5jZW9mIGNvbnN0cnVjdG9yXG4gICAgICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byB0aHJvdyAje2V4cH0gYnV0ICN7YWN0fSB3YXMgdGhyb3duJ1xuICAgICAgICAgICwgJ2V4cGVjdGVkICN7dGhpc30gdG8gbm90IHRocm93ICN7ZXhwfSBidXQgI3thY3R9IHdhcyB0aHJvd24nXG4gICAgICAgICAgLCBuYW1lXG4gICAgICAgICAgLCAoZXJyIGluc3RhbmNlb2YgRXJyb3IgPyBlcnIudG9TdHJpbmcoKSA6IGVycilcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAoIWVyck1zZykge1xuICAgICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgLy8gbmV4dCwgY2hlY2sgbWVzc2FnZVxuICAgICAgdmFyIG1lc3NhZ2UgPSAnb2JqZWN0JyA9PT0gXy50eXBlKGVycikgJiYgXCJtZXNzYWdlXCIgaW4gZXJyXG4gICAgICAgID8gZXJyLm1lc3NhZ2VcbiAgICAgICAgOiAnJyArIGVycjtcblxuICAgICAgaWYgKChtZXNzYWdlICE9IG51bGwpICYmIGVyck1zZyAmJiBlcnJNc2cgaW5zdGFuY2VvZiBSZWdFeHApIHtcbiAgICAgICAgdGhpcy5hc3NlcnQoXG4gICAgICAgICAgICBlcnJNc2cuZXhlYyhtZXNzYWdlKVxuICAgICAgICAgICwgJ2V4cGVjdGVkICN7dGhpc30gdG8gdGhyb3cgZXJyb3IgbWF0Y2hpbmcgI3tleHB9IGJ1dCBnb3QgI3thY3R9J1xuICAgICAgICAgICwgJ2V4cGVjdGVkICN7dGhpc30gdG8gdGhyb3cgZXJyb3Igbm90IG1hdGNoaW5nICN7ZXhwfSdcbiAgICAgICAgICAsIGVyck1zZ1xuICAgICAgICAgICwgbWVzc2FnZVxuICAgICAgICApO1xuXG4gICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfSBlbHNlIGlmICgobWVzc2FnZSAhPSBudWxsKSAmJiBlcnJNc2cgJiYgJ3N0cmluZycgPT09IHR5cGVvZiBlcnJNc2cpIHtcbiAgICAgICAgdGhpcy5hc3NlcnQoXG4gICAgICAgICAgICB+bWVzc2FnZS5pbmRleE9mKGVyck1zZylcbiAgICAgICAgICAsICdleHBlY3RlZCAje3RoaXN9IHRvIHRocm93IGVycm9yIGluY2x1ZGluZyAje2V4cH0gYnV0IGdvdCAje2FjdH0nXG4gICAgICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byB0aHJvdyBlcnJvciBub3QgaW5jbHVkaW5nICN7YWN0fSdcbiAgICAgICAgICAsIGVyck1zZ1xuICAgICAgICAgICwgbWVzc2FnZVxuICAgICAgICApO1xuXG4gICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3duID0gdHJ1ZTtcbiAgICAgICAgdGhyb3duRXJyb3IgPSBlcnI7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGFjdHVhbGx5R290ID0gJydcbiAgICAgICwgZXhwZWN0ZWRUaHJvd24gPSBuYW1lICE9PSBudWxsXG4gICAgICAgID8gbmFtZVxuICAgICAgICA6IGRlc2lyZWRFcnJvclxuICAgICAgICAgID8gJyN7ZXhwfScgLy9fLmluc3BlY3QoZGVzaXJlZEVycm9yKVxuICAgICAgICAgIDogJ2FuIGVycm9yJztcblxuICAgIGlmICh0aHJvd24pIHtcbiAgICAgIGFjdHVhbGx5R290ID0gJyBidXQgI3thY3R9IHdhcyB0aHJvd24nXG4gICAgfVxuXG4gICAgdGhpcy5hc3NlcnQoXG4gICAgICAgIHRocm93biA9PT0gdHJ1ZVxuICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byB0aHJvdyAnICsgZXhwZWN0ZWRUaHJvd24gKyBhY3R1YWxseUdvdFxuICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byBub3QgdGhyb3cgJyArIGV4cGVjdGVkVGhyb3duICsgYWN0dWFsbHlHb3RcbiAgICAgICwgKGRlc2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ICAgICAgbmFtZSA9IG5hbWUuc3Vic3RyKDEsIG5hbWUubGVuZ3RoIC0gMik7XG4gICAgICBuYW1lID0gY3R4LnN0eWxpemUobmFtZSwgJ25hbWUnKTtcbiAgICB9IGVsc2Uge1xuICAgICAgbmFtZSA9IG5hbWUucmVwbGFjZSgvJy9nLCBcIlxcXFwnXCIpXG4gICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cXFxcXCIvZywgJ1wiJylcbiAgICAgICAgICAgICAgICAgLnJlcGxhY2UoLyheXCJ8XCIkKS9nLCBcIidcIik7XG4gICAgICBuYW1lID0gY3R4LnN0eWxpemUobmFtZSwgJ3N0cmluZycpO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBuYW1lICsgJzogJyArIHN0cjtcbn1cblxuXG5mdW5jdGlvbiByZWR1Y2VUb1NpbmdsZVN0cmluZyhvdXRwdXQsIGJhc2UsIGJyYWNlcykge1xuICB2YXIgbnVtTGluZXNFc3QgPSAwO1xuICB2YXIgbGVuZ3RoID0gb3V0cHV0LnJlZHVjZShmdW5jdGlvbihwcmV2LCBjdXIpIHtcbiAgICBudW1MaW5lc0VzdCsrO1xuICAgIGlmIChjdXIuaW5kZXhPZignXFxuJykgPj0gMCkgbnVtTGluZXNFc3QrKztcbiAgICByZXR1cm4gcHJldiArIGN1ci5sZW5ndGggKyAxO1xuICB9LCAwKTtcblxuICBpZiAobGVuZ3RoID4gNjApIHtcbiAgICByZXR1cm4gYnJhY2VzWzBdICtcbiAgICAgICAgICAgKGJhc2UgPT09ICcnID8gJycgOiBiYXNlICsgJ1xcbiAnKSArXG4gICAgICAgICAgICcgJyArXG4gICAgICAgICAgIG91dHB1dC5qb2luKCcsXFxuICAnKSArXG4gICAgICAgICAgICcgJyArXG4gICAgICAgICAgIGJyYWNlc1sxXTtcbiAgfVxuXG4gIHJldHVybiBicmFjZXNbMF0gKyBiYXNlICsgJyAnICsgb3V0cHV0LmpvaW4oJywgJykgKyAnICcgKyBicmFjZXNbMV07X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pZiB0aGF0IGRvZXMgbm90IHBhc3MgaXQgd2lsbFxuICogdXNlIHRoZSB1c2VyIGRlZmluZWQgY3VzdG9tIHRlc3RzLlxuICpcbiAqIGBgYGpzXG4gKiBhc3NlcnQobGliLnRlc3QoJzEnLCAnaW50JykpO1xuICogYXNzZXJ0KGxpYi50ZXN0KCd5ZXMnLCAnYmxuJykpO1xuICogYGBgXG4gKlxuICogQHBhcmFtIHtNaXhlZH0gb2JqZWN0XG4gKiBAcGFyYW0ge1N0cmluZ30gdHlwZVxuICogQHJldHVybiB7Qm9vbGVhbn0gcmVzdWx0XG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbkxpYnJhcnkucHJvdG90eXBlLnRlc3QgPSBmdW5jdGlvbiAob2JqLCB0eXBlKSB7XG4gIGlmICh0eXBlID09PSBnZXRUeXBlKG9iaikpIHJldHVybiB0cnVlO1xuICB2YXIgdGVzdCA9IHRoaXMudGVzdHNbdHlwZV07XG5cbiAgaWYgKHRlc3QgJiYgJ3JlZ2V4cCcgPT09IGdldFR5cGUodGVzdCkpIHtcbiAgICByZXR1cm4gdGVzdC50ZXN0KG9iaik7XG4gIH0gZWxzZSBpZiAodGVzdCAmJiAnZnVuY3Rpb24nID09PSBnZXRUeXBlKHRlc3QpKSB7XG4gICAgcmV0dXJuIHRlc3Qob2JqKTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgUmVmZXJlbmNlRXJyb3IoJ1R5cGUgdGVzdCBcIicgKyB0eXBlICsgJ1wiIG5vdCBkZWZpbmVkIG9yIGludmFsaWQuJyk7XG4gIH1cbn07XG4iXX0=
@@ -4,6 +4,7 @@
4
4
  text-decoration: none
5
5
  color: map-get($black, light)
6
6
  text-align: left
7
+ transition: box-shadow 0.15s
7
8
 
8
9
  &.with-submenu
9
10
  position: relative
@@ -18,11 +19,11 @@
18
19
  color: rgba(0, 0, 0, 0.3)
19
20
 
20
21
  &:hover
21
- box-shadow: 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset
22
+ box-shadow: 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset, 0px 2px 0px 0px rgba(255, 255, 255, 0.1) inset
22
23
  text-decoration: none
23
24
 
24
25
  &:active
25
- box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1) inset
26
+ box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1) inset, 0px -2px 0px 0px rgba(255, 255, 255, 0.1) inset
26
27
  text-decoration: none
27
28
 
28
29
  // TODO: Done this way, these properties are not mutex
@@ -36,12 +37,15 @@
36
37
  =button-color($color)
37
38
  background-color: $color
38
39
 
40
+ &.open
41
+ background-color: darken($color, 5%)
42
+
39
43
  @if lightness($color) > 75%
40
44
  color: map-get($black, lighter)
41
45
  @else
42
46
  color: white
43
47
 
44
- @if $color == $yellow
48
+ @if $color == map-get($colors, yellow)
45
49
  color: map-get($black, lighter)
46
50
 
47
51
  @if $color == transparent
@@ -62,19 +66,82 @@
62
66
  left: 1/2 * $size * $size * map-get($rootElement, paddingH)
63
67
  right: -1/2 * $size * $size * map-get($rootElement, paddingH)
64
68
 
69
+ &.open
70
+ ul
71
+ display: block
72
+
65
73
  ul
66
- padding:
67
- top: $size * $size * map-get($rootElement, paddingV)
68
- +list-unstyled
69
- margin-bottom: 0
74
+ +button-dropdown($size)
70
75
 
71
76
  li
72
- +root-element($size)
73
77
  padding:
74
78
  left: 0
75
79
  right: 0
76
80
  margin:
77
81
  bottom: 0
82
+ font-size: 0.9rem * $size
83
+ color: $default-font-color
78
84
 
79
85
  a
80
86
  color: inherit
87
+
88
+ + .button-dropdown + ul
89
+ // Button with dropdown
90
+ +button-dropdown($size)
91
+ position: static
92
+ margin-top: -$space + 5px
93
+
94
+ &.open
95
+ + .button-dropdown + ul
96
+ display: block
97
+
98
+ li
99
+ font-size: 0.9rem * $size
100
+ color: $default-font-color
101
+
102
+ a
103
+ color: inherit
104
+
105
+ =button-dropdown($size)
106
+ +list-unstyled
107
+ +root-element($size)
108
+ display: none
109
+ padding:
110
+ left: $size * $size * map-get($rootElement, paddingH)
111
+ right: $size * $size * map-get($rootElement, paddingH)
112
+ position: absolute
113
+ top: 100%
114
+ left: -1px
115
+ margin-top: 5px
116
+ right: -$space
117
+ border-color: map-get($white, darker)
118
+ background: white
119
+ z-index: 10
120
+
121
+ =button-group-default($color, $size)
122
+ +list-unstyled
123
+
124
+ li
125
+ color: inherit
126
+ display: inline-block
127
+
128
+ > a, > button, > input
129
+ +button($color, $size)
130
+ color: inherit
131
+ text-decoration: inherit
132
+
133
+ &:not(:first-child):not(:last-child)
134
+ > a, > button, > input
135
+ border-radius: 0
136
+ border-left: 0
137
+
138
+ &:first-child
139
+ > a, > button, > input
140
+ border-top-right-radius: 0
141
+ border-bottom-right-radius: 0
142
+
143
+ &:last-child
144
+ > a, > button, > input
145
+ border-top-left-radius: 0
146
+ border-bottom-left-radius: 0
147
+ border-left: 0
@@ -0,0 +1,4 @@
1
+ =hr-default
2
+ border: 0
3
+ top: 2px solid $default-font-color
4
+
@@ -1,4 +1,4 @@
1
- =label-default($background-color: $blue)
1
+ =label-default($background-color: map-get($colors, blue))
2
2
  +root-element
3
3
  background: $background-color
4
4
  font-size: 0.8rem
@@ -21,7 +21,7 @@
21
21
  @if (lightness($background) < 75%)
22
22
  color: white
23
23
  @else
24
- color: map-get($black, lighter)
24
+ color: $default-font-color
25
25
 
26
26
  h1
27
27
  margin-bottom: 0
@@ -146,7 +146,7 @@
146
146
  padding:
147
147
  top: $space/4
148
148
  bottom: $space/4
149
- color: map-get($black, light)
149
+ color: $default-font-color
150
150
 
151
151
  &:hover
152
152
  color: rgba(0, 0, 0, 0.85)
@@ -8,7 +8,7 @@
8
8
  pointer-events: none
9
9
 
10
10
  .status-bar_status
11
- +label($yellow)
11
+ +label(map-get($colors, yellow))
12
12
  color: black
13
13
  text-align: center
14
14
  margin: 5px auto
@@ -22,13 +22,13 @@
22
22
  animation-name: fadeInDown
23
23
 
24
24
  &[data-type="success"]
25
- background-color: $green
25
+ background-color: map-get($colors, green)
26
26
  color: white
27
27
 
28
28
  &[data-type="error"]
29
- background-color: $red
29
+ background-color: map-get($colors, red)
30
30
  color: white
31
31
 
32
32
  &[data-type="info"]
33
- background-color: $blue
33
+ background-color: map-get($colors, blue)
34
34
  color: white
@@ -8,5 +8,5 @@
8
8
  z-index: 999999
9
9
 
10
10
  .status
11
- +label($yellow)
11
+ +label(map-get($colors, yellow))
12
12
  text-align: center
@@ -1,23 +1,25 @@
1
1
  =tile-default ($color: map-get($gray, dark))
2
2
  +root-element
3
+ +hr
3
4
  display: block
4
5
  text-decoration: none
5
-
6
+ border:
7
+ left: 1px solid map-get($white, darker)
8
+ right: 1px solid map-get($white, darker)
9
+ bottom: 1px solid map-get($white, darker)
10
+ background: white
11
+ padding: $space/2
12
+ color: $default-font-color
13
+
6
14
  &:hover
7
15
  text-decoration: none
8
16
 
9
17
  @if $color == transparent
10
18
  box-shadow: 0px 0px 0px transparent
11
19
 
12
- padding-bottom: 0
13
20
  overflow: hidden
14
21
  margin-bottom: $space
15
- border-top: 3px solid $color
16
-
17
- > h1, > h2, > h3, > h4, > h5
18
- color: $color
19
- @if $color == transparent
20
- color: black
22
+ +tile-color($color)
21
23
 
22
24
  h1
23
25
  font-size: 1.15rem
@@ -27,3 +29,14 @@
27
29
  color: gray
28
30
  font-weight: bold
29
31
  float: right
32
+
33
+ > *:last-child
34
+ margin-bottom: 0
35
+
36
+ =tile-color($color)
37
+ border-top-color: $color
38
+
39
+ > h1, > h2, > h3, > h4, > h5
40
+ color: $color
41
+ @if $color == transparent
42
+ color: black
@@ -50,7 +50,7 @@
50
50
  transform: translateY(-8px)
51
51
  transition: transform 0.25s
52
52
 
53
- =tooltip_trigger-default($background-color: $blue)
53
+ =tooltip_trigger-default($background-color: map-get($colors, blue))
54
54
  position: relative
55
55
  display: inline-block
56
56
  cursor: pointer
@@ -21,13 +21,13 @@ p
21
21
 
22
22
  a
23
23
  text-decoration: none
24
- color: $blue
24
+ color: map-get($colors, blue)
25
25
 
26
26
  &:hover
27
27
  text-decoration: underline
28
28
 
29
29
  =pre-default
30
- color: darken($blue, 25%)
30
+ color: darken(map-get($colors, blue), 25%)
31
31
  +border-radius($space/5)
32
32
  padding: ($space/5)
33
33
  font-family: monospace
@@ -9,3 +9,11 @@ iframe
9
9
  border: 0
10
10
  padding: 15px
11
11
  margin-bottom: 25px
12
+
13
+ body
14
+ display: flex
15
+ min-height: 100vh
16
+ flex-direction: column
17
+
18
+ =above-footer
19
+ flex: 1
@@ -8,10 +8,10 @@
8
8
  @import ../components/_alerts
9
9
  @import ../components/_buttons
10
10
  @import ../components/_forms
11
+ @import ../components/_hr
11
12
  @import ../components/_images
12
13
  @import ../components/_labels
13
14
  @import ../components/_modals
14
15
  @import ../components/_nav
15
16
  @import ../components/_progress
16
17
  @import ../components/_tables
17
- @import ../components/_tiles
@@ -9,4 +9,5 @@
9
9
  @import ../components/_modals
10
10
  @import ../components/_notifications
11
11
  @import ../components/_tabs
12
+ @import ../components/_tiles
12
13
  @import ../components/_tooltips
@@ -32,7 +32,15 @@ $grid-gutter: 15px
32
32
  align-items: stretch
33
33
  flex-wrap: wrap
34
34
 
35
- =set-column($columns, $offset, $ignore-auto-breakpoints: false)
35
+ =push($columns)
36
+ @media screen and (min-width: $desktop)
37
+ margin-right: percentage($columns/$grid-columns)
38
+
39
+ =pull($columns)
40
+ @media screen and (min-width: $desktop)
41
+ margin-left: percentage($columns/$grid-columns)
42
+
43
+ =set-column($columns, $pull, $push)
36
44
  width: 100%
37
45
  display: block
38
46
  margin-left: 0
@@ -41,25 +49,27 @@ $grid-gutter: 15px
41
49
  width: calc(#{percentage($columns/$grid-columns)} - #{$grid-gutter})
42
50
  clear: none
43
51
 
44
- @if $offset > 0
45
- @media screen and (min-width: $desktop)
46
- margin-left: percentage($offset/$grid-columns)
52
+ @if $pull > 0
53
+ +pull($pull)
54
+
55
+ @if $push > 0
56
+ +push($push)
47
57
 
48
- =column($type: 12, $offset: 0)
49
- +set-column(12, 0, true)
58
+ =column($type: 12, $pull: 0, $push: 0)
59
+ +set-column(12, 0, 0)
50
60
  @if $type == "half"
51
61
  @media screen and (min-width: $tablet)
52
- +set-column($grid-columns/2, 0, true)
62
+ +set-column($grid-columns/2, 0, 0)
53
63
  @else if $type == "third"
54
64
  @media screen and (min-width: $phablet)
55
- +set-column($grid-columns/2, 0, true)
65
+ +set-column($grid-columns/2, 0, 0)
56
66
  @media screen and (min-width: $tablet)
57
- +set-column($grid-columns/3, 0, true)
67
+ +set-column($grid-columns/3, 0, 0)
58
68
  @else if $type == "twothirds"
59
69
  @media screen and (min-width: $phablet)
60
- +set-column($grid-columns/2, 0, true)
70
+ +set-column($grid-columns/2, 0, 0)
61
71
  @media screen and (min-width: $tablet)
62
- +set-column(($grid-columns * 2/3), 0, true)
72
+ +set-column(($grid-columns * 2/3), 0, 0)
63
73
  @else
64
74
  @media screen and (min-width: $tablet)
65
- +set-column($type, $offset)
75
+ +set-column($type, $pull, $push)