form-jekyll 0.3.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.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +83 -0
  3. data/_includes/elements/helptext.html +3 -0
  4. data/_includes/elements/label.html +1 -0
  5. data/_includes/fields/address.html +41 -0
  6. data/_includes/fields/checkbox.html +27 -0
  7. data/_includes/fields/email.html +12 -0
  8. data/_includes/fields/file.html +14 -0
  9. data/_includes/fields/group.html +3 -0
  10. data/_includes/fields/header.html +3 -0
  11. data/_includes/fields/link.html +6 -0
  12. data/_includes/fields/number.html +20 -0
  13. data/_includes/fields/paragraph.html +1 -0
  14. data/_includes/fields/phone.html +14 -0
  15. data/_includes/fields/price.html +16 -0
  16. data/_includes/fields/radio.html +34 -0
  17. data/_includes/fields/select.html +15 -0
  18. data/_includes/fields/text.html +18 -0
  19. data/_includes/fields/textarea.html +12 -0
  20. data/_includes/pagination.html +14 -0
  21. data/_includes/render_field.html +55 -0
  22. data/_includes/render_form.html +34 -0
  23. data/_includes/sfgov/alpha-banner.html +7 -0
  24. data/_includes/sfgov/footer.html +49 -0
  25. data/_includes/sfgov/header.html +47 -0
  26. data/_layouts/default.html +59 -0
  27. data/_sass/sfgov.scss +471 -0
  28. data/_sass/variables.scss +462 -0
  29. data/assets/css/main.scss +886 -0
  30. data/assets/css/style.scss +146 -0
  31. data/assets/favicon.ico +0 -0
  32. data/assets/images/globe-blue.svg +1 -0
  33. data/assets/images/logo-white.svg +100 -0
  34. data/assets/images/logo.svg +1 -0
  35. data/assets/images/settings-toggle.svg +3 -0
  36. data/assets/images/sfgov.svg +8 -0
  37. data/assets/js/jquery.js +2 -0
  38. data/assets/js/script.js +187 -0
  39. data/assets/js/validator.js +9 -0
  40. metadata +129 -0
