form-jekyll 0.5.4 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42389114a6687daf7c995b9657c034543520661c381521992432c23157fad195
4
- data.tar.gz: a913583b765b3492e1ce5f0f69d1e5f724279e247ed9f59af31dc67e98ca5e4a
3
+ metadata.gz: 335e1b2e85abf468baa09079c46f6b2830233a6d603a05a62a8e98cfb7450a6f
4
+ data.tar.gz: 581b6e0a22cfe7352c32c153ffaa018d0143171d073e78e5daffb50444a93cb1
5
5
  SHA512:
6
- metadata.gz: 99106739dc67a6b45f47cb26fd650cdf8dcb93bf45a98da787b403888f143ac280fbe66ada582a97978f9bb896a617f2c3e76da95741d39c325dedd6063b46c5
7
- data.tar.gz: d64d2cddbea8a61f2a9ed6c6e7bf1bb65985a391cc23a0c4f5e632929bdf0042d2a3dd9fdc208d896ba5efc0d08c3ceb7b7145bd34ef866739bbbe6cda6df7a9
6
+ metadata.gz: b794bea6eddf0460a83967870c0e08a63df2c188b60de9a724977833641caac47eea0b329bec2f0fb24d2be5fd871eb8564f1401af79976936d22a0209214c37
7
+ data.tar.gz: e8fa0c886b53996d9b07510f2d69bf6abd13db3333ce338912806f807fae61e177fff547eefc2ddc05549a415aaa5289aab982b8dbb1e31ae04e1819c838780a
@@ -1,13 +1,13 @@
1
1
  {% if forloop.length > 1 %}
2
2
  <div class="form-group pagination">
3
3
  {% if forloop.first %}
4
- <a href="javascript:void(0);" class="btn btn-lg form-section-next">Start</a>
4
+ <button class="btn btn-lg form-section-next">Start</button>
5
5
  {% else %}
6
- <a href="javascript:void(0);" class="btn btn-lg form-section-prev">Previous</a>
6
+ <button class="btn btn-lg form-section-prev">Previous</button>
7
7
  {% if forloop.last %}
8
- <a href="javascript:void(0);" id="submit" class="btn btn-lg submit">Submit</a>
8
+ <button id="submit" class="btn btn-lg form-section-submit">Submit</button>
9
9
  {% else %}
10
- <a href="javascript:void(0);" class="btn btn-lg form-section-next">Next</a>
10
+ <button class="btn btn-lg form-section-next">Next</button>
11
11
  {% endif %}
12
12
  {% endif %}
13
13
  </div>
@@ -1,4 +1,23 @@
1
1
  {% for field in fields %}
2
+ {% comment %}
3
+ Assign field IDs
4
+ {% endcomment %}
5
+
6
+ {% if field.type == 'email' %} {% assign id = "c04" %}
7
+ {% elsif field.type == 'phone' %} {% assign id = "c06" %}
8
+ {% elsif field.type == 'date' %} {% assign id = "d02" %}
9
+ {% elsif field.type == 'time' %} {% assign id = "d04" %}
10
+ {% elsif field.type == 'number' %} {% assign id = "d06" %}
11
+ {% elsif field.type == 'price' %} {% assign id = "d08" %}
12
+ {% elsif field.type == 'url' %} {% assign id = "d10" %}
13
+ {% elsif field.type == 'textarea' %} {% assign id = "i14" %}
14
+ {% elsif field.type == 'file' %} {% assign id = "m13" %}
15
+ {% elsif field.type == 'select' %} {% assign id = "s02" %}
16
+ {% elsif field.type == 'checkbox' %} {% assign id = "s06" %}
17
+ {% elsif field.type == 'radio' %} {% assign id = "s08" %}
18
+ {% else %} {% assign id = "i02" %}
19
+ {% endif %}
20
+
2
21
  {% comment %}
3
22
  Assign variables
4
23
  {% endcomment %}
@@ -51,7 +70,7 @@
51
70
 
52
71
  </div>
53
72
  {% else %}
54
- <div class="form-group field-{{ field.type }}" {% if field.hidden %}data-hidden="true"{% endif %}>
73
+ <div class="form-group field-{{ id }}" {% if field.hidden %}data-hidden="true"{% endif %}>
55
74
 
56
75
  {% include elements/annotation.html annotation=annotation %}
57
76
 
@@ -11,6 +11,7 @@
11
11
  <link href="https://fonts.googleapis.com/css?family=Rubik:300,400,400i,500" rel="stylesheet">
12
12
  <script src="/assets/js/jquery.js"></script>
13
13
  <script src="/assets/js/validator.js"></script>
14
+ <script src="/assets/js/mousetrap.js"></script>
14
15
  <script src="/assets/js/script.js"></script>
15
16
  </head>
16
17
  <body>
@@ -12,7 +12,9 @@ layout: base
12
12
  </span>
13
13
 
14
14
  <form class="form">
15
- {% include render_form.html form=page.form %}
15
+ <div class="sections-container">
16
+ {% include render_form.html form=page.form %}
17
+ </div>
16
18
  </form>
17
19
  </main>
18
20
 
@@ -21,7 +23,7 @@ layout: base
21
23
 
22
24
  {{ content }}
23
25
 
24
- <div class="form-settings">
26
+ <div class="form-settings active">
25
27
  <h5>Show&hellip;</h5>
26
28
 
27
29
  <a href="javascript:void(0);" class="form-settings-toggle" title="Toggle settings">
@@ -29,27 +31,36 @@ layout: base
29
31
  </a>
30
32
 
31
33
 
32
- <label>
34
+ <div class="form-group field-s06">
35
+ <label class="checkbox">
33
36
  <input type="checkbox" id="settings-all-pages">
34
37
  <span class="inline-label">Every page</span>
35
38
  </label>
39
+ </div>
36
40
 
37
- <label>
41
+ <div class="form-group field-s06">
42
+ <label class="checkbox">
38
43
  <input type="checkbox" id="settings-all-conditionals">
39
44
  <span class="inline-label">All conditionals</span>
40
45
  </label>
46
+ </div>
41
47
 
42
- <label>
48
+ <div class="form-group field-s06">
49
+ <label class="checkbox">
43
50
  <input type="checkbox" id="settings-all-annotations">
44
51
  <span class="inline-label">Annotations</span>
45
52
  </label>
53
+ </div>
46
54
 
47
- <label>
55
+ <div class="form-group field-s06">
56
+ <label class="checkbox">
48
57
  <input type="checkbox" id="settings-show-hidden">
49
58
  <span class="inline-label">Hidden fields</span>
50
59
  </label>
60
+ </div>
51
61
 
52
- <label>
62
+ <div class="form-group field-s06">
63
+ <label class="checkbox">
53
64
  <input type="checkbox" id="settings-top-nav">
54
65
  <span class="inline-label">Page navigation on top</span>
55
66
  </label>
@@ -437,35 +437,4 @@ main[role="main"] {
437
437
  margin: 0;
438
438
  }
439
439
  }
