Browse Source

feat: update line spacing in search captions

pull/2083/head
natdeanlewissoftwire 2 years ago
parent
commit
ffd4d072c1
  1. 2
      app/components/search_result_caption_component.html.erb
  2. 4
      app/frontend/styles/_search.scss
  3. 2
      app/views/logs/_log_list.html.erb
  4. 2
      app/views/schemes/_scheme_list.html.erb

2
app/components/search_result_caption_component.html.erb

@ -7,7 +7,7 @@
<strong><%= count %></strong> <%= item_label.pluralize(count) %> matching filters<br> <strong><%= count %></strong> <%= item_label.pluralize(count) %> matching filters<br>
<% else %> <% else %>
<span class="govuk-!-margin-right-4"> <span class="govuk-!-margin-right-4">
<strong><%= count %></strong> matching <%= item %> <strong><%= count %></strong> total <%= item %>
</span> </span>
<% end %> <% end %>
</span> </span>

4
app/frontend/styles/_search.scss

@ -22,3 +22,7 @@
margin-bottom: 2px; margin-bottom: 2px;
width: auto; width: auto;
} }
.app-search__caption {
line-height: govuk-spacing(6)
}

2
app/views/logs/_log_list.html.erb

@ -1,5 +1,5 @@
<h2 class="govuk-body"> <h2 class="govuk-body">
<div class="govuk-grid-row"> <div class="govuk-grid-row app-search__caption">
<div class="govuk-grid-column-three-quarters"> <div class="govuk-grid-column-three-quarters">
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "logs", filters_count: applied_filters_count(@filter_type))) %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "logs", filters_count: applied_filters_count(@filter_type))) %>
<% if logs&.any? %> <% if logs&.any? %>

2
app/views/schemes/_scheme_list.html.erb

@ -1,12 +1,14 @@
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>"> <section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>">
<%= govuk_table do |table| %> <%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<span class="app-search__caption">
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "schemes", filters_count: applied_filters_count(@filter_type))) %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "schemes", filters_count: applied_filters_count(@filter_type))) %>
<% if @schemes&.any? %> <% if @schemes&.any? %>
<%= govuk_link_to "Download schemes (CSV)", schemes_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> <%= govuk_link_to "Download schemes (CSV)", schemes_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %>
<%= govuk_link_to "Download locations (CSV)", locations_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> <%= govuk_link_to "Download locations (CSV)", locations_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %>
<%= govuk_link_to "Download schemes and locations (CSV)", combined_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> <%= govuk_link_to "Download schemes and locations (CSV)", combined_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %>
<% end %> <% end %>
</span>
<% end %> <% end %>
<%= table.head do |head| %> <%= table.head do |head| %>
<%= head.row do |row| %> <%= head.row do |row| %>

Loading…
Cancel
Save