Skip to content

Commit

Permalink
Merge pull request #4538 from alphagov/hide-side-nav-on-mobile
Browse files Browse the repository at this point in the history
Hide side navigation on mobile
  • Loading branch information
matthillco authored Dec 17, 2024
2 parents c1bf438 + b9dd16d commit 05ecd2f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "govuk_publishing_components/individual_component_support";

.side-nav {
@include govuk-media-query($until: desktop) {
display: none;
}
}
7 changes: 6 additions & 1 deletion app/views/landing_page/blocks/_side_navigation.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<%
add_view_stylesheet("landing_page/side-navigation")
%>
<div class="side-nav">
<%= render "govuk_publishing_components/components/contents_list", {
underline_links: block.data["underline_links"],
alternative_line_style: block.data["alternative_line_style"],
title: block.data["title"],
contents: contents_list(request.path, block.links)
} %>
} %>
</div>
1 change: 1 addition & 0 deletions config/initializers/dartsass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"views/_landing_page/featured.scss" => "views/_landing_page/featured.css",
"views/_landing_page/main-navigation.scss" => "views/_landing_page/main-navigation.css",
"views/_landing_page/quote.scss" => "views/_landing_page/quote.css",
"views/_landing_page/side-navigation.scss" => "views/_landing_page/side-navigation.css",
"views/_landing_page/themes/prime-ministers-office-10-downing-street.scss" => "views/_landing_page/themes/prime-ministers-office-10-downing-street.css",
}.freeze

Expand Down

0 comments on commit 05ecd2f

Please sign in to comment.