diff --git a/app/assets/stylesheets/components/_notice.scss b/app/assets/stylesheets/components/_notice.scss deleted file mode 100644 index b52537c42..000000000 --- a/app/assets/stylesheets/components/_notice.scss +++ /dev/null @@ -1,33 +0,0 @@ -.app-c-notice { - clear: both; - padding: $gutter-two-thirds; - border: 2px solid $govuk-blue; - - @include media(mobile) { - padding: $gutter-half; - } - - .govuk-govspeak { - p:last-child { - margin-bottom: 0; - } - } -} - -.app-c-notice--bottom-margin { - @include responsive-bottom-margin; -} - -.app-c-notice__title { - @include bold-27; - margin-bottom: $gutter-one-third; - - &:last-child { - margin-bottom: 0; - } -} - -.app-c-notice__description { - @include core-19; - margin-bottom: 0; -} diff --git a/app/views/components/_notice.html.erb b/app/views/components/_notice.html.erb deleted file mode 100644 index 8a1e560a7..000000000 --- a/app/views/components/_notice.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<% if defined?(title) %> - <% - description_text ||= false - description_govspeak ||= false - margin_bottom_class = " app-c-notice--bottom-margin" unless local_assigns[:margin_bottom] - %> -
- <% if description_text || description_govspeak %> -

<%= title %>

- <% else %> - <%= title %> - <% end %> - - <% if description_text %> -

<%= description_text %>

- <% end %> - - <% if description_govspeak %> - <%= render 'govuk_component/govspeak', content: description_govspeak %> - <% end %> -
-<% end %> diff --git a/app/views/components/docs/notice.yml b/app/views/components/docs/notice.yml deleted file mode 100644 index 1482887a0..000000000 --- a/app/views/components/docs/notice.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Notice -description: A notice to convey and highlight information -body: | - The notice component replaces the notice and withdrawal notice patterns on GOV.UK. - - The component accepts either a simple string description_text parameter that it wraps in a paragraph, or a description_govspeak parameter that is rendered through govspeak for more complex HTML layout. -accessibility_criteria: | - The notice must: - - - have a border colour contrast ratio of more than 4.5:1 with its background to be visually distinct. - - always render headings with associated description content, so there are no isolated heading elements inside the component -examples: - default: - data: - title: 'Statistics release cancelled' - with_description_text: - data: - title: 'Statistics release cancelled' - description_text: 'Duplicate, added in error' - with_description_govspeak: - data: - title: 'Statistics release update' - description_govspeak: '

The Oil & Gas Authority launched a new website on 3 October 2016 to reflect its new status as a government company.

This formalises the transfer of the Secretary of State’s regulatory powers in respect of oil and gas to the OGA, and grants it new powers. This website will no longer be updated. Visitors should refer to www.ogauthority.co.uk

