@{string currentPage = ViewContext.RouteData.Values["Page"].ToString();}

<div id="layout-sidenav" class="layout-sidenav sidenav-vertical sidenav bg-sidenav-theme">

    <div class="app-brand demo">
        <span class="app-brand-logo demo bg-secondary">
            <i class="fas fa-thumbtack text-white"></i>
        </span>
        <a href="/" class="app-brand-text demo sidenav-text font-weight-normal ml-2">ZPC Bulletin board</a>
    </div>

    <div class="sidenav-divider mt-0"></div>

    <ul class="sidenav-inner">
        <li class="sidenav-item@(currentPage.StartsWith("/Pages/")? " active" : "")">
            <a asp-page="/Pages/Index" class="sidenav-link"><i class="sidenav-icon far fa-file"></i><div>Strani</div></a>
        </li>
        <li class="sidenav-item@(currentPage.StartsWith("/Boards/") ? " active" : "")">
            <a asp-page="/Boards/Index" class="sidenav-link"><i class="sidenav-icon fab fa-flipboard"></i><div>Oglasne deske</div></a>
        </li>
        <li class="sidenav-item@(currentPage.StartsWith("/BoardsLinks/") ? " active" : "")">
            <a asp-page="/BoardsLinks/Index" class="sidenav-link"><i class="sidenav-icon fas fa-link"></i><div>Povezave</div></a>
        </li>
        @if (User.IsInRole("Administrator") || User.IsInRole("TransportThingUser"))
        {
            <li class="sidenav-divider mb-1"></li>
            <li class="sidenav-header small font-weight-semibold">ADMINISTRACIJA</li>

            <li class="sidenav-item@(currentPage.StartsWith("/TransportLoadingOrder/") ? " active" : "")">
                <a asp-page="/TransportLoadingOrder/Index" class="sidenav-link"><i class="sidenav-icon far fa-u"></i><div>Uporabniki</div></a>
            </li>
        }
    </ul>
</div>