Orange navbar

Orange specific navbar used for Orange portal.

How it works

Orange navbar is based on the navbar component. It adds some display management and introduces the supra bar component.

Orange navbar is the main navigation of project website. It should always be included in a <header role="banner"> tag.

<header role="banner">
    <nav class="navbar navbar-dark bg-dark navbar-expand-md">
        <div class="container">
            <a class="navbar-brand" href="#"><img src="/docs/4.3/dist/img/orange_logo.svg" alt="Back to homepage" title="Back to homepage"/></a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsing-navbar" aria-controls="collapsing-navbar" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="navbar-collapse justify-content-between collapse" id="collapsing-navbar">
                <ul class="navbar-nav">
                    <li class="nav-item active"><a class="nav-link" href="#" aria-current="page">Discover</a></li>
                    <li class="nav-item"><a class="nav-link" href="#">Shop</a></li>
                    <li class="nav-item"><a href="#" class="nav-link">My Orange</a></li>
                    <li class="nav-item"><a href="#" class="nav-link">Help</a></li>
                </ul>
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a href="#" class="nav-link icon svg-buy">
                            <span class="sr-only">open basket</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="nav-link icon svg-search">
                            <span class="sr-only">open search bar</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</header>

Using icons as links is possible, be sure to add the .icon class to the .nav-link element for proper alignement.

Supra bar

Another navigation can be added on top of orange navbar, it is called supar bar. Simply add the .supra class in you navbar declaration.

This navbar is visible only on desktop view.

<nav class="navbar navbar-dark bg-dark navbar-expand-md supra">
    <div class="container">
        <ul class="navbar-nav">
            <li class="nav-item active"><a href="#" class="nav-link" aria-current="page">Personal</a></li>
            <li class="nav-item"><a href="#" class="nav-link">Business</a></li>
            <li class="nav-item"><a href="#" class="nav-link">Follow us</a></li>
        </ul>
        <ul class="navbar-nav ml-auto">
            <li class="nav-item">
                    <a href="#" class="nav-link icon svg-buy">
                    <span class="sr-only">basket</span>
                </a>
            </li>
            <li class="nav-item">
                <a href="#" class="nav-link icon svg-avatar">
                    <span class="sr-only">my account</span>
                </a>
            </li>
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">EN</a>
                <ul class="dropdown-menu" role="menu">
                    <li><a class="dropdown-item" href="#">FR</a></li>
                    <li><a class="dropdown-item" href="#">SP</a></li>
                </ul>
            </li>
        </ul>
    </div>
</nav>

A supra bar should never be used on its own and always be included in header and with the regular navbar, which gives :

Full example

<header role="banner" id="demo-navbar">
    <nav class="navbar navbar-dark bg-dark navbar-expand-md supra">
        <div class="container">
            <ul class="navbar-nav">
                <li class="nav-item active"><a href="#" class="nav-link" aria-current="page">Personal</a></li>
                <li class="nav-item"><a href="#" class="nav-link">Business</a></li>
                <li class="nav-item"><a href="#" class="nav-link">Follow us</a></li>
            </ul>
            <ul class="navbar-nav ml-auto">
                <li class="nav-item">
                        <a href="#" class="nav-link icon svg-buy">
                        <span class="sr-only">basket</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link icon svg-avatar">
                        <span class="sr-only">my account</span>
                    </a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">EN</a>
                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                        <li><a class="dropdown-item" href="#">FR</a></li>
                        <li><a class="dropdown-item" href="#">SP</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
    <nav class="navbar navbar-dark bg-dark navbar-expand-md">
        <div class="container">
            <a class="navbar-brand" href="#"><img src="/docs/4.3/dist/img/orange_logo.svg" alt="Back to homepage" title="Back to homepage"/></a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsing-navbar2" aria-controls="collapsing-navbar2" aria-expanded="false" aria-label="Toggle navigation">
              <span class="navbar-toggler-icon"></span>
            </button>
            <div class="navbar-collapse justify-content-between collapse" id="collapsing-navbar2">
                <ul class="navbar-nav">
                    <li class="nav-item"><a class="nav-link" href="#">Discover</a></li>
                    <li class="nav-item"><a class="nav-link" href="#">Shop</a></li>
                    <li class="nav-item"><a href="#" class="nav-link">My Orange</a></li>
                    <li class="nav-item"><a href="#" class="nav-link">Help</a></li>
                </ul>
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a href="#" class="nav-link icon svg-buy">
                            <span class="sr-only">open basket</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="nav-link icon svg-search">
                            <span class="sr-only">open search bar</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</header>

Options

Using javascript your can initialize the navbar component with the following options :

Name Type Default Description
sticky boolean false Tells wether or not the navbar should stick to the top of page
hideSupra boolean false Hides the supra bar on page scroll. Show when scroll to top.

Usage

Using javascript, simply declare your navbar component with the needed options.

$('#demo-navbar').navbar({sticky: true, hideSupra: true});

See a full implementation in the Orange News example page