Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Use footer component from govuk-components gem
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Jan 22, 2021
1 parent 91ea5bb commit 54b010d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ gem 'skylight'

# Allows the creation of components which encapsulate and test logic in views
gem 'view_component'
gem 'govuk-components'
gem 'govuk-components', github: 'dfe-digital/govuk-components', branch: 'reimplement-footer'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand Down
14 changes: 10 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
GIT
remote: https://github.com/dfe-digital/govuk-components.git
revision: f2386176a9dde4cdc1635f67d4019defb406b950
branch: reimplement-footer
specs:
govuk-components (1.0.2)
rails (>= 6.0)
view_component (>= 2.22.1, < 2.25.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -165,9 +174,6 @@ GEM
geokit (1.13.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
govuk-components (1.0.2)
rails (>= 6.0)
view_component (>= 2.22.1, < 2.25.0)
hashdiff (1.0.1)
httparty (0.18.1)
mime-types (~> 3.0)
Expand Down Expand Up @@ -423,7 +429,7 @@ DEPENDENCIES
foreman
geocoder
geokit
govuk-components
govuk-components!
httparty
json_api_client
jsonapi-deserializable
Expand Down
81 changes: 40 additions & 41 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -61,50 +61,49 @@
) %>
<% end %>

<footer class="govuk-footer govuk-!-display-none-print" role="contentinfo">
<div class="govuk-width-container">
<div class="govuk-footer__meta">
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
<h2 class="govuk-heading-m">Get support</h2>
<div class="govuk-grid-row govuk-!-margin-bottom-5">
<div class="govuk-grid-column-one-half">
<h2 class="govuk-heading-s govuk-!-margin-bottom-1">Telephone</h2>
<ul class="govuk-footer__meta-custom govuk-list govuk-!-font-size-16">
<li>0800 389 2500</li>
<li>Monday to Friday, 8.30am to 5pm (except public&nbsp;holidays)</li>
<li>Free of charge</li>
</ul>
</div>
<div class="govuk-grid-column-one-half">
<h2 class="govuk-heading-s govuk-!-margin-bottom-1">Online chat</h2>
<ul class="govuk-footer__meta-custom govuk-list govuk-!-font-size-16 govuk-!-margin-bottom-8">
<li><%= link_to "Talk to an adviser online", "https://beta-getintoteaching.education.gov.uk/#talk-to-us", class: "govuk-footer__link" %></li>
<li>Monday to Friday, 8.30am to 5pm (except public&nbsp;holidays)</li>
</ul>
</div>
<%= render GovukComponent::Footer.new do |footer| %>
<%= footer.slot(:meta) do %>
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
<h2 class="govuk-heading-m">Get support</h2>
<div class="govuk-grid-row govuk-!-margin-bottom-5">
<div class="govuk-grid-column-one-half">
<h2 class="govuk-heading-s govuk-!-margin-bottom-1">Telephone</h2>
<ul class="govuk-footer__meta-custom govuk-list govuk-!-font-size-16">
<li>0800 389 2500</li>
<li>Monday to Friday, 8.30am to 5pm (except public&nbsp;holidays)</li>
<li>Free of charge</li>
</ul>
</div>
<div class="govuk-grid-column-one-half">
<h2 class="govuk-heading-s govuk-!-margin-bottom-1">Online chat</h2>
<ul class="govuk-footer__meta-custom govuk-list govuk-!-font-size-16 govuk-!-margin-bottom-8">
<li><%= link_to "Talk to an adviser online", "https://getintoteaching.education.gov.uk/lp/live-chat", class: "govuk-footer__link" %></li>
<li>Monday to Friday, 8.30am to 5pm (except public&nbsp;holidays)</li>
</ul>
</div>
<h2 class="govuk-visually-hidden">Support links</h2>
<ul class="govuk-footer__inline-list govuk-!-margin-bottom-0">
<li class="govuk-footer__inline-list-item">
<%= link_to "Accessibility", accessibility_path, class: "govuk-footer__link" %>
</li>
<li class="govuk-footer__inline-list-item">
<%= link_to "Cookies", cookie_preferences_path, class: "govuk-footer__link" %>
</li>
<li class="govuk-footer__inline-list-item">
<%= link_to "Privacy policy", privacy_path, class: "govuk-footer__link" %>
</li>
<li class="govuk-footer__inline-list-item">
<%= link_to "Terms and conditions", terms_path, class: "govuk-footer__link" %>
</li>
</ul>
</div>
<div class="govuk-footer__meta-item">
<a class="govuk-footer__link govuk-footer__copyright-logo govuk-!-margin-bottom-1" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">© Crown copyright</a>
</div>
<h2 class="govuk-visually-hidden">Support links</h2>
<ul class="govuk-footer__inline-list govuk-!-margin-bottom-0">
<li class="govuk-footer__inline-list-item">
<%= link_to "Accessibility", accessibility_path, class: "govuk-footer__link" %>
</li>
<li class="govuk-footer__inline-list-item">
<%= link_to "Cookies", cookie_preferences_path, class: "govuk-footer__link" %>
</li>
<li class="govuk-footer__inline-list-item">
<%= link_to "Privacy policy", privacy_path, class: "govuk-footer__link" %>
</li>
<li class="govuk-footer__inline-list-item">
<%= link_to "Terms and conditions", terms_path, class: "govuk-footer__link" %>
</li>
</ul>
</div>
<div class="govuk-footer__meta-item">
<a class="govuk-footer__link govuk-footer__copyright-logo govuk-!-margin-bottom-1" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">© Crown copyright</a>
</div>
</div>
</footer>
<% end %>
<% end %>

<%= javascript_pack_tag 'application' %>
<%= content_for(:body_end) %>
</body>
Expand Down

0 comments on commit 54b010d

Please sign in to comment.