<nav class="navbar navbar-toggleable-md navbar-inverse bg-inverse">
    <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <a class="navbar-brand" href="{% url 'home' %}">FOSS@Amrita</a>

    <div class="collapse navbar-collapse" id="navbarsExampleDefault">
        <ul class="navbar-nav mr-auto">
            {% if request.user.is_authenticated %}
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'club' %}">Club</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'document' %}">Documents</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'achievements' %}">Achievements</a>
                </li>
{#                <li class="nav-item">#}
{#                    <a class="nav-link" href="{% url 'notices' %}">Notices</a>#}
{#                </li>#}

            {% else %}
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'foss_intro' %}">Join us</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'achievements' %}">Achievements</a>
                </li>
            {% endif %}
            <li class="nav-item">
                <a class="nav-link" href="{% url 'team' %}">Teams</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{% url 'profile_list' %}">Members</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{% url 'project' %}">Projects</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{% url 'category_list' %}">Resources</a>
            </li>
            {% if request.user.is_superuser %}
            <li class="nav-item">
                <a class="nav-link" href="{% url 'join_list' %}">
                    Applications {% if application_count %} <span class="badge badge-info">
                    {{ application_count }}</span>
                    {% endif %}
                    </a>
            </li>
            {% endif %}
        </ul>

        <ul class="navbar-nav pull-right navbar-right">
            {% if request.user.is_authenticated %}
                <li class="nav-item active">
                    <a class="nav-link" href="{% url 'profile' request.user.id %}">{{ request.user.username }}</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'logout' %}">Logout</a>
                </li>
            {% else %}
                {%  ifequal request.path '/accounts/login/' %}
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'signup' %}">Sign Up</a>
                    </li>
                {% else %}
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'login' %}?next={{request.path}}">Login</a>
                    </li>
                {% endifequal %}
            {% endif %}
        </ul>
    </div>
</nav>
