Skip to content

Commit

Permalink
Merge pull request #845 from alphagov/replace-publication-header-with…
Browse files Browse the repository at this point in the history
…-inverse-header

Replace publication header with inverse header
  • Loading branch information
Vanita Barrett authored Mar 26, 2018
2 parents 2ca3399 + 780ce8e commit bb0255d
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 85 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ gem 'gds-api-adapters', '~> 52.2'
gem 'govuk_ab_testing', '~> 2.4'
gem 'govuk_app_config', '~> 1.3'
gem 'govuk_frontend_toolkit', '~> 7.4'
gem 'govuk_navigation_helpers', '~> 9.2'
gem 'govuk_publishing_components', '~> 5.5'
gem 'govuk_navigation_helpers', '~> 9.2.1'
gem 'govuk_publishing_components', '~> 5.7.0'
gem 'plek', '~> 2.1'
gem 'slimmer', '~> 12.0'

Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ DEPENDENCIES
govuk_ab_testing (~> 2.4)
govuk_app_config (~> 1.3)
govuk_frontend_toolkit (~> 7.4)
govuk_navigation_helpers (~> 9.2)
govuk_publishing_components (~> 5.5)
govuk_navigation_helpers (~> 9.2.1)
govuk_publishing_components (~> 5.7.0)
govuk_schemas (~> 3.1)
htmlentities (~> 4.3)
jasmine-rails
Expand Down
11 changes: 0 additions & 11 deletions app/assets/stylesheets/components/_publication-header.scss

This file was deleted.

5 changes: 5 additions & 0 deletions app/assets/stylesheets/views/_html-publication.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
}
}

.publication-header__last-changed {
@include core-19;
margin-top: $gutter-half;
}

.column-quarter-desktop-only {
@include grid-column( 1 / 4, $full-width: desktop );

Expand Down
9 changes: 0 additions & 9 deletions app/views/components/_publication-header.html.erb

This file was deleted.

15 changes: 0 additions & 15 deletions app/views/components/docs/publication-header.yml

This file was deleted.

10 changes: 9 additions & 1 deletion app/views/content_items/html_publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@
</ol>
</div>

<%= render 'components/publication-header', title: @content_item.title, context: I18n.t("content_item.schema_name.#{@content_item.format_sub_type}", count: 1), last_changed: @content_item.last_changed %>
<%= render 'govuk_publishing_components/components/inverse_header', {} do %>
<%= render 'govuk_component/title',
title: @content_item.title,
context: I18n.t("content_item.schema_name.#{@content_item.format_sub_type}", count: 1),
inverse: true,
margin_bottom: 0
%>
<p class="publication-header__last-changed"><%= @content_item.last_changed %></p>
<% end %>

<%= render 'components/notice', @content_item.withdrawal_notice_component %>

Expand Down
43 changes: 0 additions & 43 deletions test/components/publication_header_test.rb

This file was deleted.

4 changes: 2 additions & 2 deletions test/integration/html_publication_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class HtmlPublicationTest < ActionDispatch::IntegrationTest
test "html publications" do
setup_and_visit_content_item('published')

within ".app-c-publication-header" do
within ".gem-c-inverse-header" do
assert page.has_text?(@content_item["details"]["format_sub_type"])
assert page.has_text?(@content_item["title"])

Expand Down Expand Up @@ -67,7 +67,7 @@ class HtmlPublicationTest < ActionDispatch::IntegrationTest
test "no contents are shown when headings are an empty list" do
setup_and_visit_content_item("prime_ministers_office")

within ".app-c-publication-header" do
within ".gem-c-inverse-header" do
refute page.has_text?("Contents")
end
end
Expand Down

0 comments on commit bb0255d

Please sign in to comment.