fae-rails 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/app/assets/javascripts/fae/_deploy.js +198 -0
  4. data/app/assets/javascripts/fae/_modals.js +94 -0
  5. data/app/assets/javascripts/fae/application.js +2 -0
  6. data/app/assets/javascripts/fae/form/_ajax.js +4 -2
  7. data/app/assets/javascripts/fae/form/_filtering.js +34 -0
  8. data/app/assets/javascripts/fae/form/_form.js +1 -0
  9. data/app/assets/javascripts/fae/form/_form_manager.js +295 -0
  10. data/app/assets/javascripts/fae/form/_slugger.js.erb +2 -2
  11. data/app/assets/javascripts/fae/form/inputs/_select.js +5 -2
  12. data/app/assets/stylesheets/fae/base.scss +5 -2
  13. data/app/assets/stylesheets/fae/globals/imports/_variables.scss +1 -0
  14. data/app/assets/stylesheets/fae/globals/layout/_base.scss +7 -2
  15. data/app/assets/stylesheets/fae/globals/layout/_content-header.scss +8 -2
  16. data/app/assets/stylesheets/fae/globals/navigation/_header.scss +2 -2
  17. data/app/assets/stylesheets/fae/globals/navigation/_multi-col-subnav.scss +50 -0
  18. data/app/assets/stylesheets/fae/modules/_buttons.scss +11 -0
  19. data/app/assets/stylesheets/fae/modules/_deploy.scss +25 -0
  20. data/app/assets/stylesheets/fae/modules/_modal.scss +25 -0
  21. data/app/assets/stylesheets/fae/modules/_toggles.scss +39 -23
  22. data/app/assets/stylesheets/fae/modules/forms/_asset-actions.scss +1 -1
  23. data/app/assets/stylesheets/fae/modules/forms/_base.scss +1 -1
  24. data/app/assets/stylesheets/fae/modules/forms/_checkbox.scss +1 -1
  25. data/app/assets/stylesheets/fae/modules/forms/_date.scss +16 -0
  26. data/app/assets/stylesheets/fae/modules/forms/_form-manager.scss +82 -0
  27. data/app/assets/stylesheets/fae/modules/forms/_radio.scss +1 -1
  28. data/app/assets/stylesheets/fae/modules/forms/_select.scss +7 -6
  29. data/app/assets/stylesheets/fae/modules/forms/_simple-mde.scss +1 -1
  30. data/app/assets/stylesheets/fae/modules/forms/_textarea.scss +1 -1
  31. data/app/assets/stylesheets/fae/modules/tables/_filters.scss +4 -0
  32. data/app/assets/stylesheets/fae/pages/_login.scss +4 -0
  33. data/app/controllers/fae/application_controller.rb +7 -0
  34. data/app/controllers/fae/base_controller.rb +5 -1
  35. data/app/controllers/fae/deploy_controller.rb +24 -0
  36. data/app/controllers/fae/deploy_hooks_controller.rb +71 -0
  37. data/app/controllers/fae/form_managers_controller.rb +19 -0
  38. data/app/controllers/fae/options_controller.rb +1 -0
  39. data/app/controllers/fae/static_pages_controller.rb +6 -1
  40. data/app/controllers/fae/users_controller.rb +11 -1
  41. data/app/controllers/fae/utilities_controller.rb +18 -6
  42. data/app/helpers/fae/application_helper.rb +26 -1
  43. data/app/helpers/fae/form_helper.rb +26 -2
  44. data/app/helpers/fae/view_helper.rb +22 -9
  45. data/app/models/concerns/fae/base_model_concern.rb +9 -0
  46. data/app/models/fae/change.rb +19 -6
  47. data/app/models/fae/deploy_hook.rb +12 -0
  48. data/app/models/fae/form_manager.rb +24 -0
  49. data/app/models/fae/user.rb +2 -2
  50. data/app/services/fae/netlify_api.rb +197 -0
  51. data/app/views/devise/unlocks/new.html.slim +5 -9
  52. data/app/views/fae/application/_content_form.html.slim +16 -11
  53. data/app/views/fae/application/_file_uploader.html.slim +7 -2
  54. data/app/views/fae/application/_global_search_results.html.slim +1 -1
  55. data/app/views/fae/application/_header.slim +4 -1
  56. data/app/views/fae/application/_mobilenav.slim +3 -0
  57. data/app/views/fae/deploy/index.html.slim +40 -0
  58. data/app/views/fae/deploy_hooks/_form.html.slim +18 -0
  59. data/app/views/fae/deploy_hooks/_table.html.slim +28 -0
  60. data/app/views/fae/deploy_hooks/edit.html.slim +3 -0
  61. data/app/views/fae/deploy_hooks/new.html.slim +3 -0
  62. data/app/views/fae/images/_image_uploader.html.slim +12 -3
  63. data/app/views/fae/options/_form.html.slim +4 -1
  64. data/app/views/fae/pages/activity_log.html.slim +7 -3
  65. data/app/views/fae/pages/home.html.slim +3 -4
  66. data/app/views/fae/shared/_form_header.html.slim +16 -12
  67. data/app/views/fae/shared/_nested_table.html.slim +4 -2
  68. data/app/views/fae/shared/_recent_changes.html.slim +1 -1
  69. data/app/views/fae/shared/_shared_nested_table.html.slim +4 -1
  70. data/app/views/layouts/fae/application.html.slim +1 -0
  71. data/config/deploy.rb +3 -1
  72. data/config/initializers/devise.rb +6 -6
  73. data/config/locales/fae.en.yml +39 -3
  74. data/config/locales/fae.zh-CN.yml +2 -2
  75. data/config/routes.rb +9 -1
  76. data/db/migrate/20140809222030_add_user_table.rb +1 -1
  77. data/db/migrate/20190925153222_create_fae_form_managers.rb +11 -0
  78. data/db/migrate/20220118192729_create_fae_publish_hooks.rb +10 -0
  79. data/db/migrate/20220128133730_rename_publish_hooks.rb +5 -0
  80. data/db/migrate/20220202153607_add_position_to_deploy_hooks.rb +6 -0
  81. data/lib/fae/options.rb +4 -2
  82. data/lib/fae/version.rb +1 -1
  83. data/lib/generators/fae/base_generator.rb +11 -1
  84. data/lib/generators/fae/nested_scaffold_generator.rb +13 -0
  85. data/lib/generators/fae/templates/assets/fae.js +1 -1
  86. data/lib/generators/fae/templates/controllers/nested_scaffold_controller.rb +14 -0
  87. data/lib/generators/fae/templates/initializers/fae.rb +16 -1
  88. data/lib/generators/fae/templates/views/_form.html.slim +10 -1
  89. data/lib/generators/fae/templates/views/_form_index_nested.html.slim +15 -1
  90. data/lib/generators/fae/templates/views/_form_nested.html.slim +19 -2
  91. data/lib/generators/fae/templates/views/static_page_form.html.slim +13 -1
  92. metadata +28 -8