440
- }
441
-
442
- .hero-banner.default {
443
- @include contain-1090;
444
- padding-top: 40px;
445
-
446
- @include media($medium-screen) {
447
- padding-top: 60px;
448
- }
449
-
450
- h1 {
451
- @include fs-h1-default;
452
- margin-top: 0;
453
- color: $black;
454
- margin-bottom: 40px;
455
-
456
- @include media($medium-screen) {
457
- margin-left: -5px;
458
- }
459
- }
460
-
461
- .lead-paragraph {
462
- color: $black;
463
- }
464
-
465
- .path-frontpage & {
466
- h1 {
467
- @include fs-h1-home;
468
- margin-bottom: 27px;
469
- }
470
- }
471
440
  }
@@ -1,789 +1,38 @@
1
1
  ---
2
2
  ---
3
3
 
4
- @import 'variables';
4
+ @import url('https://fonts.googleapis.com/css?family=Rubik:300,400,400i,500&display=swap');
5
5
 
6
- html, body {
7
- margin: 0;
8
- padding: 0;
9
- }
6
+ @import '../node_modules/sf-design-system/src/components/00-design-tokens/colors';
7
+ @import '../node_modules/sf-design-system/src/components/00-design-tokens/breakpoints';
8
+ @import '../node_modules/sf-design-system/src/components/00-design-tokens/typography-mixins';
9
+ @import '../node_modules/sf-design-system/src/components/00-design-tokens/typography';
10
+ @import '../node_modules/sf-design-system/src/components/00-design-tokens/mixins';
11
+ @import '../node_modules/sf-design-system/src/components/00-design-tokens/variables';
12
+ @import '../node_modules/sf-design-system/src/components/00-design-tokens/base';
10
13
 
11
- fieldset {
12
- margin: 0;
13
- padding: 0;
14
- border: 0;
15
- }
16
-
17
- label,
18
- .label,
19
- legend {
20
- display: block;
21
- margin: 0 0 0.25rem;
22
- padding: 0;
23
- line-height: 1.5;
24
- }
14
+ @import '../node_modules/sf-design-system/src/components/03-layout/headers/hero-banner';
15
+ @import '../node_modules/sf-design-system/src/components/04-forms/field-types/form-fields';
16
+ @import '../node_modules/sf-design-system/src/components/04-forms/layout/pagination';
25
17
 
26
- div[data-group] {
27
- display: none;
28
- }
18
+ @import 'sfgov';
29
19
 
