Skip to content

Commit

Permalink
makes sidebar sticky on popular links page
Browse files Browse the repository at this point in the history
  • Loading branch information
Helen.Pickavance authored and Helen.Pickavance committed Jul 3, 2024
1 parent 40877c7 commit fac5c4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/assets/stylesheets/sidebar_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
}
border-top: 2px solid $govuk-brand-colour;
}

.sidebar-sticky {
position: -webkit-sticky;
position: sticky;
top: 0;
margin-top: -20px;
}

2 changes: 1 addition & 1 deletion app/views/homepage/popular_links/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<%= render "homepage/popular_links/link", item:, index: %>
<% end %>
</div>
<div class = "govuk-grid-column-one-third" >
<div class = "govuk-grid-column-one-third sidebar-sticky" >
<%= render "homepage/popular_links/sidebar" %>
</div>

0 comments on commit fac5c4c

Please sign in to comment.