Fold secondary nav links into a «بیشتر» dropdown
CI/CD / CI · dotnet build (push) Successful in 5m51s
CI/CD / Deploy · hamkadr (push) Successful in 3m9s

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:
soroush.asadi
2026-06-23 19:05:29 +03:30
parent e3750b7d43
commit ccc5a954dd
2 changed files with 26 additions and 2 deletions
@@ -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>
+15
View File
@@ -71,6 +71,15 @@ a { color: inherit; text-decoration: none; }
content: ""; position: absolute; inset-inline: 0; bottom: -6px; height: 2px;
background: var(--accent); border-radius: 2px;
}
/* «بیشتر» nav dropdown (native <details>) — secondary browse links (facilities, calendar). */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; padding: 4px 0; user-select: none; }
.nav-more > summary::-webkit-details-marker, .nav-more > summary::marker { display: none; content: ""; }
.nav-more > summary:hover, .nav-more[open] > summary, .nav-more > summary.active { color: var(--primary-dark); }
.nav-more-menu { position: absolute; top: 200%; inset-inline-end: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 6px; min-width: 180px; z-index: 60; display: flex; flex-direction: column; }
.nav-more-menu a { color: var(--text); font-weight: 600; font-size: 14px; padding: 9px 12px; border-radius: 8px; white-space: nowrap; }
.nav-more-menu a:hover, .nav-more-menu a.active { background: var(--primary-soft); color: var(--primary-dark); }
.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; }
@@ -607,6 +616,12 @@ mark { background: #fff3bf; color: inherit; padding: 0 2px; border-radius: 3px;
.main-nav a.active { background: var(--primary-soft); border-radius: 8px; }
.main-nav a:last-child { border-bottom: none; }
/* In the burger panel the «بیشتر» menu expands inline (no floating dropdown). */
.nav-more { width: 100%; }
.nav-more > summary { padding: 13px 20px; font-size: 15px; border-bottom: 1px solid var(--line); }
.nav-more-menu { position: static; box-shadow: none; border: none; padding: 0; min-width: 0; }
.nav-more-menu a { padding: 13px 34px; border-bottom: 1px solid var(--line); border-radius: 0; }
.header-actions {
flex-direction: column; align-items: stretch; gap: 0;
margin: 0; padding: 8px 14px 16px; border-top: 1px solid var(--line);