' diff --git a/app/views/content_items/_body_with_related_links.html.erb b/app/views/content_items/_body_with_related_links.html.erb index 86c804fa3..a03de38dd 100644 --- a/app/views/content_items/_body_with_related_links.html.erb +++ b/app/views/content_items/_body_with_related_links.html.erb @@ -9,7 +9,7 @@
- <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.body, direction: page_text_direction, disable_youtube_expansions: true, diff --git a/app/views/content_items/_document_collection_body.html.erb b/app/views/content_items/_document_collection_body.html.erb index 51e5384a4..da75b7b75 100644 --- a/app/views/content_items/_document_collection_body.html.erb +++ b/app/views/content_items/_document_collection_body.html.erb @@ -1,11 +1,11 @@ <% if @content_item.body.present? %> - <%= render 'govuk_component/govspeak', @content_item.govspeak_body %> + <%= render 'govuk_publishing_components/components/govspeak', @content_item.govspeak_body %> <% end %> <% @content_item.groups.each_with_index do |group, group_index| %> <%= @content_item.group_heading(group) %> <% if group["body"].present? %> - <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: group["body"], direction: page_text_direction %> <% end %> diff --git a/app/views/content_items/_publication_inline_body.html.erb b/app/views/content_items/_publication_inline_body.html.erb index a6072376b..79104f067 100644 --- a/app/views/content_items/_publication_inline_body.html.erb +++ b/app/views/content_items/_publication_inline_body.html.erb @@ -4,7 +4,7 @@ mobile_top_margin: true %>
- <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.documents, direction: page_text_direction %>
@@ -15,7 +15,7 @@ mobile_top_margin: true %>
- <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.details, direction: page_text_direction %>
diff --git a/app/views/content_items/case_study.html.erb b/app/views/content_items/case_study.html.erb index 13e1b8574..ec9926eb3 100644 --- a/app/views/content_items/case_study.html.erb +++ b/app/views/content_items/case_study.html.erb @@ -15,7 +15,7 @@
<%= render 'shared/publisher_metadata_with_logo' %> -<%= render 'components/notice', @content_item.withdrawal_notice_component %> +<%= render 'govuk_publishing_components/components/notice', @content_item.withdrawal_notice_component %>
@@ -25,7 +25,7 @@ alt: @content_item.image["alt_text"], caption: @content_item.image["caption"] if @content_item.image %> - <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.body, direction: page_text_direction %>
diff --git a/app/views/content_items/consultation.html.erb b/app/views/content_items/consultation.html.erb index 69db3b150..999e96331 100644 --- a/app/views/content_items/consultation.html.erb +++ b/app/views/content_items/consultation.html.erb @@ -13,7 +13,7 @@ <%= render 'shared/publisher_metadata_with_logo', content_item: @content_item %> <%= render 'shared/history_notice', content_item: @content_item %> -<%= render 'components/notice', @content_item.withdrawal_notice_component %> +<%= render 'govuk_publishing_components/components/notice', @content_item.withdrawal_notice_component %>
@@ -25,21 +25,21 @@ <% if @content_item.opening_date_midnight? %>on<% else %>at<% end %> <% end %> - <%= render 'components/notice', title: "This consultation isn't open yet", description_text: content_item_unopened %> + <%= render 'govuk_publishing_components/components/notice', title: "This consultation isn't open yet", description_text: content_item_unopened %> <% elsif @content_item.pending_final_outcome? %> <% content_item_final_outcome = capture do %> Visit this page again soon to download the outcome to this public feedback. <% end %> - <%= render 'components/notice', title: 'We are analysing your feedback', description_text: content_item_final_outcome, margin_bottom: 0 %> + <%= render 'govuk_publishing_components/components/notice', title: 'We are analysing your feedback', description_text: content_item_final_outcome, margin_bottom: 0 %> <% elsif @content_item.final_outcome? %> - <%= render 'components/notice', title: 'This consultation has concluded' %> + <%= render 'govuk_publishing_components/components/notice', title: 'This consultation has concluded' %> <% if @content_item.final_outcome_documents? %> <%= render 'govuk_publishing_components/components/heading', text: "Download the full outcome", mobile_top_margin: true %>
- <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.final_outcome_documents, direction: page_text_direction %>
@@ -47,7 +47,7 @@ <%= render 'govuk_publishing_components/components/heading', text: "Detail of outcome", mobile_top_margin: true %>
- <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.final_outcome_detail, direction: page_text_direction %>
@@ -56,7 +56,7 @@ <% if @content_item.public_feedback_documents? %> <%= render 'govuk_publishing_components/components/heading', text: "Feedback received", mobile_top_margin: true %>
- <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.public_feedback_documents, direction: page_text_direction %>
@@ -65,7 +65,7 @@ <% if @content_item.public_feedback_detail %> <%= render 'govuk_publishing_components/components/heading', text: "Detail of feedback received", mobile_top_margin: true %>
- <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.public_feedback_detail, direction: page_text_direction %>
@@ -109,12 +109,12 @@
<%= render 'govuk_publishing_components/components/heading', text: "Consultation description", mobile_top_margin: true %> - <%= render 'govuk_component/govspeak', @content_item.govspeak_body %> + <%= render 'govuk_publishing_components/components/govspeak', @content_item.govspeak_body %> <% if @content_item.documents? %> <%= render 'govuk_publishing_components/components/heading', text: "Documents", mobile_top_margin: true %>
- <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.documents, direction: page_text_direction %>
@@ -157,7 +157,7 @@ <% end %> <% end %> - <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @ways_to_respond_body, direction: page_text_direction %>
diff --git a/app/views/content_items/contact.html.erb b/app/views/content_items/contact.html.erb index 6da8022b0..9b3c64ee0 100644 --- a/app/views/content_items/contact.html.erb +++ b/app/views/content_items/contact.html.erb @@ -101,7 +101,7 @@ <% end %> <% end %> - <%= render 'govuk_component/govspeak', content: body, rich_govspeak: true %> + <%= render 'govuk_publishing_components/components/govspeak', content: body, rich_govspeak: true %>
<%= render 'shared/sidebar_navigation' %>
diff --git a/app/views/content_items/corporate_information_page.html.erb b/app/views/content_items/corporate_information_page.html.erb index ee761c8d3..4c988da47 100644 --- a/app/views/content_items/corporate_information_page.html.erb +++ b/app/views/content_items/corporate_information_page.html.erb @@ -39,7 +39,7 @@ <%= render 'shared/translations' %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %> - <%= render 'components/notice', @content_item.withdrawal_notice_component %> + <%= render 'govuk_publishing_components/components/notice', @content_item.withdrawal_notice_component %>
@@ -47,7 +47,7 @@
<%= render "components/contents-list-with-body", contents: @content_item.contents do %>
- <%= render 'govuk_component/govspeak', content: "#{@content_item.body}#{@additional_body}" %> + <%= render 'govuk_publishing_components/components/govspeak', content: "#{@content_item.body}#{@additional_body}" %>
<% end %>
diff --git a/app/views/content_items/detailed_guide.html.erb b/app/views/content_items/detailed_guide.html.erb index 2c6662703..b7fa406fe 100644 --- a/app/views/content_items/detailed_guide.html.erb +++ b/app/views/content_items/detailed_guide.html.erb @@ -16,14 +16,14 @@ <%= render 'shared/publisher_metadata_with_logo' %> <%= render 'shared/history_notice', content_item: @content_item %> -<%= render 'components/notice', @content_item.withdrawal_notice_component %> +<%= render 'govuk_publishing_components/components/notice', @content_item.withdrawal_notice_component %>
<%= render 'components/important-metadata', items: @content_item.important_metadata %> <%= render "components/contents-list-with-body", contents: @content_item.contents do %> - <%= render 'govuk_component/govspeak', @content_item.govspeak_body %> + <%= render 'govuk_publishing_components/components/govspeak', @content_item.govspeak_body %>
<%= render 'components/published-dates', { diff --git a/app/views/content_items/document_collection.html.erb b/app/views/content_items/document_collection.html.erb index e2b43039a..7ad2c6665 100644 --- a/app/views/content_items/document_collection.html.erb +++ b/app/views/content_items/document_collection.html.erb @@ -14,7 +14,7 @@ <%= render 'shared/translations', content_item: @content_item %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %> - <%= render 'components/notice', @content_item.withdrawal_notice_component %> + <%= render 'govuk_publishing_components/components/notice', @content_item.withdrawal_notice_component %> <%= render 'shared/history_notice', content_item: @content_item %>
diff --git a/app/views/content_items/fatality_notice.html.erb b/app/views/content_items/fatality_notice.html.erb index cf148090c..87eea550f 100644 --- a/app/views/content_items/fatality_notice.html.erb +++ b/app/views/content_items/fatality_notice.html.erb @@ -15,7 +15,7 @@
<%= render 'shared/publisher_metadata_with_logo' %> -<%= render 'components/notice', @content_item.withdrawal_notice_component %> +<%= render 'govuk_publishing_components/components/notice', @content_item.withdrawal_notice_component %>
@@ -26,7 +26,7 @@ src: @content_item.image["url"], alt: @content_item.image["alt_text"], caption: @content_item.image["caption"] if @content_item.image %> - <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.body, direction: page_text_direction %>
diff --git a/app/views/content_items/gone.html.erb b/app/views/content_items/gone.html.erb index ab4bd799b..d14ad84fc 100644 --- a/app/views/content_items/gone.html.erb +++ b/app/views/content_items/gone.html.erb @@ -6,7 +6,7 @@ The information on this page has been removed because it was published in error.

- <%= render 'govuk_component/govspeak', content: @content_item.explanation %> + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.explanation %> <% if @content_item.alternative_path.present? %>

diff --git a/app/views/content_items/guide.html+print.erb b/app/views/content_items/guide.html+print.erb index 44dd4ed14..e84a7030b 100644 --- a/app/views/content_items/guide.html+print.erb +++ b/app/views/content_items/guide.html+print.erb @@ -14,7 +14,7 @@

<%= "#{index + 1}. #{part['title']}" %>

- <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: part['body'], direction: page_text_direction, disable_youtube_expansions: true, diff --git a/app/views/content_items/guide.html.erb b/app/views/content_items/guide.html.erb index 519ccda93..e5d3f565b 100644 --- a/app/views/content_items/guide.html.erb +++ b/app/views/content_items/guide.html.erb @@ -23,7 +23,7 @@ <%= @content_item.current_part_title %> <% end %> - <%= render 'govuk_component/govspeak', + <%= render 'govuk_publishing_components/components/govspeak', content: @content_item.current_part_body, direction: page_text_direction, disable_youtube_expansions: true, diff --git a/app/views/content_items/html_publication.html.erb b/app/views/content_items/html_publication.html.erb index 0ea82908b..309f08e03 100644 --- a/app/views/content_items/html_publication.html.erb +++ b/app/views/content_items/html_publication.html.erb @@ -28,7 +28,7 @@

<%= @content_item.last_changed %>

<% end %> -<%= render 'components/notice', @content_item.withdrawal_notice_component %> +<%= render 'govuk_publishing_components/components/notice', @content_item.withdrawal_notice_component %>