forever_style_guide 3.0.40 → 3.0.41

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: f148b43e8a6d15d9f772f706aebb07a761a35e0f
4
- data.tar.gz: a112254d1e1e82cb0bcc86f9f72041a8b7dc2ddf
3
+ metadata.gz: 9aea47aa9023eb048cf26e7a5bc2766476ac6b06
4
+ data.tar.gz: 415d4320b71cd34b9c1d35bfe4637463d7e0e241
5
5
  SHA512:
6
- metadata.gz: b6436dc6b331e39f6789ea057952082abc4da9092f400b8adf77507dcadd73171679e81838bbe74a97bdc418082e67f4fdfeb058b584fef22800321f9647c7ac
7
- data.tar.gz: 85b8d06633020d9775af38779d8890e6d2a27449c4cadbb156258975eb6339c5a021be8dc4c0cb22377a3c328b6c2a321819e07fd8a8f219e043d0ae1a4ebeaf
6
+ metadata.gz: 7e5953baab467b133c22d2c23e415b04a8ae9c4bb72fe912aa87c96a37041f515daa1c778809af4569062e1c08bdec56fde8cd5da4264c686066e11c45024a23
7
+ data.tar.gz: d63a26232db25a3c1d43980c015ca3016910828fcad783b9f801766c1f2d3558886d792bcbbde3d562a681cbabe5e0bed10b8a0fc2ac5699e53c723ff41bb253
@@ -2,7 +2,6 @@
2
2
  @import "fonts";
3
3
  @import "breakpoints";
4
4
  @import "variables";
5
- @import "icons";
6
5
  @import "mixins";
7
6
  @import "effects";
8
7
  @import "layout";
@@ -23,19 +23,6 @@ $color-nav-hover: color('secondary');
23
23
  transition: $transition-property $transition-time $method;
24
24
  }
25
25
 
