SiteHeader

SiteHeader

Source:
Parameters:
NameTypeDescription
elementHTMLElement

DOM element for component instantiation and scope

optionsObject
Properties
NameTypeDescription
languageLinkSelectorString
languageListOverlaySelectorString
languageListEuSelectorString
languageListNonEuSelectorString
closeOverlaySelectorString
searchToggleSelectorString
searchFormSelectorString
loginToggleSelectorString
loginBoxSelectorString
tabletBreakpointinteger
attachClickListenerBoolean

Whether or not to bind click events

attachKeyListenerBoolean

Whether or not to bind keyboard events

attachResizeListenerBoolean

Whether or not to bind resize events

Classes

SiteHeader

Methods

closeOverlay()

Description:
  • Hides the modal language list overlay.

Source:

destroy()

Description:
  • Destroy component.

Source:

handleClickGlobal(e)

Description:
  • Handles global click events, triggered outside of the site header.

Source:
Parameters:
NameTypeDescription
eEvent

handleKeyboardGlobal(e)

Description:
  • Handles global keyboard events, triggered outside of the site header.

Source:
Parameters:
NameTypeDescription
eEvent

handleKeyboardLanguage(e)

Description:
  • Handles keyboard events specific to the language list.

Source:
Parameters:
NameTypeDescription
eEvent

handleResize()

Description:
  • Trigger events on resize Uses a debounce, for performance

Source:

init()

Description:
  • Initialise component.

Source:

openOverlay()

Description:
  • Shows the modal language list overlay.

Source:

setLanguageListHeight()

Description:
  • Set a max height for the language list content

Source:

toggleLogin(e)

Description:
  • Toggles the login form.

Source:
Parameters:
NameTypeDescription
eEvent

toggleOverlay(e)

Description:
  • Toggles the modal language list overlay.

Source:
Parameters:
NameTypeDescription
eEvent

toggleSearch(e)

Description:
  • Toggles the search form.

Source:
Parameters:
NameTypeDescription
eEvent

updateOverlay()

Description:
  • Update display of the modal language list overlay.

Source:

(static) autoInit(root) → {SiteHeader}

Source:
Parameters:
NameTypeDescription
rootHTMLElement

DOM element for component instantiation and scope

Returns:

An instance of SiteHeader.

Type
SiteHeader