Problem/Motivation

As described in #2716773: [Meta] Convert 7.x-6.x Twig components to be Drupal 8-compatible, we need to convert the header component from Zen 7.x-6.x to be compatible with Drupal 8.

Proposed resolution

The parent issue describes the general solution we need to use when converting a component.

Solutions specific to the header component: Manage header layout, to make it usable in styleguide and in site

Remaining tasks

(reviews needed, tests to be written or run, documentation to be written, etc.)

CommentFileSizeAuthor
#2 convert_header-2829570-2.patch5.81 KBfinnsky
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

finnsky created an issue. See original summary.

finnsky’s picture

Status: Active » Needs review
FileSize
5.81 KB

Hi!
Now we have different header used in drupal and styleguide. This patch resolving this.
What is done:

  1. changed header twig template.
  2. it included into page twig template. (using embed)
  3. addd css to style nav menu in header ad .inlne-links
  4. added block--system-branding-block.html.twig to use branding template.

what needs to be done:

  1. add header to maintenance page
  2. do something with menu in header template, this is cool to have menu displayed in styleguide.

We need review and disquss.

andriyun’s picture

  1. +++ b/STARTERKIT/components/components/header/header.scss
    @@ -68,4 +69,16 @@
    +  > nav {
    

    With this code we provide inline styles for all menus in scope of header region

  2. +++ b/STARTERKIT/components/components/header/header.twig
    @@ -1,24 +1,24 @@
    +    {# if we ned to display this nav here? #}
    ...
    +      {% include "../inline-links/inline-links.twig" with links %}
    

    For me this block is not clear.
    We have included inline-links component but on drupal render this component is not used

Except these notices patch is ok for me

finnsky’s picture

@andriyun,

  1. +++ b/STARTERKIT/components/components/header/header.scss
    @@ -68,4 +69,16 @@
    +  > nav {

    yeah, i didn't know how to add styles in styleguide. maybe we may put this in kss-only?

  2. +++ b/STARTERKIT/components/components/header/header.twig
    @@ -1,24 +1,24 @@
    +    {# if we ned to display this nav here? #}
    ...
    +      {% include "../inline-links/inline-links.twig" with links %}
    

    Same reasons.