govuk_template 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/LICENCE.txt +22 -0
  2. data/README.md +61 -0
  3. data/app/assets/images/apple-touch-icon-114x114.png +0 -0
  4. data/app/assets/images/apple-touch-icon-144x144.png +0 -0
  5. data/app/assets/images/apple-touch-icon-57x57.png +0 -0
  6. data/app/assets/images/apple-touch-icon-72x72.png +0 -0
  7. data/app/assets/images/favicon.ico +0 -0
  8. data/app/assets/images/gov.uk_logotype-2x.png +0 -0
  9. data/app/assets/images/gov.uk_logotype_crown.png +0 -0
  10. data/app/assets/images/gov.uk_logotype_crown_invert.png +0 -0
  11. data/app/assets/images/gov.uk_logotype_crown_invert_trans.png +0 -0
  12. data/app/assets/images/open-government-licence_2x.png +0 -0
  13. data/app/assets/images/opengraph-image.png +0 -0
  14. data/app/assets/javascripts/govuk-template.js +97 -0
  15. data/app/assets/javascripts/ie.js +512 -0
  16. data/app/assets/javascripts/vendor/goog/webfont-debug.js +2126 -0
  17. data/app/assets/stylesheets/external-link-24x24.png +0 -0
  18. data/app/assets/stylesheets/external-link-black-12x12.png +0 -0
  19. data/app/assets/stylesheets/external-link-black-24x24.png +0 -0
  20. data/app/assets/stylesheets/external-link.png +0 -0
  21. data/app/assets/stylesheets/fonts-ie8.css.erb +30 -0
  22. data/app/assets/stylesheets/fonts.css.erb +30 -0
  23. data/app/assets/stylesheets/fonts/NTA-Bold-20130221.eot +0 -0
  24. data/app/assets/stylesheets/fonts/NTA-Bold-20130221.woff +0 -0
  25. data/app/assets/stylesheets/fonts/NTA-Light-20130221.eot +0 -0
  26. data/app/assets/stylesheets/fonts/NTA-Light-20130221.woff +0 -0
  27. data/app/assets/stylesheets/fonts/NTATabularNumbers-Bold.eot +0 -0
  28. data/app/assets/stylesheets/fonts/NTATabularNumbers-Bold.woff +0 -0
  29. data/app/assets/stylesheets/fonts/NTATabularNumbers-Light.eot +0 -0
  30. data/app/assets/stylesheets/fonts/NTATabularNumbers-Light.woff +0 -0
  31. data/app/assets/stylesheets/govuk-template-ie6.css.erb +548 -0
  32. data/app/assets/stylesheets/govuk-template-ie7.css.erb +544 -0
  33. data/app/assets/stylesheets/govuk-template-ie8.css.erb +527 -0
  34. data/app/assets/stylesheets/govuk-template-print.css.erb +78 -0
  35. data/app/assets/stylesheets/govuk-template.css.erb +575 -0
  36. data/app/assets/stylesheets/images/close.png +0 -0
  37. data/app/assets/stylesheets/images/govuk-crest-2x.png +0 -0
  38. data/app/assets/stylesheets/images/govuk-crest-ie.png +0 -0
  39. data/app/assets/stylesheets/images/govuk-crest.png +0 -0
  40. data/app/assets/stylesheets/images/separator-2x.png +0 -0
  41. data/app/assets/stylesheets/images/separator.png +0 -0
  42. data/app/views/layouts/govuk_template.html.erb +127 -0
  43. data/lib/govuk_template.rb +5 -0
  44. data/lib/govuk_template/engine.rb +13 -0
  45. data/lib/govuk_template/version.rb +3 -0
  46. metadata +209 -0
