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
- #add_footer_link(name, href, options = {}) ⇒ Object
- #add_navigation_item(label, path, options = {}) ⇒ Object
- #brand ⇒ Object
-
#govuk_footer_elements? ⇒ Boolean
Hide the GOV.UK footer's Crown emblem, Open Government Licence and copyright logo if it is not yet a verified GOV.UK product.
Instance Method Details
#add_footer_link(name, href, options = {}) ⇒ Object
29 30 31 32 |
# File 'app/controllers/concerns/design_system/branded.rb', line 29 def (name, href, = {}) @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 (label, path, = {}) @navigation_items ||= [] @navigation_items << { label:, path:, options: } end |
#brand ⇒ Object
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 |
#govuk_footer_elements? ⇒ Boolean
Hide the GOV.UK footer's Crown emblem, Open Government Licence and copyright logo if it is not yet a verified GOV.UK product
20 21 22 |
# File 'app/controllers/concerns/design_system/branded.rb', line 20 def @govuk_footer_elements != :hidden end |