30
- label:empty,
31
- legend:empty,
32
- p:empty {
20
+ body {
33
21
  margin: 0;
34
- }
35
-
36
- .field-legend:after,
37
- .field-wrapper:after,
38
- .form-group:after {
39
- display: table;
40
- content: "";
41
- clear: both;
42
- }
43
-
44
- .valtype {
45
- input,
46
- label {
47
- &:last-of-type {
48
- margin-bottom: 0;
49
- }
50
- }
51
- }
52
-
53
- input,
54
- textarea {
55
- border: 1px solid #777;
56
- width: 100%;
57
- padding: 0.5rem;
58
- }
59
-
60
- textarea {
61
- resize: vertical;
62
- &.textarea-small {
63
- height: 1.75rem * 3;
64
- }
65
-
66
- &.textarea-medium {
67
- height: 1.75rem * 5;
68
- }
69
-
70
- &.textarea-large {
71
- height: 1.75rem * 9;
72
- }
73
- }
74
-
75
- .help-block {
76
- margin: 0.5rem 0 0;
77
- color: #666;
78
- }
79
-
80
- .help-block ul {
81
- margin: 0;
82
- }
83
-
84
- .help-block.with-errors:empty {
85
- height: 0;
86
- }
87
-
88
- .help-block .list-unstyled {
89
22
  padding: 0;
90
23
  }
91
24
 
92
- .has-error .help-block {
93
- color: red;
94
- }
95
-
96
- .form-section,
97
- .form-section-header {
98
- display: none;
99
- }
100
-
101
- .form-section.active,
102
- .form-section-header.active {
103
- display: block;
104
- }
105
-
106
- .form-section-header {
107
- font-size: 1.5em;
108
- }
109
-
110
- .form-section-prev,
111
- .form-section-next {
112
- margin-top: 1.5rem;
113
- }
114
-
115
- .form-section-prev {
116
- float: left;
117
- }
118
-
119
- .form-section-next {
120
- float: right;
121
- }
122
-
123
- .form-section-nav {
124
- display: none;
125
- }
126
-
127
- .form-section-nav li {
128
- list-style: none;
129
- padding: 0.5rem 1rem;
130
- display: block;
131
- }
132
-
133
- .form-section-nav li.active {
134
- font-weight: bold;
135
- position: relative;
136
- }
137
-
138
- .form-section-nav li.active:before {
139
- content: "";
140
- border-radius: 50%;
141
- width: 0.5rem;
142
- height: 0.5rem;
143
- position: absolute;
144
- left: 0;
145
- top: 50%;
146
- margin-top: -0.25rem;
147
- background: currentColor;
148
- }
149
-
150
- @media screen and (min-width: 40rem) {
151
- .form-section-nav,
152
- .form-horizontal {
153
- float: left;
154
- }
155
-
156
- .form-section-nav {
157
- display: block;
158
- width: 20%;
159
- margin-right: 5%;
160
- }
161
-
162
- .form-horizontal {
163
- width: 60%;
164
- }
165
- }
166
-
167
- @media screen and (min-width: 70rem) {
168
- .form-section-nav {
169
- width: 15%;
170
- margin-right: 5%;
171
- }
172
-
173
- .form-horizontal {
174
- width: 70%;
175
- }
176
- }
177
-
178
- /* Hacks */
179
-
180
- input[formtype="m11"] {
181
- display: none;
182
- }
183
-
184
- /* Add a cursor to .form-section-nav elements */
185
- .form-section-nav li {
186
- cursor: pointer;
187
- }
188
-
189
- /* Label .form-section-nav */
190
-
191
- .form-section-nav {
192
- position: relative;
193
- padding-top: 1rem;
194
- }
195
-
196
- .form-section-nav:before {
197
- content: "Choose a Page";
198
- position: absolute;
199
- font-size: 1.25rem;
200
- color: #666;
201
- top: -1rem;
202
- }
203
-
204
- /* Only display legend to screen readers*/
205
-
206
- #SFDSWFB-legend {
207
- position: absolute !important;
208
- height: 1px;
209
- width: 1px;
210
- overflow: hidden;
211
- clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
212
- clip: rect(1px, 1px, 1px, 1px);
213
- }
214
-
215
- // Branding stylesheet
216
-
217
- @import url('https://fonts.googleapis.com/css?family=Rubik:300,400,500');
218
-
219
- *,
220
- *::before,
221
- *::after {
222
- box-sizing: border-box;
223
- }
224
-
225
- // Mixins
226
-
227
- @mixin font-smoothing {
228
- -webkit-font-smoothing: antialiased;
229
- -moz-osx-font-smoothing: grayscale;
230
- }
231
-
232
- @mixin font-size-to-rem($number) {
233
- font-size: ($number * 1rem) / $base-font-size;
234
- }
235
-
236
- @mixin line-height-to-rem($number) {
237
- line-height: $number * 1rem / $base-font-size;
238
- }
239
-
240
- @mixin input-border {
241
- border-color: $slate-blue;
242
- border-width: 2px;
243
- border-style: solid;
244
- border-radius: 8px;
245
- background-color: $white;
246
- }
247
-
248
- @mixin input-border-focus {
249
- border-color: $bright-blue;
250
- box-shadow: inset 0 0 0 2px $bright-blue;
251
- outline: none;
252
- }
253
-
254
- // Global styles
255
-
256
- body,
257
- input,
258
- textarea,
259
- select,
260
- button {
261
- @include rubik;
262
- @include fs-body-short;
263
- color: $slate-blue;
264
- font-weight: $t-normal;
265
- -webkit-font-size-adjust: 100%;
266
- }
267
-
268
- input,
269
- textarea,
270
- select {
271
- color: $slate-blue;
272
- }
273
-
274
- .site {
275
- font-size: 1.0625em;
276
- }
277
-
278
- label,
279
- legend {
280
- font-size: (24em / 17);
281
- letter-spacing: -0.016em;
282
- line-height: 1.5;
283
- @include font-smoothing;
284
- margin-bottom: 0.5rem;
285
- }
286
-
287
- legend {
288
- margin-bottom: 0.75rem;
289
- }
290
-
291
- b, strong {
292
- font-weight: $t-bold;
293
- }
294
-
295
- // Make italic fonts bold, since we're
296
- // not loading italic font weights
297
- em, i {
298
- font-style: normal;
299
- font-weight: $t-bold;
300
- }
301
-
302
- input,
303
- textarea,
304
- select {
305
- @include input-border;
306
- border-radius: 8px;
307
- &:focus {
308
- @include input-border-focus;
309
- }
310
- }
311
-
312
- input[type='text'],
313
- input[type='email'],
314
- input[type='url'],
315
- input[type='tel'],
316
- input[type='number'],
317
- input[type='password'],
318
- input[type='date'],
319
- input[type='time'],
320
- input[type='search'],
321
- textarea,
322
- select {
323
- padding: 0.64rem 1rem;
324
- }
325
-
326
- // Cross-browser consistency / bug fixes
327
-
328
- input::-webkit-outer-spin-button,
329
- input::-webkit-inner-spin-button,
330
- input::-webkit-calendar-picker-indicator {
331
- -webkit-appearance: none;
332
- margin: 0;
333
- }
334
-
335
- input[type=number] {
336
- -moz-appearance: textfield;
337
- }
338
-
339
- input[type='search'] {
340
- -webkit-appearance: none;
341
- }
342
-
343
- ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
344
- color: rgba($slate-blue, 0.6);
345
- }
346
- ::-moz-placeholder { /* Firefox 19+ */
347
- color: rgba($slate-blue, 0.6);
348
- }
349
- :-ms-input-placeholder { /* IE 10+ */
350
- color: rgba($slate-blue, 0.6);
351
- }
352
- :-moz-placeholder { /* Firefox 18- */
353
- color: rgba($slate-blue, 0.6);
354
- }
355
-
356
- button,
357
- input[type='submit'] {
358
- -webkit-appearance: none;
359
- -moz-appearance: none;
360
- }
361
-
362
- input[type='date'],
363
- input[type='time'] {
364
- // Fix styling inconsistencies with
365
- // date and time inputs on iOS
366
- -webkit-appearance: textfield;
367
- -moz-appearance: textfield;
368
- min-height: 3rem;
369
- }
370
-
371
- input[type='file'] {
372
- border: none;
373
- padding: 0;
374
- }
375
-
376
- // Checkbox and radio button styles
377
-
378
- $rc-size: 3rem;
379
-
380
- .checkbox,
381
- .radio {
382
- position: relative;
383
- padding-left: $rc-size + 0.75rem;
384
- margin-bottom: 1rem;
385
- min-height: $rc-size;
386
-
387
- input,
388
- .inline-label::before {
389
- position: absolute;
390
- top: 0;
391
- left: 0;
392
- width: $rc-size;
393
- height: $rc-size;
394
- }
395
-
396
- input {
397
- -webkit-appearance: none;
398
- -moz-appearance: none;
399
- opacity: 0;
400
- padding: 0;
401
- margin: 0;
402
- &:focus + .inline-label:before {
403
- @include input-border-focus;
404
- }
405
- }
406
-
407
- .inline-label {
408
- display: block;
409
- font-size: initial;
410
- padding-top: 0.75rem;
411
- &::before {
412
- content: '';
413
- @include input-border;
414
- }
415
- }
416
- }
417
-
418
- .radio {
419
- .inline-label::before,
420
- .inline-label::after {
421
- border-radius: 50%;
422
- }
423
-
424
- .inline-label::after {
425
- content: '';
426
- width: $rc-size * 0.625;
427
- height: $rc-size * 0.625;
428
- top: $rc-size * 0.1875;
429
- left: $rc-size * 0.1875;
430
- z-index: 2;
431
- position: absolute;
432
- }
433
-
434
- input:checked {
435
- + .inline-label::after {
436
- background: $slate-blue;
437
- }
438
-
439
- &:focus + .inline-label:after {
440
- background: $bright-blue;
441
- }
442
- }
443
-
444
- input:focus + .inline-label:before {
445
- background: $white;
446
- }
447
- }
448
-
449
-
450
- .checkbox input:checked {
451
- + .inline-label::before {
452
- background-size: 50% 40%;
453
- background-repeat: no-repeat;
454
- background-position: center;
455
- background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNS43NTAwOSAxNi43NTVDNS41ODU3OSAxNi43NTU2IDUuNDIzIDE2LjcyMzYgNS4yNzExMSAxNi42NjFDNS4xMTkyMSAxNi41OTg0IDQuOTgxMjIgMTYuNTA2MyA0Ljg2NTA5IDE2LjM5TDAuMzY1MDkgMTEuODlDMC4yNDU4NzYgMTEuNzc0NiAwLjE1MDg1NCAxMS42MzY1IDAuMDg1NTY3OCAxMS40ODM5QzAuMDIwMjgxMyAxMS4zMzEzIC0wLjAxMzk2MjMgMTEuMTY3MiAtMC4wMTUxNjQ5IDExLjAwMTNDLTAuMDE2MzY3NiAxMC44MzUzIDAuMDE1NDk0NyAxMC42NzA3IDAuMDc4NTYyOSAxMC41MTcyQzAuMTQxNjMxIDEwLjM2MzcgMC4yMzQ2NDIgMTAuMjI0MyAwLjM1MjE3IDEwLjEwNzFDMC40Njk2OTcgOS45ODk4OCAwLjYwOTM4OCA5Ljg5NzI2IDAuNzYzMDkgOS44MzQ2M0MwLjkxNjc5MyA5Ljc3MiAxLjA4MTQzIDkuNzQwNiAxLjI0NzQgOS43NDIyN0MxLjQxMzM2IDkuNzQzOTQgMS41NzczMyA5Ljc3ODY1IDEuNzI5NzQgOS44NDQzN0MxLjg4MjE1IDkuOTEwMDkgMi4wMTk5NSAxMC4wMDU1IDIuMTM1MDkgMTAuMTI1TDUuNzUwMDkgMTMuNzRMMTcuODcwMSAxLjYyMDA0QzE4LjEwNjIgMS4zOTI2NSAxOC40MjIxIDEuMjY3MDkgMTguNzQ5OSAxLjI3MDM5QzE5LjA3NzYgMS4yNzM2OSAxOS4zOTA5IDEuNDA1NiAxOS42MjI0IDEuNjM3NjlDMTkuODUzOCAxLjg2OTc5IDE5Ljk4NDkgMi4xODM1MSAxOS45ODcyIDIuNTExMjdDMTkuOTg5NiAyLjgzOTAzIDE5Ljg2MzEgMy4xNTQ2MSAxOS42MzUxIDMuMzkwMDRMNi42MzUwOSAxNi4zOUM2LjUxODk2IDE2LjUwNjMgNi4zODA5NyAxNi41OTg0IDYuMjI5MDcgMTYuNjYxQzYuMDc3MTggMTYuNzIzNiA1LjkxNDM5IDE2Ljc1NTYgNS43NTAwOSAxNi43NTVaIiBmaWxsPSIjMUMzRTU3Ii8+Cjwvc3ZnPg==');
456
- }
457
-
458
- &:focus + .inline-label::before {
459
- background-color: $bright-blue;
460
- background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNS43NTAwOSAxNi43NTVDNS41ODU3OSAxNi43NTU2IDUuNDIzIDE2LjcyMzYgNS4yNzExMSAxNi42NjFDNS4xMTkyMSAxNi41OTg0IDQuOTgxMjIgMTYuNTA2MyA0Ljg2NTA5IDE2LjM5TDAuMzY1MDkgMTEuODlDMC4yNDU4NzYgMTEuNzc0NiAwLjE1MDg1NCAxMS42MzY1IDAuMDg1NTY3OCAxMS40ODM5QzAuMDIwMjgxMyAxMS4zMzEzIC0wLjAxMzk2MjMgMTEuMTY3MiAtMC4wMTUxNjQ5IDExLjAwMTNDLTAuMDE2MzY3NiAxMC44MzUzIDAuMDE1NDk0NyAxMC42NzA3IDAuMDc4NTYyOSAxMC41MTcyQzAuMTQxNjMxIDEwLjM2MzcgMC4yMzQ2NDIgMTAuMjI0MyAwLjM1MjE3IDEwLjEwNzFDMC40Njk2OTcgOS45ODk4OCAwLjYwOTM4OCA5Ljg5NzI2IDAuNzYzMDkgOS44MzQ2M0MwLjkxNjc5MyA5Ljc3MiAxLjA4MTQzIDkuNzQwNiAxLjI0NzQgOS43NDIyN0MxLjQxMzM2IDkuNzQzOTQgMS41NzczMyA5Ljc3ODY1IDEuNzI5NzQgOS44NDQzN0MxLjg4MjE1IDkuOTEwMDkgMi4wMTk5NSAxMC4wMDU1IDIuMTM1MDkgMTAuMTI1TDUuNzUwMDkgMTMuNzRMMTcuODcwMSAxLjYyMDA0QzE4LjEwNjIgMS4zOTI2NSAxOC40MjIxIDEuMjY3MDkgMTguNzQ5OSAxLjI3MDM5QzE5LjA3NzYgMS4yNzM2OSAxOS4zOTA5IDEuNDA1NiAxOS42MjI0IDEuNjM3NjlDMTkuODUzOCAxLjg2OTc5IDE5Ljk4NDkgMi4xODM1MSAxOS45ODcyIDIuNTExMjdDMTkuOTg5NiAyLjgzOTAzIDE5Ljg2MzEgMy4xNTQ2MSAxOS42MzUxIDMuMzkwMDRMNi42MzUwOSAxNi4zOUM2LjUxODk2IDE2LjUwNjMgNi4zODA5NyAxNi41OTg0IDYuMjI5MDcgMTYuNjYxQzYuMDc3MTggMTYuNzIzNiA1LjkxNDM5IDE2Ljc1NTYgNS43NTAwOSAxNi43NTVaIiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPg==');
461
- }
462
- }
463
-
464
- // Buttons
465
-
466
- button,
467
- input[type='submit'],
468
- .btn {
469
- border-radius: $radius;
470
- font-weight: $t-bold;
471
- padding: 0.75rem 1.5rem;
472
- display: inline-block;
473
- text-decoration: none;
474
- margin: 0 0.4375rem 0.875rem 0;
475
- }
476
-
477
- button,
478
- input[type='submit'] {
479
- border: 3px solid $bright-blue;
480
- background: $bright-blue;
481
- color: $white;
482
- line-height: 1.75;
483
- &:hover, &:focus {
484
- background: darken($bright-blue, 10%);
485
- border-color: darken($bright-blue, 10%);
486
- }
487
-
488
- &:active {
489
- background: darken($bright-blue, 15%);
490
- border-color: darken($bright-blue, 15%);
491
- }
492
-
493
- &:hover, &:active, &:focus, &:visited {
494
- color: $white;
495
- text-decoration: none;
496
- }
497
- }
498
-
499
- // Dropdowns
500
-
501
- select {
502
- display: block;
503
- background-repeat: no-repeat;
504
- -moz-appearance: none;
505
- -webkit-appearance: none;
506
- // Background gradient needed for <= IE9
507
- // See https://www.filamentgroup.com/lab/select-css.html
508
- background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTEiIHZpZXdCb3g9IjAgMCAxOCAxMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguOTYwMDggMTAuNzU1QzguNzk1NzcgMTAuNzU1NiA4LjYzMjk4IDEwLjcyMzYgOC40ODEwOSAxMC42NjFDOC4zMjkyIDEwLjU5ODMgOC4xOTEyMSAxMC41MDYyIDguMDc1MDggMTAuMzlMMC41NzUwNzUgMi44OUMwLjM0MDM1OSAyLjY1NTI4IDAuMjA4NDk2IDIuMzM2OTQgMC4yMDg0OTYgMi4wMDVDMC4yMDg0OTYgMS42NzMwNiAwLjM0MDM1OSAxLjM1NDcxIDAuNTc1MDc1IDEuMTJDMC44MDk3OTIgMC44ODUyOCAxLjEyODE0IDAuNzUzNDE4IDEuNDYwMDggMC43NTM0MThDMS43OTIwMSAwLjc1MzQxOCAyLjExMDM2IDAuODg1MjggMi4zNDUwOCAxLjEyTDguOTYwMDggNy43NEwxNS41NzUxIDEuMTJDMTUuODA5OCAwLjg4NTI4IDE2LjEyODEgMC43NTM0MTggMTYuNDYwMSAwLjc1MzQxOEMxNi43OTIgMC43NTM0MTggMTcuMTEwNCAwLjg4NTI4IDE3LjM0NTEgMS4xMkMxNy41Nzk4IDEuMzU0NzEgMTcuNzExNyAxLjY3MzA2IDE3LjcxMTcgMi4wMDVDMTcuNzExNyAyLjMzNjk0IDE3LjU3OTggMi42NTUyOCAxNy4zNDUxIDIuODlMOS44NDUwOCAxMC4zOUM5LjcyODk0IDEwLjUwNjIgOS41OTA5NSAxMC41OTgzIDkuNDM5MDYgMTAuNjYxQzkuMjg3MTcgMTAuNzIzNiA5LjEyNDM4IDEwLjc1NTYgOC45NjAwOCAxMC43NTVaIiBmaWxsPSIjMUMzRTU3Ii8+Cjwvc3ZnPgo='), linear-gradient(#fff, #fff);
509
- &:focus {
510
- background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTEiIHZpZXdCb3g9IjAgMCAxOCAxMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguOTYwMDggMTAuNzU1QzguNzk1NzcgMTAuNzU1NiA4LjYzMjk4IDEwLjcyMzYgOC40ODEwOSAxMC42NjFDOC4zMjkyIDEwLjU5ODMgOC4xOTEyMSAxMC41MDYyIDguMDc1MDggMTAuMzlMMC41NzUwNzUgMi44OUMwLjM0MDM1OSAyLjY1NTI4IDAuMjA4NDk2IDIuMzM2OTQgMC4yMDg0OTYgMi4wMDVDMC4yMDg0OTYgMS42NzMwNiAwLjM0MDM1OSAxLjM1NDcxIDAuNTc1MDc1IDEuMTJDMC44MDk3OTIgMC44ODUyOCAxLjEyODE0IDAuNzUzNDE4IDEuNDYwMDggMC43NTM0MThDMS43OTIwMSAwLjc1MzQxOCAyLjExMDM2IDAuODg1MjggMi4zNDUwOCAxLjEyTDguOTYwMDggNy43NEwxNS41NzUxIDEuMTJDMTUuODA5OCAwLjg4NTI4IDE2LjEyODEgMC43NTM0MTggMTYuNDYwMSAwLjc1MzQxOEMxNi43OTIgMC43NTM0MTggMTcuMTEwNCAwLjg4NTI4IDE3LjM0NTEgMS4xMkMxNy41Nzk4IDEuMzU0NzEgMTcuNzExNyAxLjY3MzA2IDE3LjcxMTcgMi4wMDVDMTcuNzExNyAyLjMzNjk0IDE3LjU3OTggMi42NTUyOCAxNy4zNDUxIDIuODlMOS44NDUwOCAxMC4zOUM5LjcyODk0IDEwLjUwNjIgOS41OTA5NSAxMC41OTgzIDkuNDM5MDYgMTAuNjYxQzkuMjg3MTcgMTAuNzIzNiA5LjEyNDM4IDEwLjc1NTYgOC45NjAwOCAxMC43NTVaIiBmaWxsPSIjNEY2NkVFIi8+Cjwvc3ZnPgo='), linear-gradient(#fff, #fff);
511
- }
512
- background-size: 18px 11px;
513
- background-position: right 1rem top 50%;
514
- padding-right: 3rem;
515
- border: 2px solid $slate-blue;
516
-
517
- option {
518
- font-weight: normal;
519
- font-size: 100%;
520
- }
521
- }
522
-
523
- select:-moz-focusring {
524
- color: transparent;
525
- text-shadow: 0 0 0 $bright-blue;
526
- }
527
-
528
- select::-ms-expand {
529
- // Hide browser-standard chevron on IE
530
- display: none;
531
- }
532
-
533
- option:not(:checked) {
534
- color: $black;
535
- }
536
-
537
- // Section headers
538
-
539
- @mixin h1 {
540
- color: $slate-blue;
541
- font-weight: $t-bold;
542
- margin: 1.75rem 0 0;
543
- @include font-size-to-rem(33);
544
- @include line-height-to-rem(44);
545
- &.title {
546
- line-height: normal;
547
- font-weight: $t-light;
548
- }
549
- @media screen and (min-width: 40rem) {
550
- @include font-size-to-rem(62);
551
- line-height: normal;
552
- letter-spacing: -0.3px;
553
- &.title {
554
- @include font-size-to-rem(50);
555
- letter-spacing: 0;
556
- }
557
- }
558
- }
559
-
560
- @mixin h2 {
561
- color: $slate-blue;
562
- font-weight: $t-bold;
563
- margin: 1.25rem 0 0.875rem;
564
- @include font-size-to-rem(40);
565
- line-height: normal;
566
- }
567
-
568
- @mixin h3 {
569
- color: $slate-blue;
570
- font-weight: $t-bold;
571
- margin: 1.25rem 0 0.875rem;
572
- @include font-size-to-rem(30);
573
- @include line-height-to-rem(42);
574
- }
575
-
576
- @mixin h4 {
577
- font-weight: $t-normal;
578
- margin: 1.25rem 0 0.875rem;
579
- @include font-size-to-rem(24);
580
- @include line-height-to-rem(34);
581
- }
582
-
583
- @mixin h5 {
584
- margin: 1rem 0 0.875rem;
585
- font-weight: $t-bold;
586
- @include font-size-to-rem(20);
587
- @include line-height-to-rem(27);
588
- }
589
-
590
- @mixin display-2 {
591
- font-weight: $t-light;
592
- @include font-size-to-rem(50);
593
- @include line-height-to-rem(59);
594
- letter-spacing: -1px;
595
- }
596
-
597
- .t-display-2 {
598
- @include display-2;
599
- }
600
-
601
- h1, .h1 {
602
- @include h1;
603
- }
604
-
605
- h2, .h2 {
606
- @include h2;
607
- }
608
-
609
- h3, .h3 {
610
- @include h3;
611
- }
612
-
613
- h4, .h4 {
614
- @include h4;
615
- }
616
-
617
- h5, .h5 {
618
- @include h5;
619
- }
620
-
621
- // Form layout
622
-
623
- .form-section-header {
624
- @include h3;
625
- margin-top: 0;
626
- }
627
-
628
- .form-group {
629
- margin-bottom: 2.5rem;
630
-
631
- p + &,
632
- ul + & {
633
- margin-top: 2rem;
634
- }
635
- }
636
-
637
- .form-content {
25
+ form {
638
26
  @include contain-1090;
639
27
  }
640
28
 
641
- .form-header-meta {
642
- position: relative;
643
- margin-bottom: 1.5rem;
29
+ .form-group {
30
+ @include clearfix;
644
31
  }
645
32
 
646
- .form-header-meta,
647
- .form-section h1,
648
- .form-content-inner {
33
+ .sections-container {
649
34
  max-width: 38rem;
650
- }
651
-
652
- .form-section-nav {
653
- background: $blue-1;
654
- border-radius: $radius;
655
- padding: 4.5rem 0 1.5rem;
656
-
657
- &::before {
658
- top: 1.75rem;
659
- left: 2rem;
660
- @include h5;
661
- color: $slate-blue;
662
- margin-top: 0;
663
- }
664
-
665
- li {
666
- padding: 1rem 2rem;
667
- color: $bright-blue;
668
- &.active {
669
- font-weight: $t-bold;
670
- background: $bright-blue;
671
- color: $white;
672
- @include font-smoothing;
673
-
674
- &::before {
675
- content: none;
676
- }
677
- }
678
- }
679
- }
680
-
681
- @media screen and (min-width: 40rem), screen and (min-width: 70rem) {
682
- .form-horizontal {
683
- width: 60%;
684
- }
685
-
686
- .form-section-nav {
687
- width: 33%;
688
- margin-right: 5%;
689
- }
690
- }
691
-
692
- .help-text {
693
- color: $slate-blue;
694
- font-size: (15rem / 17);
695
-
696
- p:first-child {
697
- margin-top: 0.5rem;
698
- }
699
-
700
- p, ul {
701
- margin: 0;
702
- }
703
-
704
- }
705
-
706
- .has-error .help-block {
707
- font-size: 1rem;
708
- background: $red-4;
709
- color: $white;
710
- padding: 0.25rem 0.75rem;
711
- border-radius: $radius;
712
- display: inline-block;
713
- @include font-smoothing;
714
-
715
- &.with-errors-inline {
716
- @include fs-small-text;
717
- padding: 0;
718
- background: transparent;
719
- color: $red-4;
720
- position: relative;
721
- top: -0.25rem;
722
- margin: 0 0 1rem;
723
- }
724
-
725
- li {
726
- list-style-type: none;
727
- }
728
- }
729
-
730
- .form-section-prev,
731
- .form-section-next {
732
- border: 3px solid $bright-blue;
733
- color: $bright-blue;
734
- background-size: 20px 16px;
735
- font-weight: $t-bold;
736
-
737
- &:hover, &:focus, &:active {
738
- box-shadow: 0 0 0 1px $bright-blue;
739
- background-color: rgba($bright-blue, 0.05);
740
- }
741
- }
742
-
743
- .form-section-prev {
744
- padding-left: 3rem;
745
- background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuMzY0NjggOC44ODQ5M0w2LjcyOTY4IDE1LjI0OTlDNi44Mzk5MiAxNS4zODQ2IDYuOTc3MDUgMTUuNDk0NyA3LjEzMjI5IDE1LjU3MzNDNy4yODc1NCAxNS42NTE5IDcuNDU3NDkgMTUuNjk3MiA3LjYzMTI1IDE1LjcwNjNDNy44MDUwMSAxNS43MTU0IDcuOTc4NzcgMTUuNjg4MiA4LjE0MTM5IDE1LjYyNjNDOC4zMDQwMiAxNS41NjQ0IDguNDUxOTMgMTUuNDY5MiA4LjU3NTY3IDE1LjM0NjlDOC42OTk0MSAxNS4yMjQ2IDguNzk2MjQgMTUuMDc3NyA4Ljg1OTk3IDE0LjkxNThDOC45MjM3IDE0Ljc1MzkgOC45NTI5MiAxNC41ODA1IDguOTQ1NzcgMTQuNDA2NkM4LjkzODYxIDE0LjIzMjggOC44OTUyNCAxNC4wNjIzIDguODE4NDMgMTMuOTA2MkM4Ljc0MTYxIDEzLjc1MDEgOC42MzMwNSAxMy42MTE3IDguNDk5NjggMTMuNDk5OUw0LjI2OTY4IDkuMjQ5OTNIMTguNzY5N0MxOS4xMDEyIDkuMjQ5OTMgMTkuNDE5MSA5LjExODIzIDE5LjY1MzYgOC44ODM4MUMxOS44ODggOC42NDkzOSAyMC4wMTk3IDguMzMxNDUgMjAuMDE5NyA3Ljk5OTkzQzIwLjAxOTcgNy42Njg0MSAxOS44ODggNy4zNTA0NiAxOS42NTM2IDcuMTE2MDRDMTkuNDE5MSA2Ljg4MTYyIDE5LjEwMTIgNi43NDk5MyAxOC43Njk3IDYuNzQ5OTNINC4yNjk2OEw4LjQ5OTY4IDIuNDk5OTNDOC42OTY5IDIuMjU5MDcgOC43OTcxNSAxLjk1MzMgOC43ODA4MiAxLjY0MjQzQzguNzY0NDkgMS4zMzE1NyA4LjYzMjc1IDEuMDM3OTggOC40MTEzOCAwLjgxOTExOEM4LjE5MDAyIDAuNjAwMjUzIDcuODk0OTUgMC40NzE4NjIgNy41ODM5MiAwLjQ1OTA2NUM3LjI3Mjg5IDAuNDQ2MjY5IDYuOTY4MjggMC41NDk5ODcgNi43Mjk2OCAwLjc0OTkyN0wwLjM2NDY4IDcuMTE0OTNDMC4xMzA3OTggNy4zNTAwOSAtMC4wMDA0ODgyODEgNy42NjgyNiAtMC4wMDA0ODgyODEgNy45OTk5M0MtMC4wMDA0ODgyODEgOC4zMzE1OSAwLjEzMDc5OCA4LjY0OTc3IDAuMzY0NjggOC44ODQ5M1oiIGZpbGw9IiM0RjY2RUUiLz4KPC9zdmc+Cg==')left 1rem top 50% no-repeat;
746
- }
747
-
748
- .form-section-next {
749
- padding-right: 3rem;
750
- background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5LjYzNSA3LjExNDkzTDEzLjI3IDAuNzQ5OTI3QzEzLjAzMTQgMC41NDk5ODcgMTIuNzI2OCAwLjQ0NjI2OSAxMi40MTU4IDAuNDU5MDY1QzEyLjEwNDcgMC40NzE4NjIgMTEuODA5NyAwLjYwMDI1MyAxMS41ODgzIDAuODE5MTE4QzExLjM2NjkgMS4wMzc5OCAxMS4yMzUyIDEuMzMxNTcgMTEuMjE4OSAxLjY0MjQzQzExLjIwMjUgMS45NTMzIDExLjMwMjggMi4yNTkwNyAxMS41IDIuNDk5OTNMMTUuNzMgNi43Mjk5M0gxLjI1QzAuOTE4NDc5IDYuNzI5OTMgMC42MDA1MzcgNi44NjE2MiAwLjM2NjExNyA3LjA5NjA0QzAuMTMxNjk2IDcuMzMwNDYgMCA3LjY0ODQxIDAgNy45Nzk5M0MwIDguMzExNDUgMC4xMzE2OTYgOC42MjkzOSAwLjM2NjExNyA4Ljg2MzgxQzAuNjAwNTM3IDkuMDk4MjMgMC45MTg0NzkgOS4yMjk5MyAxLjI1IDkuMjI5OTNIMTUuNzVMMTEuNSAxMy40OTk5QzExLjI2NTMgMTMuNzM0NiAxMS4xMzM0IDE0LjA1MyAxMS4xMzM0IDE0LjM4NDlDMTEuMTMzNCAxNC43MTY5IDExLjI2NTMgMTUuMDM1MiAxMS41IDE1LjI2OTlDMTEuNzM0NyAxNS41MDQ2IDEyLjA1MzEgMTUuNjM2NSAxMi4zODUgMTUuNjM2NUMxMi43MTY5IDE1LjYzNjUgMTMuMDM1MyAxNS41MDQ2IDEzLjI3IDE1LjI2OTlMMTkuNjM1IDguODg0OTNDMTkuODY4OSA4LjY0OTc3IDIwLjAwMDIgOC4zMzE1OSAyMC4wMDAyIDcuOTk5OTNDMjAuMDAwMiA3LjY2ODI2IDE5Ljg2ODkgNy4zNTAwOSAxOS42MzUgNy4xMTQ5M1oiIGZpbGw9IiM0RjY2RUUiLz4KPC9zdmc+Cg==') right 1rem top 50% no-repeat;
751
- }
752
-
753
- .btn.submit {
754
- float: right;
755
- }
756
-
757
- // Field-specific styles
758
-
759
- .field-number {
760
- input, .units {
761
- display: inline-block;
762
- }
763
-
764
- .units {
765
- margin-left: 0.5rem;
766
- }
767
- }
768
-
769
- .field-price {
770
- input {
771
- width: 10rem;
772
- }
773
-
774
- input, .dollar {
775
- display: inline-block;
776
- }
777
-
778
- .dollar {
779
- font-weight: $t-light;
780
- font-size: 3rem;
781
- line-height: 1;
782
- position: relative;
783
- top: 0.75rem;
784
- margin-right: 0.5rem;
785
- color: $slate-blue;
786
- }
35
+ padding-bottom: 60px;
787
36
  }
788
37
 
789
38
  div[data-hidden] {
@@ -798,22 +47,6 @@ div[data-hidden] {
798
47
  border: 0;
799
48
  }
800
49
 
801
- .field-address {
802
-
803
- .form-group {
804
- margin-bottom: 0;
805
- }
806
-
807
- label {
808
- font-size: (15rem / 17);
809
- margin: 0 0 0.25rem;
810
- }
811
-
812
- input {
813
- margin-bottom: 0.75rem;
814
- }
815
- }
816
-
817
50
  .optional {
818
51
  opacity: 0.8;
819
52
  }
@@ -840,159 +73,4 @@ div[data-hidden] {
840
73
  line-height: 1;
841
74
  padding: 0.5rem;
842
75
  height: 2.5rem;
843
- }
844
-
845
- @media screen and (min-width: 48rem) {
846
- .field-address-state,
847
- .field-address-zip {
848
- display: inline-block;
849
- }
850
-
851
- .field-address-state {
852
- margin-right: 0.75rem;
853
- }
854
- }
855
-
856
- .field-link {
857
- a {
858
- display: block;
859
- border: 3px solid $bright-blue;
860
- padding: 2rem;
861
- @include h5;
862
- color: $bright-blue;
863
- text-decoration: none;
864
- border-radius: 8px;
865
- }
866
- }
867
-
868
- .field-file {
869
- label {
870
- position: relative;
871
- cursor: pointer;
872
- height: 6.5rem;
873
- }
874
-
875
- input {
876
- min-width: 14rem;
877
- margin: 0;
878
- filter: alpha(opacity=0);
879
- opacity: 0;
880
- }
881
-
882
- .file-custom {
883
- font-size: 1rem;
884
- position: absolute;
885
- padding-top: 2.75rem;
886
- top: 0;
887
- right: 0;
888
- left: 0;
889
- z-index: 5;
890
- white-space: nowrap;
891
- overflow: hidden;
892
- text-overflow: ellipsis;
893
- -webkit-user-select: none;
894
- -moz-user-select: none;
895
- -ms-user-select: none;
896
- user-select: none;
897
-
898
- &::after {
899
- content: attr(data-filename);
900
- }
901
-
902
- &::before {
903
- @extend button;
904
- z-index: 6;
905
- content: "Choose a file";
906
- background: $white;
907
- color: $bright-blue;
908
- background-size: 20px 16px;
909
- font-weight: $t-bold;
910
- }
911
-
912
- &:hover, &:focus, &:active {
913
- &::before {
914
- box-shadow: inset 0 0 0 2px darken($bright-blue, 10%);
915
- color: darken($bright-blue, 10%);
916
- background-color: rgba($bright-blue, 0.05);
917
- color: $bright-blue;
918
- }
919
- }
920
- }
921
- }
922
-
923
- // Progress
924
-
925
- .form-progress {
926
- position: absolute;
927
- top: 0;
928
- right: 0;
929
- }
930
-
931
- .form-progress-bubble {
932
- background: $purple-1;
933
- padding: 0.25rem 1rem;
934
- border-radius: 1.5rem;
935
- position: relative;
936
- top: -0.25rem;
937
- font-size: 1rem;
938
- }
939
-
940
- .form-progress-bar {
941
- font-size: 0;
942
- color: transparent;
943
- background: $purple-1;
944
- height: 0.75rem;
945
- display: inline-block;
946
- width: 10rem;
947
- position: relative;
948
- top: -0.125rem;
949
- border-radius: 0.375rem;
950
- &::before {
951
- content: '';
952
- background: #6b8292;
953
- height: 0.75rem;
954
- border-radius: 0.375rem 0 0 0.375rem;
955
- position: absolute;
956
- top: 0;
957
- left: 0;
958
- }
959
- }
960
-
961
- @for $i from 1 to 90 {
962
- .form-progress-bar-#{$i}::before {
963
- width: $i * 1%;
964
- }
965
- }
966
-
967
- @for $i from 91 to 99 {
968
- .form-progress-bar-#{$i} {
969
- background: #6b8292;
970
- &::before {
971
- background: $purple-1;
972
- left: auto;
973
- right: 0;
974
- border-radius: 0 0.375rem 0.375rem 0;
975
- width: (100% - ($i * 1%));
976
- }
977
- }
978
- }
979
-
980
-
981
- // Field length
982
-
983
- @for $i from 1 to 16 {
984
- .length-#{$i} {
985
- width: 2.5rem + (0.65rem * $i);
986
- margin-bottom: 1rem;
987
- }
988
- }
989
-
990
- // Header
991
-
992
- .hero-banner h2 {
993
- font-size: 1rem;
994
- font-weight: $t-normal;
995
- margin-bottom: 0.25rem;
996
- }
997
-
998
- @import 'sfgov';
76
+ }
@@ -89,8 +89,48 @@ $shadow: 0 1px 4px rgba(#000, 0.06);
89
89
  }
