moj_internal_template 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENCE.txt +24 -0
- data/README.md +39 -0
- data/app/assets/fonts/Bliss2Rg.eot +0 -0
- data/app/assets/fonts/Bliss2Rg.ttf +0 -0
- data/app/assets/fonts/Bliss2Rg.woff +0 -0
- data/app/assets/images/moj_logotype_crest.png +0 -0
- data/app/assets/javascripts/modules/moj.cookie-message.js +82 -0
- data/app/assets/javascripts/modules/moj.tabs.js +83 -0
- data/app/assets/javascripts/moj.js +54 -0
- data/app/assets/javascripts/vendor/jquery/jquery-1.11.0.min.js +4 -0
- data/app/assets/stylesheets/elements/_buttons.scss +56 -0
- data/app/assets/stylesheets/elements/_colours.scss +34 -0
- data/app/assets/stylesheets/elements/_forms.scss +171 -0
- data/app/assets/stylesheets/elements/_helpers.scss +51 -0
- data/app/assets/stylesheets/elements/_icons.scss +222 -0
- data/app/assets/stylesheets/elements/_layout.scss +151 -0
- data/app/assets/stylesheets/elements/_lists.scss +32 -0
- data/app/assets/stylesheets/elements/_panels.scss +30 -0
- data/app/assets/stylesheets/elements/_reset.scss +33 -0
- data/app/assets/stylesheets/elements/_shame.scss +79 -0
- data/app/assets/stylesheets/elements/_tables.scss +22 -0
- data/app/assets/stylesheets/elements/_typography.scss +150 -0
- data/app/assets/stylesheets/elements/forms/_form-chunky-labels.scss +62 -0
- data/app/assets/stylesheets/elements/forms/_form-date-of-birth.scss +45 -0
- data/app/assets/stylesheets/elements/forms/_form-validation.scss +64 -0
- data/app/assets/stylesheets/moj-internal-ie6.scss +5 -0
- data/app/assets/stylesheets/moj-internal-ie7.scss +4 -0
- data/app/assets/stylesheets/moj-internal-ie8.scss +4 -0
- data/app/assets/stylesheets/moj-internal.scss +56 -0
- data/app/assets/stylesheets/moj/_fonts.scss +12 -0
- data/app/assets/stylesheets/moj/_header.scss +126 -0
- data/app/assets/stylesheets/moj/_typography.scss +72 -0
- data/app/helpers/moj_helper.rb +5 -0
- data/app/views/layouts/moj_internal_template.html.erb +114 -0
- data/app/views/layouts/partials/_after_header.html.erb +14 -0
- data/app/views/layouts/partials/_body_classes.html.erb +1 -0
- data/app/views/layouts/partials/_body_end.html.erb +10 -0
- data/app/views/layouts/partials/_content.html.erb +11 -0
- data/app/views/layouts/partials/_cookie_message.html.erb +5 -0
- data/app/views/layouts/partials/_footer_support_links.html.erb +15 -0
- data/app/views/layouts/partials/_header_class.html.erb +1 -0
- data/app/views/layouts/partials/_page_title.html.erb +1 -0
- data/lib/moj_internal_template.rb +5 -0
- data/lib/moj_internal_template/engine.rb +11 -0
- data/lib/moj_internal_template/version.rb +3 -0
- metadata +173 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
@import "govuk-template";
|
2
|
+
|
3
|
+
// Import GOV.UK frontend toolkit
|
4
|
+
|
5
|
+
@import "colours";
|
6
|
+
@import "measurements";
|
7
|
+
@import "conditionals";
|
8
|
+
@import "shims";
|
9
|
+
@import "typography";
|
10
|
+
@import "css3";
|
11
|
+
@import "design-patterns/alpha-beta";
|
12
|
+
@import "design-patterns/buttons";
|
13
|
+
|
14
|
+
// Shame
|
15
|
+
// For changes awaiting merge into the front-end toolkit
|
16
|
+
@import "elements/shame";
|
17
|
+
|
18
|
+
// Helpers
|
19
|
+
@import "elements/helpers";
|
20
|
+
|
21
|
+
// Reset
|
22
|
+
@import "elements/reset";
|
23
|
+
|
24
|
+
// Layout
|
25
|
+
@import "elements/layout";
|
26
|
+
|
27
|
+
// Modules
|
28
|
+
// ==========================================================================
|
29
|
+
|
30
|
+
// Forms
|
31
|
+
@import "elements/forms";
|
32
|
+
|
33
|
+
// Tables
|
34
|
+
@import "elements/tables";
|
35
|
+
|
36
|
+
// Buttons
|
37
|
+
@import "elements/buttons";
|
38
|
+
|
39
|
+
// Lists
|
40
|
+
@import "elements/lists";
|
41
|
+
|
42
|
+
// Panels
|
43
|
+
@import "elements/panels";
|
44
|
+
|
45
|
+
// Colours
|
46
|
+
@import "elements/colours";
|
47
|
+
|
48
|
+
// Icons
|
49
|
+
@import "elements/icons";
|
50
|
+
|
51
|
+
// MoJ
|
52
|
+
// ==========================================================================
|
53
|
+
|
54
|
+
// Typography
|
55
|
+
@import "moj/typography";
|
56
|
+
@import "moj/header"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
@font-face {
|
2
|
+
font-family: 'Bliss2';
|
3
|
+
src: url('/assets/Bliss2Rg.eot'); /* IE9 Compat Modes */
|
4
|
+
src: url('/assets/Bliss2Rg.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
5
|
+
url('/assets/Bliss2Rg.woff') format('woff'), /* Modern Browsers */
|
6
|
+
url('/assets/Bliss2Rg.ttf') format('truetype'), /* Safari, Android, iOS */
|
7
|
+
url('/assets/Bliss2Rg.svg#svgBliss2Rg') format('svg'); /* Legacy iOS */
|
8
|
+
}
|
9
|
+
|
10
|
+
body {
|
11
|
+
font-family: 'Bliss2', arial, sans-serif;
|
12
|
+
}
|
@@ -0,0 +1,126 @@
|
|
1
|
+
@import '_shims';
|
2
|
+
@import '_conditionals';
|
3
|
+
@import '_measurements';
|
4
|
+
|
5
|
+
$header-background-color: #f7f7ed;
|
6
|
+
$header-foreground-color: $black;
|
7
|
+
|
8
|
+
#global-header {
|
9
|
+
background-color: $header-background-color;
|
10
|
+
width: 100%;
|
11
|
+
|
12
|
+
.header-wrapper {
|
13
|
+
background-color: $header-background-color;
|
14
|
+
max-width: 990px;
|
15
|
+
margin: 0 auto;
|
16
|
+
padding-top: 8px;
|
17
|
+
padding-bottom: 8px;
|
18
|
+
@extend %contain-floats;
|
19
|
+
@include media(tablet){
|
20
|
+
padding-left: $gutter-half;
|
21
|
+
padding-right: $gutter-half;
|
22
|
+
}
|
23
|
+
@include ie-lte(8) {
|
24
|
+
width: 990px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.header-global {
|
28
|
+
@extend %contain-floats;
|
29
|
+
.header-logo {
|
30
|
+
@extend %contain-floats;
|
31
|
+
float: left;
|
32
|
+
|
33
|
+
@include media(desktop){
|
34
|
+
width: 33.33%;
|
35
|
+
}
|
36
|
+
@media screen and (max-width: 379px) {
|
37
|
+
width: auto;
|
38
|
+
float: none;
|
39
|
+
}
|
40
|
+
|
41
|
+
.content {
|
42
|
+
margin: 0 15px;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
.header-logo {
|
46
|
+
margin: 5px 0 2px;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
#logo {
|
52
|
+
float: left;
|
53
|
+
position: relative;
|
54
|
+
top: 1px;
|
55
|
+
|
56
|
+
height: 30px;
|
57
|
+
overflow: visible;
|
58
|
+
vertical-align: baseline;
|
59
|
+
|
60
|
+
color: $header-foreground-color;
|
61
|
+
font-weight: bold;
|
62
|
+
font-size: 30px;
|
63
|
+
line-height: 1em;
|
64
|
+
text-decoration: none;
|
65
|
+
text-rendering: optimizeLegibility;
|
66
|
+
margin-bottom: -1px;
|
67
|
+
padding-bottom: 1px;
|
68
|
+
|
69
|
+
img {
|
70
|
+
position: relative;
|
71
|
+
top: -2px;
|
72
|
+
|
73
|
+
width: 35px;
|
74
|
+
height: 31px;
|
75
|
+
|
76
|
+
padding-right: 6px;
|
77
|
+
|
78
|
+
float: left;
|
79
|
+
display: inline;
|
80
|
+
line-height: inherit;
|
81
|
+
border: none;
|
82
|
+
}
|
83
|
+
|
84
|
+
&:hover,
|
85
|
+
&:focus {
|
86
|
+
text-decoration: none;
|
87
|
+
border-bottom: 1px solid;
|
88
|
+
padding-bottom: 0;
|
89
|
+
}
|
90
|
+
|
91
|
+
&:active {
|
92
|
+
color: $light-blue;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
#log-in-out {
|
97
|
+
font-size: 16px;
|
98
|
+
float: right;
|
99
|
+
margin-top: 15px;
|
100
|
+
margin-right: 15px;
|
101
|
+
|
102
|
+
a {
|
103
|
+
color: inherit;
|
104
|
+
text-decoration: none;
|
105
|
+
}
|
106
|
+
a:hover {
|
107
|
+
text-decoration: underline;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
/* Global header bar */
|
113
|
+
|
114
|
+
#global-header-bar {
|
115
|
+
@include outer-block;
|
116
|
+
.inner-block {
|
117
|
+
@include inner-block;
|
118
|
+
}
|
119
|
+
.header-bar {
|
120
|
+
height: 10px;
|
121
|
+
background-color: $header-foreground-color;
|
122
|
+
@include ie-lte(8) {
|
123
|
+
font-size: 0;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
// Typography
|
2
|
+
// ==========================================================================
|
3
|
+
|
4
|
+
// Increase the base font size to 19px
|
5
|
+
// Using the core-19 mixin from the govuk_toolkit _typography.scss file
|
6
|
+
|
7
|
+
@import "fonts";
|
8
|
+
|
9
|
+
body {
|
10
|
+
@include core-19;
|
11
|
+
font-family: "Bliss2", Arial, sans-serif;
|
12
|
+
}
|
13
|
+
|
14
|
+
// Text
|
15
|
+
p {
|
16
|
+
margin-top: em(5, 16 );
|
17
|
+
margin-bottom: em(20, 16);
|
18
|
+
|
19
|
+
@include media(tablet) {
|
20
|
+
margin-top: em(5);
|
21
|
+
margin-bottom: em(20);
|
22
|
+
}
|
23
|
+
|
24
|
+
}
|
25
|
+
|
26
|
+
// Lede, or intro text
|
27
|
+
.lede {
|
28
|
+
@include core-24;
|
29
|
+
font-family: inherit;
|
30
|
+
}
|
31
|
+
|
32
|
+
// Set a max-width for text blocks
|
33
|
+
// Less than 75 characters per line of text
|
34
|
+
.text {
|
35
|
+
max-width: 30em;
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
// Code styles
|
40
|
+
pre,
|
41
|
+
code {
|
42
|
+
font-size: 13px;
|
43
|
+
line-height: 19px;
|
44
|
+
color: $black;
|
45
|
+
background-color: $highlight-colour;
|
46
|
+
border: 1px solid $border-colour;
|
47
|
+
padding: 3px 7px;
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
h1 {
|
52
|
+
@include heading-48();
|
53
|
+
@include bold-48();
|
54
|
+
font-family: inherit;
|
55
|
+
}
|
56
|
+
|
57
|
+
h2 {
|
58
|
+
@include heading-36();
|
59
|
+
@include bold-36();
|
60
|
+
font-family: inherit;
|
61
|
+
}
|
62
|
+
|
63
|
+
h3 {
|
64
|
+
@include heading-24;
|
65
|
+
@include bold-24();
|
66
|
+
font-family: inherit;
|
67
|
+
}
|
68
|
+
|
69
|
+
h4 {
|
70
|
+
@include bold-19();
|
71
|
+
font-family: inherit;
|
72
|
+
}
|
@@ -0,0 +1,114 @@
|
|
1
|
+
<%= yield :top_of_page %>
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<!--[if lt IE 9]><html class="lte-ie8" lang="<%= content_for?(:html_lang) ? yield(:html_lang) : "en" %>"><![endif]-->
|
4
|
+
<!--[if gt IE 8]><!--><html lang="<%= content_for?(:html_lang) ? yield(:html_lang) : "en" %>"><!--<![endif]-->
|
5
|
+
<head>
|
6
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
7
|
+
|
8
|
+
<title><%= content_for?(:page_title) ? yield(:page_title) : "Ministry of Justice" %></title>
|
9
|
+
|
10
|
+
<script type="text/javascript">
|
11
|
+
(function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var d=document,c="appendChild",a=d.createElement("style");a[c](d.createTextNode("@-ms-viewport{width:auto!important}"));d.getElementsByTagName("head")[0][c](a);}})();
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<!--[if gt IE 8]><!--><link href="<%= asset_path "moj-internal.css" %>" media="screen" rel="stylesheet" type="text/css" /><!--<![endif]-->
|
15
|
+
<!--[if IE 6]><link href="<%= asset_path "moj-internal-ie6.css" %>" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
|
16
|
+
<!--[if IE 7]><link href="<%= asset_path "moj-internal-ie7.css" %>" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
|
17
|
+
<!--[if IE 8]><link href="<%= asset_path "moj-internal-ie8.css" %>" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
|
18
|
+
|
19
|
+
<!--[if lt IE 9]>
|
20
|
+
<script src="<%= asset_path "ie.js" %>" type="text/javascript"></script>
|
21
|
+
<![endif]-->
|
22
|
+
|
23
|
+
<link rel="shortcut icon" href="<%= asset_path 'favicon.ico' %>" type="image/x-icon" />
|
24
|
+
|
25
|
+
<!-- For third-generation iPad with high-resolution Retina display: -->
|
26
|
+
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%= asset_path "apple-touch-icon-144x144.png" %>">
|
27
|
+
<!-- For iPhone with high-resolution Retina display: -->
|
28
|
+
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="<%= asset_path "apple-touch-icon-114x114.png" %>">
|
29
|
+
<!-- For first- and second-generation iPad: -->
|
30
|
+
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="<%= asset_path "apple-touch-icon-72x72.png" %>">
|
31
|
+
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
|
32
|
+
<link rel="apple-touch-icon-precomposed" href="<%= asset_path "apple-touch-icon-57x57.png" %>">
|
33
|
+
|
34
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
35
|
+
<meta property="og:image" content="<%= asset_path "opengraph-image.png" %>">
|
36
|
+
|
37
|
+
<%= yield :head %>
|
38
|
+
</head>
|
39
|
+
|
40
|
+
<body<%= content_for?(:body_classes) ? raw(" class=\"#{yield(:body_classes)}\"") : '' %>>
|
41
|
+
<script type="text/javascript">document.body.className = 'js-enabled ' + document.body.className;</script>
|
42
|
+
|
43
|
+
<div id="skiplink-container">
|
44
|
+
<div>
|
45
|
+
<a href="#content" class="skiplink">Skip to main content</a>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div id="global-cookie-message">
|
50
|
+
<div class="outer-block">
|
51
|
+
<div class="inner-block">
|
52
|
+
<% if content_for?(:cookie_message) %>
|
53
|
+
<%= yield :cookie_message %>
|
54
|
+
<% else %>
|
55
|
+
<p>GOV.UK uses cookies to make the site simpler. <a href="https://www.gov.uk/help/cookies">Find out more about cookies</a></p>
|
56
|
+
<% end %>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
<!--end global-cookie-message-->
|
61
|
+
|
62
|
+
<% unless @omit_header %>
|
63
|
+
<header role="banner" id="global-header" class="<%= yield(:header_class) %>">
|
64
|
+
<div class="header-wrapper">
|
65
|
+
<div class="header-global">
|
66
|
+
<div class="header-logo">
|
67
|
+
<a href="https://www.gov.uk/" title="Go to the GOV.UK homepage" id="logo" class="content">
|
68
|
+
<img src="<%= asset_path 'moj_logotype_crest.png' %>" width="61" height="50" alt="">
|
69
|
+
<%= content_for?(:app_name) ? yield(:app_name) : "Ministry of Justice" %>
|
70
|
+
</a>
|
71
|
+
</div>
|
72
|
+
<div id="log-in-out">
|
73
|
+
<%= yield :log_in_out %>
|
74
|
+
</div>
|
75
|
+
<%= yield :inside_header %>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
</header>
|
79
|
+
<!--end header-->
|
80
|
+
<% end %>
|
81
|
+
|
82
|
+
<%= yield :after_header %>
|
83
|
+
|
84
|
+
<div id="global-header-bar">
|
85
|
+
<div class="inner-block">
|
86
|
+
<div class="header-bar"></div>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
<!--end global-header-bar-->
|
90
|
+
|
91
|
+
<%= content_for?(:content) ? yield(:content) : yield %>
|
92
|
+
|
93
|
+
<footer class="group js-footer" id="footer" role="contentinfo">
|
94
|
+
|
95
|
+
<div class="footer-wrapper">
|
96
|
+
<%= yield :footer_top %>
|
97
|
+
|
98
|
+
<div class="footer-meta">
|
99
|
+
<div class="footer-meta-inner">
|
100
|
+
<%= yield :footer_support_links %>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
</footer>
|
105
|
+
|
106
|
+
<!--end footer-->
|
107
|
+
|
108
|
+
<div id="global-app-error" class="app-error hidden"></div>
|
109
|
+
|
110
|
+
<script src="<%= asset_path "moj.js" %>" type="text/javascript"></script>
|
111
|
+
|
112
|
+
<%= yield :body_end %>
|
113
|
+
</body>
|
114
|
+
</html>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="indicator cf">
|
2
|
+
<p>
|
3
|
+
<strong><%= config_item(:phase).to_s.capitalize %>:</strong>
|
4
|
+
This is a new service -
|
5
|
+
<% if content_for?(:feedback_link) %>
|
6
|
+
<%= yield(:feedback_link) %>
|
7
|
+
<% else %>
|
8
|
+
<a href="<%= "#{config_item(:feedback_url)}" %>">your feedback</a>
|
9
|
+
<% end %>
|
10
|
+
will help us to improve it
|
11
|
+
</p>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%= yield :after_header %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= content_for?(:body_classes) ? raw("#{yield(:body_classes)}") : "#{config_item(:phase).to_s.downcase} #{config_item(:product_type).to_s.downcase}" %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<!--[if gt IE 6]><!-->
|
2
|
+
<script src="<%= asset_path "vendor/jquery/jquery-1.11.0.min.js" %>" type="text/javascript"></script>
|
3
|
+
<script src="<%= asset_path "moj.js" %>" type="text/javascript"></script>
|
4
|
+
|
5
|
+
<%= yield :javascripts %>
|
6
|
+
|
7
|
+
<script type="text/javascript">$(moj.init);</script>
|
8
|
+
<!--<![endif]-->
|
9
|
+
|
10
|
+
<%= yield :body_end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% if content_for?(:content_override) %>
|
2
|
+
<%= yield(:content_override) %>
|
3
|
+
<% else %>
|
4
|
+
<%= yield :before_content %>
|
5
|
+
|
6
|
+
<div id="wrapper" class="group">
|
7
|
+
<section id="content" role="main">
|
8
|
+
<%= content_for?(:content) ? yield(:content) : yield %>
|
9
|
+
</section>
|
10
|
+
</div>
|
11
|
+
<% end %>
|