Skip to content

Commit

Permalink
Update locator pages
Browse files Browse the repository at this point in the history
Example Page: /find-local-council
Update to resolve visual differences for frontend swap

Remove border from swap on:
/foreign-travel-advice
  • Loading branch information
Chris Yoong committed May 25, 2021
1 parent f63c814 commit 2caf45b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 50 deletions.
31 changes: 0 additions & 31 deletions app/assets/stylesheets/views/_homepage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ body.homepage {
#global-header-bar {
display: none;
}

// #wrapper,
// #content {
// margin: 0;
// width: auto; // needed for IE overides
// max-width: 100%;
// }
}
// stylelint-enable selector-no-qualifying-type, selector-max-id

Expand Down Expand Up @@ -58,11 +51,6 @@ body.homepage {
}
}

.home-top__links-title {
@include govuk-font(19);
margin: 0;
}

.home-top__links-list {
margin: 0;
padding: 0;
Expand All @@ -77,25 +65,6 @@ body.homepage {
margin: 5px 0;
}

.home-top__links-link {
color: govuk-colour("white");

&:link,
&:visited {
color: govuk-colour("white");
}

&:active,
&:hover {
color: $govuk-hover-colour;
}

&:focus,
&:link:focus {
@include govuk-focused-text;
}
}

.homepage__ready-container {
margin: govuk-spacing(6) 0 govuk-spacing(7) 0;

Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/views/_travel-advice.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
}

.country-filter-form__form-group {
margin: 0; // Because fieldset has 2px margins by default.
border: 0;
margin: 0;
}

.subscriptions-wrapper {
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/travel_advice_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def index
@presenter = TravelAdviceIndexPresenter.new(@content_item)

respond_to do |format|
format.html {
format.html do
slimmer_template "gem_layout"
render locals: { full_width: true }
end
Expand Down
4 changes: 2 additions & 2 deletions app/views/application/_location_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<% end %>

<form method="post" id="local-locator-form" class="location-form">
<fieldset>
<legend class="visuallyhidden">Postcode lookup</legend>
<fieldset class="govuk-fieldset">
<legend class=" govuk-fieldset__legend govuk-visually-hidden">Postcode lookup</legend>

<%= render partial: 'draft_fields' %>
Expand Down
10 changes: 5 additions & 5 deletions app/views/find_local_council/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<%= render layout: 'base_page' do %>
<p class="govuk-body">Find the website for your local council.</p>
<%= render partial: 'location_form',
locals: {
format: 'service',
publication_format: 'find_local_council',
postcode: @postcode,
} %>
locals: {
format: 'service',
publication_format: 'find_local_council',
postcode: @postcode,
} %>
<% end %>
6 changes: 3 additions & 3 deletions app/views/place/_option.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

<p class="adr govuk-body">
<% if place["name"].present? %>
<span class="fn"><%= place["name"] %></span><span class="visuallyhidden">,</span>
<span class="fn"><%= place["name"] %></span><span class="govuk-visually-hidden">,</span>
<% end %>
<% if place["address"].present? %>
<br /><span class="street-address"><%= place["address"] %></span><span class="visuallyhidden">,</span>
<br /><span class="street-address"><%= place["address"] %></span><span class="govuk-visually-hidden">,</span>
<% end %>
<% if place["town"].present? %>
<br /><span class="locality"><%= place["town"] %></span><span class="visuallyhidden">,</span>
<br /><span class="locality"><%= place["town"] %></span><span class="govuk-visually-hidden">,</span>
<% end %>
<% if place["postcode"].present? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/place/_option_report_child_abuse.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<% if place["url"].present? %>
<p class="url govuk-body">
<a href="<%= place["url"] %>">Go to their website</a>
<a href="<%= place["url"] %>" class="govuk-link">Go to their website</a>
</p>
<% end %>
</div>
Expand Down
12 changes: 6 additions & 6 deletions spec/javascripts/unit/foreign-travel-advice.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ var GOVUKTest = {
countryFilter: {
threeCategories: '<div id="W" class="list">' +
'<h3>' +
'<span class="visuallyhidden">Countries starting with </span>W</h3>' +
'<span class="govuk-visually-hidden">Countries starting with </span>W</h3>' +
'<ul class="countries js-countries-list">' +
'<li data-synonyms=""><a href="/foreign-travel-advice/wallis-and-futuna">Wallis and Futuna</a></li>' +
'<li data-synonyms="Sahel"><a href="/foreign-travel-advice/western-sahara">Western Sahara</a></li>' +
'</ul>' +
'</div>' +
'<div id="Y" class="list">' +
'<h3>' +
'<span class="visuallyhidden">Countries starting with </span>Y</h3>' +
'<span class="govuk-visually-hidden">Countries starting with </span>Y</h3>' +
'<ul class="countries js-countries-list">' +
'<li data-synonyms=""><a href="/foreign-travel-advice/yemen">Yemen</a></li>' +
'</ul>' +
'</div>' +
'<div id="Z" class="list">' +
'<h3>' +
'<span class="visuallyhidden">Countries starting with </span>Z</h3>' +
'<span class="govuk-visually-hidden">Countries starting with </span>Z</h3>' +
'<ul class="countries js-countries-list">' +
'<li data-synonyms=""><a href="/foreign-travel-advice/zambia">Zambia</a></li>' +
'<li data-synonyms=""><a href="/foreign-travel-advice/zimbabwe">Zimbabwe</a></li>' +
Expand All @@ -31,22 +31,22 @@ GOVUKTest.countryFilter.categories = {
allWithCountries: '<section class="countries-wrapper">' + GOVUKTest.countryFilter.threeCategories + '</section>',
twoWithoutCountries: '<section><div id="W" class="list">' +
'<h3>' +
'<span class="visuallyhidden">Countries starting with </span>W</h3>' +
'<span class="govuk-visually-hidden">Countries starting with </span>W</h3>' +
'<ul class="countries js-countries-list">' +
'<li data-synonyms="" style="display:none"><a href="/foreign-travel-advice/wallis-and-futuna">Wallis and Futuna</a></li>' +
'<li data-synonyms="Sahel" style="display:none"><a href="/foreign-travel-advice/western-sahara">Western Sahara</a></li>' +
'</ul>' +
'</div>' +
'<div id="Y" class="list">' +
'<h3>' +
'<span class="visuallyhidden">Countries starting with </span>Y</h3>' +
'<span class="govuk-visually-hidden">Countries starting with </span>Y</h3>' +
'<ul class="countries js-countries-list">' +
'<li data-synonyms="" style="display:none"><a href="/foreign-travel-advice/yemen">Yemen</a></li>' +
'</ul>' +
'</div>' +
'<div id="Z" class="list">' +
'<h3>' +
'<span class="visuallyhidden">Countries starting with </span>Z</h3>' +
'<span class="govuk-visually-hidden">Countries starting with </span>Z</h3>' +
'<ul class="countries js-countries-list">' +
'<li data-synonyms=""><a href="/foreign-travel-advice/zambia">Zambia</a></li>' +
'<li data-synonyms=""><a href="/foreign-travel-advice/zimbabwe">Zimbabwe</a></li>' +
Expand Down

0 comments on commit 2caf45b

Please sign in to comment.