CodeLiturgy.Dashboard/BlueWest.Views/Views/Shared/_HeaderMenu.cshtml

42 lines
1.8 KiB
Plaintext

@using BlueWest.Views.Utils
@using Duende.IdentityServer.Extensions
@using BlueWest.Data.Auth
@{
Layout = null;
var userAuthenticated = User.IsAuthenticated();
var menu = LayoutCache.GetDefaultHeaderMenu(ViewData, userAuthenticated);
var user = ViewData.GetUserViewData();
var rootUrl = SessionConstants.CookieDomain;
}
<div class="q-tabs items-center row no-wrap items-center q-tabs--not-scrollable q-tabs--horizontal q-tabs__arrows--inside">
<div class="q-tabs__content row no-wrap items-center self-stretch hide-scrollbar relative-position q-tabs__content--align-center">
@if (menu is {Count: > 0 })
{
@foreach (var record in menu)
{
<a class="q-tab relative-position self-stretch flex flex-center text-center q-tab--inactive q-focusable q-hoverable cursor-pointer " href="@record.Location">
<div class="q-tab__content self-stretch flex-center relative-position q-anchor--skip non-selectable column">
<div class="q-tab__label">@record.Name</div>
</div>
<div class="q-tab__indicator absolute-bottom"></div>
</a>
}
}
@if (userAuthenticated && user != null)
{
<div class="q-chip row inline no-wrap items-center q-chip--dark q-dark">
<div class="q-chip__content col row no-wrap items-center q-anchor--skip">
<div class="q-avatar">
<div class="q-avatar__content row flex-center overflow-hidden">
<img src="@rootUrl/static/profile/boy-avatar.png">
</div>
</div> @user.Email
</div>
</div>
}
</div>
</div>