@@ -0,0 +1,295 @@
1
+ /* global Fae */
2
+
3
+ /**
4
+ * Fae form manager
5
+ * @namespace form
6
+ * @memberof Fae
7
+ */
8
+ Fae.form.formManager = {
9
+
10
+ $theForm: null,
11
+ $managerForm: null,
12
+ savedFieldSettings: null,
13
+ mainContentClass: 'main-content',
14
+ fmContainerClass: 'js-form-manager-container',
15
+ formManagerFormClass: 'form-manager-form',
16
+ launchManagerClass: 'js-launch-form-manager',
17
+ cancelManagerClass: 'js-form-manager-cancel',
18
+ saveAndCloseManagerClass: 'js-form-manager-submit',
19
+ helperTextTextElClass: 'helper_text_text',
20
+ infoAttr: 'data-form-manager-info',
21
+ languageAttr: 'data-language',
22
+ requiredEl: '<abbr title="required">*</abbr> ',
23
+ containerManagerDataId: 'data-form-manager-id',
24
+ ignoredFields: [
25
+ 'seo_title',
26
+ 'seo_description',
27
+ 'social_media_title',
28
+ 'social_media_description',
29
+ 'social_media_image'
30
+ ],
31
+
32
+ init: function(formSelector) {
33
+ var _this = this;
34
+ formSelector = formSelector || 'form:first';
35
+ _this.$theForm = $(formSelector);
36
+
37
+ // Draw initial label/helper overrides
38
+ _this.setupAllFields(_this.$theForm);
39
+
40
+ $('body').on('click', '.'+_this.launchManagerClass, function(e) {
41
+ e.preventDefault();
42
+ _this.$theForm = $(this).parents('form');
43
+ _this._launchManager($(this));
44
+ });
45
+
46
+ $('body').on('click', '.'+_this.saveAndCloseManagerClass, function(e) {
47
+ e.preventDefault();
48
+ _this._saveAndCloseManager($(this));
49
+ });
50
+
51
+ $('body').on('click', '.'+_this.cancelManagerClass, function(e) {
52
+ e.preventDefault();
53
+ _this._closeManager($(this));
54
+ });
55
+
56
+ },
57
+
58
+ setupAllFields: function($theForm) {
59
+ _this = this;
60
+ if ($theForm.length && $theForm.attr(_this.infoAttr)) {
61
+ this.savedFieldSettings = JSON.parse($theForm.attr(_this.infoAttr));
62
+
63
+ $.each(JSON.parse(this.savedFieldSettings.fields), function(i, fieldSettings) {
64
+ _this._determineFieldSetup(fieldSettings);
65
+ });
66
+ }
67
+ },
68
+
69
+ _determineFieldSetup: function(fieldSettings) {
70
+ var $container = $('[data-form-manager-id="'+fieldSettings.formManagerId+'"]');
71
+ _this._setupField($container, fieldSettings.label, fieldSettings.helper);
72
+
73
+ if ($container.hasClass('image')) {
74
+ var $captionContainer = $('.' + fieldSettings.formManagerId + '_caption_container');
75
+ var $altContainer = $('.' + fieldSettings.formManagerId + '_alt_container');
76
+
77
+ if ($captionContainer) {
78
+ var captionLabel = fieldSettings.label + ' Caption';
79
+ _this._setupField($captionContainer, captionLabel, '');
80
+ }
81
+ if ($altContainer) {
82
+ var altLabel = fieldSettings.label + ' Alt Text';
83
+ _this._setupField($altContainer, altLabel, '');
84
+ }
85
+ }
86
+ },
87
+
88
+ _setupField: function($container, overriddenLabel, overriddenHelper) {
89
+ var _this = this;
90
+ if ($container.length) {
91
+ var $label = $container.find('label:first');
92
+ var $helperTextContainerEl = $container.find('h6');
93
+ var $labelInner = $label.find('.label_inner');
94
+ var $labelTextEl = $label;
95
+ if ($labelInner.length) {
96
+ $labelTextEl = $labelInner;
97
+ }
98
+ var $labelsCheckbox = $labelTextEl.find('input');
99
+
100
+ var newLabelText = '';
101
+ if ($container.hasClass('required') || $label.hasClass('required') || $labelInner.text().indexOf('*') !== -1) {
102
+ newLabelText = _this.requiredEl;
103
+ }
104
+
105
+ newLabelText += overriddenLabel;
106
+ $labelTextEl.html(newLabelText);
107
+
108
+ if($labelsCheckbox.length) {
109
+ $labelTextEl.append($labelsCheckbox);
110
+ }
111
+
112
+ // Don't mess with image alt text or caption helpers
113
+ if ($container.attr('class').indexOf('alt_container') !== -1
114
+ || $container.attr('class').indexOf('caption_container') !== -1
115
+ ) {
116
+ return;
117
+ }
118
+
119
+ // Just do the helper thing no matter what, aka allow empty
120
+ $label.removeClass('has_no_helper_text');
121
+
122
+ // Main form and nested form markup differs, deal with it
123
+ if ($container.find('h6').length) {
124
+ $label.find('.'+_this.helperTextTextElClass).text(overriddenHelper);
125
+ } else {
126
+ if ($helperTextContainerEl.length) {
127
+ $helperTextContainerEl.find('.'+_this.helperTextTextElClass).text(overriddenHelper);
128
+ } else {
129
+ $helperTextContainerEl = $('<h6 />', {class: 'helper_text'}).append($('<span />', {class: 'helper_text_text', text: overriddenHelper}));
130
+ }
131
+ $label.append($helperTextContainerEl);
132
+ }
133
+ }
134
+ },
135
+
136
+ _launchManager: function() {
137
+ var _this = this;
138
+
139
+ // Show all language inputs so we can manage them
140
+ _this.$theForm.find('['+_this.languageAttr+']').show();
141
+
142
+ _this.$managerForm =
143
+ $('<form />', {action: '#', class: _this.formManagerFormClass})
144
+ .append($('<header />', {class: 'content-header js-content-header js-will-be-sticky'})
145
+ .append($('<a />', {href: '#', text: 'Cancel', class: 'button '+_this.cancelManagerClass}))
146
+ .append($('<a />', {href: '#', text: 'Submit', class: 'button js-form-manager-submit'}))
147
+ );
148
+
149
+ // Insert a bunch of inputs for label/helper text
150
+ _this._gatherAndInjectManagerEls();
151
+
152
+ $('.'+_this.fmContainerClass).append(_this.$managerForm);
153
+ _this._revealManagerForm();
154
+
155
+ },
156
+
157
+ _gatherAndInjectManagerEls: function() {
158
+ $(_this.$theForm.find('['+_this.containerManagerDataId+']')).each(function(i) {
159
+ var $container = $(this);
160
+
161
+ if ($container.hasClass('hidden') || !_this._shouldDisplayInManager($container)) { return; }
162
+
163
+ var $label = $container.find('label:first');
164
+ var $labelTextEl = $label;
165
+ var $labelInner = $label.find('.label_inner');
166
+ if ($labelInner.length) {
167
+ $labelTextEl = $labelInner;
168
+ }
169
+ var $helperTextTextEl = $label.find('.'+_this.helperTextTextElClass);
170
+ var containerManagerId = $container.attr(_this.containerManagerDataId);
171
+ var iDParts = containerManagerId.split('_');
172
+ iDParts.shift();
173
+ var fMLabelText = _this._titleize(iDParts.join(' '));
174
+ var labelInputValue = $labelTextEl.clone().children().remove().end().text().replace('*','').trim();
175
+ var helperInputValue = $helperTextTextEl.text();
176
+
177
+ var $fmFieldContainer = $('<div />', {class: "form-section", 'data-form-manager-id': $container.attr('data-form-manager-id')});
178
+ var $fmSingleFieldContainer = $('<div />', {class: "single-field"});
179
+ var $fmSingleHelperFieldContainer = $('<div />', {class: "single-field"});
180
+ var $fmFieldTitle = $('<div />', {class: "field_title"});
181
+ var $fmHelperFieldTitle = $('<div />', {class: "field_title"});
182
+ var $fMLabel = $('<label />', {text: fMLabelText, class: 'fm_label'});
183
+ var $fMHelper = $('<label />', {text: 'Helper', class: 'fm_label'});
184
+ var $labelInput = $('<input />', {type: 'text', id: $container.attr('data-form-manager-id')+'_label_input', class: 'label_input', value: labelInputValue});
185
+ var $helperInput = $('<input />', {type: 'text', id: $container.attr('data-form-manager-id')+'_helper_input', class: 'helper_input', value: helperInputValue});
186
+
187
+ _this.$managerForm.append(
188
+ $fmFieldContainer.append(
189
+ $fmSingleFieldContainer.append(
190
+ $fmFieldTitle.append(
191
+ $fMLabel
192
+ ),
193
+ $labelInput
194
+ ),
195
+ $fmSingleHelperFieldContainer.append(
196
+ $fmHelperFieldTitle.append(
197
+ $fMHelper
198
+ ),
199
+ $helperInput
200
+ )
201
+ )
202
+ );
203
+
204
+ });
205
+ },
206
+
207
+ _revealManagerForm: function() {
208
+ var _this = this;
209
+ $('.'+_this.mainContentClass).hide();
210
+ $('.'+_this.fmContainerClass).show();
211
+ $('.'+_this.formManagerFormClass).fadeIn('fast');
212
+ },
213
+
214
+ _saveAndCloseManager: function() {
215
+ _this = this;
216
+ _this._submitManager();
217
+ _this._closeManager();
218
+ },
219
+
220
+ _closeManager: function() {
221
+ var _this = this;
222
+ $('.'+_this.fmContainerClass).children().remove();
223
+ $('.'+_this.mainContentClass).show();
224
+ },
225
+
226
+ _submitManager: function() {
227
+ var _this = this;
228
+ var payload = {
229
+ form_manager: {
230
+ form_manager_model_name: _this.$theForm.data('form-manager-model'),
231
+ form_manager_model_id: _this.$theForm.data('form-manager-model-id'),
232
+ fields: {}
233
+ }
234
+ };
235
+
236
+ // Gather everything in the inputs for a POST
237
+ $.each(_this.$managerForm.find('['+_this.containerManagerDataId+']'), function(i) {
238
+ var $container = $(this);
239
+ var formManagerId = $container.attr(_this.containerManagerDataId);
240
+ var requiredValue = $container.hasClass('required') ? 1 : 0;
241
+
242
+ payload.form_manager.fields[formManagerId] = {
243
+ formManagerId: formManagerId,
244
+ label: $container.find('.label_input').val(),
245
+ helper: $container.find('.helper_input').val(),
246
+ required: requiredValue
247
+ };
248
+ });
249
+
250
+ // Reset the labels/helpers to the custom ones just made
251
+ $.each(payload.form_manager.fields, function(i, fieldSettings) {
252
+ _this._determineFieldSetup(fieldSettings);
253
+ });
254
+
255
+ $.ajax({
256
+ url: Fae.path+'/form_managers/update',
257
+ type: 'post',
258
+ data: payload,
259
+ headers: {
260
+ 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
261
+ },
262
+ dataType: 'json',
263
+ success: function (data) {
264
+ // do something?
265
+ }
266
+ });
267
+
268
+ },
269
+
270
+ _shouldDisplayInManager: function($container) {
271
+ var _this = this;
272
+ var should = true;
273
+ $(_this.ignoredFields).each(function(i, fuzzyClass) {
274
+ if ($container.attr('class').indexOf(fuzzyClass) > -1) {
275
+ should = false;
276
+ return false;
277
+ }
278
+ });
279
+ return should;
280
+ },
281
+
282
+ _capitalize: function(str) {
283
+ return str.charAt(0).toUpperCase() + str.slice(1);
284
+ },
285
+
286
+ _titleize: function(str) {
287
+ var _this = this;
288
+ var string_array = str.split(' ');
289
+ string_array = string_array.map(function(str) {
290
+ return _this._capitalize(str);
291
+ });
292
+ return string_array.join(' ');
293
+ }
294
+
295
+ };
@@ -74,8 +74,8 @@ Fae.form.slugger = {
74
74
  slug_text = slug_text.join(' ');
75
75
 
76
76
  // Strip accented characters
77
- var from = 'àáâãäæåçèéêëęēėìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ';
78
- var to = 'aaaaaaaceeeeeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY';
77
+ var from = 'âàáâãäæåçèéêëęēėìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ';
78
+ var to = 'aaaaaaaaceeeeeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY';
79
79
 
80
80
  // Loop through all accented characters and replace with non-accents
81
81
  for (var i = 0; i < from.length; i++) {
@@ -92,8 +92,11 @@ Fae.form.select = {
92
92
  })
93
93
  });
