
<body class="sb-nav-fixed">
    <nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
        {% if request.user.is_superuser %}
        <a class="navbar-brand" href="/">
            <i class="fas fa-home"></i> Home
        </a>

        {% else %}

        <a class="navbar-brand" href="/">
            <i class="fas fa-home"></i> Home
        </a>


        {% endif %}
             <button type="button" id="sidebarToggle" class="btn btn-warning text-black-50">
                <i class="fas fa-align-left"></i>
              </button>

            <div class="col">
                
                <a class="float-right" style="color:white;"> Hello, {{request.user.username}} </a>
               
            </div>
      
<div class="col">
    <div  data-toggle="modal" data-target="#logOutModal" style="margin-left:70%;">
             
        <a class="btn btn-sm btn-warning float-right" style="cursor: pointer;color:black;"><i class="fa fa-sign-out-alt"></i> LOGOUT</a>
    </div>
</div>

     
        
    </nav>
    <!--logout model js popup for confirm or stay-->
    <div id="logOutModal" class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">Want to leave ?</h4>
                    <button class="close" data-dismiss="modal">&times;</button>
                </div>
                <div class="modal-body">
                    Press logout to leave !
                </div>
                <div class="modal-footer">
                    <button class="btn btn-success" data-dismiss="modal">
                        <!--model-dismiss la same page ma lauxa-->
                        Stay Here
                    </button>
                    <a class="btn btn-danger" href="{% url 'register_app:logout'%}">
                        Logout</a>
                </div>
            </div>
        </div>
    </div>

    <div id="layoutSidenav">
        <div id="layoutSidenav_nav">
            <nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
                <div class="sb-sidenav-menu">
                    <div class="nav">

                  {% if request.user.is_superuser %}
                        <a class="nav-link" href="/dashboard">
                            <div class="sb-nav-link-icon">
                                <i class="fas fa-home"></i>
                            </div>
                            Dashboard
                        </a>
                {% endif %}

                        <div class="sb-sidenav-menu-heading">Interface</div>
                        <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseLayouts"
                            aria-expanded="false" aria-controls="collapseLayouts">
                            <div class="sb-nav-link-icon">
                                <i class="fas fa-columns"></i>
                            </div>
                            Pages
                            <div class="sb-sidenav-collapse-arrow">
                                <i class="fas fa-angle-down"></i></div>
                        </a>

                        <div class="(collapse)" id="collapseLayouts" aria-labelledby="headingOne"
                            data-parent="#sidenavAccordion">
                            <nav class="sb-sidenav-menu-nested nav">
                                <a class="nav-link" href="{% url 'product_app:list'%}"><i class="fas fa-bars"></i><span class="ml-1">Products</span></a>
                                <a class="nav-link" href="{% url 'order_app:list'%}"><i class="fas fa-bars"></i><span class="ml-1">Orders</span></a>
                                <a class="nav-link" href="{% url 'customer_app:list'%}"><i class="fas fa-bars"></i><span class="ml-1">Customers</span></a>
                            </nav>
                        </div>

                        <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages"
                            aria-expanded="false" aria-controls="collapsePages">
                            <div class="sb-nav-link-icon">
                                <i class="fas fa-book-open"></i>
                            </div>
                            Authentication
                            <div class="sb-sidenav-collapse-arrow">
                                <i class="fas fa-angle-down"></i></div>
                        </a>
                        <div class="(collapse)" id="collapsePages" aria-labelledby="headingTwo"
                            data-parent="#sidenavAccordion">
                            
                            <nav class="sb-sidenav-menu-nested nav">
                                {% if user.is_authenticated %}

                                <a class="nav-link" href="{% url 'register_app:logout'%}"><i class="fas fa-sign-out-alt"></i> Logout</a>

                                {% else %}
                                <a class="nav-link" href="{% url 'register_app:login'%}">Login</a>
                                <a class="nav-link" href="{% url 'register_app:register'%}">Register</a>
                                {% endif %}
                            </nav>




                        </div>
                       
                    </div>
                </div>
              
            </nav>
        </div>




    </div>
    </div>


</body>