@{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-draw-circle text-white"></i>
        </span>
        <a href="/" class="app-brand-text demo sidenav-text font-weight-normal ml-2">Bulletin board</a>
        <a href="javascript:void(0)" class="layout-sidenav-toggle sidenav-link text-large ml-auto">
            <i class="ion ion-md-menu align-middle"></i>
        </a>
    </div>

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

    <ul class="sidenav-inner">
        <li class="sidenav-item@(currentPage.StartsWith("/Editor")? " active" : "")">
            <a asp-page="/Index" class="sidenav-link"><i class="sidenav-icon fas fa-home"></i><div>Urejevalnik</div></a>
        </li>
        <li class="sidenav-item@(currentPage.StartsWith("/Boards") ? " active" : "")">
            <a asp-page="/Boards/Index" class="sidenav-link"><i class="sidenav-icon fas fa-home"></i><div>Oglasne deske</div></a>
        </li>
    </ul>
</div>