Module: CCS::FrontendHelpers::CCSFrontend::Header

Included in:
CCS::FrontendHelpers::CCSFrontend
Defined in:
lib/ccs/frontend_helpers/ccs_frontend/header.rb

Overview

CCS Header

This helper is used for generating the header component from the CCS - Components - Header

Instance Method Summary collapse

Instance Method Details

#ccs_header(**options) ⇒ ActiveSupport::SafeBuffer

Generates the HTML for the CCS Header component

Parameters:

  • service_authentication_items (Array<Hash>)

    An array of links for the service authentication section of the header. See ServiceAuthentication#initialize for details of the items in the array.

  • navigation (Hash)

    options for the navigation section of the header. See Navigation#initialize for details of the options.

  • menu_button (Hash)

    options for the menu button in the header. See Navigation#initialize for details of the options.

  • service (Hash)

    options for the service name

  • options (Hash)

    options that will be used in customising the HTML

Options Hash (**options):

  • :classes (String)

    additional CSS classes for the header HTML

  • :container_classes (String)

    classes for the container

  • :homepage_url (String)

    URL of the homepage. Defaults to /https://www.crowncommercial.gov.uk

  • :attributes (Hash)

    additional attributes that will added as part of the header HTML

Returns:

  • (ActiveSupport::SafeBuffer)


22
23
24
# File 'lib/ccs/frontend_helpers/ccs_frontend/header.rb', line 22

def ccs_header(**options)
  Components::CCS::Header.new(context: self, **options).render
end