Fold secondary nav links into a «بیشتر» dropdown
Move مراکز درمانی + تقویم هفتگی into a native <details> «بیشتر» dropdown, leaving the bar with just the primary items: خانه · استخدام · شیفتها · آماده به کار · بیشتر ▾ · 🔎. Desktop shows a floating menu; in the mobile burger panel it expands inline. Closes on outside click. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -115,12 +115,17 @@
|
||||
<a href="/Jobs" data-tour="jobs" class="@(path.StartsWith("/Jobs") ? "active" : null)">استخدام</a>
|
||||
<a href="/Shifts" data-tour="shifts" class="@(path.StartsWith("/Shifts") ? "active" : null)">شیفتها</a>
|
||||
<a asp-page="/Talent/Index" class="@(path.StartsWith("/Talent") ? "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>
|
||||
@if (User.Identity?.IsAuthenticated != true)
|
||||
{
|
||||
<a asp-page="/Recommendations/Index" class="@(path.StartsWith("/Recommendations") ? "active" : null)">✨ پیشنهادها</a>
|
||||
}
|
||||
<details class="nav-more">
|
||||
<summary class="@(path.StartsWith("/Facilities") || path.StartsWith("/Calendar") ? "active" : null)">بیشتر ▾</summary>
|
||||
<div class="nav-more-menu">
|
||||
<a asp-page="/Facilities/Index" class="@(path.StartsWith("/Facilities") ? "active" : null)">🏥 مراکز درمانی</a>
|
||||
<a asp-page="/Calendar/Index" class="@(path.StartsWith("/Calendar") ? "active" : null)">🗓️ تقویم هفتگی</a>
|
||||
</div>
|
||||
</details>
|
||||
<a asp-page="/Search" class="nav-search-link @(path.StartsWith("/Search") ? "active" : null)">🔎 جستجو</a>
|
||||
</nav>
|
||||
<div class="header-actions">
|
||||
@@ -228,6 +233,10 @@
|
||||
document.addEventListener('click', function (e) {
|
||||
var t = document.getElementById('profile-toggle');
|
||||
if (t && t.checked && !e.target.closest('.profile-menu')) t.checked = false;
|
||||
// Close the «بیشتر» nav dropdown when clicking outside it.
|
||||
document.querySelectorAll('details.nav-more[open]').forEach(function (d) {
|
||||
if (!d.contains(e.target)) d.removeAttribute('open');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user