[Profile] Editable profile (avatar + resume) + role-based profile dropdown menu
Every user gets a full editable profile at /Me/Profile: name, role, city, specialty/title, license, years, bio + avatar image upload + resume upload (PDF/image). Avatar/resume stored in-DB on User (migration, 5 nullable columns). Endpoints: /avatar/{id} (public) and /resume/{id} (owner, admin, or an employer who received that user's application). Nav: replaced the scattered action links with an avatar button + dropdown listing all of the user's pages by role (profile, کارجو panel, alerts, preferences, notifications; employer panel; admin panel + settings; logout) — shows the avatar image or initials; collapses into the burger menu on mobile; closes on outside-click.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -88,6 +88,35 @@ a { color: inherit; text-decoration: none; }
|
||||
.nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
|
||||
.bell-mobile { position: relative; font-size: 20px; margin-inline-start: auto; line-height: 1; }
|
||||
|
||||
/* ---------- Profile avatar + dropdown ---------- */
|
||||
.profile-menu { position: relative; }
|
||||
.avatar-btn { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
|
||||
.avatar-img, .avatar-fallback { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
|
||||
.avatar-fallback { background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
|
||||
.avatar-caret { color: var(--muted); font-size: 11px; }
|
||||
.profile-dropdown {
|
||||
position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 230px; z-index: 60;
|
||||
background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
|
||||
box-shadow: 0 16px 38px rgba(0,0,0,.16); padding: 6px; display: none;
|
||||
}
|
||||
.profile-toggle:checked ~ .profile-dropdown { display: block; animation: fadeIn .12s ease; }
|
||||
.profile-dropdown a, .pd-logout {
|
||||
display: flex; align-items: center; gap: 8px; width: 100%; text-align: start;
|
||||
padding: 9px 12px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: 14px;
|
||||
background: none; border: none; cursor: pointer; font-family: inherit;
|
||||
}
|
||||
.profile-dropdown a:hover, .pd-logout:hover { background: var(--primary-soft); color: var(--primary-dark); }
|
||||
.profile-dropdown form { margin: 0; }
|
||||
.pd-head { padding: 8px 12px; font-weight: 800; color: var(--muted); font-size: 13px; }
|
||||
.pd-sep { height: 1px; background: var(--line); margin: 4px 0; }
|
||||
.pd-logout { color: var(--danger); }
|
||||
|
||||
/* Large avatar on the profile editor page */
|
||||
.avatar-lg { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
|
||||
background: var(--primary-soft); display: grid; place-items: center; }
|
||||
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.avatar-lg span { font-size: 34px; font-weight: 800; color: var(--primary-dark); }
|
||||
|
||||
/* ---------- Live notification toasts (SSE) ---------- */
|
||||
.toast-host {
|
||||
position: fixed; inset-block-end: 16px; inset-inline-start: 16px; z-index: 200;
|
||||
@@ -400,6 +429,14 @@ label { font-size: 13px; }
|
||||
.bell-inline .bell-label { display: inline; }
|
||||
.header-actions .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-top: 6px; }
|
||||
|
||||
/* On mobile the avatar button is hidden and the menu items show stacked in the burger panel. */
|
||||
.avatar-btn { display: none; }
|
||||
.profile-menu { width: 100%; }
|
||||
.profile-dropdown { position: static; display: block; box-shadow: none; border: none; padding: 0; min-width: 0; }
|
||||
.profile-dropdown a, .pd-logout { padding: 12px 6px; font-size: 15px; }
|
||||
.pd-head { display: none; }
|
||||
.pd-sep { display: none; }
|
||||
|
||||
.cal { border-spacing: 4px; }
|
||||
.cal td { height: auto; min-height: 80px; padding: 6px; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user