Sha256: cd9afd7d223071ec178f740aadcd8538e68d19191f1329cf8113b0942bb66a93
Contents?: true
Size: 960 Bytes
Versions: 5
Compression:
Stored size: 960 Bytes
Contents
<% average_title_length ||= false context ||= false context_text = context.is_a?(Hash) ? context[:text] : context context_href = context.is_a?(Hash) ? context[:href] : false context_data = context.is_a?(Hash) ? context[:data] : false inverse ||= false local_assigns[:margin_bottom] ||= 8 shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) classes = %w(gem-c-title govuk-!-margin-top-8) classes << "gem-c-title--inverse" if inverse classes << (shared_helper.get_margin_bottom) %> <%= content_tag(:div, class: classes) do %> <% if context %> <p class="gem-c-title__context"> <%= context_href ? link_to(context_text, context_href, class: 'gem-c-title__context-link govuk-link', data: context_data) : context_text %> </p> <% end %> <h1 class="gem-c-title__text <% if average_title_length %>gem-c-title__text--<%= average_title_length %><% end %>"> <%= title %> </h1> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems