extends ./layout.jade

block tabNavigation
  - var patterns = page.parent
  if Object.keys(patterns).length > 1
    div.mdl-layout__tab-bar.mdl-js-ripple-effect
      - var index = 0
      each pattern, file in patterns
        a.mdl-layout__tab(class="#{index === 0 ? 'is-active' : ''}" href="#tab-#{parameterize(pattern.metadata.title)}")
          = pattern.metadata.title
        - index++

block content
  - var index = 0
  each pattern, file in page.parent
    section.mdl-layout__tab-panel(class="#{index === 0 ? 'is-active' : ''}" id="tab-#{parameterize(pattern.metadata.title)}")
      div.page-content
        div.wpl-card-pattern.mdl-card.mdl-shadow--2dp
          div.mdl-card__title.mdl-card--expand
            h2.mdl-card__title-text= pattern.metadata.title
          div.mdl-card__supporting-text
            if pattern.metadata.description
              = pattern.metadata.description
              hr
            div.wpl-layout__source
              if pattern.metadata.use_source === false
                !{pattern.html}
              else
                div(data-iframe)
                  !{pattern.html}
                  link(rel='stylesheet', href=contents.stylesheets['base.css'].url)
                  script(src=contents.javascripts['base.js'].url)
            if pattern.metadata.show_code !== false
              hr
              pre
                code.language-markup= pattern.html
    - index++

extends ./layout.jade

block tabNavigation
  - var patterns = page.parent
  if Object.keys(patterns).length > 1
    div.mdl-layout__tab-bar.mdl-js-ripple-effect
      - var index = 0
      each pattern, file in patterns
        a.mdl-layout__tab(class="#{index === 0 ? 'is-active' : ''}" href="#tab-#{parameterize(pattern.metadata.title)}")
          = pattern.metadata.title
        - index++

block content
  - var index = 0
  each pattern, file in page.parent
    section.mdl-layout__tab-panel(class="#{index === 0 ? 'is-active' : ''}" id="tab-#{parameterize(pattern.metadata.title)}")
      div.page-content
        div.wpl-card-pattern.mdl-card.mdl-shadow--2dp
          div.mdl-card__title.mdl-card--expand
            h2.mdl-card__title-text= pattern.metadata.title
          div.mdl-card__supporting-text
            if pattern.metadata.description
              = pattern.metadata.description
              hr
            div.wpl-layout__source
              if pattern.metadata.use_source === false
                | !{pattern.html}
              else
                div(data-iframe)
                  | !{pattern.html}
                  link(rel='stylesheet', href=contents.stylesheets['base.css'].url)
                  script(src=contents.javascripts['base.js'].url)
            if pattern.metadata.show_code !== false
              hr
              pre
                code.language-markup= pattern.html
    - index++

Fix jade warning "Warning: missing space before text for"
Fix jade warning "Warning: missing space before text for"
