Started switching to bootstrap library
This commit is contained in:
@@ -1,32 +1,38 @@
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using HopFrame.Web.Pages.Administration.Components
|
||||
@using BlazorStrap
|
||||
@using BlazorStrap.V5
|
||||
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/administration">HopFrame</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="checkbox" title="Navigation menu" class="navbar-toggler"/>
|
||||
<BSNavbar Color="BSColor.Light">
|
||||
<BSContainer Container="Container.Fluid">
|
||||
<BSNavbarBrand>
|
||||
@*<img src="logo.svg" alt="logo" width="30" class="d-inline-block align-text-top"/>*@
|
||||
HopFrame
|
||||
</BSNavbarBrand>
|
||||
<BSCollapse IsInNavbar="true">
|
||||
<Toggler>
|
||||
<BSNavbarToggle/>
|
||||
</Toggler>
|
||||
<Content>
|
||||
<BSNav MarginEnd="Margins.Auto" MarginBottom="Margins.Small" Class="mb-lg-0">
|
||||
@foreach (var nav in Subpages) {
|
||||
<BSNavItem IsActive="IsNavItemActive(nav.Key)" Url="@nav.Key">@nav.Value</BSNavItem>
|
||||
}
|
||||
</BSNav>
|
||||
</Content>
|
||||
</BSCollapse>
|
||||
</BSContainer>
|
||||
</BSNavbar>
|
||||
|
||||
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
|
||||
<nav class="flex-column" style="display: flex; height: 100%">
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="administration/users">
|
||||
<HopIconDisplay Type="HopIconDisplay.HopIcon.User" NavIcon="true"/> Users
|
||||
</NavLink>
|
||||
</div>
|
||||
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="administration/groups">
|
||||
<HopIconDisplay Type="HopIconDisplay.HopIcon.Group" NavIcon="true"/> Groups
|
||||
</NavLink>
|
||||
</div>
|
||||
@inject NavigationManager Navigator
|
||||
|
||||
<div class="nav-item px-3" style="margin-top: auto">
|
||||
<NavLink class="nav-link" href="login">
|
||||
<HopIconDisplay Type="HopIconDisplay.HopIcon.Logout" NavIcon="true"/> Logout
|
||||
</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@code {
|
||||
public static IDictionary<string, string> Subpages = new Dictionary<string, string> {
|
||||
{ "administration/users", "Users" },
|
||||
{ "administration/groups", "Groups" }
|
||||
};
|
||||
|
||||
public bool IsNavItemActive(string element) {
|
||||
return Navigator.Uri.Contains(element);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user