Sha256: 25ba570bec3c0d1b57b17b63b61c419f8ea4de853d2bd9fdaf0dec44bdbcad81
Contents?: true
Size: 1.83 KB
Versions: 6
Compression:
Stored size: 1.83 KB
Contents
<% add_gem_component_stylesheet("layout-header") environment ||= nil full_width ||= false navigation_aria_label ||= t("components.layout_header.top_level") navigation_items ||= [] product_name ||= nil remove_bottom_border ||= false search ||= false width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container" logo_link ||= "/" component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns) component_helper.add_class("gem-c-layout-header govuk-header") component_helper.add_class("gem-c-layout-header--#{environment}") if environment component_helper.add_class("gem-c-layout-header--no-bottom-border") if remove_bottom_border component_helper.add_data_attribute({ module: "govuk-header" }) %> <%= tag.header(**component_helper.all_attributes) do %> <div class="govuk-header__container <%= width_class %>"> <div class="govuk-grid-row"> <div class="gem-c-layout-header__logo govuk-grid-column-one-half"> <%= render "govuk_publishing_components/components/layout_header/header_logo", { environment: environment, logo_link: logo_link, product_name: product_name, } %> </div> <% if navigation_items.any? %> <div class="govuk-header__content gem-c-header__content govuk-grid-column-full govuk-!-display-none-print"> <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items, navigation_aria_label: navigation_aria_label %> </div> <% end %> <% if search %> <div class="govuk-grid-column-one-half gem-c-layout-header__search govuk-!-display-none-print"> <%= render "govuk_publishing_components/components/layout_header/search" %> </div> <% end %> </div> </div> <% end %>
Version data entries
6 entries across 6 versions & 1 rubygems