26
- @mixin circle($diameter, $color) {
27
- width: $diameter;
28
- height: $diameter;
29
- border-radius: 50%;
30
- background-color: $color;
31
- }
32
-
33
- @mixin link_visited_hover_active {
34
- &:link, &:visited, &:hover, &:active {
35
- @content;
36
- }
37
- }
38
-
39
26
  @mixin center_with_flexbox ($flex-align, $justify-content) {
40
27
  display: -webkit-box;
41
28
  display: -webkit-flex;
@@ -6,13 +6,10 @@
6
6
  @import "footer";
7
7
  @import "hero";
8
8
  @import "hero-block";
9
- @import "hero-blur";
10
- @import "hero-product";
11
9
  @import "hero_simple";
12
10
  @import "impersonation_banner";
13
11
  @import "input_groups";
14
12
  @import "list";
15
- @import "list-toggle";
16
13
  @import "nav";
17
14
  @import "nav-dropdowns";
18
15
  @import "nav-dropdowns-account";
@@ -21,7 +18,6 @@
21
18
  @import "nav-icons";
22
19
  @import "nav-item-list";
23
20
  @import "nav-offcanvas";
24
- @import "popover";
25
21
  @import "progress";
26
22
  @import "promo_banner";
27
23
  @import "responsive_utilities";
@@ -30,4 +26,3 @@
30
26
  @import "hero_simple";
31
27
  @import "modal";
32
28
  @import "signin";
33
- @import "switch";
@@ -1,3 +1,3 @@
1
1
  module ForeverStyleGuide
2
- VERSION = "3.0.40"
2
+ VERSION = "3.0.41"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forever_style_guide
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.40
4
+ version: 3.0.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas McClay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-27 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -217,12 +217,8 @@ files:
217
217
  - app/assets/images/forever_style_guide/single-product.jpg
218
218
  - app/assets/images/forever_style_guide/valet-logo-sm.png
219
219
  - app/assets/images/forever_style_guide/valet-logo.png
220
- - app/assets/javascripts/forever_style_guide/account-popover.js
221
220
  - app/assets/javascripts/forever_style_guide/application.js
222
- - app/assets/javascripts/forever_style_guide/hero-blur.js
223
- - app/assets/javascripts/forever_style_guide/list-toggle.js
224
221
  - app/assets/javascripts/forever_style_guide/offcanvas.js
225
- - app/assets/javascripts/forever_style_guide/popover.js
226
222
  - app/assets/stylesheets/forever_style_guide/_all.scss
227
223
  - app/assets/stylesheets/forever_style_guide/base/_all.scss
228
224
  - app/assets/stylesheets/forever_style_guide/base/_bootstrap_reset.scss
@@ -234,7 +230,6 @@ files:
234
230
  - app/assets/stylesheets/forever_style_guide/globals/_colors.scss
235
231
  - app/assets/stylesheets/forever_style_guide/globals/_effects.scss
236
232
  - app/assets/stylesheets/forever_style_guide/globals/_fonts.scss
237
- - app/assets/stylesheets/forever_style_guide/globals/_icons.scss
238
233
  - app/assets/stylesheets/forever_style_guide/globals/_layout.scss
239
234
  - app/assets/stylesheets/forever_style_guide/globals/_mixins.scss
240
235
  - app/assets/stylesheets/forever_style_guide/globals/_variables.scss
@@ -246,13 +241,10 @@ files:
246
241
  - app/assets/stylesheets/forever_style_guide/modules/_fa-feature_bullet.scss
247
242
  - app/assets/stylesheets/forever_style_guide/modules/_footer.scss
248
243
  - app/assets/stylesheets/forever_style_guide/modules/_hero-block.scss
249
- - app/assets/stylesheets/forever_style_guide/modules/_hero-blur.scss
250
- - app/assets/stylesheets/forever_style_guide/modules/_hero-product.scss
251
244
  - app/assets/stylesheets/forever_style_guide/modules/_hero.scss
252
245
  - app/assets/stylesheets/forever_style_guide/modules/_hero_simple.scss
253
246
  - app/assets/stylesheets/forever_style_guide/modules/_impersonation_banner.scss
254
247
  - app/assets/stylesheets/forever_style_guide/modules/_input_groups.scss
255
- - app/assets/stylesheets/forever_style_guide/modules/_list-toggle.scss
256
248
  - app/assets/stylesheets/forever_style_guide/modules/_list.scss
257
249
  - app/assets/stylesheets/forever_style_guide/modules/_modal.scss
258
250
  - app/assets/stylesheets/forever_style_guide/modules/_nav-dropdowns-account.scss
@@ -263,14 +255,12 @@ files:
263
255
  - app/assets/stylesheets/forever_style_guide/modules/_nav-item-list.scss
264
256
  - app/assets/stylesheets/forever_style_guide/modules/_nav-offcanvas.scss
265
257
  - app/assets/stylesheets/forever_style_guide/modules/_nav.scss
266
- - app/assets/stylesheets/forever_style_guide/modules/_popover.scss
267
258
  - app/assets/stylesheets/forever_style_guide/modules/_progress.scss
268
259
  - app/assets/stylesheets/forever_style_guide/modules/_promo_banner.scss
269
260
  - app/assets/stylesheets/forever_style_guide/modules/_responsive_utilities.scss
270
261
  - app/assets/stylesheets/forever_style_guide/modules/_select.scss
271
262
  - app/assets/stylesheets/forever_style_guide/modules/_shame.scss
272
263
  - app/assets/stylesheets/forever_style_guide/modules/_signin.scss
273
- - app/assets/stylesheets/forever_style_guide/modules/_switch.scss
274
264
  - app/assets/stylesheets/forever_style_guide/utils/_color-utils.scss
275
265
  - app/assets/stylesheets/forever_style_guide/utils/_font-utils.scss
276
266
  - app/assets/stylesheets/forever_style_guide/utils/_logger.scss
@@ -316,9 +306,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
306
  version: '0'
317
307
  requirements: []
318
308
  rubyforge_project:
319
- rubygems_version: 2.4.6
309
+ rubygems_version: 2.2.2
320
310
  signing_key:
321
311
  specification_version: 4
322
312
  summary: A live style guide and component API for the Forever brand
323
313
  test_files: []
324
- has_rdoc:
@@ -1,108 +0,0 @@
1
- // an 'accounPopover' namespace for additional popover functionality.
2
- var accountPopover = (function () {
3
- /**
4
- Apply 'danger', 'warning' classes to the
5
- popover's progress bar and upgrade button.
6
-
7
- Example
8
-
9
- ```javascript
10
- _addStateClasses($popoverContainer, 'danger');
11
- ```
12
-
13
- @private
14
- */
15
- var _addStateClasses = function (container, state) {
16
- container.find(".account-popover-link-text").addClass("account-popover-link-" + state);
17
- container.find(".account-popover-storage-upgrade .btn").addClass("btn-" + state);
18
- container.find(".progress-bar").addClass("progress-bar-" + state);
19
- };
20
-
21
- /**
22
- Removes the 'danger' and 'warning' classes to
23
- the popover's progress bar and upgrade button.
24
-
25
- Example
26
-
27
- ```javascript
28
- _resetClasses($popoverContainer);
29
- ```
30
-
31
- @private
32
- */
33
- var _resetClasses = function (container) {
34
- container.find(".account-popover-link-danger").removeClass("account-popover-link-danger");
35
- container.find(".account-popover-link-warning").removeClass("account-popover-link-warning");
36
- container.find(".account-popover-storage-upgrade .btn").removeClass("btn-danger btn-warning");
37
- container.find(".progress-bar").removeClass("progress-bar-danger progress-bar-warning");
38
- };
39
-
40
- /**
41
- Sets the user's storage data in the account
42
- popover.
43
-
44
- Example
45
-
46
- ```javascript
47
- var storage = {
48
- membership_type: "Intro Member",
49
- percent_used: "35%",
50
- total_storage: "3GB"
51
- };
52
-
53
- accountPopover.setAccountStorage(storage)
54
- ```
55
-
56
- @public
57
- */
58
- var setAccountStorage = function (storage) {
59
- if (!storage.membership_type || !storage.percent_used || !storage.total_storage) {
60
- return console.warn("argument storage must contain the following keys: 'membership_type', 'percent_used', 'total_storage'");
61
- }
62
-
63
- var container = $(".account-popover-storage");
64
- var percentAsInt = parseInt(storage.percent_used);
65
-
66
- _resetClasses(container);
67
-
68
- container.find(".account-popover-membership_type").html(storage.membership_type);
69
- container.find(".account-popover-percent_used, .progress-label").html(storage.percent_used);
70
- container.find(".account-popover-total_storage").html(storage.total_storage);
71
- container.find(".progress-bar").attr("style", "width: " + storage.percent_used + ";");
72
-
73
- if (percentAsInt >= 100) {
74
- _addStateClasses(container, "danger");
75
- container.find(".account-popover-storage-upgrade").show();
76
- } else if (percentAsInt >= 90) {
77
- _addStateClasses(container, "warning");
78
- } else {
79
- container.find(".account-popover-storage-upgrade").hide();
80
- }
81
- };
82
-
83
- return {
84
- setAccountStorage: setAccountStorage
85
- };
86
- })();
87
-
88
- // Trigger account popovers
89
- $(function () {
90
- $('[data-toggle="popover-desktop"]').popover({
91
- html: true,
92
- content: function () {
93
- return $('.account-popover').html();
94
- },
95
- template: '<div class="popover account-popover hidden-sm hidden-xs"><div class="arrow"></div><div class="popover-content"></div></div>',
96
- container: '.account-popover-container',
97
- placement: 'bottom'
98
- })
99
- $('[data-toggle="popover-mobile"]').popover({
100
- html: true,
101
- content: function () {
102
- return $('.account-popover').html();
103
- },
104
- template: '<div class="popover account-popover account-popover-mobile hidden-md hidden-lg"><div class="arrow"></div><div class="popover-content"></div></div>',
105
- container: '.account-popover-container-mobile',
106
- placement: 'bottom'
107
- })
108
- });
@@ -1,439 +0,0 @@
1
- /**
2
- * Blur.js (jQuery module)
3
- *
4
- * @see {@link https://github.com/jakiestfu/Blur.js|GitHub}
5
- * @see {@link http://blurjs.com/}
6
- * @author Jacob Kelley <jakie8@gmail.com>
7
- * @license MIT
8
- */
9
-
10
- (function (define) {
11
- define(['jquery'], function ($) {
12
- $.fn.blurjs = function (options) {
13
- var canvas = document.createElement('canvas');
14
- var isCached = false;
15
- var selector = ($(this).selector).replace(/[^a-zA-Z0-9]/g, "");
16
- if(!canvas.getContext) {
17
- return;
18
- }
19
- options = $.extend({
20
- source: 'body',
21
- radius: 5,
22
- overlay: '',
23
- offset: {
24
- x: 0,
25
- y: 0
26
- },
27
- optClass: '',
28
- cache: false,
29
- cacheKeyPrefix: 'blurjs-',
30
- draggable: false,
31
- debug: false
32
- }, options);
33
- // Stackblur, courtesy of Mario Klingemann: http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html
34
- var mul_table = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];
35
- var shg_table = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];
36
-
37
- function stackBlurCanvasRGB(a, b, c, d, f, g) {
38
- if(isNaN(g) || g < 1) return;
39
- g |= 0;
40
- var h = a.getContext("2d");
41
- var j;
42
- try {
43
- try {
44
- j = h.getImageData(b, c, d, f)
45
- } catch(e) {
46
- try {
47
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
48
- j = h.getImageData(b, c, d, f)
49
- } catch(e) {
50
- alert("Cannot access local image");
51
- throw new Error("unable to access local image data: " + e);
52
- }
53
- }
54
- } catch(e) {
55
- alert("Cannot access image");
56
- throw new Error("unable to access image data: " + e);
57
- }
58
- var k = j.data;
59
- var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, r_out_sum, g_out_sum, b_out_sum, r_in_sum, g_in_sum, b_in_sum, pr, pg, pb, rbs;
60
- var l = g + g + 1;
61
- var m = d << 2;
62
- var n = d - 1;
63
- var o = f - 1;
64
- var q = g + 1;
65
- var r = q * (q + 1) / 2;
66
- var s = new BlurStack();
67
- var t = s;
68
- for(i = 1; i < l; i++) {
69
- t = t.next = new BlurStack();
70
- if(i == q) var u = t
71
- }
72
- t.next = s;
73
- var v = null;
74
- var w = null;
75
- yw = yi = 0;
76
- var z = mul_table[g];
77
- var A = shg_table[g];
78
- for(y = 0; y < f; y++) {
79
- r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0;
80
- r_out_sum = q * (pr = k[yi]);
81
- g_out_sum = q * (pg = k[yi + 1]);
82
- b_out_sum = q * (pb = k[yi + 2]);
83
- r_sum += r * pr;
84
- g_sum += r * pg;
85
- b_sum += r * pb;
86
- t = s;
87
- for(i = 0; i < q; i++) {
88
- t.r = pr;
89
- t.g = pg;
90
- t.b = pb;
91
- t = t.next
92
- }
93
- for(i = 1; i < q; i++) {
94
- p = yi + ((n < i ? n : i) << 2);
95
- r_sum += (t.r = (pr = k[p])) * (rbs = q - i);
96
- g_sum += (t.g = (pg = k[p + 1])) * rbs;
97
- b_sum += (t.b = (pb = k[p + 2])) * rbs;
98
- r_in_sum += pr;
99
- g_in_sum += pg;
100
- b_in_sum += pb;
101
- t = t.next
102
- }
103
- v = s;
104
- w = u;
105
- for(x = 0; x < d; x++) {
106
- k[yi] = (r_sum * z) >> A;
107
- k[yi + 1] = (g_sum * z) >> A;
108
- k[yi + 2] = (b_sum * z) >> A;
109
- r_sum -= r_out_sum;
110
- g_sum -= g_out_sum;
111
- b_sum -= b_out_sum;
112
- r_out_sum -= v.r;
113
- g_out_sum -= v.g;
114
- b_out_sum -= v.b;
115
- p = (yw + ((p = x + g + 1) < n ? p : n)) << 2;
116
- r_in_sum += (v.r = k[p]);
117
- g_in_sum += (v.g = k[p + 1]);
118
- b_in_sum += (v.b = k[p + 2]);
119
- r_sum += r_in_sum;
120
- g_sum += g_in_sum;
121
- b_sum += b_in_sum;
122
- v = v.next;
123
- r_out_sum += (pr = w.r);
124
- g_out_sum += (pg = w.g);
125
- b_out_sum += (pb = w.b);
126
- r_in_sum -= pr;
127
- g_in_sum -= pg;
128
- b_in_sum -= pb;
129
- w = w.next;
130
- yi += 4
131
- }
132
- yw += d
133
- }
134
- for(x = 0; x < d; x++) {
135
- g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0;
136
- yi = x << 2;
137
- r_out_sum = q * (pr = k[yi]);
138
- g_out_sum = q * (pg = k[yi + 1]);
139
- b_out_sum = q * (pb = k[yi + 2]);
140
- r_sum += r * pr;
141
- g_sum += r * pg;
142
- b_sum += r * pb;
143
- t = s;
144
- for(i = 0; i < q; i++) {
145
- t.r = pr;
146
- t.g = pg;
147
- t.b = pb;
148
- t = t.next
149
- }
150
- yp = d;
151
- for(i = 1; i <= g; i++) {
152
- yi = (yp + x) << 2;
153
- r_sum += (t.r = (pr = k[yi])) * (rbs = q - i);
154
- g_sum += (t.g = (pg = k[yi + 1])) * rbs;
155
- b_sum += (t.b = (pb = k[yi + 2])) * rbs;
156
- r_in_sum += pr;
157
- g_in_sum += pg;
158
- b_in_sum += pb;
159
- t = t.next;
160
- if(i < o) {
161
- yp += d
162
- }
163
- }
164
- yi = x;
165
- v = s;
166
- w = u;
167
- for(y = 0; y < f; y++) {
168
- p = yi << 2;
169
- k[p] = (r_sum * z) >> A;
170
- k[p + 1] = (g_sum * z) >> A;
171
- k[p + 2] = (b_sum * z) >> A;
172
- r_sum -= r_out_sum;
173
- g_sum -= g_out_sum;
174
- b_sum -= b_out_sum;
175
- r_out_sum -= v.r;
176
- g_out_sum -= v.g;
177
- b_out_sum -= v.b;
178
- p = (x + (((p = y + q) < o ? p : o) * d)) << 2;
179
- r_sum += (r_in_sum += (v.r = k[p]));
180
- g_sum += (g_in_sum += (v.g = k[p + 1]));
181
- b_sum += (b_in_sum += (v.b = k[p + 2]));
182
- v = v.next;
183
- r_out_sum += (pr = w.r);
184
- g_out_sum += (pg = w.g);
185
- b_out_sum += (pb = w.b);
186
- r_in_sum -= pr;
187
- g_in_sum -= pg;
188
- b_in_sum -= pb;
189
- w = w.next;
190
- yi += d
191
- }
192
- }
193
- h.putImageData(j, b, c)
194
- }
195
-
196
- function BlurStack() {
197
- this.r = 0;
198
- this.g = 0;
199
- this.b = 0;
200
- this.a = 0;
201
- this.next = null
202
- }
203
- return this.each(function () {
204
- var $glue = $(this);
205
- var $source = $(options.source);
206
- var formattedSource = ($source.css('backgroundImage')).replace(/"/g, "").replace(/url\(|\)$/ig, "");
207
- ctx = canvas.getContext('2d');
208
- tempImg = new Image();
209
- tempImg.onload = function () {
210
- if(!isCached) {
211
- canvas.style.display = "none";
212
- canvas.width = tempImg.width;
213
- canvas.height = tempImg.height;
214
- ctx.drawImage(tempImg, 0, 0);
215
- stackBlurCanvasRGB(canvas, 0, 0, canvas.width, canvas.height, options.radius);
216
-
217
- ctx.beginPath();
218
- ctx.rect(0, 0, tempImg.width, tempImg.width);
219
-
220
- if(options.overlay != false) {
221
- ctx.fillStyle = options.overlay;
222
- }
223
- // customer overlay via attribute
224
- if ($glue.attr("data-hero-overlay")) {
225
- options.overlay = $glue.attr("data-hero-overlay");
226
- ctx.fillStyle = options.overlay;
227
- }
228
-
229
- ctx.fill();
230
-
231
- var blurredData = canvas.toDataURL();
232
- if(options.cache) {
233
- try {
234
- if(options.debug) {
235
- console.log('Cache Set');
236
- }
237
- localStorage.setItem(options.cacheKeyPrefix + selector + '-' + formattedSource + '-data-image', blurredData);
238
- } catch(e) {
239
- console.log(e);
240
- }
241
- }
242
- } else {
243
- var blurredData = tempImg.src;
244
- }
245
- var attachment = $source.css('backgroundAttachment');
246
- var position = (attachment == 'fixed') ? '' : '-' + (($glue.offset().left) - ($source.offset().left) - (options.offset.x)) + 'px -' + (($glue.offset().top) - ($source.offset().top) - (options.offset.y)) + 'px';
247
- $glue.css({
248
- 'background-image': 'url("' + blurredData + '")',
249
- 'background-repeat': $source.css('backgroundRepeat'),
250
- 'background-position': position,
251
- 'background-attachment': attachment
252
- });
253
- if(options.optClass != false) {
254
- $glue.addClass(options.optClass);
255
- }
256
- if(options.draggable) {
257
- $glue.css({
258
- 'background-attachment': 'fixed',
259
- 'background-position': '0 0'
260
- });
261
- $glue.draggable();
262
- }
263
-
264
- $glue.attr({
265
- "data-hero-width" : canvas.width,
266
- "data-hero-height" : canvas.height,
267
- "data-hero-overlay": options.overlay
268
- });
269
- $glue.trigger( "loaded", canvas);
270
- };
271
- Storage.prototype.cacheChecksum = function (opts) {
272
- var newData = '';
273
- for(var key in opts) {
274
- var obj = opts[key];
275
- if(obj.toString() == '[object Object]') {
276
- newData += ((obj.x).toString() + (obj.y).toString() + ",").replace(/[^a-zA-Z0-9]/g, "");
277
- } else {
278
- newData += (obj + ",").replace(/[^a-zA-Z0-9]/g, "");
279
- }
280
- }
281
- var originalData = this.getItem(options.cacheKeyPrefix + selector + '-' + formattedSource + '-options-cache');
282
- if(originalData != newData) {
283
- this.removeItem(options.cacheKeyPrefix + selector + '-' + formattedSource + '-options-cache');
284
- this.setItem(options.cacheKeyPrefix + selector + '-' + formattedSource + '-options-cache', newData);
285
- if(options.debug) {
286
- console.log('Settings Changed, Cache Emptied');
287
- }
288
- }
289
- };
290
- var cachedData = null;
291
- if(options.cache) {
292
- localStorage.cacheChecksum(options);
293
- cachedData = localStorage.getItem(options.cacheKeyPrefix + selector + '-' + formattedSource + '-data-image');
294
- }
295
- if(cachedData != null) {
296
- if(options.debug) {
297
- console.log('Cache Used');
298
- }
299
- isCached = true;
300
- tempImg.src = (cachedData);
301
- canvas.width = tempImg.width;
302
- canvas.height = tempImg.height;
303
- } else {
304
- if(options.debug) {
305
- console.log('Source Used');
306
- }
307
- tempImg.src = formattedSource;
308
- }
309
- });
310
- };
311
- return $; // return jQuery
312
- });
313
- })(
314
- typeof define === 'function' && define.amd
315
- ? define
316
- : function (r, factory) { factory(jQuery);
317
- }
318
- );
319
-
320
-
321
- (function UpdateHeroModule (elem) {
322
-
323
- // percentage of 'x' position of center of focus for bg scaling
324
- var xFocus = 0.8;
325
- var yFocus = 0.5;
326
-
327
- this.blurGenerated = false;
328
- this.windowWidth = $(window).width();
329
-
330
- this.updateHeroPosition = function updateHeroPosition() {
331
- var $source = $('.hero-blur');
332
- var $blur = $(".hero-block-blur");
333
-
334
- var imgWidth = $blur.attr('data-hero-width');
335
- var imgHeight = $blur.attr('data-hero-height');
336
- var imgScale = imgHeight / imgWidth;
337
- var heroScale = $source.outerHeight() / $source.outerWidth();
338
-
339
- // how many scaled pixels are on/off the viewport
340
- var imgOnScreenX = (imgScale / heroScale) * imgWidth;
341
- var imgOffScreenX = imgWidth - imgOnScreenX;
342
- var imgOnScreenY = (imgScale / heroScale) * imgHeight;
343
- var imgOffScreenY = imgHeight - imgOnScreenY;
344
-
345
- var viewFactorX = imgOffScreenX / imgOnScreenX;
346
- var viewFactorY = Math.abs(imgOffScreenY / imgOnScreenY);
347
-
348
- // how many actual pixels are on/off the viewport
349
- var heroOnScreenX = $source.outerWidth();
350
- var heroOffScreenX = heroOnScreenX * viewFactorX;
351
-
352
- var heroOnScreenY = $source.outerHeight();
353
- var heroOffScreenY = heroOnScreenY * viewFactorY;
354
-
355
- var offsetBlurY = $source.offset().top - $blur.offset().top;
356
- var offsetBlurX = $source.offset().left - $blur.offset().left;
357
-
358
- if (heroScale >= imgScale) {
359
- //console.log("image is wider than screen", heroOnScreenX, imgOffScreenX, heroOnScreenX, heroOffScreenX, viewFactorX, heroOnScreenY);
360
- offsetBlurX -= heroOffScreenX * xFocus;
361
- $blur.css('background-size', (heroOnScreenX + heroOffScreenX) + 'px ' + heroOnScreenY + "px");
362
- } else {
363
- //console.log("image is taller than screen", imgOnScreenY, imgOffScreenY, heroOnScreenY, heroOffScreenY, viewFactorY);
364
- $blur.css('background-size', heroOnScreenX + 'px auto');
365
- }
366
-
367
- $source.css('background-position', (xFocus * 100) + '% ' + '0%');
368
- $blur.css('background-position', (offsetBlurX) + 'px ' + (offsetBlurY) + 'px');
369
- };
370
-
371
- this.generateHeroBlur = function(done) {
372
- $('.hero-block-blur').blurjs({
373
- source: '.hero-blur',
374
- radius: 30,
375
- overlay: 'rgba(255,255,255,0.8)'
376
- }).on('loaded', function(e, canvas) {
377
- done(e, canvas);
378
- });
379
- };
380
-
381
- this.initialize = function() {
382
- $(".hero-blur").addClass('hero-blur-visible');
383
-
384
- this.generateHeroBlur(function(e, canvas) {
385
- this.blurGenerated = true;
386
- // initializes position upon load
387
- $(e.target).addClass('hero-block-blur-visible');
388
- this.updateHeroPosition();
389
- });
390
-
391
- this.updateHeroPosition();
392
- };
393
-
394
- elem.UpdateHeroModule = this;
395
- })(window);
396
-
397
- // initialize
398
- $(function() {
399
- // prevent errors on pages that do not contain a '.hero-blur' node.
400
- // prefer early return in here vs. wrapping selectors and applying
401
- // the plugin so that we don't have add $('.hero-blur').pluginName()
402
- // to all of our individual projects.
403
- if (!$(".hero-blur").length) return;
404
-
405
- // prevents a race condition where var heroOnScreenY = $source.outerHeight(); above returns an incorrect height
406
- setTimeout(function() {
407
- window.UpdateHeroModule.initialize();
408
- }, 100);
409
-
410
- // mobile images will use optimized image fallback
411
- if ($(window).width() <= 768) {
412
- $(".hero-blur").addClass('hero-blur-visible');
413
- $(".hero-block-side .hero-block-blur").addClass('hero-block-blur-visible');
414
- }
415
- });
416
-
417
-
418
- $(window).resize(function() {
419
- if (!$(".hero-blur").length) return;
420
-
421
- var updateHeroModule = window.UpdateHeroModule;
422
-
423
- // Check window width has actually changed and it's not just iOS triggering a resize event on scroll
424
- if ($(window).width() != updateHeroModule.windowWidth) {
425
- updateHeroModule.updateHeroPosition();
426
- // Update the window width for next time
427
- updateHeroModule.windowWidth = $(window).width();
428
- }
429
-
430
- // if mobile optimized image was loaded, now generate a proper blur image (mostly for local testing)
431
- if (!updateHeroModule.blurGenerated && $(window).width() >= 768) {
432
- updateHeroModule.blurGenerated = true;
433
- $(".hero-block-blur").removeClass('hero-block-blur-visible');
434
- updateHeroModule.generateHeroBlur(function(e, canvas) {
435
- $(e.target).addClass('hero-block-blur-visible');
436
- updateHeroModule.updateHeroPosition();
437
- });
438
- }
439
- });
@@ -1,46 +0,0 @@
1
- var setup_toggle_list = function () {
2
- $(".list-group-toggler").click(function (e) {
3
- e.preventDefault();
4
- $(this).next('.list-group-item-child').toggleClass("is_open");
5
- $(this).find('.list-group-toggle-trigger').toggleClass("fa-plus fa-minus");
6
- });
7
-
8
- $('.list-group-link').on('click', function (e) {
9
- e.preventDefault();
10
- if(!$(this).parent().hasClass('list-group-toggler')) {
11
-
12
- var checkBox = $(this).next("input[type='checkbox']");
13
- checkBox.prop('checked', !checkBox.prop('checked'));
14
-
15
- if(checkBox.prop('checked')){
16
- $(this).toggleClass('list-group-link-is_active');
17
- $(this).append('<i class="fa fa-times"></i>');
18
- $(this).parents('.list-group-item').addClass('is_active');
19
- }
20
- else {
21
- $(this).toggleClass('list-group-link-is_active');
22
- $(this).find('i').remove();
23
- if( !$(this).parent().parents('.list-group-item').find('input:checkbox:checked').length) {
24
- $(this).parent().parents('.list-group-item').removeClass('is_active');
25
- }
26
- }
27
-
28
- $(this).parents('form[data-listToggle]').submit();
29
- }
30
- });
31
-
32
- var activeListItems = $('.list-group-link-is_active');
33
-
34
- if ($(activeListItems).length) {
35
- $(activeListItems).append('<i class="fa fa-times"></i>');
36
- $(activeListItems).next("input[type='checkbox']").prop('checked', true);
37
- $(activeListItems).addClass('list-group-link-is_active');
38
- $(activeListItems).parents('.list-group-item-child').addClass('is_open');
39
- $(activeListItems).parents('.list-group-item')
40
- .find('.list-group-toggle-trigger.fa')
41
- .removeClass('fa-plus')
42
- .addClass('fa-minus');
43
- }
44
- };
45
- $(document).ready(setup_toggle_list);
46
- $(document).on('page:load', setup_toggle_list);
@@ -1,41 +0,0 @@
1
- $(function () {
2
- $('[data-toggle="popover"]').popover();
3
- });
4
-
5
- $.fn.popover.Constructor.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
6
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
7
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
8
- placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
9
- placement == 'bottomleft' ? { top: pos.top + pos.height, left: (pos.left - actualWidth+ pos.width) } :
10
- placement == 'bottomright' ? { top: pos.top + pos.height, left: pos.left } :
11
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
12
- };
13
-
14
- $.fn.popover.Constructor.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
15
- var $arrow = this.arrow();
16
- var arrowWidth = $arrow[0].offsetWidth;
17
- var arrowHeight = $arrow[0].offsetHeight;
18
-
19
- var $tip = this.tip();
20
- var tipWidth = $tip[0].offsetWidth;
21
- var tipHeight = $tip[0].offsetHeight;
22
-
23
- var $button = this.$element;
24
- var buttonWidth = $button[0].offsetWidth;
25
- var buttonHeight = $button[0].offsetHeight;
26
-
27
- switch(this.options.placement) {
28
- case "bottomleft":
29
- var centerOfButton = tipWidth - buttonWidth / 2;
30
- this.arrow().css('left', centerOfButton + "px");
31
- break;
32
- case "bottomright":
33
- var centerOfButton = buttonWidth / 2;
34
- this.arrow().css('left', centerOfButton + "px");
35
- break;
36
- default:
37
- this.arrow()
38
- .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
39
- .css(isHorizontal ? 'top' : 'left', '')
40
- }
41
- };
@@ -1,31 +0,0 @@
1
- .hero-blur {
2
- height: 100%;
3
- opacity: 0;
4
- background-position: top center;
5
- background-repeat: no-repeat;
6
- @include clearfix;
7
- @include transition(opacity 1s ease-in);
8
- }
9
-
10
- .hero-block-blur {
11
- position: relative;
12
- margin-top: 150px;
13
- opacity: 0;
14
- @include transition(opacity 1s ease-in);
15
-
16
- @media (min-width: $screen-lg) {
17
- margin-top: 250px;
18
- margin-bottom: 50px;
19
- }
20
- @media (min-width: $screen-xl) {
21
- margin-top: 300px;
22
- margin-bottom: 100px;
23
- }
24
- &.hero-block-side {
25
- @extend .hero-block-side;
26
- }
27
- }
28
- .hero-block-blur-visible,
29
- .hero-blur-visible {
30
- opacity: 1.0;
31
- }
@@ -1,25 +0,0 @@
1
- .hero-product-logo {
2
- margin-left: 0;
3
- padding-top: 40px;
4
-
5
- @media (max-width: $screen-sm) {
6
- position: relative;
7
- padding: 0;
8
- margin: auto;
9
- width: 100%;
10
- max-width: 500px;
11
- }
12
-
13
- .hero-product-details {
14
- font-size: $font-size-500;
15
- padding: 30px 10px;
16
-
17
- @media (max-width: $screen-sm) {
18
- font-size: $font-size-400;
19
- padding: 20px 0;
20
- }
21
- }
22
- }
23
- .hero-product-logo-block {
24
- height: 100px;
25
- }
@@ -1,108 +0,0 @@
1
- $toggle-list-bg: color('white');
2
-
3
- .list-group-toggler:hover {
4
- cursor: pointer;
5
- }
6
-
7
- .list-group-toggle {
8
- font-size: $font-size-300;
9
-
10
- .list-group-toggle-trigger {
11
- padding: 2px 10px 6px;
12
- float: right;
13
- color: color('gray-500');
14
- font-size: $font-size-small;
15
- background-color: $toggle-list-bg;
16
- box-shadow: none;
17
-
18
- &:hover {
19
- color: color('secondary');
20
- cursor: pointer;
21
- background-color: $toggle-list-bg;
22
- }
23
- &:focus,
24
- &:active {
25
- background-color: $toggle-list-bg;
26
- box-shadow: none;
27
- }
28
- }
29
- .list-group-item {
30
- padding: 5px;
31
- background-color: $toggle-list-bg;
32
- border-color: color('gray-300') $toggle-list-bg $toggle-list-bg;
33
-
34
- &:last-child {
35
- border-bottom-color: color('gray-300');
36
- }
37
- }
38
- .list-group-item {
39
- border-left: 2px solid transparent;
40
-
41
- &.is_active {
42
- border-right-color: color('gray-300');
43
- border-left-color: color('primary');
44
-
45
- &:hover {
46
- background-color: $toggle-list-bg;
47
- }
48
- }
49
- }
50
- .list-group-link {
51
- display: inline-block;
52
- padding: 0;
53
- color: color('secondary');
54
- border: 0;
55
-
56
- &:hover,
57
- &:active,
58
- &:focus {
59
- color: color('secondary');
60
- border: 0;
61
- background: none;
62
- text-shadow: none;
63
- }
64
- &.list-group-link-is_active {
65
- display: inline-block;
66
- padding: $padding-xs-vertical $padding-xs-horizontal;
67
- color: color('white');
68
- background-color: color('secondary');
69
- border-color: color('gray-300');
70
- border-radius: $border-radius-large;
71
-
72
- &:hover,
73
- &:focus,
74
- &:active,
75
- &:active:focus {
76
- color: color('white');
77
- background-color: color('secondary');
78
- text-decoration: none;
79
- }
80
- .fa {
81
- padding-left: $padding-small-horizontal;
82
- }
83
- }
84
- }
85
- .list-group-item-child {
86
- max-height: 0;
87
- margin-top: 0;
88
- overflow: hidden;
89
- opacity: 0.8;
90
- @include transition(max-height 0.3s ease-in-out, margin-top 0.2s ease-in-out, opacity 0.2s ease-in-out);
91
-
92
- &.is_open {
93
- max-height: 1000px; // may need adjusted given list length
94
- opacity: 1.0;
95
- }
96
- .list-group-item {
97
- padding-left: 10px;
98
- border: 0;
99
- }
100
- .list-group-item.is_active {
101
- border: 0;
102
- }
103
- .list-group-link-is_active {
104
- margin-left: -$padding-xs-horizontal;
105
- }
106
- }
107
- }
108
-
@@ -1,39 +0,0 @@
1
- @import "bootstrap/variables";
2
-
3
- .popover {
4
- // Offset the popover to account for the popover arrow
5
- &.bottomleft { margin-top: $popover-arrow-width; }
6
- &.bottomright { margin-top: $popover-arrow-width; }
7
-
8
- &.bottomleft > .arrow {
9
- left: 90%;
10
- margin-left: -$popover-arrow-outer-width;
11
- border-top-width: 0;
12
- border-bottom-color: $popover-arrow-outer-fallback-color; // IE8 fallback
13
- border-bottom-color: $popover-arrow-outer-color;
14
- top: -$popover-arrow-outer-width;
15
- &:after {
16
- content: " ";
17
- top: 1px;
18
- margin-left: -$popover-arrow-width;
19
- border-top-width: 0;
20
- border-bottom-color: $popover-arrow-color;
21
- }
22
- }
23
-
24
- &.bottomright > .arrow {
25
- left: 10%;
26
- margin-left: -$popover-arrow-outer-width;
27
- border-top-width: 0;
28
- border-bottom-color: $popover-arrow-outer-fallback-color; // IE8 fallback
29
- border-bottom-color: $popover-arrow-outer-color;
30
- top: -$popover-arrow-outer-width;
31
- &:after {
32
- content: " ";
33
- top: 1px;
34
- margin-left: -$popover-arrow-width;
35
- border-top-width: 0;
36
- border-bottom-color: $popover-arrow-color;
37
- }
38
- }
39
- }
@@ -1,96 +0,0 @@
1
- // Global variables for overriding behavior in individual CSS files
2
- $toggle_width: 56px;
3
- $toggle_height: 21px;
4
- $toggle_horizontal_padding: 10px;
5
- $toggle_vertical_padding: 2px;
6
- $toggle_circle_diameter: 13px;
7
- $toggle_no_background: color('gray');
8
- $toggle_yes_background: color('primary');
9
-
10
- .switch {
11
- display: inline-block;
12
- position: relative;
13
- width: $toggle_width;
14
- height: $toggle_height;
15
- overflow: hidden;
16
- padding: $toggle_vertical_padding 5px;
17
- border-radius: 10px;
18
- cursor: pointer;
19
- color: $color-white !important;
20
- background: $toggle_no_background;
21
- font-size: $font-size-100;
22
- text-transform: uppercase;
23
- line-height: $toggle_height - $toggle_vertical_padding;
24
-
25
- &:after {
26
- position: absolute;
27
- z-index: 1;
28
- width: $toggle_width - ($toggle_circle_diameter);
29
- }
30
-
31
- // Circle "knob"
32
- &:not(.disabled):before {
33
- content: "";
34
- position: relative;
35
- z-index: 2;
36
- float: right;
37
- display: block;
38
- width: $toggle_circle_diameter;
39
- height: $toggle_circle_diameter;
40
- margin-top: 2px;
41
- border-radius: 50%;
42
- background-color: color('white');
43
- }
44
- &.switch-no, &.switch-off {
45
- text-align: left;
46
- padding-left: $toggle_horizontal_padding;
47
- background: $toggle_no_background;
48
-
49
- &:before {
50
- float: right;
51
- }
52
- &:after {
53
- top: $toggle_vertical_padding;
54
- left: $toggle_circle_diameter;
55
- padding-right: $toggle_horizontal_padding;
56
- background: $toggle_no_background;
57
- }
58
- }
59
- &.switch-yes, &.switch-on {
60
- text-align: right;
61
- padding-right: $toggle_horizontal_padding;
62
- background: $toggle_yes_background;
63
-
64
- &:before {
65
- float: left;
66
- }
67
- &:after {
68
- top: $toggle_vertical_padding;
69
- right: $toggle_circle_diameter;
70
- padding-left: $toggle_horizontal_padding;
71
- background: $toggle_yes_background;
72
- }
73
- }
74
- &:link,
75
- &:hover {
76
- color: color('white');
77
- text-decoration: none;
78
- }
79
- &.disabled {
80
- font-style: inherit;
81
- }
82
-
83
- &.switch-yes:after {
84
- content: "Yes";
85
- }
86
- &.switch-no:after {
87
- content: "No";
88
- }
89
- &.switch-on:after {
90
- content: "On";
91
- }
92
- &.switch-off:after {
93
- content: "Off";
94
- }
95
-
96
- }