-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3652 from alphagov/revert-3649-fix-containers
Revert "Remove unnecessary padding on search results layout"
- Loading branch information
Showing
5 changed files
with
235 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
<% content_for :before_content do %> | ||
<div class="app-before-content<%= " app-before-content--inverse" if is_inverse? %>"> | ||
<% if content_item.show_phase_banner? %> | ||
<%= render 'govuk_publishing_components/components/phase_banner', { | ||
phase: content_item.phase, | ||
message: sanitize(content_item.phase_message), | ||
inverse: is_inverse? | ||
} %> | ||
<% end %> | ||
<div class="govuk-width-container"> | ||
<% if content_item.show_phase_banner? %> | ||
<%= render 'govuk_publishing_components/components/phase_banner', { | ||
phase: content_item.phase, | ||
message: sanitize(content_item.phase_message), | ||
inverse: is_inverse? | ||
} %> | ||
<% end %> | ||
|
||
<% if @breadcrumbs.breadcrumbs %> | ||
<%= render 'govuk_publishing_components/components/breadcrumbs', { | ||
breadcrumbs: @breadcrumbs.breadcrumbs, | ||
inverse: is_inverse?, | ||
collapse_on_mobile: true | ||
} %> | ||
<% else %> | ||
<%= render 'govuk_publishing_components/components/contextual_breadcrumbs', { | ||
content_item: content_item.as_hash, | ||
inverse: is_inverse? | ||
} %> | ||
<% end %> | ||
<% if @breadcrumbs.breadcrumbs %> | ||
<%= render 'govuk_publishing_components/components/breadcrumbs', { | ||
breadcrumbs: @breadcrumbs.breadcrumbs, | ||
inverse: is_inverse?, | ||
collapse_on_mobile: true | ||
} %> | ||
<% else %> | ||
<%= render 'govuk_publishing_components/components/contextual_breadcrumbs', { | ||
content_item: content_item.as_hash, | ||
inverse: is_inverse? | ||
} %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,80 @@ | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<% if content_item.all_content_finder? %> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
text: sanitize("Search <span class='govuk-visually-hidden'>all content</span>"), | ||
heading_level: 1, | ||
font_size: "xl", | ||
margin_bottom: 4, | ||
inverse: inverse, | ||
} %> | ||
<div id="keywords" class="app-patch--search-input-override" role="search" aria-label="Sitewide" data-ga4-change-category="update-keyword text"> | ||
<%= render "govuk_publishing_components/components/search", { | ||
aria_controls: "js-search-results-info", | ||
label_id: "finder-keyword-search", | ||
name: "keywords", | ||
type: 'search', | ||
value: result_set_presenter.user_supplied_keywords, | ||
on_govuk_blue: inverse, | ||
disable_corrections: true, | ||
<div class="govuk-width-container"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<% if content_item.all_content_finder? %> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
text: sanitize("Search <span class='govuk-visually-hidden'>all content</span>"), | ||
heading_level: 1, | ||
font_size: "xl", | ||
margin_bottom: 4, | ||
inverse: inverse, | ||
} %> | ||
<div id="keywords" class="app-patch--search-input-override" role="search" aria-label="Sitewide" data-ga4-change-category="update-keyword text"> | ||
<%= render "govuk_publishing_components/components/search", { | ||
aria_controls: "js-search-results-info", | ||
label_id: "finder-keyword-search", | ||
name: "keywords", | ||
type: 'search', | ||
value: result_set_presenter.user_supplied_keywords, | ||
on_govuk_blue: inverse, | ||
disable_corrections: true, | ||
} %> | ||
</div> | ||
<div id="js-spelling-suggestions" class="spelling-suggestions"> | ||
<%= render 'spelling_suggestion' %> | ||
</div> | ||
<% elsif topic_finder?(filter_params) %> | ||
<%= link_to topic_finder_parent(filter_params)['title'], topic_finder_parent(filter_params)['base_path'], class: 'govuk-link topic-finder__taxon-link' %> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
text: content_item.title, | ||
inverse: inverse, | ||
heading_level: 1, | ||
font_size: "xl", | ||
margin_bottom: 8, | ||
} %> | ||
<% else %> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
text: content_item.title, | ||
context: title_context, | ||
inverse: inverse, | ||
heading_level: 1, | ||
font_size: "xl", | ||
margin_bottom: 8, | ||
} %> | ||
<% end %> | ||
|
||
<% if page_metadata.any? %> | ||
<% page_metadata.merge!({ inverse: inverse, inverse_compress: true, margin_bottom: 2 }) %> | ||
<%= render 'govuk_publishing_components/components/metadata', page_metadata %> | ||
<% end %> | ||
</div> | ||
|
||
<% if content_item.summary %> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<div class="metadata-summary "> | ||
<%= render 'govuk_publishing_components/components/govspeak', { inverse: inverse } do %> | ||
<%= sanitize(content_item.summary) %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div id="js-spelling-suggestions" class="spelling-suggestions"> | ||
<%= render 'spelling_suggestion' %> | ||
</div> | ||
<% elsif topic_finder?(filter_params) %> | ||
<%= link_to topic_finder_parent(filter_params)['title'], topic_finder_parent(filter_params)['base_path'], class: 'govuk-link topic-finder__taxon-link' %> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
text: content_item.title, | ||
inverse: inverse, | ||
heading_level: 1, | ||
font_size: "xl", | ||
margin_bottom: 8, | ||
} %> | ||
<% else %> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
text: content_item.title, | ||
context: title_context, | ||
inverse: inverse, | ||
heading_level: 1, | ||
font_size: "xl", | ||
margin_bottom: 8, | ||
} %> | ||
<% end %> | ||
|
||
<% if page_metadata.any? %> | ||
<% page_metadata.merge!({ inverse: inverse, inverse_compress: true, margin_bottom: 2 }) %> | ||
<%= render 'govuk_publishing_components/components/metadata', page_metadata %> | ||
<% if content_item.logo_path %> | ||
<div class="finder-logo govuk-grid-column-one-third"> | ||
<%= image_tag content_item.logo_path, class: "finder-logo__image" %> | ||
</div> | ||
<% end %> | ||
</div> | ||
|
||
<% if content_item.summary %> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<div class="metadata-summary "> | ||
<%= render 'govuk_publishing_components/components/govspeak', { inverse: inverse } do %> | ||
<%= sanitize(content_item.summary) %> | ||
<% end %> | ||
<% if content_item.related.any? %> | ||
<div class="related-links govuk-grid-column-one-third"> | ||
<ul class="js-finder-results"> | ||
<% content_item.related.each do |link| %> | ||
<li class="related-links__item"> | ||
<%= link_to link['title'], link['web_url'], class: "related-links__link" %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
<% if content_item.logo_path %> | ||
<div class="finder-logo govuk-grid-column-one-third"> | ||
<%= image_tag content_item.logo_path, class: "finder-logo__image" %> | ||
</div> | ||
<% end %> | ||
|
||
<% if content_item.related.any? %> | ||
<div class="related-links govuk-grid-column-one-third"> | ||
<ul class="js-finder-results govuk-list"> | ||
<% content_item.related.each do |link| %> | ||
<li class="related-links__item"> | ||
<%= link_to link['title'], link['web_url'], class: "related-links__link" %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
</div> |
Oops, something went wrong.