Skip to content

Commit

Permalink
Merge pull request #1024 from alphagov/enable-register-section-to-vot…
Browse files Browse the repository at this point in the history
…e-in-sidebar

Allow for a description in related link sections
  • Loading branch information
carvil authored May 5, 2017
2 parents f4e955c + 53e6e7e commit ef1b065
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/govuk-component/_related-items.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
margin-bottom: 0.5em;
}

.description {
@include core-16;
}

ul {
// reset the default browser styles
padding: 0;
Expand Down
7 changes: 7 additions & 0 deletions app/views/govuk_component/related_items.raw.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
>
<%= section[:title] %>
</h2>

<% if section[:description].present? %>
<p class='description'>
<%= section[:description] %>
</p>
<% end %>

<nav role="navigation" <% if section[:id] %>aria-labelledby="<%= section[:id] %>"<% end %>>
<ul>
<% total_links_in_section = section[:items].length + (section[:url] ? 1 : 0) %>
Expand Down

0 comments on commit ef1b065

Please sign in to comment.