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

handle "global" side-nav and catalog's side-nav #117

Open
Thanood opened this issue Feb 23, 2016 · 2 comments
Open

handle "global" side-nav and catalog's side-nav #117

Thanood opened this issue Feb 23, 2016 · 2 comments

Comments

@Thanood
Copy link
Collaborator

Thanood commented Feb 23, 2016

On smaller screens, the top navigation items (About/Installation/Project Status/Help) are hidden and displayed in a side-nav instead.

The component catalog also brings its own side-nav with navigation to component samples.

These two side-navs don't work well together.

  1. component side-nav introduces a padding on the left edge which doesn't disappear oin small screens
  2. the global side-nav's hamburger icon button (how is that thing called really?) only shows that global side-nav
  3. the component side-nav is only accessible from the "samples" folder

Either merge these two side-navs into one global fixed side-nav or display one of them on the right edge instead of the left edge.

Right now, I'd prefer merging.

@adriatic
Copy link
Member

All of our catalog apps are direct descendants of Aurelia Navigation Skeleton, which uses some of the Bootstrap features (navbar and layout on some pages).

<template bindable="router">
  <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#skeleton-navigation-navbar-collapse">
        <span class="sr-only">Toggle Navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">
        <i class="fa fa-home"></i>
        <span>${router.title}</span>
      </a>
    </div>

    <div class="collapse navbar-collapse" id="skeleton-navigation-navbar-collapse">
      <ul class="nav navbar-nav">
        <li repeat.for="row of router.navigation" class="${row.isActive ? 'active' : ''}">
          <a data-toggle="collapse" data-target="#skeleton-navigation-navbar-collapse.in" href.bind="row.href">${row.title}</a>
        </li>
      </ul>

      <ul class="nav navbar-nav navbar-right">
        <li class="loader" if.bind="router.isNavigating">
          <i class="fa fa-spinner fa-spin fa-2x"></i>
        </li>
      </ul>
    </div>
  </nav>
</template>

The Project status page uses the bootstrap row/col layout which also behaves as you described above.

@Thanood
Copy link
Collaborator Author

Thanood commented Feb 23, 2016

So, what would you do if you had two navbar-collapse? That is, if I got Bootstrap right (which need not be the case). Combine ("merge") them or put them in distinct places?

The point is really: how to best combine two different collapsing/collapsed navigation panels?

Btw: there is no Bootstrap in this bridge anymore. 😄

(or is there something I didn't get?)

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

No branches or pull requests

2 participants