snapshot: preserve account profile inline editing and avatar flow

This commit is contained in:
Md Bayazid Bostame
2026-03-27 02:06:52 +01:00
parent 8d228723f9
commit 358a71230d
13 changed files with 1462 additions and 398 deletions

View File

@@ -0,0 +1,486 @@
body {
margin: 0;
min-height: 100vh;
font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
background:
radial-gradient(76% 96% at 8% 10%, rgba(0, 0, 120, 0.12), rgba(0, 0, 120, 0)),
radial-gradient(64% 86% at 92% 88%, rgba(163, 32, 32, 0.1), rgba(163, 32, 32, 0)),
linear-gradient(160deg, #eef3ff 0%, #f8fbff 52%, #edf4ff 100%);
padding: 24px;
}
.shell {
background: rgba(255, 255, 255, 0.78);
backdrop-filter: blur(12px);
border: 1px solid rgba(217, 227, 238, 0.9);
border-radius: 28px;
box-shadow: 0 22px 48px rgba(18, 34, 56, 0.14);
overflow: hidden;
}
.account-shell-body {
padding: 28px;
background:
radial-gradient(90% 120% at 10% 0%, rgba(31, 79, 214, 0.06), rgba(31, 79, 214, 0)),
linear-gradient(180deg, rgba(255,255,255,0.72), rgba(248,251,255,0.48));
}
.account-page {
width: min(1120px, 100%);
margin: 0 auto;
display: grid;
gap: 22px;
}
.account-hero {
display: flex;
justify-content: space-between;
gap: 18px;
align-items: flex-start;
padding: 26px 28px;
border: 1px solid #d9e3f0;
border-radius: 24px;
background:
radial-gradient(circle at top right, rgba(30, 64, 175, 0.1), transparent 24%),
linear-gradient(135deg, rgba(255,255,255,0.96), rgba(244,248,255,0.9));
box-shadow: 0 14px 34px rgba(28, 45, 79, 0.08);
}
.account-kicker {
display: inline-flex;
margin-bottom: 10px;
padding: 6px 10px;
border-radius: 999px;
background: rgba(0, 0, 120, 0.08);
color: #203b74;
font-size: 11px;
font-weight: 800;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.account-hero h1 {
margin: 0 0 8px;
font-size: 32px;
color: #132238;
}
.account-hero p {
margin: 0;
max-width: 620px;
color: #617389;
line-height: 1.55;
}
.account-hero-badges {
display: flex;
gap: 10px;
flex-wrap: wrap;
justify-content: flex-end;
}
.account-chip {
display: inline-flex;
align-items: center;
min-height: 38px;
padding: 0 14px;
border-radius: 999px;
background: #0f2e8a;
color: #fff;
font-size: 12px;
font-weight: 800;
letter-spacing: 0.03em;
}
.account-chip-muted {
background: #edf3ff;
color: #35507e;
border: 1px solid #d5deee;
}
.account-layout {
display: grid;
grid-template-columns: 320px minmax(0, 1fr);
gap: 22px;
align-items: start;
}
.account-profile-card,
.account-panel {
border: 1px solid #d9e3f0;
border-radius: 22px;
background: rgba(255, 255, 255, 0.94);
box-shadow: 0 14px 32px rgba(28, 45, 79, 0.09);
}
.account-profile-card {
padding: 24px;
position: sticky;
top: 24px;
}
.account-avatar-form {
display: grid;
gap: 10px;
}
.account-avatar-wrap {
position: relative;
display: inline-flex;
width: fit-content;
cursor: pointer;
}
.account-avatar {
width: 84px;
height: 84px;
border-radius: 24px;
display: inline-flex;
align-items: center;
justify-content: center;
background: linear-gradient(180deg, #000078, #2943b6);
color: #fff;
font-size: 28px;
font-weight: 800;
letter-spacing: 0.04em;
text-transform: uppercase;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}
.account-avatar-image {
width: 84px;
height: 84px;
object-fit: cover;
display: block;
border-radius: 24px;
border: 1px solid #dce5f2;
box-shadow: 0 12px 24px rgba(18, 34, 56, 0.12);
}
.account-avatar-edit {
position: absolute;
right: -4px;
bottom: -4px;
width: 30px;
height: 30px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
background: #132d8a;
color: #fff;
font-size: 14px;
font-weight: 800;
border: 2px solid #fff;
box-shadow: 0 8px 18px rgba(18, 34, 56, 0.16);
}
.account-avatar-hint {
margin: 0;
color: #617389;
font-size: 12px;
line-height: 1.45;
}
.account-avatar-error {
color: #ab1e1e;
font-size: 12px;
line-height: 1.4;
}
.account-profile-copy {
margin-top: 18px;
}
.account-profile-copy h2 {
margin: 0 0 6px;
font-size: 24px;
color: #132238;
}
.account-profile-copy p {
margin: 0;
color: #617389;
line-height: 1.45;
word-break: break-word;
}
.account-profile-meta {
display: grid;
gap: 12px;
margin-top: 22px;
}
.account-profile-meta div {
padding: 12px 14px;
border-radius: 14px;
background: #f7faff;
border: 1px solid #dce6f2;
}
.account-profile-meta span {
display: block;
margin-bottom: 4px;
color: #6b7a90;
font-size: 12px;
}
.account-profile-meta strong {
color: #132238;
font-size: 14px;
line-height: 1.4;
}
.account-main {
display: grid;
gap: 22px;
}
.account-panel {
padding: 24px;
}
.account-panel-head {
margin-bottom: 18px;
display: flex;
justify-content: space-between;
gap: 14px;
align-items: flex-start;
}
.account-panel-head h2 {
margin: 0 0 6px;
font-size: 20px;
color: #132238;
}
.account-panel-head p {
margin: 0;
color: #617389;
line-height: 1.5;
}
.account-detail-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
}
.account-detail-wide {
grid-column: 1 / -1;
}
.account-detail {
padding: 14px 16px;
border-radius: 16px;
background: #f9fbff;
border: 1px solid #dbe5f2;
}
.account-detail span {
display: block;
margin-bottom: 6px;
color: #6b7a90;
font-size: 12px;
}
.account-detail strong {
color: #132238;
font-size: 14px;
line-height: 1.45;
word-break: break-word;
}
.account-action-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
margin-bottom: 18px;
}
.account-action-card {
display: grid;
gap: 6px;
padding: 16px 18px;
border-radius: 18px;
border: 1px solid #dbe5f2;
background:
radial-gradient(circle at top right, rgba(30, 64, 175, 0.08), transparent 28%),
#f9fbff;
color: inherit;
text-decoration: none;
transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.account-action-card:hover {
transform: translateY(-1px);
box-shadow: 0 10px 24px rgba(28, 45, 79, 0.08);
}
.account-action-card strong {
color: #132238;
font-size: 15px;
}
.account-action-card span {
color: #617389;
font-size: 13px;
line-height: 1.5;
}
.account-action-card-muted {
cursor: default;
}
.account-action-card-muted:hover {
transform: none;
box-shadow: none;
}
.account-actions {
display: flex;
gap: 10px;
}
.account-actions .btn {
width: auto;
}
.account-actions form {
margin: 0;
}
.account-inline-view.is-hidden,
.account-inline-form.is-hidden {
display: none;
}
.account-inline-edit-trigger {
min-width: 112px;
}
.account-form-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
}
.account-form-field {
display: grid;
gap: 6px;
}
.account-form-field-wide {
grid-column: 1 / -1;
}
.account-form-field label {
color: #132238;
font-size: 13px;
font-weight: 700;
}
.account-form-field input,
.account-form-field textarea {
width: 100%;
box-sizing: border-box;
padding: 10px 12px;
border: 1px solid #cbd5e1;
border-radius: 12px;
min-height: 44px;
font: inherit;
background: #fff;
transition: border-color 180ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.account-form-field textarea {
min-height: 104px;
resize: vertical;
}
.account-form-field input:focus,
.account-form-field textarea:focus {
outline: none;
border-color: rgba(0, 0, 120, 0.3);
box-shadow: 0 0 0 4px rgba(0, 0, 120, 0.08);
}
.account-form-field.has-error input,
.account-form-field.has-error textarea {
border-color: #e3a3a3;
background: #fffafa;
box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.06);
}
.account-form-error {
color: #ab1e1e;
font-size: 12px;
line-height: 1.4;
}
.account-inline-actions {
display: flex;
gap: 10px;
margin-top: 16px;
}
@media (max-width: 980px) {
.account-layout {
grid-template-columns: 1fr;
}
.account-profile-card {
position: static;
}
}
@media (max-width: 760px) {
body {
padding: 14px;
}
.account-shell-body {
padding: 16px;
}
.account-hero,
.account-panel,
.account-profile-card {
padding: 18px;
border-radius: 18px;
}
.account-hero {
flex-direction: column;
}
.account-hero h1 {
font-size: 26px;
}
.account-hero-badges {
justify-content: flex-start;
}
.account-detail-grid,
.account-action-grid,
.account-form-grid {
grid-template-columns: 1fr;
}
.account-actions {
flex-direction: column;
}
.account-inline-actions {
flex-direction: column;
}
.account-actions .btn {
width: 100%;
}
.account-panel-head {
flex-direction: column;
}
}

View File

@@ -190,7 +190,7 @@
align-items: center;
gap: 10px;
min-height: 44px;
padding: 6px 10px 6px 6px;
padding: 6px 10px 6px 8px;
border: 1px solid var(--app-line);
border-radius: 999px;
background: rgba(248, 251, 255, 0.92);
@@ -217,18 +217,27 @@
}
.app-user-avatar {
width: 32px;
height: 32px;
width: 28px;
height: 28px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
background: linear-gradient(180deg, var(--app-brand-blue), #1d3ca8);
color: #fff;
font-size: 11px;
font-size: 10px;
font-weight: 800;
letter-spacing: 0.04em;
text-transform: uppercase;
overflow: hidden;
flex: 0 0 28px;
}
.app-user-avatar-image {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.app-user-copy {