Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QOLOE-356 start of header split #366

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

duttonw
Copy link
Member

@duttonw duttonw commented Jul 11, 2024

  • Break apart the header into individual parts.
    • Handle the ability to have searchInput html or the searchData in the json passed to the searchInput partial
  • Use the js/scss so storybook compiles directly for speed
  • Have Handlebars init be called at the start for preview.js

header now calls these partials
handlebars.registerPartial("header_preMenu", header_preMenu);
handlebars.registerPartial("header_primary", header_primary);
handlebars.registerPartial("header_sitePreHeader_CTA_menuItem", header_sitePreHeader_CTA_menuItem);
handlebars.registerPartial("header_wrap", header_wrap);

todo:
loop the menu via the header_sitePreHeader_CTA_menuItem

tip: this.searchData == a way to use the root and only pass one element through.

{{#>header_wrap }}
  {{#>header_preMenu sitePreHeader=sitePreHeader siteHeader=siteHeader siteSearchAsset=siteSearchAsset dropdown_enabled=dropdown_enabled dropdown_options=dropdown_options siteSearchAsset=siteSearchAsset }}
  {{!put your own menu here }}
  {{/header_preMenu }}
  {{#>header_primary siteHeader=siteHeader }}
    {{#unless searchInput }}
      {{>searchInput  this.searchData }}
    {{else}}
    {{! search is fully overriden by html }}
      {{{ searchInput }}}
    {{/unless}}
  {{/header_primary }}
{{/header_wrap }}

@duttonw duttonw force-pushed the QOLOE-356_splitHeaderApart branch from 83af4d8 to 5ff2898 Compare July 11, 2024 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant