Skip to content

Commit

Permalink
Merge pull request #1851 from alphagov/additional-skip-link-on-guide-…
Browse files Browse the repository at this point in the history
…pages

Add additional skip link on guide views
  • Loading branch information
injms authored Sep 10, 2020
2 parents e978d50 + feb4fb4 commit e727bc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ $govuk-use-legacy-palette: false;
@import 'govuk_publishing_components/components/title';
@import 'govuk_publishing_components/components/translation-nav';
@import 'govuk_publishing_components/components/warning-text';
@import 'govuk_publishing_components/components/skip-link';

// government-frontend mixins
@import 'mixins/margins';
Expand Down
6 changes: 5 additions & 1 deletion app/views/content_items/guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
<%= render 'govuk_publishing_components/components/title', { title: @content_item.content_title } %>

<% if @content_item.show_guide_navigation? %>
<%= render "govuk_publishing_components/components/skip_link", {
text: "Skip to contents of guide",
href: "#guide-contents"
} %>
<aside class="part-navigation-container" role="complementary">
<%= render "govuk_publishing_components/components/contents_list", aria_label: 'Pages in this guide', contents: @content_item.part_link_elements, underline_links: true %>
</aside>
<% end %>
</div>

<div class="govuk-grid-column-two-thirds">
<div class="govuk-grid-column-two-thirds" id="guide-contents">
<% if @content_item.has_parts? %>
<% if @content_item.show_guide_navigation? %>
<h1 class="part-title">
Expand Down

0 comments on commit e727bc6

Please sign in to comment.