From feb4fb4725ffea45eb21c2ac9b09bfa26e98ab99 Mon Sep 17 00:00:00 2001 From: owenatgov Date: Tue, 8 Sep 2020 11:09:06 +0100 Subject: [PATCH] Add additional skiplink on guide views --- app/assets/stylesheets/application.scss | 1 + app/views/content_items/guide.html.erb | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index b17daa5c2..991a10aaf 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -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'; diff --git a/app/views/content_items/guide.html.erb b/app/views/content_items/guide.html.erb index 1892570b4..15ac15540 100644 --- a/app/views/content_items/guide.html.erb +++ b/app/views/content_items/guide.html.erb @@ -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" + } %> <% end %> -
+
<% if @content_item.has_parts? %> <% if @content_item.show_guide_navigation? %>