94
94
 
95
- // Add actions to wraper
96
- $deselect_all_action.insertAfter($chosen);
95
+ // prevent duplicate link from being added when nested form re-renders on the page after saving
96
+ if (!$('.js-multiselect-action-deselect_all').length > 0) {
97
+ // Add actions to wraper
98
+ $deselect_all_action.insertAfter($chosen);
99
+ }
97
100
 
98
101
  // Add special "Select All" option and notify Chosen of new option
99
102
  addSelectAllOption($element)
@@ -32,7 +32,8 @@
32
32
  'globals/navigation/sidenav',
33
33
  'globals/navigation/mobilenav',
34
34
  'globals/navigation/utility',
35
- 'globals/navigation/search'
35
+ 'globals/navigation/search',
36
+ 'globals/navigation/multi-col-subnav'
36
37
  ;
37
38
 
38
39
  // Tables
@@ -52,6 +53,7 @@
52
53
  @import
53
54
  'modules/buttons',
54
55
  'modules/modal',
56
+ 'modules/deploy',
55
57
  'modules/toggles',
56
58
  'modules/alerts'
57
59
  ;
@@ -70,7 +72,8 @@
70
72
  'modules/forms/colorpicker',
71
73
  'modules/forms/hints',
72
74
  'modules/forms/validation',
