Newsbot.Portal/Newsbot.Portal.Blazor.Server/Shared/NavMenu.razor

40 lines
1.3 KiB
Plaintext
Raw Normal View History

<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
2023-06-15 21:50:03 -07:00
<a class="navbar-brand" href="">Newsbot</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="articles/newest">
<span class="oi oi-list-rich" aria-hidden="true"></span> Newest Articles
</NavLink>
</div>
<div class="nav-item px-3">
2023-06-15 21:50:03 -07:00
<NavLink class="nav-link" href="sources">
<span class="oi oi-list-rich" aria-hidden="true"></span> Sources
</NavLink>
</div>
</nav>
</div>
@code {
private bool collapseNavMenu = true;
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}