Header: replace My Account nav link with an account icon in the top right (sign-in link / account menu), collapse header below 900px; v2.23.0

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-12 14:36:22 -04:00
1 parent 4a7c3cc967
commit 54575c22ef
5 files changed
+311 -101

No files matched your search

+211 -97
View File
@@ -223,6 +223,93 @@
color: var(--brand-black) !important;
}
/* ── Account icon (top right) ── */
.header-account-wrap {
position: relative;
flex-shrink: 0;
}
.header-account {
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
flex-shrink: 0;
padding: 0;
border-radius: 50%;
border: 1px solid rgba(201, 168, 76, 0.5);
background: transparent;
color: var(--brand-gold);
font: inherit;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
overflow: hidden;
text-decoration: none;
transition: background 200ms, color 200ms;
}
.header-account:hover,
.header-account[aria-expanded='true'] {
background: var(--brand-gold);
color: var(--brand-black);
}
.header-account-avatar {
width: 100%;
height: 100%;
object-fit: cover;
}
.header-account-menu {
position: absolute;
top: calc(100% + 10px);
right: 0;
z-index: 130;
min-width: 220px;
padding: 0.4rem;
border-radius: 12px;
border: 1px solid rgba(201, 168, 76, 0.3);
background: rgba(15, 15, 12, 0.98);
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.header-account-name {
padding: 0.55rem 0.75rem 0.65rem;
margin-bottom: 0.25rem;
font-size: 0.82rem;
color: var(--brand-muted);
border-bottom: 1px solid rgba(201, 168, 76, 0.15);
overflow-wrap: anywhere;
}
.header-account-name strong {
color: var(--brand-warm-white);
font-weight: 600;
}
.header-account-item {
display: block;
width: 100%;
padding: 0.65rem 0.75rem;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--brand-warm-white);
font: inherit;
font-size: 0.95rem;
text-align: left;
text-decoration: none;
cursor: pointer;
}
.header-account-item:hover,
.header-account-item:focus-visible {
background: rgba(201, 168, 76, 0.14);
color: var(--brand-gold-light);
}
/* ── Hero ── */
.hero {
display: grid;
@@ -7941,56 +8028,12 @@ a.study-track-card:hover {
padding: 0 1rem;
}
.header-inner {
padding: 0.75rem 1rem;
position: relative;
}
.site-search-bar-inner {
padding: 0.4rem 1rem;
}
.header-menu-btn {
display: inline-flex;
margin-left: auto;
}
.header-nav {
max-height: 0;
opacity: 0;
pointer-events: none;
overflow: hidden;
position: absolute;
top: 100%;
left: 0;
right: 0;
z-index: 120;
flex-direction: column;
align-items: stretch;
gap: 0;
padding: 0 1rem;
background: rgba(10, 10, 8, 0.98);
border-bottom: 1px solid rgba(201, 168, 76, 0.2);
transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.28s ease;
}
.header-nav--open {
max-height: 500px;
opacity: 1;
pointer-events: auto;
padding: 0.5rem 1rem 1rem;
}
.header-nav .header-nav-link {
display: block;
padding: 0.8rem 0.25rem;
border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}
.header-nav .header-cta {
margin-top: 0.75rem;
justify-content: center;
text-align: center;
.header-account-menu {
position: fixed;
top: 4.2rem;
right: 0.75rem;
left: 0.75rem;
min-width: 0;
}
.admin-top-tabs .admin-tab {
@@ -10855,53 +10898,6 @@ a.study-track-card:hover {
}
@media (max-width: 540px) {
.header-nav--open {
max-height: 660px;
}
.nav-dropdown-trigger {
width: 100%;
display: flex;
justify-content: space-between;
padding: 0.8rem 0.25rem;
border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}
.nav-dropdown-label {
flex: 1;
padding: 0;
}
.nav-dropdown-menu {
display: none;
position: static;
transform: none;
padding-top: 0;
min-width: 0;
}
.nav-dropdown-menu-inner {
background: transparent;
border: none;
border-radius: 0;
padding: 0;
box-shadow: none;
}
.nav-dropdown:hover .nav-dropdown-menu {
display: none;
}
.nav-dropdown--open .nav-dropdown-menu {
display: block;
}
.nav-dropdown-item {
padding: 0.65rem 0.25rem 0.65rem 1.5rem;
font-size: 0.88rem;
border-bottom: 1px solid rgba(201, 168, 76, 0.08);
}
.finished-series-hero {
flex-direction: column;
gap: 1rem;
@@ -13615,3 +13611,121 @@ a.study-track-card:hover {
.qna { padding: 1.5rem 0 3rem; }
.qna-q-text { font-size: 1.15rem; }
}
/* Keep the full header on one line between 901px and 1100px */
.header-cta { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1100px) {
.header-inner { padding-left: 1rem; padding-right: 1rem; }
.header-nav { gap: 1rem; }
.header-nav a,
.header-nav button { font-size: 0.88rem; letter-spacing: 0.04em; }
.header-cta { padding: 0.4rem 0.9rem !important; }
}
/* ── Collapsed header (menu button + account icon) below 900px ── */
@media (max-width: 900px) {
.header-inner {
padding: 0.75rem 1rem;
position: relative;
}
.site-search-bar-inner {
padding: 0.4rem 1rem;
}
.header-menu-btn {
display: inline-flex;
margin-left: auto;
}
.header-account {
width: 44px;
height: 44px;
}
.header-nav {
max-height: 0;
opacity: 0;
pointer-events: none;
overflow: hidden;
position: absolute;
top: 100%;
left: 0;
right: 0;
z-index: 120;
flex-direction: column;
align-items: stretch;
gap: 0;
padding: 0 1rem;
background: rgba(10, 10, 8, 0.98);
border-bottom: 1px solid rgba(201, 168, 76, 0.2);
transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.28s ease;
}
.header-nav--open {
max-height: 500px;
opacity: 1;
pointer-events: auto;
padding: 0.5rem 1rem 1rem;
}
.header-nav .header-nav-link {
display: block;
padding: 0.8rem 0.25rem;
border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}
.header-nav .header-cta {
margin-top: 0.75rem;
justify-content: center;
text-align: center;
}
.header-nav--open {
max-height: 660px;
}
.nav-dropdown-trigger {
width: 100%;
display: flex;
justify-content: space-between;
padding: 0.8rem 0.25rem;
border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}
.nav-dropdown-label {
flex: 1;
padding: 0;
}
.nav-dropdown-menu {
display: none;
position: static;
transform: none;
padding-top: 0;
min-width: 0;
}
.nav-dropdown-menu-inner {
background: transparent;
border: none;
border-radius: 0;
padding: 0;
box-shadow: none;
}
.nav-dropdown:hover .nav-dropdown-menu {
display: none;
}
.nav-dropdown--open .nav-dropdown-menu {
display: block;
}
.nav-dropdown-item {
padding: 0.65rem 0.25rem 0.65rem 1.5rem;
font-size: 0.88rem;
border-bottom: 1px solid rgba(201, 168, 76, 0.08);
}
}