90
90
  }
91
91
 
92
+ // Annotations
93
+
94
+ .field-annotation {
95
+ display: none;
96
+ background: $yellow-1;
97
+ padding: 0.75rem;
98
+ font-size: 0.875rem;
99
+ position: absolute;
100
+ top: 2.5rem;
101
+ left: 0;
102
+ box-shadow: 0 3px 0 $slate-blue;
103
+ border: 1px solid $slate-blue;
104
+ z-index: 20;
105
+ border-radius: 2px;
106
+
107
+ .radio &,
108
+ .checkbox & {
109
+ left: 8rem;
110
+ top: 0;
111
+ }
112
+
113
+ p {
114
+ margin: 0 0 0.25rem;
115
+
116
+ &:last-child {
117
+ margin-bottom: 0;
118
+ }
119
+ }
120
+ }
121
+
92
122
  // Form settings
93
123
 
124
+ .form-settings,
125
+ hypothesis-adder,
126
+ .annotator-outer {
127
+ display: none;
128
+
129
+ .admin & {
130
+ display: block;
131
+ }
132
+ }
133
+
94
134
  .form-settings {
95
135
  $offset: 4.5rem;
96
136
  background: #fff;
@@ -126,6 +166,10 @@ $shadow: 0 1px 4px rgba(#000, 0.06);
126
166
  }
127
167
  }
