[Nav] Add ثبت آگهی CTA, streamline menu, active-link highlight, role dashboards
Header gets a prominent accent +ثبت آگهی CTA → /Employer/Index (auth redirect handles login → register/post). Main nav trimmed to the 5 core public links (خانه/شیفتها/استخدام/مراکز/تقویم); دریافت اپ + راهنما live in the footer and علاقهمندیها in the profile menu, so the bar is far less crowded. Added active-page highlight (accent underline on desktop, soft background on mobile). Login now sends admins to /Admin/Overview (dashboard) instead of the ingestion queue; employers→/Employer/Index, job-seekers→/Me already in place. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -106,7 +106,7 @@ public class LoginModel : PageModel
|
||||
// Route to the right panel for the account type.
|
||||
return user.Role switch
|
||||
{
|
||||
UserRole.Admin => RedirectToPage("/Admin/Index"),
|
||||
UserRole.Admin => RedirectToPage("/Admin/Overview"),
|
||||
UserRole.FacilityAdmin => RedirectToPage("/Employer/Index"),
|
||||
_ => RedirectToPage("/Me/Index"),
|
||||
};
|
||||
|
||||
@@ -93,16 +93,14 @@
|
||||
|
||||
<div class="nav-collapse">
|
||||
<nav class="main-nav">
|
||||
<a asp-page="/Index">خانه</a>
|
||||
<a asp-page="/Shifts/Index" data-tour="shifts">شیفتها</a>
|
||||
<a asp-page="/Jobs/Index" data-tour="jobs">استخدام</a>
|
||||
<a asp-page="/Calendar/Index">تقویم هفتگی</a>
|
||||
<a asp-page="/Download">دریافت اپ</a>
|
||||
<a asp-page="/Facilities/Index">مراکز درمانی</a>
|
||||
<a asp-page="/Preferences/Index" data-tour="prefs">علاقهمندیها</a>
|
||||
<a asp-page="/Help" data-tour="help">راهنما</a>
|
||||
<a asp-page="/Index" class="@(path == "/" ? "active" : null)">خانه</a>
|
||||
<a asp-page="/Shifts/Index" data-tour="shifts" class="@(path.StartsWith("/Shifts") ? "active" : null)">شیفتها</a>
|
||||
<a asp-page="/Jobs/Index" data-tour="jobs" class="@(path.StartsWith("/Jobs") ? "active" : null)">استخدام</a>
|
||||
<a asp-page="/Facilities/Index" class="@(path.StartsWith("/Facilities") ? "active" : null)">مراکز درمانی</a>
|
||||
<a asp-page="/Calendar/Index" class="@(path.StartsWith("/Calendar") ? "active" : null)">تقویم هفتگی</a>
|
||||
</nav>
|
||||
<div class="header-actions">
|
||||
<a class="btn btn-accent btn-sm cta-post" asp-page="/Employer/Index" data-tour="post">+ ثبت آگهی</a>
|
||||
@if (User.Identity?.IsAuthenticated == true)
|
||||
{
|
||||
<a class="nav-action bell-inline js-bell" asp-page="/Me/Notifications" title="اعلانها" data-tour="bell"><span class="bell-ico">🔔</span><span class="bell-label">اعلانها</span>@if (unreadCount > 0) {<span class="bell-badge">@JalaliDate.ToPersianDigits(unreadCount > 99 ? "99+" : unreadCount.ToString())</span>}</a>
|
||||
|
||||
@@ -64,8 +64,14 @@ a { color: inherit; text-decoration: none; }
|
||||
and the whole thing can collapse into a dropdown on mobile. */
|
||||
.nav-collapse { display: flex; align-items: center; gap: 18px; flex: 1; }
|
||||
.main-nav { display: flex; gap: 18px; margin-inline-start: 6px; flex: 1; }
|
||||
.main-nav a { color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; transition: color .15s; }
|
||||
.main-nav a { color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; transition: color .15s; position: relative; padding: 4px 0; }
|
||||
.main-nav a:hover { color: var(--primary); }
|
||||
.main-nav a.active { color: var(--primary-dark); }
|
||||
.main-nav a.active::after {
|
||||
content: ""; position: absolute; inset-inline: 0; bottom: -6px; height: 2px;
|
||||
background: var(--accent); border-radius: 2px;
|
||||
}
|
||||
.cta-post { white-space: nowrap; box-shadow: 0 2px 8px rgba(240,132,62,.35); }
|
||||
.header-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
|
||||
.nav-action { font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap; transition: color .15s; }
|
||||
.nav-action:hover { color: var(--primary); }
|
||||
@@ -439,6 +445,8 @@ label { font-size: 13px; }
|
||||
|
||||
.main-nav { flex-direction: column; gap: 0; margin: 0; flex: none; padding: 6px 0; }
|
||||
.main-nav a { padding: 13px 20px; font-size: 15px; border-bottom: 1px solid var(--line); }
|
||||
.main-nav a.active::after { display: none; }
|
||||
.main-nav a.active { background: var(--primary-soft); border-radius: 8px; }
|
||||
.main-nav a:last-child { border-bottom: none; }
|
||||
|
||||
.header-actions {
|
||||
|
||||
Reference in New Issue
Block a user