73
- 'modules/forms/simple-mde'
75
+ 'modules/forms/simple-mde',
76
+ 'modules/forms/form-manager'
74
77
  ;
75
78
 
76
79
  // Pages
@@ -89,6 +89,7 @@ $c-chosen-gradient-end: $c-light-grey !default;
89
89
  $c-chosen-multi-bg: $c-lightest-grey !default;
90
90
  $c-chosen-multi-text: $c-dark-grey !default;
91
91
  $c-chosen-multi-delete: $c-darker-grey !default;
92
+ $c-focus-border: $c-mid-dark-grey !default;
92
93
 
93
94
  // Yes / No Sliders
94
95
  $c-slider-no-color: $c-light-grey !default;
@@ -33,8 +33,7 @@
33
33
  text-transform: uppercase;
34
34
  font-size: 14px;
35
35
  letter-spacing: .2em;
36
- // counters the padding from .content
37
- margin: 0 negate($content-buffer) 30px;
36
+ margin: 0 0 30px;
38
37
  }
39
38
 
40
39
  h3 {
@@ -46,3 +45,9 @@
46
45
  margin-bottom: 20px;
47
46
  }
48
47
  }
48
+
49
+ p {
50
+ margin-bottom: 1.3em;
51
+ max-width: 80%;
52
+ line-height: 1.2em;
53
+ }
@@ -10,7 +10,7 @@ $content-header-padding: 16px;
10
10
  position: absolute;
