Sha256: 44e581639df234b96c1232c4cc348d15382cb8fad468f3448eae8f6abec4274c
Contents?: true
Size: 1.25 KB
Versions: 153
Compression:
Stored size: 1.25 KB
Contents
<% logo_helper = GovukPublishingComponents::Presenters::OrganisationLogoHelper.new(local_assigns) brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(organisation[:brand]) organisation ||= {} heading_level ||= false inline ||= false # Check if `heading_level` is an appropriate number: use_heading = [*1..6].include?(heading_level) # Set the wrapping element to be a heading or a `div`: wrapping_element = (use_heading ? "h#{heading_level}" : "div").to_sym wrapper_classes = %w[gem-c-organisation-logo] wrapper_classes << brand_helper.brand_class container_classes = [ logo_helper.logo_container_class, brand_helper.border_color_class ] container_classes << "gem-c-organisation-logo__container--inline" if inline %> <%= content_tag(wrapping_element, { class: wrapper_classes, data: { module: ("gem-track-click" if organisation[:data_attributes]) } }) do %> <% if organisation[:url] %> <%= link_to organisation[:url], class: container_classes.join(" "), data: organisation[:data_attributes] do %> <%= logo_helper.logo_content %> <% end %> <% else %> <div class="<%= container_classes.join(" ") %>"> <%= logo_helper.logo_content %> </div> <% end %> <% end %>
Version data entries
153 entries across 153 versions & 1 rubygems