<header>
    <!-- Fixed navbar -->
    <nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
        <a class="navbar-brand" href="#">FediPlan</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarCollapse">
            <ul class="navbar-nav mr-auto">
                {% if not is_granted('ROLE_USER') %}
                <li class="nav-item {% if app.request.attributes.get('_route') == 'index' %} active {% endif %}">
                    <a class="nav-link" href="{{ path('index') }}">Login <span class="sr-only">(current)</span></a>
                </li>
                {% endif %}
                {% if is_granted('ROLE_USER') %}
                <li class="nav-item {% if "articles" in app.request.attributes.get('schedule') %} active {% endif %}">
                    <a class="nav-link" href="{{ path('schedule') }}">Shedule</a>
                </li>

                <li class="nav-item {% if app.request.attributes.get('_route') == 'scheduled' %} active {% endif %}">
                    <a class="nav-link" href="{{ path('scheduled') }}">scheduled</a>
                </li>

                <li class="nav-item">
                    <a class="nav-link" href="{{ path('logout') }}" tabindex="-1" >Logout</a>
                </li>

                <li class="nav-item">
                    <a class="nav-link" href="https://fedilab.app/page/donations/" tabindex="-1" >Support my work</a>
                </li>
                {% endif %}
            </ul>
        </div>
    </nav>
</header>