@@ -0,0 +1,544 @@
1
+ /* govuk_frontend_toolkit includes */
2
+ @-ms-viewport {
3
+ width: device-width; }
4
+
5
+ @-o-viewport {
6
+ width: device-width; }
7
+
8
+ /* CSS 3 Mixins
9
+
10
+ Add them as you need them. This should let us manage vendor prefixes in one place.
11
+ */
12
+ @font-face {
13
+ font-family: GDS-Logo;
14
+ src: local("HelveticaNeue"), local("Helvetica Neue"), local("Arial"), local("Helvetica"); }
15
+
16
+ @-ms-viewport {
17
+ width: device-width; }
18
+
19
+ @-o-viewport {
20
+ width: device-width; }
21
+
22
+ /* Cross-browser shims
23
+
24
+ Ways of normalising properties across browsers.
25
+ */
26
+ @-ms-viewport {
27
+ width: device-width; }
28
+
29
+ @-o-viewport {
30
+ width: device-width; }
31
+
32
+ /* Usage:
33
+ @include inline-block
34
+
35
+ or
36
+
37
+ @include inline-block("250px")
38
+
39
+ which gives a min-height to the inline-block elements.
40
+ */
41
+ /* Contain floats usage:
42
+
43
+ .this-has-floated-children {
44
+ @extend %contain-floats;
45
+ }
46
+
47
+ */
48
+ #global-header .header-wrapper, #global-header .header-wrapper .header-global, #global-header .header-wrapper .header-global .header-logo {
49
+ zoom: 1; }
50
+ #global-header .header-wrapper:after, #global-header .header-wrapper .header-global:after, #global-header .header-wrapper .header-global .header-logo:after {
51
+ content: "";
52
+ display: block;
53
+ clear: both; }
54
+
55
+ /* CSS 3 Mixins
56
+
57
+ Add them as you need them. This should let us manage vendor prefixes in one place.
58
+ */
59
+ @-ms-viewport {
60
+ width: device-width; }
61
+
62
+ @-o-viewport {
63
+ width: device-width; }
64
+
65
+ /*
66
+
67
+ Mixin and defaults for making buttons on GOV.UK services.
68
+
69
+ For guidance, see: https://www.gov.uk/service-manual/design-and-content/resources/buttons.html
70
+
71
+ Example usage:
72
+
73
+ .button{
74
+ @include button;
75
+ }
76
+ .button-secondary{
77
+ @include button($grey-3);
78
+ }
79
+ .button-warning{
80
+ @include button($red);
81
+ }
82
+
83
+ */
84
+ /* local styleguide includes */
85
+ /* New Greys */
86
+ html, body, button, input, table, td, th {
87
+ font-family: "nta", Arial, sans-serif; }
88
+
89
+ html, body, div, h1, h2, h3, h4, h5, h6, article, aside, footer, header, hgroup, nav, section {
90
+ margin: 0;
91
+ padding: 0;
92
+ vertical-align: baseline; }
93
+
94
+ .group:before,
95
+ .group:after {
96
+ content: "\0020";
97
+ display: block;
98
+ height: 0;
99
+ overflow: hidden; }
100
+
101
+ .group:after {
102
+ clear: both; }
103
+
104
+ .group {
105
+ zoom: 1; }
106
+
107
+ .content-fixed {
108
+ top: 0;
109
+ position: fixed; }
110
+
111
+ .shim {
112
+ display: block; }
113
+
114
+ /*
115
+ * 1. Prevents iOS text size adjust after orientation change, without disabling
116
+ * user zoom.
117
+ */
118
+ html {
119
+ -webkit-text-size-adjust: 100%;
120
+ /* 1 */
121
+ -ms-text-size-adjust: 100%;
122
+ /* 1 */
123
+ background: white; }
124
+
125
+ body {
126
+ color: #0b0c0c;
127
+ line-height: 1.5;
128
+ font-weight: 400;
129
+ -webkit-font-smoothing: antialiased; }
130
+
131
+ ol, ul, nav ol, nav ul {
132
+ list-style: inherit; }
133
+
134
+ fieldset {
135
+ border: none;
136
+ padding: 0; }
137
+
138
+ a,
139
+ a:visited {
140
+ color: #2e3191; }
141
+
142
+ a:hover {
143
+ color: #2e8aca; }
144
+
145
+ a:active {
146
+ color: #2e8aca; }
147
+
148
+ a[rel="external"]:after {
149
+ background-image: url(<%= asset_path 'external-link.png' %>);
150
+ background-repeat: no-repeat; }
151
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
152
+ a[rel="external"]:after {
153
+ background-image: url(<%= asset_path 'external-link-24x24.png' %>);
154
+ background-size: 12px 400px; } }
155
+ a[rel="external"]:after {
156
+ content: "\A0\A0\A0\A0";
157
+ background-position: right 6px; }
158
+ a[rel="external"]:hover:after {
159
+ background-position: right -382px; }
160
+
161
+ .external-link:after {
162
+ content: "\A0\A0\A0\A0\A0\A0\A0\A0";
163
+ background-position: right 0px; }
164
+ .external-link:hover:after {
165
+ background-position: right 0px; }
166
+ .external-link:after {
167
+ background-image: url(<%= asset_path 'external-link-black-12x12.png' %>);
168
+ background-repeat: no-repeat; }
169
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
170
+ .external-link:after {
171
+ background-image: url(<%= asset_path 'external-link-black-24x24.png' %>);
172
+ background-size: 12px 400px; } }
173
+
174
+ /*
175
+ * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
176
+ * http://clagnut.com/blog/348/#c790
177
+ * note - font-size reduced to 62.5% to allow simple rem/px font-sizing and fallback
178
+ * http://snook.ca/archives/html_and_css/font-size-with-rem
179
+ * 2. Keeps page centred in all browsers regardless of content height
180
+ * 3. Removes Android and iOS tap highlight color to prevent entire container being highlighted
181
+ * www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
182
+ */
183
+ html {
184
+ font-size: 62.5%;
185
+ /* 1 */
186
+ overflow-y: scroll;
187
+ /* 2 */
188
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
189
+ /* 3 */ }
190
+
191
+ /*
192
+ * 1. Font-size increased to compensate for change to html element font-size in
193
+ * order to support beta typography which was set in ems
194
+ * (62.5% * 160% = 100%)
195
+ * 2. Addresses margins handled incorrectly in IE6/7
196
+ */
197
+ body {
198
+ font-size: 160%;
199
+ /* 1 */
200
+ margin: 0;
201
+ /* 2 */ }
202
+
203
+ b,
204
+ strong {
205
+ font-weight: 600; }
206
+
207
+ img {
208
+ border: 0; }
209
+
210
+ button {
211
+ *overflow: visible; }
212
+
213
+ abbr[title] {
214
+ cursor: help; }
215
+
216
+ /*
217
+ * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
218
+ * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
219
+ * (include `-moz` to future-proof).
220
+ */
221
+ input[type="search"] {
222
+ -webkit-appearance: textfield;
223
+ /* 1 */
224
+ -moz-box-sizing: content-box;
225
+ -webkit-box-sizing: content-box;
226
+ /* 2 */
227
+ box-sizing: content-box; }
228
+
229
+ input[type="search"]::-webkit-search-cancel-button {
230
+ -webkit-appearance: searchfield-cancel-button;
231
+ margin-right: 2px; }
232
+
233
+ input[type="search"]::-webkit-search-decoration {
234
+ -webkit-appearance: none; }
235
+
236
+ /* For image replacement */
237
+ .ir {
238
+ display: block;
239
+ text-indent: -999em;
240
+ overflow: hidden;
241
+ background-repeat: no-repeat;
242
+ text-align: left;
243
+ direction: ltr; }
244
+ .ir br {
245
+ display: none; }
246
+
247
+ /* Hide for both screenreaders and browsers */
248
+ .hidden {
249
+ display: none;
250
+ visibility: hidden; }
251
+
252
+ /* Hide only visually, but have it available for screenreaders */
253
+ .visuallyhidden {
254
+ position: absolute;
255
+ left: -9999em;
256
+ /*
257
+ * Extends the .visuallyhidden class to allow the element to be
258
+ * focusable when navigated to via the keyboard
259
+ */ }
260
+ .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus {
261
+ clip: auto;
262
+ height: auto;
263
+ margin: 0;
264
+ overflow: visible;
265
+ position: static;
266
+ width: auto; }
267
+
268
+ /* Hide visually and from screenreaders, but maintain layout */
269
+ .invisible {
270
+ visibility: hidden; }
271
+
272
+ /* Give a strong clear visual idea as to what is currently in focus */
273
+ a {
274
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3); }
275
+
276
+ a:focus {
277
+ background-color: #ffbf47;
278
+ outline: 3px solid #ffbf47; }
279
+
280
+ /* Make skiplinks visible when they are tabbed to */
281
+ .skiplink {
282
+ position: absolute;
283
+ left: -9999em; }
284
+
285
+ .skiplink:focus {
286
+ position: static; }
287
+
288
+ #skiplink-container {
289
+ text-align: center;
290
+ background: #0b0c0c; }
291
+ #skiplink-container div {
292
+ text-align: left;
293
+ margin: 0 auto;
294
+ max-width: 1020px; }
295
+ #skiplink-container .skiplink {
296
+ display: -moz-inline-stack;
297
+ display: inline-block;
298
+ zoom: 1;
299
+ display: inline;
300
+ margin: 0.75em 0 0 30px; }
301
+
302
+ input:focus,
303
+ textarea:focus,
304
+ select:focus,
305
+ #global-header input:focus {
306
+ outline: 3px solid #ffbf47; }
307
+
308
+ #global-header h1 a:focus {
309
+ background-color: transparent;
310
+ outline: none; }
311
+ #global-header a:focus {
312
+ color: #0b0c0c; }
313
+
314
+ /* Cross-browser shims
315
+
316
+ Ways of normalising properties across browsers.
317
+ */
318
+ @-ms-viewport {
319
+ width: device-width; }
320
+
321
+ @-o-viewport {
322
+ width: device-width; }
323
+
324
+ /* Usage:
325
+ @include inline-block
326
+
327
+ or
328
+
329
+ @include inline-block("250px")
330
+
331
+ which gives a min-height to the inline-block elements.
332
+ */
333
+ /* Contain floats usage:
334
+
335
+ .this-has-floated-children {
336
+ @extend %contain-floats;
337
+ }
338
+
339
+ */
340
+ #global-header .header-wrapper, #global-header .header-wrapper .header-global, #global-header .header-wrapper .header-global .header-logo {
341
+ zoom: 1; }
342
+ #global-header .header-wrapper:after, #global-header .header-wrapper .header-global:after, #global-header .header-wrapper .header-global .header-logo:after {
343
+ content: "";
344
+ display: block;
345
+ clear: both; }
346
+
347
+ #global-header {
348
+ background-color: #0b0c0c;
349
+ width: 100%; }
350
+ #global-header .header-wrapper {
351
+ max-width: 990px;
352
+ margin: 0 auto;
353
+ padding: 0.5em 15px; }
354
+ #global-header .header-wrapper .header-global .header-logo {
355
+ width: 49%;
356
+ float: left;
357
+ width: 33.33%; }
358
+ @media screen and (max-width: 379px) {
359
+ #global-header .header-wrapper .header-global .header-logo {
360
+ width: auto;
361
+ float: none; } }
362
+ #global-header .header-wrapper .header-global .header-logo .content {
363
+ margin: 0 15px; }
364
+ #global-header .header-wrapper .header-global .header-logo {
365
+ margin: 5px 0 2px; }
366
+ #global-header #logo {
367
+ float: left;
368
+ position: relative;
369
+ top: 1px;
370
+ height: 30px;
371
+ overflow: visible;
372
+ vertical-align: baseline;
373
+ color: white;
374
+ font-weight: bold;
375
+ font-size: 30px;
376
+ line-height: 1em;
377
+ text-decoration: none;
378
+ margin-bottom: -1px;
379
+ padding-bottom: 1px; }
380
+ #global-header #logo img {
381
+ position: relative;
382
+ top: -3px;
383
+ width: 35px;
384
+ height: 31px;
385
+ padding-right: 8px;
386
+ float: left;
387
+ display: inline;
388
+ line-height: inherit;
389
+ border: none; }
390
+ #global-header #logo span > span {
391
+ margin: 0 1px 0 -6px; }
392
+ #global-header #logo:hover, #global-header #logo:focus {
393
+ text-decoration: none;
394
+ border-bottom: 1px solid;
395
+ padding-bottom: 0; }
396
+ #global-header #logo:active {
397
+ color: #2b8cc4; }
398
+
399
+ /* Global cookie message */
400
+ .js-enabled #global-cookie-message {
401
+ display: none;
402
+ /* shown with JS, always on for non-JS */ }
403
+
404
+ #global-cookie-message {
405
+ padding: 0.5em 2em;
406
+ background-color: #d5e8f3; }
407
+ #global-cookie-message p {
408
+ font-family: "nta", Arial, sans-serif;
409
+ font-size: 19px;
410
+ line-height: 1.31579;
411
+ font-weight: 400;
412
+ text-transform: none;
413
+ margin: 0 auto;
414
+ max-width: 960px; }
415
+ @media (max-width: 640px) {
416
+ #global-cookie-message p {
417
+ font-size: 16px;
418
+ line-height: 1.25; } }
419
+
420
+ /* Global footer */
421
+ #footer {
422
+ background-color: #dee0e2;
423
+ border-top: 1px solid #a1acb2; }
424
+ #footer .footer-wrapper {
425
+ max-width: 60em;
426
+ margin: 0 auto;
427
+ padding: 60px 1em 0 1em;
428
+ width: 928px;
429
+ /* we want the width for IE to max out at 960px total (including padding) */ }
430
+ #footer a {
431
+ color: #454a4c; }
432
+ #footer a:hover {
433
+ color: #171819; }
434
+ #footer h2 {
435
+ font-family: "nta", Arial, sans-serif;
436
+ font-size: 24px;
437
+ line-height: 1.25;
438
+ font-weight: 400;
439
+ text-transform: none;
440
+ font-weight: bold;
441
+ color: #171819;
442
+ margin: 0; }
443
+ @media (max-width: 640px) {
444
+ #footer h2 {
445
+ font-size: 20px;
446
+ line-height: 1.2; } }
447
+ #footer h2 a {
448
+ color: inherit; }
449
+ #footer .footer-meta {
450
+ clear: both;
451
+ font-size: 0;
452
+ color: #454a4c;
453
+ padding-bottom: 60px; }
454
+ #footer .footer-meta .footer-meta-inner {
455
+ display: inline-block;
456
+ vertical-align: bottom;
457
+ width: 75%;
458
+ display: block;
459
+ float: left; }
460
+ #footer .footer-meta .footer-meta-inner ul {
461
+ font-family: "nta", Arial, sans-serif;
462
+ font-size: 16px;
463
+ line-height: 1.5;
464
+ font-weight: 300;
465
+ text-transform: none;
466
+ display: inline-block;
467
+ list-style: none;
468
+ margin: 0 0 1em;
469
+ padding: 0; }
470
+ @media (max-width: 640px) {
471
+ #footer .footer-meta .footer-meta-inner ul {
472
+ font-size: 14px;
473
+ line-height: 1.5; } }
474
+ #footer .footer-meta .footer-meta-inner ul li {
475
+ display: inline-block;
476
+ margin: 0 15px 0 0;
477
+ display: inline;
478
+ margin-right: 0;
479
+ padding-right: 15px; }
480
+ #footer .footer-meta .footer-meta-inner .open-government-licence {
481
+ clear: left;
482
+ position: relative;
483
+ padding-left: 53px; }
484
+ #footer .footer-meta .footer-meta-inner .open-government-licence h2 {
485
+ position: absolute;
486
+ left: 0;
487
+ top: 0;
488
+ width: 41px;
489
+ height: 100%; }
490
+ #footer .footer-meta .footer-meta-inner .open-government-licence h2 a, #footer .footer-meta .footer-meta-inner .open-government-licence h2 img {
491
+ display: block;
492
+ width: 43px;
493
+ height: 17px; }
494
+ #footer .footer-meta .footer-meta-inner .open-government-licence p {
495
+ font-family: "nta", Arial, sans-serif;
496
+ font-size: 16px;
497
+ line-height: 1.25;
498
+ font-weight: 300;
499
+ text-transform: none;
500
+ margin: 0;
501
+ padding-top: 0.1em; }
502
+ @media (max-width: 640px) {
503
+ #footer .footer-meta .footer-meta-inner .open-government-licence p {
504
+ font-size: 14px;
505
+ line-height: 1.14286; } }
506
+ #footer .footer-meta .footer-meta-inner .open-government-licence p a {
507
+ font-family: "nta", Arial, sans-serif;
508
+ font-size: 14px;
509
+ line-height: 1.42857;
510
+ font-weight: 400;
511
+ text-transform: none; }
512
+ @media (max-width: 640px) {
513
+ #footer .footer-meta .footer-meta-inner .open-government-licence p a {
514
+ font-size: 12px;
515
+ line-height: 1.25; } }
516
+ #footer .footer-meta .copyright {
517
+ font-family: "nta", Arial, sans-serif;
518
+ font-size: 16px;
519
+ line-height: 1.25;
520
+ font-weight: 300;
521
+ text-transform: none;
522
+ display: inline-block;
523
+ float: none;
524
+ text-align: inherit;
525
+ width: 25%;
526
+ padding-top: 15px;
527
+ display: block;
528
+ float: right;
529
+ height: 150px;
530
+ width: 24%; }
531
+ @media (max-width: 640px) {
532
+ #footer .footer-meta .copyright {
533
+ font-size: 14px;
534
+ line-height: 1.14286; } }
535
+ #footer .footer-meta .copyright a {
536
+ display: block;
537
+ padding: 115px 0 0 0;
538
+ background: transparent url(<%= asset_path 'images/govuk-crest.png' %>) no-repeat 100% 0;
539
+ text-align: right;
540
+ text-decoration: none; }
541
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
542
+ #footer .footer-meta .copyright a {
543
+ background-image: url(<%= asset_path 'images/govuk-crest-2x.png' %>);
544
+ background-size: 125px 102px; } }