11
11
  left: 0;
12
12
  top: 0;
13
- box-shadow: 0 0 10px $c-grey;
13
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
14
14
  display: flex;
15
15
  justify-content: space-between;
16
16
  align-items: center;
@@ -43,7 +43,7 @@ $content-header-padding: 16px;
43
43
  display: inline-block;
44
44
  vertical-align: top;
45
45
  padding: 6px 0;
46
- border-bottom: 4px solid transparent;
46
+ border-bottom: 2px solid transparent;
47
47
  margin: 0 12px;
48
48
  font-size: 13px;
49
49
  color: $c-darkest-grey;
@@ -74,6 +74,12 @@ $content-header-padding: 16px;
74
74
  }
75
75
 
76
76
  .content-header-buttons {
77
+ position: absolute;
78
+ height: 100%;
79
+ top: 0;
80
+ display: flex;
81
+ align-items: center;
82
+ right: 30px;
77
83
  a {
78
84
  margin-right: 5px;
79
85
 
@@ -6,7 +6,7 @@
6
6
  left: 0;
7
7
  width: 100%;
8
8
  background: $c-header-bg;
9
- border-bottom: $header-border-width solid $c-custom-highlight;
9
+ border-top: $header-border-width solid $c-custom-highlight;
10
10
 
11
11
  @include bp(large) {
12
12
  padding: 0 $content-buffer;
@@ -87,7 +87,7 @@
87
87
  }
88
88
  }
89
89
 
90
- .main-header-nav {
90
+ .main-header-nav, .utility-nav {
91
91
  @include transition(opacity .2s ease-in-out);
92
92
 
93
93
  a {
@@ -0,0 +1,50 @@
1
+ $col_width: 176px;
2
+ $col_width_padding: 36px;
3
+
4
+ header.main-header ul ul.multicol-nav {
5
+ min-height: auto;
6
+ max-height: 1024px!important;
7
+ left: -($col_width * .5);
8
+ }
9
+ .main-header-nav li:nth-of-type(n+5) ul.multicol-nav.three,
10
+ .main-header-nav li ul.multicol-nav.four,
11
+ .main-header-nav li:nth-of-type(n+7) ul.multicol-nav {
12
+ left: -($col_width * 0.75);
13
+ }
14
+ .main-header-nav li:nth-of-type(n+6) ul.multicol-nav.three,
15
+ .main-header-nav li:nth-of-type(n+2) ul.multicol-nav.four,
16
+ .main-header-nav li:nth-of-type(n+8) ul.multicol-nav {
17
+ left: -($col_width * 1);
18
+ }
19
+
20
+ .main-header-nav li:nth-of-type(n+7) ul.multicol-nav.three,
21
+ .main-header-nav li:nth-of-type(n+3) ul.multicol-nav.four {
22
+ left: -($col_width * 1.25);
23
+ }
24
+
25
+ .main-header-nav li:nth-of-type(n+8) ul.multicol-nav.three,
26
+ .main-header-nav li:nth-of-type(n+4) ul.multicol-nav.four {
27
+ left: -($col_width * 1.75);
28
+ }
29
+
30
+ .main-header-nav li:nth-of-type(n+5) ul.multicol-nav.four {
31
+ left: -($col_width * 2.25);
32
+ }
33
+ .main-header-nav li:nth-of-type(n+6) ul.multicol-nav.four {
34
+ left: -($col_width * 2.5);
35
+ }
36
+ .main-header-nav li:nth-of-type(n+7) ul.multicol-nav.four {
37
+ left: -($col_width * 3);
38
+ }
39
+
40
+
41
+ .multicol-nav {
42
+ display: grid;
43
+ grid-template-columns: $col_width $col_width;
44
+ &.three {
45
+ grid-template-columns: $col_width $col_width $col_width;
46
+ }
47
+ &.four {
48
+ grid-template-columns: $col_width $col_width $col_width $col_width;
49
+ }
50
+ }
@@ -13,6 +13,10 @@ button[type=button],
13
13
  line-height: 1;
14
14
  }
15
15
 
16
+ .deploy .button {
17
+ margin-right: 10px;
18
+ }
19
+
16
20
  // Dark buttons
17
21
 
18
22
  input[type=submit],
@@ -47,6 +51,13 @@ button[type=button],
47
51
  &:hover {
48
52
  background: $c-light-button-gradient-end;
49
53
  }
54
+
55
+ &:disabled {
56
+ background: $c-light-button-gradient-end;
57
+ color: $c-mid-grey;
58
+ border-color: $c-grey;
59
+ cursor: wait;
60
+ }
50
61
  }
51
62
 
52
63
  .button {
@@ -0,0 +1,25 @@
1
+ .deploying-heading.running:after {
2
+ overflow: hidden;
3
+ display: inline-block;
4
+ vertical-align: bottom;
5
+ -webkit-animation: ellipsis steps(4,end) 900ms infinite;
6
+ animation: ellipsis steps(4,end) 900ms infinite;
7
+ content: "\2026"; /* ascii code for the ellipsis character */
8
+ width: 0px;
9
+ }
10
+
11
+ @keyframes ellipsis {
12
+ to {
13
+ width: 20px;
14
+ }
15
+ }
16
+
17
+ @-webkit-keyframes ellipsis {
18
+ to {
19
+ width: 20px;
20
+ }
21
+ }
22
+
23
+ .hidden {
24
+ display: none;
25
+ }
@@ -76,3 +76,28 @@
76
76
  font-size: 12px;
77
77
  }
78
78
  }
79
+
80
+ #fae-modal {
81
+ padding: 0;
82
+ box-shadow: none;
83
+
84
+ .simplemodal-data {
85
+ min-height: 100%;
86
+ }
87
+
88
+ .simplemodal-close {
89
+ position: absolute;
90
+ top: 5px;
91
+ right: 5px;
92
+ height: 20px;
93
+ width: 20px;
94
+
95
+ &:before {
96
+ position: relative;
97
+ padding: 4px;
98
+ top: auto;
99
+ right: auto;
100
+ color: #3b3b3b;
101
+ }
102
+ }
103
+ }
@@ -2,47 +2,63 @@
2
2
  .slider-wrapper {
3
3
  display: block;
4
4
  position: relative;
5
- width: 60px;
6
- border: 1px solid $c-mid-grey;
7
- border-radius: 2px;
5
+ width: 50px;
6
+ border-radius: 15px;
7
+ height: 25px;
8
8
  font-size: 12px;
9
- overflow: hidden;
10
9
  cursor: pointer;
11
10
  text-decoration: none;
12
- background: $c-white;
11
+ background: $c-light-grey;
12
+ transition: background-color 0.24s;
13
+ &:hover, &:focus {
14
+ background-color: $c-mid-grey;
15
+ }
16
+ &.slider-yes-selected {
17
+ background: $c-custom-highlight;
18
+ }
13
19
  }
