anpleenko
4/19/2016 - 8:35 PM

mobile menu

mobile menu

// мобильное меню видно на всех устройств меньше 992px
#mobile-menu
  .panel
    each key, i in mainMenu
      if !key.submenu
        a(href="#{key.url}" tabindex="-1") #{key.label}

      else
        div
          a(href="#{key.url}" tabindex="-1") #{key.label}
          a(href="#target-menu#{i}" data-toggle="collapse" data-parent="#mobile-menu" tabindex="-1") open

        .collapse(id='target-menu#{i}')

          div(id="menus#{i}")
            .panel
              each val, e in key.submenu
                if !val.submenu
                  a(href="#{val.url}" tabindex="-1") #{val.label}

                else
                  div
                    a(href="#{val.url}" tabindex="-1") #{val.label}
                    a(href="#target-submenu#{i}#{e}" data-toggle="collapse" data-parent="#menus#{i}" tabindex="-1") open

                  .collapse(id="target-submenu#{i}#{e}")
                    each link in val.submenu
                      a(href="#{link.url}" tabindex="-1") #{link.label}