Page contents:
--
- <% @content_item.header_links.each do |header_link| %>
-
- <%= link_to(header_link[:title], header_link[:href], class: 'govuk-link') %> - <% end %> -
diff --git a/Gemfile b/Gemfile index f8aaf27f..a3dfe160 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ gem 'gds-api-adapters', '~> 60.0.0' gem 'govuk_app_config', '~> 2.0' gem 'govuk_elements_rails' gem 'govuk_frontend_toolkit', '~> 8.2.0' -gem 'govuk_publishing_components', '~> 20.3.0' +gem 'govuk_publishing_components', '~> 17.21.0' gem 'plek', '3.0.0' gem 'rails', '~> 5.2.3' gem 'rails-i18n', '~> 5.1.3' @@ -18,7 +18,7 @@ gem 'uglifier', '>= 1.3.0' group :development, :test do gem 'govuk-lint' gem 'jasmine-rails' - gem 'phantomjs', '~> 2.1', '>= 2.1.1.0' + gem 'phantomjs', '~> 2.1.1' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 9d8383d3..9092172d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -114,7 +114,7 @@ GEM govuk_frontend_toolkit (8.2.0) railties (>= 3.1.0) sass (>= 3.2.0) - govuk_publishing_components (20.3.0) + govuk_publishing_components (17.21.0) gds-api-adapters govuk_app_config govuk_frontend_toolkit @@ -246,7 +246,7 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) robotex (1.0.0) - rouge (3.10.0) + rouge (3.7.0) rubocop (0.72.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) @@ -274,8 +274,9 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.2.0) + sassc (2.0.1) ffi (~> 1.9) + rake sassc-rails (2.1.2) railties (>= 4.0.0) sassc (>= 2.0) @@ -359,10 +360,10 @@ DEPENDENCIES govuk_app_config (~> 2.0) govuk_elements_rails govuk_frontend_toolkit (~> 8.2.0) - govuk_publishing_components (~> 20.3.0) + govuk_publishing_components (~> 17.21.0) jasmine-rails listen (>= 3.0.5, < 3.2) - phantomjs (~> 2.1, >= 2.1.1.0) + phantomjs (~> 2.1.1) plek (= 3.0.0) poltergeist pry-byebug @@ -381,4 +382,4 @@ RUBY VERSION ruby 2.6.3p62 BUNDLED WITH - 1.17.2 + 1.16.2 diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 2eda776a..6e618e9b 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,7 +1,4 @@ -$govuk-compatibility-govuktemplate: true; -$govuk-compatibility-govukfrontendtoolkit: true; -$govuk-compatibility-govukelements: true; -@import "govuk_publishing_components/all_components"; +// The main application stylesheet @import "common"; @@ -15,12 +12,18 @@ $govuk-compatibility-govukelements: true; @import "modules/community-contact"; @import "modules/govspeak-wrapper"; @import "modules/hero"; +@import "modules/improve-this-page"; @import "modules/link-unit"; @import "modules/main-service-manual"; +@import "modules/metadata"; @import "modules/notice"; @import "modules/page-contents"; @import "modules/page-header"; @import "modules/panel"; @import "modules/related-content"; +@import "modules/search"; @import "modules/service-standard-point"; +@import "modules/subsections"; @import "modules/typography"; + +@import "govuk_publishing_components/all_components"; diff --git a/app/assets/stylesheets/hacks/_full-width.scss b/app/assets/stylesheets/hacks/_full-width.scss index d77ce2d4..85856a2c 100644 --- a/app/assets/stylesheets/hacks/_full-width.scss +++ b/app/assets/stylesheets/hacks/_full-width.scss @@ -1,10 +1,23 @@ -.app-full-width { - #global-header-bar { // scss-lint:disable IdSelector +.full-width { + // We're overriding static, we have to use IDs. + // scss-lint:disable IdSelector + #wrapper { + margin: 0; + width: auto; + max-width: 100%; + } + + #global-header-bar { display: none; } -} -.app-\!-full-width-override { - margin: auto !important; - max-width: none !important; + .govuk-beta-label { + border-bottom: none; + } + + .full-page-width-wrapper, + #wrapper .report-a-problem-toggle-wrapper, + #wrapper .report-a-problem-container { + @extend %site-width-container; + } } diff --git a/app/assets/stylesheets/hacks/_header-tweaks.scss b/app/assets/stylesheets/hacks/_header-tweaks.scss index a50dc8fd..a24c393f 100644 --- a/app/assets/stylesheets/hacks/_header-tweaks.scss +++ b/app/assets/stylesheets/hacks/_header-tweaks.scss @@ -2,7 +2,7 @@ // this work, we need to slightly tweak the header's CSS from our app. .header-title { float: left; - color: govuk-colour("white"); + color: $white; @include bold-24; // When the title appears on its own line (the search box is hidden and only a diff --git a/app/assets/stylesheets/mixins/_margins.scss b/app/assets/stylesheets/mixins/_margins.scss index 6ca7103c..33e5e42b 100644 --- a/app/assets/stylesheets/mixins/_margins.scss +++ b/app/assets/stylesheets/mixins/_margins.scss @@ -1,16 +1,16 @@ @mixin responsive-bottom-margin { - margin-bottom: govuk-spacing(3); + margin-bottom: $gutter-half; @include media(tablet) { - margin-bottom: govuk-spacing(7); + margin-bottom: $gutter * 1.5; } } @mixin responsive-top-margin { - margin-top: govuk-spacing(3); + margin-top: $gutter-half; @include media(tablet) { - margin-top: govuk-spacing(7); + margin-top: $gutter * 1.5; } } @@ -21,11 +21,11 @@ @mixin gutter-bottom-margin { - margin-bottom: govuk-spacing(6); + margin-bottom: $gutter; } @mixin gutter-top-margin { - margin-top: govuk-spacing(6); + margin-top: $gutter; } @mixin gutter-vertical-margins { @@ -34,9 +34,9 @@ } @mixin gutter-bottom-margin-to-double { - margin-bottom: govuk-spacing(3); + margin-bottom: $gutter; @include media(tablet) { - margin-bottom: govuk-spacing(9); + margin-bottom: $gutter * 2; } } diff --git a/app/assets/stylesheets/modules/_change-history.scss b/app/assets/stylesheets/modules/_change-history.scss index fb8c3534..36469b5e 100644 --- a/app/assets/stylesheets/modules/_change-history.scss +++ b/app/assets/stylesheets/modules/_change-history.scss @@ -1,3 +1,33 @@ -.app-c-change-history__change-note { - color: $govuk-secondary-text-colour; +.change-history { + margin-top: 30px; + width: 66%; + + &__latest-change { + + dt { + @include core-19; + } + + dd { + @include bold-24; + margin-bottom: 10px; + } + } + + &__summary { + @include core-16; + color: $grey-1; + } + + &__past { + + time { + @include bold-19; + } + + li { + list-style: none; + margin-bottom: 10px; + } + } } diff --git a/app/assets/stylesheets/modules/_collection.scss b/app/assets/stylesheets/modules/_collection.scss index 5f451fdc..40e7701e 100644 --- a/app/assets/stylesheets/modules/_collection.scss +++ b/app/assets/stylesheets/modules/_collection.scss @@ -1,12 +1,12 @@ .collection { - border-bottom: 1px solid $govuk-border-colour; + border-bottom: 1px solid $border-colour; - padding-bottom: govuk-spacing(3); - margin-bottom: govuk-spacing(3); + padding-bottom: $gutter-half; + margin-bottom: $gutter-half; @include media(tablet) { - padding-bottom: govuk-spacing(6); - margin-bottom: govuk-spacing(6); + padding-bottom: $gutter; + margin-bottom: $gutter; } &:last-child { @@ -22,7 +22,7 @@ &__description { @include core-24; - color: $govuk-secondary-text-colour; + color: $secondary-text-colour; margin-top: 0; } diff --git a/app/assets/stylesheets/modules/_community-contact.scss b/app/assets/stylesheets/modules/_community-contact.scss index cadd5cba..8628f3ec 100644 --- a/app/assets/stylesheets/modules/_community-contact.scss +++ b/app/assets/stylesheets/modules/_community-contact.scss @@ -1,6 +1,7 @@ -.app-c-community-contact { +.community-contact { + @include gutter-vertical-margins; @include media(tablet) { text-align: right; - padding-top: govuk-spacing(8); + padding-top: $gutter-half; } } diff --git a/app/assets/stylesheets/modules/_govspeak-wrapper.scss b/app/assets/stylesheets/modules/_govspeak-wrapper.scss index 4880188d..e4a99eef 100644 --- a/app/assets/stylesheets/modules/_govspeak-wrapper.scss +++ b/app/assets/stylesheets/modules/_govspeak-wrapper.scss @@ -8,12 +8,17 @@ .govuk-govspeak p, .govuk-govspeak ol, .govuk-govspeak ul { - line-height: 1.45; // govspeak margin bottom is 20px - margin-bottom: govuk-spacing(3); + margin-bottom: $gutter-half; } .govuk-govspeak h2 { - @extend %govuk-heading-m; + margin-top: 15px; + padding-top: 15px; + // govspeak margin-top is 45px + @include media(tablet) { + margin-top: 15px; + padding-top: 30px; + } } } diff --git a/app/assets/stylesheets/modules/_hero.scss b/app/assets/stylesheets/modules/_hero.scss index 0644458a..e4773fc0 100644 --- a/app/assets/stylesheets/modules/_hero.scss +++ b/app/assets/stylesheets/modules/_hero.scss @@ -1,25 +1,57 @@ -.app-c-hero { - background-color: $govuk-brand-colour; - color: govuk-colour("white"); - margin-bottom: govuk-spacing(3); - position: relative; - top: -1px; +.hero { + background-color: $govuk-blue; + color: $white; + + margin-bottom: $gutter-half; @include media(tablet) { - margin-bottom: govuk-spacing(6); + margin-bottom: $gutter; } a:link, a:visited { - @include govuk-typography-weight-bold; + font-weight: bold; + color: $white; } -} -.app-c-hero-lead { - line-height: 1.35; -} + a:hover, + a:active { + color: $light-blue-25; + } + + &__content { + $border-top-width: 10px; + + @extend %site-width-container; + + padding: ($gutter-half + $border-top-width) 0 $gutter-half; + + @include media(tablet) { + padding: ($gutter + $border-top-width) 0 $gutter; + } + } -.app-c-hero__heading--inverse, -.app-c-hero__body--inverse { - color: govuk-colour("white"); + &__title { + @include core-48; + margin-bottom: $gutter; + font-weight: bold; + } + + &__description { + @include core-24; + } + + &__feedback-link { + @include core-16; + line-height: 1.25; + margin-top: $gutter; + + @include media(tablet) { + margin-top: 0; + } + } + + &__search { + margin-bottom: $gutter-half; + } } diff --git a/app/assets/stylesheets/modules/_improve-this-page.scss b/app/assets/stylesheets/modules/_improve-this-page.scss new file mode 100644 index 00000000..b011b83a --- /dev/null +++ b/app/assets/stylesheets/modules/_improve-this-page.scss @@ -0,0 +1,66 @@ +// Here we're using BEM which uses __ to denote an element within a block +// scss-lint:disable SelectorFormat + +.improve-this-page { + @include print { + display: none; + } +} + +.improve-this-page__prompt { + background-color: $govuk-blue; + color: $white; + padding: 10px $gutter-half 0; + + a:link, + a:visited { + color: $white; + display: inline-block; + + &:focus { + color: $black; + } + } + + &:focus { + outline: none; + } +} + +.improve-this-page__page-is-useful-button { + margin-right: 0.2em; +} + +.improve-this-page__is-useful-question { + @include bold-16; + + display: inline; +} + +.improve-this-page__anything-wrong { + float: right; +} + +.improve-this-page__form { + margin-top: $gutter; + padding: $gutter-half 0; + border-top: 10px solid $govuk-blue; + + .form-control { + width: 100%; + } +} + +.improve-this-page__close { + @include core-16; + + text-align: right; + display: block; + margin-bottom: 10px; + + @include media(tablet) { + display: inherit; + float: right; + padding-top: 0; + } +} diff --git a/app/assets/stylesheets/modules/_metadata.scss b/app/assets/stylesheets/modules/_metadata.scss new file mode 100644 index 00000000..07edd347 --- /dev/null +++ b/app/assets/stylesheets/modules/_metadata.scss @@ -0,0 +1,31 @@ +.metadata { + @include core-14; + @extend %contain-floats; + margin-bottom: 2em; + + dt { + float: left; + clear: left; + width: auto; + min-width: 120px; + + @include media(tablet) { + padding-right: $gutter-one-third; + } + } + + dd { + float: left; + width: 55%; + + @include media(tablet) { + width: 70%; + } + } + + // Adjust icon position for external links + a[rel="external"]:after { + content: "\A0\A0\A0\A0\A0\A0"; + background-position: right 0%; + } +} diff --git a/app/assets/stylesheets/modules/_notice.scss b/app/assets/stylesheets/modules/_notice.scss index 07447485..347412f4 100644 --- a/app/assets/stylesheets/modules/_notice.scss +++ b/app/assets/stylesheets/modules/_notice.scss @@ -1,17 +1,17 @@ .notice { clear: both; @include responsive-bottom-margin; - padding: govuk-spacing(3); + padding: $gutter-half; - border: 5px solid $govuk-brand-colour; + border: 5px solid $govuk-blue; @include media(tablet) { - padding: govuk-spacing(4); + padding: $gutter-two-thirds; } &__title { @include bold-36; - margin-bottom: govuk-spacing(2); + margin-bottom: $gutter-one-third; } &__description { diff --git a/app/assets/stylesheets/modules/_page-contents.scss b/app/assets/stylesheets/modules/_page-contents.scss index cb0ea371..26403ee6 100644 --- a/app/assets/stylesheets/modules/_page-contents.scss +++ b/app/assets/stylesheets/modules/_page-contents.scss @@ -1,15 +1,43 @@ -.app-c-page-contents { +.page-contents { + margin-top: 1em; + + @include media(tablet) { + margin-top: 0; + padding: 2em 0; + } + + &__title { + @include bold-16; + margin-bottom: 5px; + } + &__list li { - margin-left: govuk-spacing(0); - padding-right: govuk-spacing(3); + @include core-16; + list-style-type: none; + margin-bottom: 5px; + margin-left: $gutter-half; + padding-right: $gutter-half; &:before { - content: "– "; - display: inline-block; - padding-right: govuk-spacing(1); + content: "–"; + float: left; + display: block; + width: $gutter-half; + margin-left: -$gutter-half; } } + &__list a { + text-decoration: none; + // Prevents emboldening from pushing text onto new lines + letter-spacing: 0.022em; + + &:hover, + &:focus, + &:active { + text-decoration: underline; + } + } // Styles required by GOVUK.HighlightActiveNavItem JS &__list .active { letter-spacing: 0; diff --git a/app/assets/stylesheets/modules/_page-header.scss b/app/assets/stylesheets/modules/_page-header.scss index 2e0b4e09..4210c173 100644 --- a/app/assets/stylesheets/modules/_page-header.scss +++ b/app/assets/stylesheets/modules/_page-header.scss @@ -1,20 +1,43 @@ -.app-c-page-header { - &__intro { - p { - @extend %govuk-body-m; - } +// Example usage: + +//
Context
+//+// How to work in an agile way: principles, tools and governance. +//
+//+// Additional descriptive text can sit here +//
+//- <%= @content_item.description %> -
- <% end %> -<%= @content_item.category_title %>
++ <%= @content_item.description %> +
+ <% end %>- <%= link_to "Give feedback about this page", "/contact/govuk", class: "govuk-link" %> + <%= link_to "Give feedback about this page", "/contact/govuk", class: "feedback" %>
- + Show all page updates (<%= @content_item.previous_changes.length %>) -
-+ Show all page updates (<%= @content_item.previous_changes.length + 1 %>)
+- Helping teams to create and run great public services that meet the <%= link_to 'Service Standard', '/service-manual/service-standard', class: 'govuk-link app-link--inverse' %>. -
++ Helping teams to create and run great public services that meet the <%= link_to 'Service Standard', '/service-manual/service-standard' %>. +
+ +- <%= link_to 'Contact the Service Manual team', '/contact/govuk', class: 'govuk-link app-link--inverse' %> - with any comments or questions. -
-<%= link_to 'Contact the Service Manual team', '/contact/govuk' %> with any comments or questions.
<%= topic["description"] %>
+<%= topic["description"] %>
The <%= link_to 'Service Standard', '/service-manual/service-standard', class: 'govuk-link' %> provides the principles of building a good service. This manual explains what teams can do to build great services that will meet the standard.
The <%= link_to 'Service Standard', '/service-manual/service-standard' %> provides the principles of building a good service. This manual explains what teams can do to build great services that will meet the standard.
You can view the <%= link_to 'communities of practice', '/service-manual/communities', class: 'govuk-link' %> to find more learning resources, see who has written the guidance in the manual and connect with digital people like you from across government.
-You can view the <%= link_to 'communities of practice', '/service-manual/communities' %> to find more learning resources, see who has written the guidance in the manual and connect with digital people like you from across government.
- <%= @content_item.content_item["description"] %> -
-+ <%= @content_item.content_item["description"] %> +
+#{point.description}
" if point.description.present? %> -<%= link_to "Read more about point #{ point.number }", point.base_path, class: 'govuk-link' %>
-<%= point.description %>
+<%= link_to "Read more about point #{ point.number }", point.base_path %>
+
<%= @content_item.description %>
<%= link_group.description %>
+<%= link_group.description %>
+ <% end %> +