From 6441a77a4211e9af8a696833985e147103b17069 Mon Sep 17 00:00:00 2001 From: maxgds Date: Mon, 16 Mar 2020 15:11:26 +0000 Subject: [PATCH 1/2] Add emergency travel callout - Callout hardcoded into the country page travel advice template. --- app/assets/stylesheets/application.scss | 10 +++ .../content_items/travel_advice.html.erb | 80 ++++++++++--------- 2 files changed, 53 insertions(+), 37 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index c57b7470c..759af8678 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -48,4 +48,14 @@ $govuk-use-legacy-palette: false; @import 'views/help-page'; @import "views/guide"; +.travel-advice-notice { + background-color: govuk-colour("light-grey"); + border: 1px solid $govuk-border-colour; + margin-bottom: govuk-spacing(7); + padding: govuk-spacing(4) govuk-spacing(4) 0 govuk-spacing(9); + position: relative; +} +.travel-advice-notice__icon { + margin-left: govuk-spacing(3); +} diff --git a/app/views/content_items/travel_advice.html.erb b/app/views/content_items/travel_advice.html.erb index 20350d9b1..eafef8cec 100644 --- a/app/views/content_items/travel_advice.html.erb +++ b/app/views/content_items/travel_advice.html.erb @@ -1,10 +1,10 @@ <% content_for :simple_header, true %> <% content_for :extra_head_content do %> - <%= auto_discovery_link_tag :atom, @content_item.feed_link, +<%= auto_discovery_link_tag :atom, @content_item.feed_link, title: "Recent updates for #{@content_item.country_name}" %> - <%= machine_readable_metadata( +<%= machine_readable_metadata( schema: :article, canonical_url: @content_item.canonical_url, title: @content_item.page_title, @@ -13,52 +13,58 @@ <% end %>
-
- <%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %> - +
-
-

- <%= @content_item.current_part_title %> -

+
+

+ <%= @content_item.current_part_title %> +

- <% if @content_item.is_summary? %> - <%= render 'shared/travel_advice_summary', content_item: @content_item %> - <% end %> + <% if @content_item.is_summary? %> + <%= render 'shared/travel_advice_summary', content_item: @content_item %> + <% end %> - <%= render 'govuk_publishing_components/components/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.current_part_body.html_safe, direction: page_text_direction %> - <%= render 'govuk_publishing_components/components/previous_and_next_navigation', @content_item.previous_and_next_navigation %> + <%= render 'govuk_publishing_components/components/previous_and_next_navigation', @content_item.previous_and_next_navigation %> - <%= render 'components/print-link', href: @content_item.print_link, link_text: t("multi_page.print_entire_guide") %> -
- <%= render 'shared/sidebar_navigation' %> + <%= render 'components/print-link', href: @content_item.print_link, link_text: t("multi_page.print_entire_guide") %> +
+ <%= render 'shared/sidebar_navigation' %>
-<%= render 'shared/footer_navigation' %> +<%= render 'shared/footer_navigation' %> \ No newline at end of file From 661e06ed622a80acdc3b35076358944e90c80c70 Mon Sep 17 00:00:00 2001 From: Ian James Date: Mon, 16 Mar 2020 21:18:05 +0000 Subject: [PATCH 2/2] Update message content --- .../content_items/travel_advice.html.erb | 89 +++++++++---------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/app/views/content_items/travel_advice.html.erb b/app/views/content_items/travel_advice.html.erb index eafef8cec..eac4b8e85 100644 --- a/app/views/content_items/travel_advice.html.erb +++ b/app/views/content_items/travel_advice.html.erb @@ -1,10 +1,9 @@ <% content_for :simple_header, true %> <% content_for :extra_head_content do %> -<%= auto_discovery_link_tag :atom, @content_item.feed_link, - title: "Recent updates for #{@content_item.country_name}" %> + <%= auto_discovery_link_tag :atom, @content_item.feed_link, title: "Recent updates for #{@content_item.country_name}" %> -<%= machine_readable_metadata( + <%= machine_readable_metadata( schema: :article, canonical_url: @content_item.canonical_url, title: @content_item.page_title, @@ -13,58 +12,56 @@ <% end %>
-
- <%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %> +
+ <%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %> -
- -

- This is a notice -

-

Jelly-o wafer gummi bears bonbon carrot cake. Topping fruitcake lemon drops bonbon - dessert. Fruitcake danish cookie. Macaroon candy fruitcake fruitcake candy cheesecake. Cupcake soufflé - chupa chups toffee wafer cotton candy soufflé gingerbread marzipan.

-
- -
+ <%= render 'govuk_publishing_components/components/subscription-links', email_signup_link: @content_item.email_signup_link, feed_link: @content_item.feed_link %> + +
-
-

- <%= @content_item.current_part_title %> -

+
+

+ <%= @content_item.current_part_title %> +

- <% if @content_item.is_summary? %> - <%= render 'shared/travel_advice_summary', content_item: @content_item %> - <% end %> + <% if @content_item.is_summary? %> + <%= render 'shared/travel_advice_summary', content_item: @content_item %> + <% end %> - <%= render 'govuk_publishing_components/components/govspeak', - content: @content_item.current_part_body.html_safe, - direction: page_text_direction %> + <%= render 'govuk_publishing_components/components/govspeak', + content: @content_item.current_part_body.html_safe, + direction: page_text_direction %> - <%= render 'govuk_publishing_components/components/previous_and_next_navigation', @content_item.previous_and_next_navigation %> + <%= render 'govuk_publishing_components/components/previous_and_next_navigation', @content_item.previous_and_next_navigation %> - <%= render 'components/print-link', href: @content_item.print_link, link_text: t("multi_page.print_entire_guide") %> -
- <%= render 'shared/sidebar_navigation' %> + <%= render 'components/print-link', href: @content_item.print_link, link_text: t("multi_page.print_entire_guide") %> +
+ <%= render 'shared/sidebar_navigation' %>
-<%= render 'shared/footer_navigation' %> \ No newline at end of file +<%= render 'shared/footer_navigation' %>