fix(nav): publish menu contrast, check-in toast and button layout

Use solid light plate + forced ink on 发布 items, notyf instead of alert,
and keep header check-in flex layout after success.
This commit is contained in:
2026-07-22 09:09:02 +08:00
parent 77164fee45
commit 35ac26db28
5 changed files with 238 additions and 81 deletions
+129 -53
View File
@@ -17,14 +17,18 @@
display: inline-flex;
align-items: center;
min-width: 0;
flex: 0 0 auto;
width: auto;
max-width: none;
}
/* CTA button base: flex icon + text, never stack or clip glyphs */
.navbar-but-cluster .navbar-cta,
.navbar-but-cluster .btn-primary,
.navbar-but-cluster .but.btn-primary,
.navbar-but-cluster .navbar-newposts.but,
.navbar-but-cluster a.but {
/* CTA paint only on actual anchors/buttons — never on hover wrappers */
.navbar-but-cluster a.navbar-cta,
.navbar-but-cluster a.btn-primary,
.navbar-but-cluster a.but.btn-primary,
.navbar-but-cluster a.navbar-newposts.but,
.navbar-but-cluster a.but,
.navbar-but-cluster button.navbar-cta {
display: inline-flex !important;
align-items: center;
justify-content: center;
@@ -32,7 +36,7 @@
padding: 6px 14px;
border-radius: var(--navbar-cta-radius, 20px);
background: var(--color-primary, #2f6df6);
color: #fff;
color: #fff !important;
text-decoration: none;
border: 0;
font-size: 13px;
@@ -40,27 +44,44 @@
white-space: nowrap;
box-sizing: border-box;
vertical-align: middle;
flex: 0 0 auto;
width: auto;
max-width: none;
height: auto;
min-height: 0;
}
.navbar-but-cluster .navbar-cta > i,
.navbar-but-cluster a.navbar-cta > i,
.navbar-but-cluster a.but > i,
.navbar-but-cluster .btn-primary > i {
.navbar-but-cluster a.btn-primary > i,
.navbar-but-cluster a.navbar-cta .navbar-cta-text,
.navbar-but-cluster a.navbar-cta > span:not(.badge) {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1em;
height: 1em;
margin: 0 !important;
flex: 0 0 auto;
line-height: 1;
font-size: 1em;
}
.navbar-but-cluster .navbar-cta-text,
.navbar-but-cluster .navbar-cta > span:not(.badge) {
display: inline-block;
line-height: 1.2;
white-space: nowrap;
color: inherit !important;
}
.navbar-but-cluster a.navbar-cta > i,
.navbar-but-cluster a.but > i,
.navbar-but-cluster a.btn-primary > i {
width: 1em;
height: 1em;
font-size: 1em;
line-height: 1;
}
/* Multi-type toggle keeps fixed CTA size when menu opens (focus-within). */
.navbar-but-cluster .newadd-btns__toggle.navbar-cta,
.navbar-but-cluster a.newadd-btns__toggle {
flex: 0 0 auto !important;
width: auto !important;
min-width: 0;
max-width: none;
}
.navbar-but-cluster .payvip-icon.but,
@@ -78,52 +99,70 @@
}
/* Publish multi-type dropdown */
.navbar-but-cluster .newadd-btns.hover-show,
.newadd-btns.hover-show {
position: relative;
display: inline-flex;
align-items: center;
align-self: center;
z-index: 20;
/* Wrapper must not inherit CTA paint (pink/primary fill + white text). */
/* Wrapper must never look like the CTA (no fill, no stretch when open). */
background: transparent !important;
color: inherit;
padding: 0;
border: 0;
box-shadow: none;
color: inherit !important;
padding: 0 !important;
margin: 0;
border: 0 !important;
box-shadow: none !important;
width: auto !important;
min-width: 0;
max-width: none;
height: auto !important;
flex: 0 0 auto;
white-space: nowrap;
}
.navbar-but-cluster .newadd-btns .drop-newadd,
.navbar-but-cluster .newadd-btns .hover-show-con,
.newadd-btns .drop-newadd,
.newadd-btns .hover-show-con {
display: block;
position: absolute;
top: calc(100% + 0px);
right: 0;
min-width: 148px;
margin: 0;
padding: 6px 0;
padding-top: 10px; /* bridge gap so pointer can move into menu */
background: transparent;
border: 0;
box-shadow: none;
display: block !important;
position: absolute !important;
top: calc(100% + 4px) !important;
right: 0 !important;
left: auto !important;
float: none !important;
width: max-content !important;
min-width: 160px;
max-width: min(240px, 80vw);
margin: 0 !important;
/* Top bridge so pointer can move into menu without collapsing hover */
padding: 8px 0 6px !important;
/* Solid plate — guarantees readable ink contrast in light mode */
background: #ffffff !important;
color: #222222 !important;
border: 1px solid rgba(0, 0, 0, 0.08) !important;
border-radius: 8px !important;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
opacity: 0;
visibility: hidden;
transform: translateY(6px);
transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
z-index: 50;
z-index: 1200 !important;
pointer-events: none;
box-sizing: border-box;
}
/* Hide decorative plate — real background is on the panel itself */
.newadd-btns .drop-newadd::before,
.newadd-btns .hover-show-con.drop-newadd::before {
content: "";
display: block;
background: var(--main-bg-color, #fff);
border-radius: 8px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
position: absolute;
inset: 6px 0 0 0;
z-index: -1;
content: none !important;
display: none !important;
}
.navbar-but-cluster .newadd-btns.hover-show:hover .drop-newadd,
.navbar-but-cluster .newadd-btns.hover-show:hover .hover-show-con,
.navbar-but-cluster .newadd-btns.hover-show:focus-within .drop-newadd,
.navbar-but-cluster .newadd-btns.hover-show:focus-within .hover-show-con,
.newadd-btns.hover-show:hover .drop-newadd,
.newadd-btns.hover-show:hover .hover-show-con,
.newadd-btns.hover-show:focus-within .drop-newadd,
@@ -134,40 +173,77 @@
pointer-events: auto;
}
.navbar-but-cluster .newadd-btns .newadd-btns__item,
.newadd-btns .drop-newadd .newadd-btns__item,
.newadd-btns__item {
display: flex;
display: flex !important;
align-items: center;
gap: 8px;
padding: 8px 14px;
/* Explicit ink color — never inherit white from CTA toggle. */
color: var(--color-ink, #222);
text-decoration: none;
padding: 8px 14px !important;
margin: 0;
width: 100% !important;
height: auto !important;
min-height: 0;
border: 0 !important;
border-radius: 0;
background: transparent !important;
/* Force dark ink — never inherit CTA white */
color: #222 !important;
text-decoration: none !important;
white-space: nowrap;
position: relative;
box-sizing: border-box;
font-size: 13px !important;
font-weight: 500;
line-height: 1.35;
opacity: 1 !important;
}
.navbar-but-cluster .newadd-btns .newadd-btns__item > i,
.newadd-btns__item > i {
width: 1em;
margin: 0;
margin: 0 !important;
text-align: center;
flex: 0 0 auto;
color: inherit !important;
opacity: 0.9;
}
.navbar-but-cluster .newadd-btns .newadd-btns__item > span,
.newadd-btns__item > span {
color: inherit !important;
line-height: 1.35;
}
.navbar-but-cluster .newadd-btns .newadd-btns__item:hover,
.newadd-btns .drop-newadd .newadd-btns__item:hover,
.newadd-btns__item:hover {
background: var(--surface-2, rgba(0, 0, 0, 0.04));
color: var(--focus-color, var(--color-primary));
background: var(--surface-2, rgba(0, 0, 0, 0.06)) !important;
color: var(--color-primary, #f04494) !important;
}
html.dark .newadd-btns .drop-newadd,
html.dark .newadd-btns .hover-show-con,
body.dark-theme .newadd-btns .drop-newadd,
body.dark-theme .newadd-btns .hover-show-con,
body.theme-dark .newadd-btns .drop-newadd,
body.theme-dark .newadd-btns .hover-show-con {
background: #323335 !important;
color: #f8fafc !important;
border-color: rgba(255, 255, 255, 0.08) !important;
}
html.dark .newadd-btns__item,
body.dark-theme .newadd-btns__item,
body.theme-dark .newadd-btns__item {
color: var(--color-ink, #f8fafc);
color: #f1f5f9 !important;
}
html.dark .newadd-btns__item:hover,
body.dark-theme .newadd-btns__item:hover,
body.theme-dark .newadd-btns__item:hover {
color: var(--focus-color, var(--color-primary));
color: var(--color-primary, #f04494) !important;
background: rgba(255, 255, 255, 0.06) !important;
}
/* Generic hover-show (zibll parity) */
+79 -19
View File
@@ -32,36 +32,76 @@
color: var(--color-ink-3, #666);
}
/* Check-in: readable on light theme */
/* Check-in: beat generic `.user-dropdown button { height:44px; background:none }` */
.user-dropdown button.aksrt-header-checkin,
.aksrt-header-checkin {
width: 100%;
border: 0;
border-radius: 6px;
padding: 8px 10px;
width: 100% !important;
max-width: 100%;
height: auto !important;
min-height: 36px;
border: 0 !important;
border-radius: 6px !important;
padding: 8px 10px !important;
margin: 0;
cursor: pointer;
background: #fff6db;
color: #8a5a00;
background: #fff6db !important;
color: #8a5a00 !important;
font-weight: 600;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
font-size: 13px !important;
line-height: 1.3;
display: inline-flex !important;
flex-direction: row !important;
align-items: center !important;
justify-content: center !important;
gap: 6px !important;
text-align: center !important;
box-sizing: border-box;
white-space: nowrap;
}
.user-dropdown button.aksrt-header-checkin > i,
.aksrt-header-checkin > i {
margin: 0 !important;
color: #b78103;
color: #b78103 !important;
flex: 0 0 auto;
line-height: 1;
}
.aksrt-header-checkin.is-done {
.user-dropdown button.aksrt-header-checkin > span,
.aksrt-header-checkin > span {
line-height: 1.3;
color: inherit;
}
.user-dropdown button.aksrt-header-checkin.is-done,
.aksrt-header-checkin.is-done,
.user-dropdown button.aksrt-header-checkin:disabled,
.aksrt-header-checkin:disabled {
opacity: 0.85;
cursor: default;
background: #f3f4f6;
color: #555;
background: #f3f4f6 !important;
color: #555 !important;
}
.aksrt-header-checkin.is-done > i {
color: #777;
.user-dropdown button.aksrt-header-checkin.is-done > i,
.aksrt-header-checkin.is-done > i,
.user-dropdown button.aksrt-header-checkin:disabled > i,
.aksrt-header-checkin:disabled > i {
color: #777 !important;
}
.user-dropdown button.aksrt-header-checkin:hover,
.aksrt-header-checkin:hover {
background: #fff0c2 !important;
color: #8a5a00 !important;
}
.user-dropdown button.aksrt-header-checkin.is-done:hover,
.aksrt-header-checkin.is-done:hover,
.user-dropdown button.aksrt-header-checkin:disabled:hover,
.aksrt-header-checkin:disabled:hover {
background: #f3f4f6 !important;
color: #555 !important;
}
.aksrt-header-checkin-details {
@@ -200,11 +240,31 @@
}
/* Dark theme overrides */
html.dark .user-dropdown button.aksrt-header-checkin,
html.dark .aksrt-header-checkin,
body.dark-theme .user-dropdown button.aksrt-header-checkin,
body.dark-theme .aksrt-header-checkin,
body.theme-dark .user-dropdown button.aksrt-header-checkin,
body.theme-dark .aksrt-header-checkin {
background: rgba(255, 193, 7, 0.18);
color: #f0c14b;
background: rgba(255, 193, 7, 0.18) !important;
color: #f0c14b !important;
}
html.dark .user-dropdown button.aksrt-header-checkin > i,
html.dark .aksrt-header-checkin > i,
body.dark-theme .user-dropdown button.aksrt-header-checkin > i,
body.dark-theme .aksrt-header-checkin > i,
body.theme-dark .user-dropdown button.aksrt-header-checkin > i,
body.theme-dark .aksrt-header-checkin > i {
color: #f0c14b !important;
}
html.dark .user-dropdown button.aksrt-header-checkin.is-done,
html.dark .aksrt-header-checkin.is-done,
body.dark-theme .user-dropdown button.aksrt-header-checkin.is-done,
body.dark-theme .aksrt-header-checkin.is-done {
background: rgba(255, 255, 255, 0.08) !important;
color: #bbb !important;
}
html.dark .aksrt-header-wallet,