Class: DsfrComponent::HeaderComponent

Inherits:
Base
  • Object
show all
Defined in:
app/components/dsfr_component/header_component.rb

Defined Under Namespace

Classes: DirectLinkComponent, DirectLinkDropdownComponent, OperatorImageComponent, ToolLinkComponent

Constant Summary

Constants inherited from Base

Base::HEADING_LEVELS

Instance Attribute Summary

Attributes inherited from Base

#html_attributes

Instance Method Summary collapse

Constructor Details

#initialize(logo_text:, title: nil, tagline: nil, classes: [], html_attributes: {}) ⇒ HeaderComponent

Returns a new instance of HeaderComponent.

Parameters:

  • logo_text (String)

    Ce texte obligatoire sera affiché en dessous de la Marianne et au dessus de la devise française. C’est généralement un nom de ministère ou d’administration.

  • title (String) (defaults to: nil)

    Le nom du service numérique, titre principal du site.

  • tagline (String) (defaults to: nil)

    La description du service numérique, sous-titre du site (optionnelle).



13
14
15
16
17
18
19
# File 'app/components/dsfr_component/header_component.rb', line 13

def initialize(logo_text:, title: nil, tagline: nil, classes: [], html_attributes: {})
  @logo_text = logo_text
  @title = title
  @tagline = tagline

  super(classes: classes, html_attributes: html_attributes)
end