128
168
 
169
+ .form-group {
170
+ margin-bottom: 0.5rem;
171
+ }
172
+
129
173
  &.active {
130
174
  transform: translateY($offset);
131
175
 
@@ -135,35 +179,6 @@ $shadow: 0 1px 4px rgba(#000, 0.06);
135
179
  }
136
180
  }
137
181
 
138
- .field-annotation {
139
- display: none;
140
- background: $yellow-1;
141
- padding: 0.75rem;
142
- font-size: 0.875rem;
143
- position: absolute;
144
- top: 2.5rem;
145
- left: 0;
146
- box-shadow: 0 3px 0 $slate-blue;
147
- border: 1px solid $slate-blue;
148
- z-index: 20;
149
- border-radius: 2px;
150
-
151
- .radio &,
152
- .checkbox & {
153
- left: 8rem;
154
- top: 0;
155
- }
156
-
157
- p {
158
- margin: 0 0 0.25rem;
159
-
160
- &:last-child {
161
- margin-bottom: 0;
162
- }
163
- }
164
- }
165
-
166
-
167
182
  // Settings body classes
168
183
 
169
184
  .all-pages {
@@ -0,0 +1,11 @@
1
+ /* mousetrap v1.6.3 craig.is/killing/mice */
2
+ (function(q,u,c){function v(a,b,g){a.addEventListener?a.addEventListener(b,g,!1):a.attachEvent("on"+b,g)}function z(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return n[a.which]?n[a.which]:r[a.which]?r[a.which]:String.fromCharCode(a.which).toLowerCase()}function F(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function w(a){return"shift"==a||"ctrl"==a||"alt"==a||
3
+ "meta"==a}function A(a,b){var g,d=[];var e=a;"+"===e?e=["+"]:(e=e.replace(/\+{2}/g,"+plus"),e=e.split("+"));for(g=0;g<e.length;++g){var m=e[g];B[m]&&(m=B[m]);b&&"keypress"!=b&&C[m]&&(m=C[m],d.push("shift"));w(m)&&d.push(m)}e=m;g=b;if(!g){if(!p){p={};for(var c in n)95<c&&112>c||n.hasOwnProperty(c)&&(p[n[c]]=c)}g=p[e]?"keydown":"keypress"}"keypress"==g&&d.length&&(g="keydown");return{key:m,modifiers:d,action:g}}function D(a,b){return null===a||a===u?!1:a===b?!0:D(a.parentNode,b)}function d(a){function b(a){a=
4
+ a||{};var b=!1,l;for(l in p)a[l]?b=!0:p[l]=0;b||(x=!1)}function g(a,b,t,f,g,d){var l,E=[],h=t.type;if(!k._callbacks[a])return[];"keyup"==h&&w(a)&&(b=[a]);for(l=0;l<k._callbacks[a].length;++l){var c=k._callbacks[a][l];if((f||!c.seq||p[c.seq]==c.level)&&h==c.action){var e;(e="keypress"==h&&!t.metaKey&&!t.ctrlKey)||(e=c.modifiers,e=b.sort().join(",")===e.sort().join(","));e&&(e=f&&c.seq==f&&c.level==d,(!f&&c.combo==g||e)&&k._callbacks[a].splice(l,1),E.push(c))}}return E}function c(a,b,c,f){k.stopCallback(b,
5
+ b.target||b.srcElement,c,f)||!1!==a(b,c)||(b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0)}function e(a){"number"!==typeof a.which&&(a.which=a.keyCode);var b=z(a);b&&("keyup"==a.type&&y===b?y=!1:k.handleKey(b,F(a),a))}function m(a,g,t,f){function h(c){return function(){x=c;++p[a];clearTimeout(q);q=setTimeout(b,1E3)}}function l(g){c(t,g,a);"keyup"!==f&&(y=z(g));setTimeout(b,10)}for(var d=p[a]=0;d<g.length;++d){var e=d+1===g.length?l:h(f||
6
+ A(g[d+1]).action);n(g[d],e,f,a,d)}}function n(a,b,c,f,d){k._directMap[a+":"+c]=b;a=a.replace(/\s+/g," ");var e=a.split(" ");1<e.length?m(a,e,b,c):(c=A(a,c),k._callbacks[c.key]=k._callbacks[c.key]||[],g(c.key,c.modifiers,{type:c.action},f,a,d),k._callbacks[c.key][f?"unshift":"push"]({callback:b,modifiers:c.modifiers,action:c.action,seq:f,level:d,combo:a}))}var k=this;a=a||u;if(!(k instanceof d))return new d(a);k.target=a;k._callbacks={};k._directMap={};var p={},q,y=!1,r=!1,x=!1;k._handleKey=function(a,
7
+ d,e){var f=g(a,d,e),h;d={};var k=0,l=!1;for(h=0;h<f.length;++h)f[h].seq&&(k=Math.max(k,f[h].level));for(h=0;h<f.length;++h)f[h].seq?f[h].level==k&&(l=!0,d[f[h].seq]=1,c(f[h].callback,e,f[h].combo,f[h].seq)):l||c(f[h].callback,e,f[h].combo);f="keypress"==e.type&&r;e.type!=x||w(a)||f||b(d);r=l&&"keydown"==e.type};k._bindMultiple=function(a,b,c){for(var d=0;d<a.length;++d)n(a[d],b,c)};v(a,"keypress",e);v(a,"keydown",e);v(a,"keyup",e)}if(q){var n={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",
8
+ 18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},r={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},C={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},B={option:"alt",command:"meta","return":"enter",
9
+ escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p;for(c=1;20>c;++c)n[111+c]="f"+c;for(c=0;9>=c;++c)n[c+96]=c.toString();d.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};d.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};d.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};d.prototype.reset=function(){this._callbacks={};
10
+ this._directMap={};return this};d.prototype.stopCallback=function(a,b){if(-1<(" "+b.className+" ").indexOf(" mousetrap ")||D(b,this.target))return!1;if("composedPath"in a&&"function"===typeof a.composedPath){var c=a.composedPath()[0];c!==a.target&&(b=c)}return"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};d.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};d.addKeycodes=function(a){for(var b in a)a.hasOwnProperty(b)&&(n[b]=a[b]);p=null};
11
+ d.init=function(){var a=d(u),b;for(b in a)"_"!==b.charAt(0)&&(d[b]=function(b){return function(){return a[b].apply(a,arguments)}}(b))};d.init();q.Mousetrap=d;"undefined"!==typeof module&&module.exports&&(module.exports=d);"function"===typeof define&&define.amd&&define(function(){return d})}})("undefined"!==typeof window?window:null,"undefined"!==typeof window?document:null);
@@ -14,6 +14,10 @@ $(document).ready(function(){
14
14
  // Initialize bootstrap-validator
15
15
  $(".form").validator();
16
16
 
17
+ Mousetrap.bind(['command+alt+.', 'ctrl+alt+.'], function(e) {
18
+ $('body').toggleClass('admin');
19
+ });
20
+
17
21
  // --- Settings checkboxes ---
18
22
 
19
23
  function settingInit(setting) {
@@ -86,6 +90,12 @@ $(document).ready(function(){
86
90
  event.preventDefault();
87
91
  }
88
92
 
93
+ function validPage() {
94
+ var activePage = $('.form-section.active');
95
+ $('.form-section.active').validator('validate');
96
+ return activePage.children('.has-error').length === 0 ? true : false;
97
+ }
98
+
89
99
  // Previous page
90
100
  $('.form-section-prev').click(function() {
91
101
  paginate(-1);
@@ -93,7 +103,9 @@ $(document).ready(function(){
93
103
 
94
104
  // Next page
95
105
  $('.form-section-next').click(function() {
96
- paginate(1);
106
+ if (validPage()) {
107
+ paginate(1);
108
+ }
97
109
  });
98
110
 
99
111
  // ---- Conditionals ----
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: form-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Rubenoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-08 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -105,6 +105,7 @@ files:
105
105
  - assets/images/settings-toggle.svg
106
106
  - assets/images/sfgov.svg
107
107
  - assets/js/jquery.js
108
+ - assets/js/mousetrap.js
108
109
  - assets/js/script.js
109
110
  - assets/js/validator.js
110
111
  homepage: https://github.com/sfdigitalservices/form-jekyll