14
20
 
15
21
  .slider-options {
16
- @include transition(left .2s);
17
- position: relative;
18
- left: -35px;
22
+ @include transition(left .24s);
19
23
  white-space: nowrap;
20
-
21
- .slider-yes-selected & {
22
- left: 0;
23
- }
24
24
  }
25
25
 
26
26
  .slider-option-selector {
27
- display: inline-block;
28
- width: 18px;
27
+ display: block;
28
+ position: absolute;
29
+ width: 50%;
30
+ left: 0;
31
+ top: 0;
32
+ bottom: 0;
33
+ border-radius: 50%;
34
+ box-sizing: border-box;
35
+ height: 100%;
36
+ border: 1px solid $c-mid-grey;
37
+ transition: left 0.24s;
38
+ .slider-yes-selected & {
39
+ left: 50%;
40
+ }
41
+ background: $c-white;
29
42
  }
30
43
 
31
44
  .slider-option-no,
32
45
  .slider-option-yes {
33
- @include user-select(none);
34
- display: inline-block;
35
- width: 35px;
36
- padding: 3px 4px;
37
- text-align: center;
46
+ position: absolute;
47
+ height: 0;
48
+ width: 0;
49
+ left: -200vw;
38
50
  }
39
51
 
40
52
  .slider-option-no {
41
- color: $c-slider-no-color;
42
- background: $c-slider-no-bg;
53
+ display:block;
54
+ .slider-yes-selected & {
55
+ display: none;
56
+ }
43
57
  }
44
58
 
45
59
  .slider-option-yes {
46
- color: $c-white;
47
- background: $c-custom-highlight;
60
+ display: none;
61
+ .slider-yes-selected & {
62
+ display:block;
63
+ }
48
64
  }
@@ -45,7 +45,7 @@
45
45
  margin-right: 10px;
46
46
 
47
47
  &:focus {
48
- border-color: $c-notice-content;
48
+ border-color: $c-focus-border;
49
49
  outline: 0;
50
50
  }
51
51
 
@@ -14,7 +14,7 @@ input[type=email] {
14
14
  max-width: 100%;
15
15
 
16
16
  &:focus {
17
- border-color: $c-notice-content;
17
+ border-color: $c-focus-border;
18
18
  }
19
19
  }
20
20
 
@@ -56,7 +56,7 @@ label.checkbox,
56
56
 
57
57
  label.checkbox.focused:before,
58
58
  .checkbox.focused label:before {
59
- border-color: $c-notice-content;
59
+ border-color: $c-focus-border;
60
60
  }
61
61
 
62
62
  .checkbox-wrapper {