Module: DesignSystem::Branded

Extended by:
ActiveSupport::Concern
Defined in:
app/controllers/concerns/design_system/branded.rb

Overview

This concern manages choosing the relevant layout for our given design system

Instance Method Summary collapse

Instance Method Details



29
30
31
32
# File 'app/controllers/concerns/design_system/branded.rb', line 29

def add_footer_link(name, href, options = {})
  @footer_links ||= []
  @footer_links << { name:, href:, options: }
end

#add_navigation_item(label, path, options = {}) ⇒ Object



24
25
26
27
# File 'app/controllers/concerns/design_system/branded.rb', line 24

def add_navigation_item(label, path, options = {})
  @navigation_items ||= []
  @navigation_items << { label:, path:, options: }
end

#brandObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'app/controllers/concerns/design_system/branded.rb', line 15

def brand
  raise NotImplementedError, 'You need to implement #brand in your ApplicationController'
end

Hide the GOV.UK footer's Crown emblem, Open Government Licence and copyright logo if it is not yet a verified GOV.UK product

Returns:

  • (Boolean)


20
21
22
# File 'app/controllers/concerns/design_system/branded.rb', line 20

def govuk_footer_elements?
  @govuk_footer_elements != :hidden
end