<nav class="navbar navbar-default">
    <div class="container">
        {# Brand and toggle get grouped for better mobile display #}
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-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>
            {% include "site/logo.html" %}
        </div>

        {# Collect the nav links, forms, and other content for toggling #}
        <div class="collapse navbar-collapse" id="header-navbar-collapse">
            <ul class="nav navbar-nav navbar-left">
                <li class="hidden">
                    <a href="#page-top"></a>
                </li>

                <li>
                    <a href="{{'home'|route_url}}">Home</a>
                </li>
            </ul>

            <ul class="nav navbar-nav navbar-right">
                {% if request.user %}

                    {% if request.user.is_admin() %}
                        <li>
                            <a id="nav-admin" href="{{'ipython'|route_url}}">
                                <i class="fa fa-wrench"></i>
                                Shell
                            </a>
                        </li>
                    {% endif %}

                    <li>
                        <a id="nav-profile" href="#">
                            <i class="fa fa-user"></i>
                            {{ request.user.friendly_name }}
                        </a>
                    </li>

                {% else %}
                    <li>
                        <a id="nav-sign-in" href="{{'login'|route_url}}">Sign in</a>
                    </li>
                {% endif %}

            </ul>
        </div>
        {# /.navbar-collapse #}
    </div>
    {# /.container-fluid #}
</nav>