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