@@ -0,0 +1,7 @@
1
+ <div class="sfgov-alpha-banner">
2
+ <div class="sfgov-alpha-banner__container">
3
+ <div class="sfgov-alpha-banner__content">
4
+ <p>This is a prototype. It is NOT a real form.</p>
5
+ </div>
6
+ </div>
7
+ </div>
@@ -0,0 +1,49 @@
1
+ <footer class="sfgov-footer" role="contentinfo">
2
+ <div class="sfgov-footer__container">
3
+ <div class="sfgov-footer-nav">
4
+ <nav role="navigation" aria-labelledby="block-sfgovpl-footer-menu" id="block-sfgovpl-footer">
5
+
6
+ <h2 class="visually-hidden" id="block-sfgovpl-footer-menu">Footer menu</h2>
7
+
8
+ <nav class="sfgov-footer-navigation">
9
+ <ul class="menu">
10
+ <li>
11
+ <a href="http://sfdhr.org/job-seekers" target="_blank" rel="noopener noreferrer">Jobs with the City</a>
12
+ </li>
13
+ <li>
14
+ <a href="https://sf.gov/contact-us" title="Contact us" data-drupal-link-system-path="node/81">Contact us</a>
15
+ </li>
16
+ <li>
17
+ <a href="https://sf.gov/about-this-website" title="About this website" data-drupal-link-system-path="node/100">About this website</a>
18
+ </li>
19
+ </ul>
20
+ </nav>
21
+ </nav>
22
+
23
+ <nav role="navigation" aria-labelledby="block-footerbottom-menu" id="block-footerbottom">
24
+
25
+ <h2 class="visually-hidden" id="block-footerbottom-menu">Footer Bottom</h2>
26
+
27
+ <nav class="sfgov-footer-navigation-bottom">
28
+ <ul class="menu">
29
+ <li>
30
+ <a href="https://sf.gov/disclaimer" title="Disclaimer" data-drupal-link-system-path="node/75">Disclaimer</a>
31
+ </li>
32
+ <li>
33
+ <a href="https://sf.gov/privacy-policy" title="Privacy policy" data-drupal-link-system-path="node/78">Privacy policy</a>
34
+ </li>
35
+ </ul>
36
+ </nav>
37
+ </nav>
38
+ </div>
39
+
40
+ <div class="logo">
41
+ <span class="seal">
42
+ <img src="/assets/images/logo-white.svg" alt="">
43
+ </span>
44
+ <span class="text">
45
+ City and County <br>of San&nbsp;Francisco
46
+ </span>
47
+ </div>
48
+ </div>
49
+ </footer>
@@ -0,0 +1,47 @@
1
+ <header role="banner">
2
+ <div class="sfgov-nav-container">
3
+ <div class="sfgov-nav-container__content">
4
+ <div class="sfgov-logo__container">
5
+ <a href="https://sf.gov/" class="branding-link">
6
+ <span class="sfgov-logo">
7
+ <span class="sfgov-logo__image">
8
+ <img class="sfgov-logo--seal" src="/assets/images/logo.svg" alt="Home">
9
+ <img class="sfgov-logo--lockup" src="/assets/images/sfgov.svg" alt="Home">
10
+ </span>
11
+ </span>
12
+ </a>
13
+ </div>
14
+
15
+ <div class="head-right--container">
16
+ <button class="sfgov-mobile-translate sfgov-mobile-nav-btn"></button>
17
+ <button class="sfgov-mobile-search sfgov-mobile-nav-btn"></button>
18
+ <button class="sfgov-menu-btn sfgov-mobile-nav-btn">Menu</button>
19
+ <nav role="navigation" class="sfgov-nav sfgov-mobile_nav-container">
20
+ <div class="sfgov-nav-inner">
21
+ <button class="sfgov-nav-close">
22
+ <i class="fa fa-times"></i>
23
+ </button>
24
+ <nav class="sfgov-main-navigation">
25
+ <ul class="menu">
26
+ <li>
27
+ <a href="https://sf.gov/services" data-drupal-link-system-path="services">Services</a>
28
+ </li>
29
+ <li>
30
+ <a href="https://sf.gov/departments" data-drupal-link-system-path="departments">Departments</a>
31
+ </li>
32
+ </ul>
33
+ </nav>
34
+
35
+ <div class="gtranslate_container">
36
+ <div class="gtranslate">
37
+ <select data-gtranslate="sfgov" disabled>
38
+ <option value="">Translate</option>
39
+ </select>
40
+ </div>
41
+ <div>
42
+ </div>
43
+ </nav>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </header>
@@ -0,0 +1,59 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <link rel="stylesheet" href="/assets/css/main.css" />
6
+ <link rel="stylesheet" href="/assets/css/style.css" />
7
+ <meta name="viewport" content="width=device-width;initial-scale=1">
8
+ <meta name="robots" content="noindex, nofollow">
9
+ <title>{{ page.title | default: "SF.GOV prototype" }}</title>
10
+ <link rel="shortcut icon" href="/assets/favicon.ico" />
11
+ <link href="https://fonts.googleapis.com/css?family=Rubik:300,400,400i,500" rel="stylesheet">
12
+ <script src="/assets/js/jquery.js"></script>
13
+ <script src="/assets/js/validator.js"></script>
14
+ <script src="/assets/js/script.js"></script>
15
+ </head>
16
+ <body>
17
+ <script src="https://hypothes.is/embed.js" async></script>
18
+ <div class="layout-container">
19
+ {% include sfgov/alpha-banner.html %}
20
+ {% include sfgov/header.html %}
21
+
22
+ <main role="main">
23
+ <span class="hero-banner--border">
24
+ <span class="hero-banner--border-contain"></span>
25
+ </span>
26
+
27
+ <form class="form">
28
+ {% include render_form.html form=page.form %}
29
+ </form>
30
+ </main>
31
+
32
+ {% include sfgov/footer.html %}
33
+ </div>
34
+
35
+ <div class="form-settings">
36
+ <h5>Settings</h5>
37
+
38
+ <a href="javascript:void(0);" class="form-settings-toggle" title="Toggle settings">
39
+ <img src="/assets/images/settings-toggle.svg" alt="Toggle settings" />
40
+ </a>
41
+
42
+
43
+ <label class="checkbox">
44
+ <input type="checkbox" id="settings-all-pages">
45
+ <span>Show all pages</span>
46
+ </label>
47
+
48
+ <label class="checkbox">
49
+ <input type="checkbox" id="settings-all-conditionals">
50
+ <span>Show hidden conditionals</span>
51
+ </label>
52
+
53
+ <label class="checkbox">
54
+ <input type="checkbox" id="settings-top-nav">
55
+ <span>Show navigation on top</span>
56
+ </label>
57
+ </div>
58
+ </body>
59
+ </html>
@@ -0,0 +1,471 @@
1
+ @import 'variables';
2
+
3
+ .sfds-layout-container {
4
+ .sfds-responsive-container {
5
+ &.sfds-responsive-container-right-zero {
6
+ padding-right: 0;
7
+ }
8
+ }
9
+ }
10
+
11
+ // ---- Alpha Banner ----
12
+
13
+ .sfgov-alpha-banner {
14
+ background: $grey-5;
15
+ padding: 11px 0;
16
+ .sfgov-alpha-banner__content {
17
+ @include contain-1090;
18
+ @include fs-body-short;
19
+ color: $white;
20
+ a {
21
+ color: $white;
22
+ font-weight: normal;
23
+ }
24
+ }
25
+ }
26
+
27
+
28
+ // ---- Logo -----
29
+
30
+ .branding-link {
31
+ text-decoration: none;
32
+ color: $black;
33
+ }
34
+
35
+ .sfgov-logo__container {
36
+ @include media($narrow-screen) {
37
+ padding: 12px 0;
38
+ }
39
+ }
40
+
41
+ .sfgov-logo {
42
+ margin-top: 3px;
43
+
44
+ @include media($narrow-screen) {
45
+ margin-top: 0;
46
+ }
47
+ }
48
+
49
+ .sfgov-logo__image {
50
+ display: block;
51
+
52
+ img {
53
+ display: inline-block;
54
+ vertical-align: middle;
55
+ }
56
+ }
57
+
58
+ .sfgov-logo--seal {
59
+ width: 32px;
60
+ height: 32px;
61
+
62
+ @include media($medium-screen) {
63
+ height: 42px;
64
+ margin-right: 4px;
65
+ width: 42px;
66
+ }
67
+ }
68
+
69
+ .sfgov-logo--lockup {
70
+ width: 86.18px;
71
+ height: 18px;
72
+
73
+ @include media($medium-screen) {
74
+ width: 112px;
75
+ height: 23.39px;
76
+ }
77
+ }
78
+
79
+ // ---- Header ----
80
+
81
+ header[role="banner"] {
82
+ .sfgov-nav-container {
83
+ .sfgov-nav-container__content {
84
+ @include clearfix;
85
+ .sfgov-mobile-nav-btn {
86
+ display: none;
87
+ }
88
+ .sfgov-mobile-btn-close {
89
+ display: none;
90
+ }
91
+ .sfgov-logo__container {
92
+ float: left;
93
+ padding: 0;
94
+ margin: 0;
95
+ }
96
+ .head-right--container {
97
+ float: right;
98
+ width: 75%;
99
+ text-align: right;
100
+ margin-top: 7px;
101
+ > * {
102
+ vertical-align: middle;
103
+ }
104
+ nav {
105
+ display: inline-block;
106
+ .sfgov-nav-inner {
107
+ .sfgov-nav-close {
108
+ display: none;
109
+ }
110
+ .sfgov-main-navigation {
111
+ .menu {
112
+ padding: 0;
113
+ margin: 0;
114
+ list-style-type: none;
115
+ > li {
116
+ display: inline-block;
117
+ margin-right: 25px;
118
+ a {
119
+ color: #5168e4;
120
+ text-decoration: none;
121
+ @include fs-nav-link;
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ .sfgov-search-311-block {
129
+ vertical-align: top;
130
+ margin-top: -10px;
131
+ }
132
+ @include less-than('not-big') {
133
+ nav.sfgov-nav {
134
+ display: none;
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ @include less-than('not-big') {
141
+ position: relative;
142
+ .sfgov-nav-container {
143
+ .sfgov-nav-container__content {
144
+ .sfgov-mobile-menu-container {
145
+ display: block;
146
+ float: right;
147
+ margin-top: 4px;
148
+ }
149
+ .sfgov-mobile-btn-close {
150
+ @include background-image('x-close-white.svg');
151
+ display: block;
152
+ width: 24px;
153
+ height: 24px;
154
+ background-size: cover;
155
+ float: right;
156
+ margin-top: 10px;
157
+ }
158
+ .sfgov-mobile-nav-btn {
159
+ @include rubik;
160
+ display: inline-block;
161
+ font-size: 17px;
162
+ font-weight: $t-medium;
163
+ margin: 0;
164
+ padding: 0;
165
+ background: transparent;
166
+ color: $bright-blue;
167
+ width: auto;
168
+ vertical-align: middle;
169
+ margin-left: 15px;
170
+ &.sfgov-mobile-search {
171
+ width: 26px;
172
+ height: 26px;
173
+ @include background-image('search-blue.svg');
174
+ background-size: cover;
175
+ }
176
+ }
177
+ .head-right--container {
178
+ width: 54%;
179
+ margin-top: 3px;
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+
186
+ header[role="banner"] {
187
+ padding-bottom: 24px;
188
+ padding-top: 24px;
189
+
190
+ @include media($medium-screen) {
191
+ padding-top: 40px;
192
+ padding-bottom: 40px;
193
+ }
194
+
195
+ #sfgov-search-autocomplete {
196
+ left: 0;
197
+ padding: 15px 20px 60px;
198
+ top: 74px;
199
+ width: 100%;
200
+
201
+ @include media($medium-screen) {
202
+ border-radius: 8px;
203
+ left: auto;
204
+ min-width: 280px;
205
+ right: 50px;
206
+ top: 44px;
207
+ }
208
+
209
+ @include media($narrow-screen) {
210
+ border-radius: 0 0 8px 8px;
211
+ left: 8px;
212
+ min-width: auto;
213
+ width: calc(100% - 56px);
214
+ }
215
+
216
+ a {
217
+ border-bottom: 3px solid rgba(28, 62, 87, .1);
218
+ padding: 10px 0;
219
+ }
220
+ }
221
+
222
+ .sfgov-menu-btn.is-active {
223
+ &::before {
224
+ @include background-image('x-close-white.svg', 50% 50%, $bright-blue);
225
+ content: '';
226
+ display: block;
227
+ height: 80px;
228
+ position: absolute;
229
+ right: 0;
230
+ top: 0;
231
+ width: 70px;
232
+ z-index: $z-menu-mobile-close;
233
+ }
234
+ }
235
+ }
236
+
237
+ .sfgov-nav-container {
238
+ @include contain-1210;
239
+
240
+ @include media($medium-screen) {
241
+ padding-left: 10px;
242
+ padding-right: 34px;
243
+ }
244
+ }
245
+
246
+ // Translate button
247
+
248
+ .gtranslate_container {
249
+ display: inline-block;
250
+ margin-right: 25px;
251
+
252
+ @include media-max($medium-screen) {
253
+ position: absolute;
254
+ right: 105px;
255
+ }
256
+
257
+ .gtranslate {
258
+ @include background-image('globe-blue.svg', center left);
259
+
260
+ @include media-max($medium-screen) {
261
+ background-size: 26px 26px;
262
+ padding: 2px 0;
263
+ }
264
+
265
+ > select {
266
+ border: 0;
267
+ appearance: none;
268
+ font-size: 17px;
269
+ padding: 0 0 0 28px;
270
+ margin: -2px 0 0 0;
271
+ height: auto;
272
+ background: none;
273
+ color: $bright-blue;
274
+ font-weight: $t-medium;
275
+
276
+ @include media-max($medium-screen) {
277
+ margin-top: 0;
278
+ padding-left: 27px;
279
+ width: 1px;
280
+ }
281
+
282
+ @include media($medium-screen) {
283
+ width: 110px;
284
+ }
285
+ }
286
+ }
287
+ }
288
+
289
+
290
+ // --- Footer ----
291
+
292
+ .sfgov-footer {
293
+ background: $black;
294
+ color: $white;
295
+ padding: 22px 0 24.4px;
296
+
297
+ @include media($medium-screen) {
298
+ height: 250px;
299
+ padding-bottom: 60px;
300
+ padding-top: 60px;
301
+ }
302
+
303
+ .sfgov-footer__container {
304
+ @include clearfix;
305
+ @include contain-1090;
306
+ .sfgov-footer-nav {
307
+ @include clearfix;
308
+ float: none;
309
+ width: auto;
310
+ @include media($medium-screen) {
311
+ float: right;
312
+ width: 50%;
313
+ }
314
+ }
315
+ }
316
+
317
+ .seal {
318
+ display: inline-block;
319
+ height: 70px;
320
+ margin-left: 15px;
321
+ vertical-align: middle;
322
+ width: 70px;
323
+
324
+ @include media($medium-screen){
325
+ height: 90px;
326
+ margin-left: 0;
327
+ width: 90px;
328
+ }
329
+ }
330
+
331
+ .logo {
332
+ float: none;
333
+ width: auto;
334
+ margin-top: 30px;
335
+ margin-bottom: 30px;
336
+ @include media($medium-screen) {
337
+ width: 50%;
338
+ float: left;
339
+ margin-top: 0;
340
+ }
341
+ }
342
+
343
+ img {
344
+ width: 100%;
345
+ }
346
+
347
+ .text {
348
+ display: inline-block;
349
+ font-size: 25px;
350
+ font-weight: $t-light;
351
+ line-height: 30px;
352
+ margin-left: 19px;
353
+ vertical-align: middle;
354
+
355
+ @include media($medium-screen) {
356
+ font-size: 33px;
357
+ line-height: 39px;
358
+ }
359
+ }
360
+
361
+ li {
362
+ display: block;
363
+ }
364
+
365
+ a {
366
+ color: $white;
367
+ display: block;
368
+ padding: 10px 40px 10px 15px;
369
+ text-decoration: none;
370
+ }
371
+
372
+ .sfgov-footer-navigation {
373
+ float: none;
374
+ width: auto;
375
+ a {
376
+ @include fs-body-bold;
377
+ }
378
+ @include media($medium-screen) {
379
+ float: left;
380
+ width: 50%;
381
+ }
382
+ }
383
+
384
+ .sfgov-footer-navigation-bottom {
385
+ float: none;
386
+ width: auto;
387
+ a {
388
+ opacity: .7;
389
+ }
390
+ @include media($medium-screen) {
391
+ float: left;
392
+ width: 50%;
393
+ }
394
+ }
395
+
396
+ // silly override of pattern lab
397
+ .sfgov-footer-navigation,
398
+ .sfgov-footer-navigation-bottom {
399
+ ul {
400
+ margin: 0;
401
+ padding: 0;
402
+ li {
403
+ &:first-child {
404
+ padding-left: 0;
405
+ }
406
+ }
407
+ }
408
+ }
409
+ }
410
+
411
+ // Main content area
412
+
413
+ main[role="main"] {
414
+ min-height: calc(100vh - 524px);
415
+
416
+ @include media($medium-screen) {
417
+ min-height: calc(100vh - 418px);
418
+ }
419
+ }
420
+
421
+
422
+ .hero-banner--border {
423
+ display: block;
424
+ height: 3px;
425
+ margin: 0 auto;
426
+ max-width: 1090px;
427
+ width: 100%;
428
+
429
+ .hero-banner--border-contain {
430
+ background: rgba(28, 62, 87, .1);
431
+ display: block;
432
+ height: 3px;
433
+ margin-left: 20px;
434
+ margin-right: 20px;
435
+
436
+ @include media($wide-screen) {
437
+ margin: 0;
438
+ }
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
+ }