dss_tech_docs 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/.editorconfig +29 -0
- data/.gitignore +37 -0
- data/.rspec +2 -0
- data/.rubocop.yml +11 -0
- data/.ruby-version +1 -0
- data/.travis.yml +9 -0
- data/CHANGELOG.md +274 -0
- data/CONTRIBUTING.md +9 -0
- data/Gemfile +4 -0
- data/LICENCE +21 -0
- data/README.md +89 -0
- data/Rakefile +13 -0
- data/docs/configuration.md +205 -0
- data/docs/core-layout-without-sidebar.png +0 -0
- data/docs/core-layout.png +0 -0
- data/docs/expired-page.png +0 -0
- data/docs/frontmatter.md +145 -0
- data/docs/last-reviewed-only.png +0 -0
- data/docs/last-reviewed-only.svg +1 -0
- data/docs/layout-layout.png +0 -0
- data/docs/not-expired-page.png +0 -0
- data/docs/page-expiry.md +85 -0
- data/dss_tech_docs.gemspec +46 -0
- data/example/.ruby-version +1 -0
- data/example/Gemfile +3 -0
- data/example/config.rb +9 -0
- data/example/config/hide-expiry.yml +51 -0
- data/example/config/tech-docs.yml +50 -0
- data/example/source/api-path.html.md +7 -0
- data/example/source/api-reference.html.md +5 -0
- data/example/source/child-of-expired-page.html.md +8 -0
- data/example/source/core-layout-without-sidebar.html.md.erb +7 -0
- data/example/source/core-layout.html.md.erb +12 -0
- data/example/source/expired-page-with-owner.html.md +10 -0
- data/example/source/expired-page.html.md +9 -0
- data/example/source/headings.html.md +11 -0
- data/example/source/index.html.md.erb +19 -0
- data/example/source/javascripts/application.js +1 -0
- data/example/source/not-expired-page.html.md +9 -0
- data/example/source/pets.yml +109 -0
- data/example/source/stylesheets/print.css.scss +3 -0
- data/example/source/stylesheets/screen-old-ie.css.scss +4 -0
- data/example/source/stylesheets/screen.css.scss +1 -0
- data/example/source/templates/proxy_template.html.md +8 -0
- data/lib/assets/javascripts/_analytics.js +58 -0
- data/lib/assets/javascripts/_govuk/modules.js +57 -0
- data/lib/assets/javascripts/_modules/anchored-headings.js +18 -0
- data/lib/assets/javascripts/_modules/collapsible-navigation.js +95 -0
- data/lib/assets/javascripts/_modules/in-page-navigation.js +132 -0
- data/lib/assets/javascripts/_modules/navigation.js +34 -0
- data/lib/assets/javascripts/_modules/page-expiry.js +15 -0
- data/lib/assets/javascripts/_modules/search.js +367 -0
- data/lib/assets/javascripts/_modules/table-of-contents.js +111 -0
- data/lib/assets/javascripts/_start-modules.js +13 -0
- data/lib/assets/javascripts/_vendor/fixedsticky.js +194 -0
- data/lib/assets/javascripts/_vendor/jquery.js +5 -0
- data/lib/assets/javascripts/_vendor/jquery.mark.js +1081 -0
- data/lib/assets/javascripts/_vendor/lodash.js +613 -0
- data/lib/assets/javascripts/_vendor/modernizr.js +3 -0
- data/lib/assets/javascripts/govuk_tech_docs.js +10 -0
- data/lib/assets/stylesheets/_accessibility.scss +9 -0
- data/lib/assets/stylesheets/_core.scss +71 -0
- data/lib/assets/stylesheets/_fonts.scss +29 -0
- data/lib/assets/stylesheets/_govuk_tech_docs.scss +2 -0
- data/lib/assets/stylesheets/_syntax-highlighting.scss +196 -0
- data/lib/assets/stylesheets/_variables.scss +12 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_colours.scss +2 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_conditionals.scss +81 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_css3.scss +90 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_device-pixels.scss +10 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_font_stack.scss +19 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_grid_layout.scss +136 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_helpers.scss +16 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_measurements.scss +14 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_shims.scss +55 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_typography.scss +249 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_url-helpers.scss +16 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/colours/_organisation.scss +103 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/colours/_palette.scss +77 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_alpha-beta.scss +66 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_breadcrumbs.scss +53 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_buttons.scss +141 -0
- data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_media-player.scss +242 -0
- data/lib/assets/stylesheets/modules/_anchored-heading.scss +54 -0
- data/lib/assets/stylesheets/modules/_app-pane.scss +64 -0
- data/lib/assets/stylesheets/modules/_collapsible.scss +52 -0
- data/lib/assets/stylesheets/modules/_contribution-banner.scss +22 -0
- data/lib/assets/stylesheets/modules/_footer.scss +130 -0
- data/lib/assets/stylesheets/modules/_govuk-logo.scss +47 -0
- data/lib/assets/stylesheets/modules/_header.scss +290 -0
- data/lib/assets/stylesheets/modules/_page-review.scss +35 -0
- data/lib/assets/stylesheets/modules/_phase-banner.scss +22 -0
- data/lib/assets/stylesheets/modules/_search.scss +137 -0
- data/lib/assets/stylesheets/modules/_skip-link.scss +31 -0
- data/lib/assets/stylesheets/modules/_technical-documentation.scss +241 -0
- data/lib/assets/stylesheets/modules/_toc.scss +216 -0
- data/lib/assets/stylesheets/modules/_warning-text.scss +73 -0
- data/lib/assets/stylesheets/palette/_syntax-highlighting.scss +23 -0
- data/lib/assets/stylesheets/utilities/_fonts.scss +29 -0
- data/lib/assets/stylesheets/utilities/_printable.scss +13 -0
- data/lib/assets/stylesheets/vendor/_fixedsticky.scss +22 -0
- data/lib/dss_tech_docs.rb +121 -0
- data/lib/govuk_tech_docs/api_reference/api_reference_extension.rb +101 -0
- data/lib/govuk_tech_docs/api_reference/api_reference_renderer.rb +279 -0
- data/lib/govuk_tech_docs/api_reference/templates/api_reference_full.html.erb +19 -0
- data/lib/govuk_tech_docs/api_reference/templates/operation.html.erb +11 -0
- data/lib/govuk_tech_docs/api_reference/templates/parameters.html.erb +28 -0
- data/lib/govuk_tech_docs/api_reference/templates/path.html.erb +4 -0
- data/lib/govuk_tech_docs/api_reference/templates/responses.html.erb +33 -0
- data/lib/govuk_tech_docs/api_reference/templates/schema.html.erb +29 -0
- data/lib/govuk_tech_docs/contribution_banner.rb +62 -0
- data/lib/govuk_tech_docs/meta_tags.rb +67 -0
- data/lib/govuk_tech_docs/page_review.rb +52 -0
- data/lib/govuk_tech_docs/pages.rb +32 -0
- data/lib/govuk_tech_docs/redirects.rb +39 -0
- data/lib/govuk_tech_docs/table_of_contents/heading.rb +30 -0
- data/lib/govuk_tech_docs/table_of_contents/heading_tree.rb +27 -0
- data/lib/govuk_tech_docs/table_of_contents/heading_tree_builder.rb +41 -0
- data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +46 -0
- data/lib/govuk_tech_docs/table_of_contents/headings_builder.rb +39 -0
- data/lib/govuk_tech_docs/table_of_contents/helpers.rb +79 -0
- data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +34 -0
- data/lib/govuk_tech_docs/unique_identifier_extension.rb +13 -0
- data/lib/govuk_tech_docs/unique_identifier_generator.rb +72 -0
- data/lib/govuk_tech_docs/version.rb +3 -0
- data/lib/govuk_tech_docs/warning_text_extension.rb +23 -0
- data/lib/source/api/pages.json.erb +1 -0
- data/lib/source/favicon.ico +0 -0
- data/lib/source/images/anchored-heading-icon-2x.png +0 -0
- data/lib/source/images/anchored-heading-icon.png +0 -0
- data/lib/source/images/gov.uk_logotype_crown-2x.png +0 -0
- data/lib/source/images/gov.uk_logotype_crown.png +0 -0
- data/lib/source/images/gov.uk_logotype_crown_invert_trans.png +0 -0
- data/lib/source/images/govuk-crest-2x.png +0 -0
- data/lib/source/images/govuk-crest.png +0 -0
- data/lib/source/images/govuk-icn-close.png +0 -0
- data/lib/source/images/govuk-icn-close@2x.png +0 -0
- data/lib/source/images/govuk-icn-numbered-list.png +0 -0
- data/lib/source/images/govuk-icn-numbered-list@2x.png +0 -0
- data/lib/source/images/open-government-licence.png +0 -0
- data/lib/source/images/open-government-licence_2x.png +0 -0
- data/lib/source/images/search-result-caret.svg +13 -0
- data/lib/source/layouts/_analytics.erb +15 -0
- data/lib/source/layouts/_footer.erb +10 -0
- data/lib/source/layouts/_header.erb +44 -0
- data/lib/source/layouts/_page_review.erb +22 -0
- data/lib/source/layouts/_search.erb +16 -0
- data/lib/source/layouts/core.erb +82 -0
- data/lib/source/layouts/layout.erb +18 -0
- metadata +474 -0
@@ -0,0 +1,47 @@
|
|
1
|
+
/**
|
2
|
+
* GOV.UK Logo Component
|
3
|
+
*
|
4
|
+
* Based on the existing GOV.UK logo from the header in GOV.UK Template.
|
5
|
+
*
|
6
|
+
* Notes:
|
7
|
+
*
|
8
|
+
* - The printable-crown element is an image that is included when the page is
|
9
|
+
* printed. It's hidden for the screen media type, where the background image
|
10
|
+
* is used instead.
|
11
|
+
*
|
12
|
+
* Example Usage:
|
13
|
+
*
|
14
|
+
* <span class="govuk-logo">
|
15
|
+
* <img class="govuk-logo__printable-crown" src="/images/gov.uk_logotype_crown_invert_trans.png" height="32" width="36">
|
16
|
+
* GOV.UK
|
17
|
+
* </span>
|
18
|
+
*/
|
19
|
+
|
20
|
+
.govuk-logo {
|
21
|
+
font-weight: bold;
|
22
|
+
display: inline-block;
|
23
|
+
|
24
|
+
@include screen {
|
25
|
+
background-image: file-url('/images/gov.uk_logotype_crown.png');
|
26
|
+
background-repeat: no-repeat;
|
27
|
+
|
28
|
+
@include device-pixel-ratio {
|
29
|
+
background-image: file-url('/images/gov.uk_logotype_crown-2x.png');
|
30
|
+
background-size: 36px 32px;
|
31
|
+
}
|
32
|
+
|
33
|
+
@include media(tablet) {
|
34
|
+
margin-right: 8px;
|
35
|
+
background-position: 0 1px;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
.govuk-logo__printable-crown {
|
41
|
+
vertical-align: middle;
|
42
|
+
margin-right: 1px;
|
43
|
+
|
44
|
+
@include screen {
|
45
|
+
visibility: hidden;
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,290 @@
|
|
1
|
+
/**
|
2
|
+
* Header Component
|
3
|
+
*
|
4
|
+
* Based on the existing GOV.UK header in GOV.UK Template, with an 'inline'
|
5
|
+
* product name and hopefully improved mobile behaviour
|
6
|
+
*
|
7
|
+
* Notes:
|
8
|
+
*
|
9
|
+
* - Make sure you include header.js in your application. This will update
|
10
|
+
* the aria-expanded and aria-hidden attributes on the toggle and the nav
|
11
|
+
* respectively so that screen readers know what's happening.
|
12
|
+
* - Link the current page to the same place as your skip link (e.g. #main) –
|
13
|
+
* this means that it is included by screen readers but is referred to as a
|
14
|
+
* 'same page' link, and clicking it does not reload the page.
|
15
|
+
*
|
16
|
+
* Example Usage:
|
17
|
+
*
|
18
|
+
* <header class="header">
|
19
|
+
* <div class="header__container">
|
20
|
+
* <div class="header__brand">
|
21
|
+
* <a href="/">
|
22
|
+
* <span class="header__title">My Product Page</span>
|
23
|
+
* </a>
|
24
|
+
* </div>
|
25
|
+
*
|
26
|
+
* <div data-module="navigation">
|
27
|
+
* <button type="button" class="header__navigation-toggle js-nav-toggle" aria-controls="navigation" aria-label="Show or hide top level navigation">
|
28
|
+
* Menu
|
29
|
+
* </button>
|
30
|
+
*
|
31
|
+
* <nav id="navigation" class="header__navigation" aria-label="Top Level Navigation" aria-hidden="true">
|
32
|
+
* <ul>
|
33
|
+
* <li class="active"><a href="#main">Active Page</a></li>
|
34
|
+
* <li><a href="/other.html">Other Page</a></li>
|
35
|
+
* </ul>
|
36
|
+
* </nav>
|
37
|
+
* </div>
|
38
|
+
* </div>
|
39
|
+
* </header>
|
40
|
+
*/
|
41
|
+
|
42
|
+
$active-nav-color: darken($dss-blue, 20%);
|
43
|
+
$nav-border: lighten(grey, 20%);
|
44
|
+
|
45
|
+
.header {
|
46
|
+
@extend %contain-floats;
|
47
|
+
|
48
|
+
@include screen {
|
49
|
+
background: $dss-blue;
|
50
|
+
color: $white;
|
51
|
+
border-bottom: 10px solid $nav-border;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
.header__container {
|
56
|
+
@extend %site-width-container;
|
57
|
+
@extend %contain-floats;
|
58
|
+
zoom: 1;
|
59
|
+
|
60
|
+
padding: 9px 0 6px;
|
61
|
+
|
62
|
+
@include screen {
|
63
|
+
border-bottom: 10px solid $nav-border;
|
64
|
+
margin-bottom: -10px;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
.header.header--full-width {
|
69
|
+
margin-bottom: 0;
|
70
|
+
|
71
|
+
@include screen {
|
72
|
+
border-bottom: 10px solid $nav-border;
|
73
|
+
}
|
74
|
+
|
75
|
+
.header__container {
|
76
|
+
border-bottom: none;
|
77
|
+
width: auto;
|
78
|
+
max-width: none;
|
79
|
+
margin: 0 $gutter-half;
|
80
|
+
|
81
|
+
@include media(tablet) {
|
82
|
+
margin: 0 $gutter;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
.header--without-border {
|
88
|
+
border-bottom: none;
|
89
|
+
margin-bottom: 0;
|
90
|
+
|
91
|
+
.header__container {
|
92
|
+
border-bottom: none;
|
93
|
+
margin-bottom: 0;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
.header__brand {
|
98
|
+
font-size: 30px;
|
99
|
+
|
100
|
+
// Give brand focus outline on mobile
|
101
|
+
&:after {
|
102
|
+
content: ".";
|
103
|
+
height: 0;
|
104
|
+
clear: both;
|
105
|
+
visibility: hidden;
|
106
|
+
}
|
107
|
+
|
108
|
+
a:link, a:visited {
|
109
|
+
text-decoration: none;
|
110
|
+
}
|
111
|
+
|
112
|
+
a:hover {
|
113
|
+
text-decoration: underline;
|
114
|
+
}
|
115
|
+
|
116
|
+
.govuk-logo {
|
117
|
+
float: left;
|
118
|
+
}
|
119
|
+
|
120
|
+
@include screen {
|
121
|
+
a:link, a:visited {
|
122
|
+
color: $white;
|
123
|
+
}
|
124
|
+
|
125
|
+
a:focus {
|
126
|
+
background-color: inherit;
|
127
|
+
}
|
128
|
+
|
129
|
+
@include media(tablet) {
|
130
|
+
float: left;
|
131
|
+
|
132
|
+
.govuk-logo {
|
133
|
+
float: none;
|
134
|
+
}
|
135
|
+
|
136
|
+
a:hover {
|
137
|
+
text-decoration: none;
|
138
|
+
border-bottom: 1px solid $white;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
@include print {
|
144
|
+
a:link, a:visited {
|
145
|
+
color: $black;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
.header__title {
|
151
|
+
@include core-24;
|
152
|
+
display: block;
|
153
|
+
float: left;
|
154
|
+
clear: left;
|
155
|
+
|
156
|
+
@include media(tablet) {
|
157
|
+
display: inherit;
|
158
|
+
float: none;
|
159
|
+
clear: none;
|
160
|
+
}
|
161
|
+
|
162
|
+
.phase-banner {
|
163
|
+
margin-left: 5px;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
.header__navigation {
|
168
|
+
@include screen {
|
169
|
+
|
170
|
+
// We want the same font size on mobile as tablet, so we can't use bold-16.
|
171
|
+
@include _core-font-generator(
|
172
|
+
$font-size: 16px,
|
173
|
+
$font-size-640: 16px,
|
174
|
+
$font-size-print: 12pt,
|
175
|
+
$line-height: (20 / 16),
|
176
|
+
$line-height-640: (20 / 16),
|
177
|
+
$font-weight: 700
|
178
|
+
);
|
179
|
+
|
180
|
+
clear: both;
|
181
|
+
|
182
|
+
padding-top: 10px;
|
183
|
+
|
184
|
+
a:link, a:visited {
|
185
|
+
color: $white;
|
186
|
+
text-decoration: none;
|
187
|
+
padding: 8px 0;
|
188
|
+
display: inline-block;
|
189
|
+
}
|
190
|
+
|
191
|
+
.active a:link, .active a:visited {
|
192
|
+
color: $active-nav-color;
|
193
|
+
}
|
194
|
+
|
195
|
+
a:focus, .active a:focus {
|
196
|
+
color: $black;
|
197
|
+
}
|
198
|
+
|
199
|
+
a:hover, a:active {
|
200
|
+
text-decoration: underline;
|
201
|
+
}
|
202
|
+
|
203
|
+
ul {
|
204
|
+
border-top: 1px solid $grey-1;
|
205
|
+
margin: 0;
|
206
|
+
padding: 8px 0 0;
|
207
|
+
}
|
208
|
+
|
209
|
+
li {
|
210
|
+
list-style: none;
|
211
|
+
margin: 2px 0;
|
212
|
+
}
|
213
|
+
|
214
|
+
@include media(tablet) {
|
215
|
+
display: block;
|
216
|
+
clear: none;
|
217
|
+
padding-top: 2px;
|
218
|
+
border-top: none;
|
219
|
+
float: right;
|
220
|
+
|
221
|
+
a:link, a:visited {
|
222
|
+
padding: 0;
|
223
|
+
}
|
224
|
+
|
225
|
+
ul {
|
226
|
+
border-top: none;
|
227
|
+
padding: 0;
|
228
|
+
}
|
229
|
+
|
230
|
+
li {
|
231
|
+
float: left;
|
232
|
+
margin: 12px 0 0 $gutter-half;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
}
|
236
|
+
|
237
|
+
@include print {
|
238
|
+
display: none;
|
239
|
+
}
|
240
|
+
}
|
241
|
+
|
242
|
+
.header__navigation-toggle {
|
243
|
+
display: none;
|
244
|
+
}
|
245
|
+
|
246
|
+
.js {
|
247
|
+
.header__navigation {
|
248
|
+
display: none;
|
249
|
+
|
250
|
+
@include media(tablet) {
|
251
|
+
display: block;
|
252
|
+
}
|
253
|
+
}
|
254
|
+
|
255
|
+
.header__navigation-toggle {
|
256
|
+
display: block;
|
257
|
+
float: right;
|
258
|
+
color: $white;
|
259
|
+
background: transparent;
|
260
|
+
border: 1px solid $grey-1;
|
261
|
+
border-radius: 3px;
|
262
|
+
padding: 2px 6px 1px;
|
263
|
+
font-size: 80%;
|
264
|
+
font-weight: bold;
|
265
|
+
|
266
|
+
input {
|
267
|
+
display: none;
|
268
|
+
}
|
269
|
+
|
270
|
+
@include media(tablet) {
|
271
|
+
display: none;
|
272
|
+
}
|
273
|
+
|
274
|
+
&:after {
|
275
|
+
display: inline-block;
|
276
|
+
font-size: 8px;
|
277
|
+
padding-left: 5px;
|
278
|
+
vertical-align: middle;
|
279
|
+
content: " \25BC";
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
&.nav-open .header__navigation-toggle:after {
|
284
|
+
content: "\25B2";
|
285
|
+
}
|
286
|
+
|
287
|
+
&.nav-open .header__navigation {
|
288
|
+
display: block;
|
289
|
+
}
|
290
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
.page-expiry--not-expired,
|
2
|
+
.page-expiry--default {
|
3
|
+
padding: $gutter-half;
|
4
|
+
margin-top: $gutter;
|
5
|
+
margin-bottom: $gutter;
|
6
|
+
background-color: $govuk-blue;
|
7
|
+
color: $page-colour;
|
8
|
+
|
9
|
+
@include media(tablet) {
|
10
|
+
padding: $gutter;
|
11
|
+
}
|
12
|
+
|
13
|
+
a:link,
|
14
|
+
a:visited {
|
15
|
+
color: inherit;
|
16
|
+
}
|
17
|
+
|
18
|
+
a:hover {
|
19
|
+
color: $link-hover-colour;
|
20
|
+
}
|
21
|
+
|
22
|
+
a:active {
|
23
|
+
color: $link-active-colour;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
.page-expiry--expired {
|
28
|
+
display: none;
|
29
|
+
|
30
|
+
padding: $gutter-half;
|
31
|
+
margin-top: $gutter * 2;
|
32
|
+
background-color: $error-background;
|
33
|
+
border: 1px solid $error-colour;
|
34
|
+
color: $error-colour;
|
35
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/**
|
2
|
+
* Phase Banner Component
|
3
|
+
*
|
4
|
+
* Example Usage:
|
5
|
+
*
|
6
|
+
* <span class="header__title">
|
7
|
+
* My Product <span class="phase-banner">Beta</span>
|
8
|
+
* </span>
|
9
|
+
*/
|
10
|
+
|
11
|
+
.phase-banner {
|
12
|
+
@include bold-14;
|
13
|
+
padding: 2px 5px 0;
|
14
|
+
text-transform: uppercase;
|
15
|
+
letter-spacing: 1px;
|
16
|
+
vertical-align: middle;
|
17
|
+
|
18
|
+
@include screen {
|
19
|
+
background: darken($govuk-blue, 30%);
|
20
|
+
color: $white;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,137 @@
|
|
1
|
+
@include screen {
|
2
|
+
.page-title + .search {
|
3
|
+
margin-top: $gutter;
|
4
|
+
}
|
5
|
+
|
6
|
+
.search {
|
7
|
+
@include core-16;
|
8
|
+
margin-bottom: $gutter-half;
|
9
|
+
height: 40px;
|
10
|
+
.search__label {
|
11
|
+
position: absolute;
|
12
|
+
left: -9999em;
|
13
|
+
top: auto;
|
14
|
+
width: 1px;
|
15
|
+
height: 1px;
|
16
|
+
overflow: hidden;
|
17
|
+
}
|
18
|
+
.form-control {
|
19
|
+
@include box-sizing(border-box);
|
20
|
+
@include core-19;
|
21
|
+
width: 100%;
|
22
|
+
padding: 5px 4px 2px;
|
23
|
+
border: 2px solid $text-colour;
|
24
|
+
appearance: none;
|
25
|
+
|
26
|
+
&:focus {
|
27
|
+
outline: 3px solid $focus-colour;
|
28
|
+
outline-offset: 0;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
@include print {
|
35
|
+
.search {
|
36
|
+
display: none;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
html.has-search-results-open {
|
41
|
+
overflow: hidden;
|
42
|
+
.app-pane__content {
|
43
|
+
overflow: hidden;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
.search-results {
|
47
|
+
display: none;
|
48
|
+
&.is-open {
|
49
|
+
display: block;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
.search-results {
|
54
|
+
position: absolute;
|
55
|
+
top: 60px;
|
56
|
+
left: 0;
|
57
|
+
right: 0;
|
58
|
+
bottom: 0;
|
59
|
+
z-index: 600;
|
60
|
+
overflow-x: scroll;
|
61
|
+
-webkit-overflow-scrolling: touch;
|
62
|
+
-ms-overflow-style: none;
|
63
|
+
@include media(tablet) {
|
64
|
+
padding: 22px 20px 0 30px;
|
65
|
+
top: 0;
|
66
|
+
// The width of the sidebar
|
67
|
+
left: 330px;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
.search-results__inner {
|
71
|
+
position: relative;
|
72
|
+
background: $white;
|
73
|
+
border-top: 1px solid $grey-2;
|
74
|
+
max-width: 40rem;
|
75
|
+
padding: 15px;
|
76
|
+
@include media(tablet) {
|
77
|
+
padding: 15px 200px 50px 40px;
|
78
|
+
border: 1px solid $grey-2;
|
79
|
+
&::after {
|
80
|
+
content: '';
|
81
|
+
position: absolute;
|
82
|
+
top: 10px;
|
83
|
+
left: -9px;
|
84
|
+
width: 10px;
|
85
|
+
height: 20px;
|
86
|
+
background: no-repeat file-url('search-result-caret.svg') center right;
|
87
|
+
background-size: contain;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
.search-results__title {
|
92
|
+
@include bold-27;
|
93
|
+
margin-bottom: $gutter;
|
94
|
+
}
|
95
|
+
.search-results__close {
|
96
|
+
@include core-16;
|
97
|
+
position: absolute;
|
98
|
+
top: 18px;
|
99
|
+
right: 20px;
|
100
|
+
appearance: none;
|
101
|
+
background: none;
|
102
|
+
border: 0;
|
103
|
+
padding: 0;
|
104
|
+
&:focus {
|
105
|
+
outline: 3px solid $focus-colour;;
|
106
|
+
outline-offset: 0;
|
107
|
+
}
|
108
|
+
&::after {
|
109
|
+
content: '';
|
110
|
+
display: inline-block;
|
111
|
+
vertical-align: middle;
|
112
|
+
padding-left: 8px;
|
113
|
+
height: 18px;
|
114
|
+
width: 18px;
|
115
|
+
background: no-repeat file-url('govuk-icn-close.png') center right;
|
116
|
+
@include device-pixel-ratio {
|
117
|
+
background-image: file-url('govuk-icn-close@2x.png');
|
118
|
+
}
|
119
|
+
background-size: contain;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
.search-results__close-label {
|
123
|
+
position: absolute;
|
124
|
+
left: -9999em;
|
125
|
+
top: auto;
|
126
|
+
width: 1px;
|
127
|
+
height: 1px;
|
128
|
+
overflow: hidden;
|
129
|
+
}
|
130
|
+
.search-result {
|
131
|
+
margin-bottom: $gutter;
|
132
|
+
}
|
133
|
+
.search-result mark {
|
134
|
+
background-color: transparent;
|
135
|
+
color: inherit;
|
136
|
+
font-weight: bold;
|
137
|
+
}
|