<nav class="navbar navbar-expand-sm navbar-light bg-light mb-5">
    <a class="navbar-brand" href="{% url 'home' %}"><i class="fas fa-person-booth"></i></a>
    <button class="navbar-toggler d-lg-none" type="button" data-toggle="collapse" data-target="#collapsibleNavId"
        aria-controls="collapsibleNavId" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="collapsibleNavId">
        <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
            <li class="nav-item active">
                <a class="nav-link" href="{% url 'home' %}">Home <span class="sr-only">(current)</span></a>
            </li>
            {% if request.user.is_authenticated %}
            <li class="nav-item">
                <a class="nav-link" href="{% url 'polls:list' %}">Polls</a>
            </li>
            {% endif %}
        </ul>
        <div class="navbar-nav ml-auto">
            {% if request.user.is_authenticated %}
            <a class="nav-link" href="{% url 'polls:list_by_user' %}">My Polls</a>
            <a class="nav-link" href="{% url 'accounts:logout' %}">Logout</a>
            {% else %}
            <a class="nav-link" href="{% url 'accounts:login' %}">Login</a>
            <a class="nav-link" href="{% url 'accounts:register' %}">Register</a>
            {% endif %}
        </div>
    </div>
</nav>