补充主题静态资源与归档模板

This commit is contained in:
kate522 committed 2026-07-03 23:15:11 +08:00
1 parent 1268a55dd0
commit 3247db7ed1
265 files changed
+59174

No files matched your search

+332
View File
@@ -0,0 +1,332 @@
/* ============================================================
* AKSRT Navigation — Editorial v3.4
*
* - 高度 60px (--nav-h)
* - 字体使用 --font-ui (Inter / 思源黑体)
* - 主色蓝调,hover 改为 primary-soft 浅底
* - 永远实心:白底深字 + 1px 分隔线,滚动后追加 box-shadow
* - 移动端:≤768 显示汉堡菜单
* ============================================================ */
.site-nav {
position: sticky;
top: 0;
z-index: 1000;
min-height: var(--nav-height, 60px);
background-color: var(--blur-bg);
backdrop-filter: saturate(5) blur(20px);
-webkit-backdrop-filter: saturate(5) blur(20px);
transition: background-color 0.25s ease,
border-color 0.25s ease,
color 0.25s ease,
box-shadow 0.25s ease,
transform 0.3s ease; /* 滚动隐藏过渡 */
}
/* 滚动隐藏头部 — 对齐 zibll .scroll-down.nav-fixed .header.scroll-down-hide */
.site-nav.is-hidden {
transform: translateY(-105%);
}
.site-nav--static {
position: relative;
}
.site-nav--transparent {
background: transparent; /* 对齐 zibll .header.show-slide: 透明覆盖在 slider 上 */
border-bottom-color: transparent;
}
.site-nav--transparent:not(.is-scrolled) {
--header-color: #fff; /* 对齐 zibll --header-color:#fff */
color: #fff;
}
.site-nav--transparent:not(.is-scrolled) a {
color: inherit;
}
.site-nav--transparent.is-scrolled {
background: var(--blur-bg); /* 滚动后恢复毛玻璃背景 */
border-bottom-color: var(--color-line-soft);
}
.site-nav--blur {
background: var(--blur-bg);
backdrop-filter: saturate(5) blur(20px);
-webkit-backdrop-filter: saturate(5) blur(20px);
border-bottom-color: transparent;
}
html.dark .site-nav--transparent:not(.is-scrolled),
html.dark .site-nav--blur:not(.is-scrolled),
body.dark-theme .site-nav--transparent:not(.is-scrolled),
body.dark-theme .site-nav--blur:not(.is-scrolled) {
background: transparent;
border-bottom-color: transparent;
}
html.dark .site-nav--transparent.is-scrolled,
html.dark .site-nav--blur.is-scrolled,
body.dark-theme .site-nav--transparent.is-scrolled,
body.dark-theme .site-nav--blur.is-scrolled {
background: var(--blur-bg);
border-bottom-color: var(--color-line-soft);
}
/* 滚动后追加阴影 — 对齐 zibll .body-scroll .header */
.site-nav.is-scrolled {
box-shadow: 0 4px 10px var(--main-shadow, rgba(116, 116, 116, 0.08));
}
/* WordPress Admin Bar 已全局禁用,无需偏移规则 */
/* ============================================================
* Inner / Row layout
* ============================================================ */
.site-nav__inner {
max-width: var(--nav-max-width, var(--container));
margin: 0 auto;
padding: 0 20px;
display: flex;
flex-direction: column;
gap: 0;
}
.site-nav__row {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 12px;
width: 100%;
min-height: var(--nav-height, 60px);
}
/* ============================================================
* Brand
* ============================================================ */
.site-brand {
display: inline-flex;
align-items: center;
gap: 10px;
min-width: 0;
max-width: min(48vw, 360px);
padding: 7px 10px;
color: var(--color-ink);
font-size: 17px;
font-weight: 700;
letter-spacing: -0.01em;
flex-shrink: 0;
text-decoration: none;
}
.site-brand:hover {
color: var(--color-ink);
text-decoration: none;
}
.site-brand--has-logo {
gap: 0;
}
.site-brand__logo {
width: 36px;
height: 36px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 13px;
color: var(--color-on-primary, #fff);
background: linear-gradient(135deg, var(--color-primary), var(--color-primary-active, var(--color-primary-dark)));
letter-spacing: 0.02em;
overflow: hidden;
}
.site-brand__media {
display: block;
flex: 0 1 auto;
max-width: 100%;
padding: 0 30px;
line-height: 0;
box-sizing: border-box;
background: transparent !important;
border: 0;
border-radius: 0;
box-shadow: none;
filter: none !important;
opacity: 1;
}
.site-brand__img {
display: block;
height: 36px;
width: auto;
max-width: 100%;
object-fit: contain;
object-position: left center;
background: transparent !important;
border-radius: 0;
box-shadow: none;
filter: none !important;
mix-blend-mode: normal !important;
opacity: 1;
transform: none !important;
}
.site-brand__name {
font-weight: 700;
letter-spacing: -0.01em;
white-space: nowrap;
}
/* Light/dark logo toggle */
.site-brand__logo-img--dark {
display: none;
}
html.dark .site-brand__logo-img--light,
[data-theme="dark"] .site-brand__logo-img--light,
body.dark-theme .site-brand__logo-img--light {
display: none;
}
html.dark .site-brand__logo-img--dark,
[data-theme="dark"] .site-brand__logo-img--dark,
body.dark-theme .site-brand__logo-img--dark {
display: inline-block;
}
/* ============================================================
* Desktop menu
* ============================================================ */
ul.nav-desktop {
display: none;
list-style: none;
margin: 0;
padding: 0;
align-items: center;
flex: 1 1 auto;
min-width: 0;
}
.nav-desktop--fallback {
display: none;
align-items: center;
flex: 1 1 auto;
min-width: 0;
}
ul.nav-desktop a,
.nav-desktop--fallback a {
color: var(--color-ink-3);
font-weight: 500;
padding: 0 10px; /* 对齐 zibll:仅水平 padding,垂直居中靠 flex 行高 */
border-radius: 4px;
transition: color var(--dur-fast, 0.15s) var(--ease),
background var(--dur-fast, 0.15s) var(--ease);
}
/* Hover — 对齐 zibll: 仅变色,无背景 */
ul.nav-desktop a:hover,
.nav-desktop--fallback a:hover {
color: var(--color-primary);
background: transparent;
}
/* Active page — 对齐 zibll: 仅变色(指示器走下方胶囊条) */
ul.nav-desktop .current-menu-item > a,
ul.nav-desktop .current_page_item > a {
color: var(--color-primary);
background: transparent;
}
/* ============================================================
* Desktop submenu (dropdown)
* ============================================================ */
ul.nav-desktop .menu-item {
position: relative;
}
/* 顶部 hover/current 胶囊指示器 — 对齐 zibll .navbar-nav>li:before
(5px 高、底部 15px 圆角,从 header 顶缘垂下)。
stretch 链(row→ul→li)让 li 充满 60px 行高,::before top:0 即锚定 header 顶部;
::before 为 absolute 不进入 flex 流,不挤压链接。 */
ul.nav-desktop {
align-self: stretch;
}
ul.nav-desktop > .menu-item {
align-self: stretch;
display: flex;
align-items: center;
}
ul.nav-desktop > .menu-item::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 5px;
background: var(--focus-color, var(--color-primary));
border-radius: 0 0 15px 15px;
opacity: 0;
transition: opacity 0.3s;
pointer-events: none;
}
ul.nav-desktop > .menu-item:hover::before,
ul.nav-desktop > .current-menu-item::before,
ul.nav-desktop > .current_page_item::before {
opacity: 1;
}
ul.nav-desktop .sub-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 998; /* 保留较高 z-index(zibll 用 99,AKSRT 栈更深,避免被覆盖) */
min-width: 120px;
list-style: none;
margin: 4px 0 0;
padding: 10px 5px;
background: var(--main-bg-color, #fff);
border: 1px solid var(--main-border-color, rgba(50, 50, 50, 0.06));
border-radius: var(--main-radius, 8px);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
opacity: 0;
visibility: hidden;
transform: translateY(6px);
transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}
ul.nav-desktop .menu-item:hover > .sub-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
ul.nav-desktop .sub-menu .menu-item > a {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 15px;
font-size: 14px;
border-radius: 4px;
white-space: nowrap;
}
ul.nav-desktop .sub-menu .menu-item > a:hover {
background: var(--color-primary-soft, rgba(240, 68, 148, 0.08));
color: var(--color-primary);
}
/* Nested submenus fly out to the right — 对齐 zibll top:-10px,去 margin-left */
ul.nav-desktop .sub-menu .sub-menu {
top: -10px;
left: 100%;
margin: 0;
}
+128
View File
@@ -0,0 +1,128 @@
/* Cards submenu */
.aksrt-nav__cards {
display: grid;
gap: 12px;
padding: 8px;
}
.aksrt-nav__card {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
border-radius: 6px;
text-decoration: none;
color: inherit;
transition: background 0.15s;
}
.aksrt-nav__card:hover {
background: var(--color-primary-soft, rgba(240, 68, 148, 0.06));
}
.aksrt-nav__card-icon {
width: 36px;
height: 36px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
background: var(--color-primary-soft, #e6f4ff);
color: var(--color-primary);
font-size: 16px;
flex-shrink: 0;
}
.aksrt-nav__card-text {
flex: 1;
min-width: 0;
}
.aksrt-nav__card-title {
font-size: 13px;
font-weight: 600;
color: var(--color-ink);
margin: 0;
}
.aksrt-nav__card-desc {
font-size: 11px;
color: var(--color-ink-4);
margin: 2px 0 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ============================================================
* 导航溢出「更多」下拉
* ============================================================ */
.aksrt-nav-more {
position: relative;
}
.aksrt-nav-more__btn {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 6px 12px;
border: none;
background: none;
color: var(--color-ink-2);
font-size: 14px;
font-weight: 500;
cursor: pointer;
border-radius: var(--radius, 8px);
transition: background 0.15s, color 0.15s;
}
.aksrt-nav-more__btn:hover {
background: var(--color-primary-soft, rgba(240, 68, 148, 0.08));
color: var(--color-primary);
}
.aksrt-nav-more__dropdown {
display: none;
position: absolute;
top: 100%;
right: 0;
min-width: 160px;
padding: 6px 0;
background: var(--surface-1, #fff);
border: 1px solid var(--color-line, rgba(50, 50, 50, 0.06));
border-radius: var(--radius, 8px);
box-shadow: var(--shadow-lg, 0 0 10px rgba(116, 116, 116, 0.12));
z-index: var(--z-dropdown, 100);
list-style: none;
margin: 4px 0 0;
}
.aksrt-nav-more__dropdown.is-open {
display: block;
}
.aksrt-nav-more__dropdown li {
display: block;
}
.aksrt-nav-more__dropdown li a,
.aksrt-nav-more__dropdown li button {
display: block;
width: 100%;
padding: 8px 16px;
border: none;
background: none;
color: var(--color-ink-2);
font-size: 14px;
text-align: left;
text-decoration: none;
cursor: pointer;
transition: background 0.15s, color 0.15s;
}
.aksrt-nav-more__dropdown li a:hover,
.aksrt-nav-more__dropdown li button:hover {
background: var(--color-primary-soft, rgba(240, 68, 148, 0.08));
color: var(--color-primary);
}
@@ -0,0 +1,12 @@
/* Dark mode Mega Menu */
html.dark ul.nav-desktop .mega-menu-item > .mega-menu__panel,
body.dark-theme ul.nav-desktop .mega-menu-item > .mega-menu__panel {
background: var(--surface-page);
border-color: var(--color-line, #2d2d3f);
}
html.dark .mega-menu__panel > .menu-item:hover,
body.dark-theme .mega-menu__panel > .menu-item:hover {
background: var(--surface-2);
}
@@ -0,0 +1,109 @@
/* Dark mode submenu */
html.dark ul.nav-desktop .sub-menu,
body.dark-theme ul.nav-desktop .sub-menu {
background: var(--surface-page);
border-color: var(--color-line, #2d2d3f);
}
/* ============================================================
* Mega Menu (图文超级菜单)
* ============================================================ */
/* Mega Menu 容器:全宽定位 */
ul.nav-desktop .mega-menu-item {
position: static;
}
ul.nav-desktop .mega-menu-item > .mega-menu__panel {
position: fixed; /* 对齐 zibll .senior-submenu: position:fixed 全视口宽 */
top: var(--nav-height, 60px);
left: 0;
right: 0;
transform: none;
max-width: var(--container);
margin: 0 auto; /* 内容区居中 */
padding: 20px 16px; /* 对齐 zibll 垂直 20px + 水平内边距 */
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05); /* 对齐 zibll shadow */
}
/* 列布局 */
.mega-menu__columns-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
}
.mega-menu__columns-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
}
.mega-menu__columns-4 {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 8px;
}
.mega-menu__columns-5 {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
}
/* Mega Menu 子项(卡片样式) */
.mega-menu__panel > .menu-item {
border-radius: 8px;
transition: background 0.15s;
}
.mega-menu__panel > .menu-item:hover {
background: var(--surface-2, #F4F5F7);
}
.mega-menu__panel > .menu-item > a {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
font-size: 14px;
border-radius: 8px;
white-space: normal;
line-height: 1.4;
}
.mega-menu__panel > .menu-item > a i {
width: 20px;
text-align: center;
color: var(--color-primary, var(--color-primary));
flex-shrink: 0;
}
/* 描述文字 */
.mega-menu__item-desc {
display: block;
font-size: 12px;
color: var(--color-ink-4, #8A8F98);
margin-top: 2px;
line-height: 1.3;
}
/* Mega Menu 标题分组 */
.mega-menu__panel .mega-menu__group-title {
grid-column: 1 / -1;
padding: 8px 12px 4px;
font-size: 12px;
font-weight: 600;
color: var(--color-ink-3);
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* Mega Menu 底部区域(可放图片/CTA) */
.mega-menu__panel .mega-menu__footer {
grid-column: 1 / -1;
padding: 12px 0 0;
margin-top: 8px;
border-top: 1px solid var(--color-line);
}
+35
View File
@@ -0,0 +1,35 @@
/* Hover effects */
.aksrt-nav__item--hover-underline > a::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 2px;
background: var(--color-primary);
transition: width 0.2s ease, left 0.2s ease;
border-radius: 1px;
}
.aksrt-nav__item--hover-underline:hover > a::after {
width: 60%;
left: 20%;
}
.aksrt-nav__item--hover-background > a {
transition: background-color 0.2s;
border-radius: 4px;
}
.aksrt-nav__item--hover-background:hover > a {
background-color: var(--color-primary-soft, rgba(240, 68, 148, 0.08));
}
.aksrt-nav__item--hover-color > a {
transition: color 0.2s;
}
.aksrt-nav__item--hover-color:hover > a {
color: var(--color-primary);
}
+28
View File
@@ -0,0 +1,28 @@
/* Mega submenu */
.aksrt-nav__mega {
position: absolute;
top: 100%;
left: 0;
z-index: 1001;
background: var(--surface-1);
border: 1px solid var(--color-line);
border-radius: var(--radius);
box-shadow: var(--shadow-lg);
padding: 16px;
opacity: 0;
visibility: hidden;
transform: translateY(8px);
transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.aksrt-nav__item:hover > .aksrt-nav__mega {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.aksrt-nav__mega--columns {
display: grid;
gap: 16px;
}
@@ -0,0 +1,41 @@
/* Menu item badge */
.aksrt-nav__badge {
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 10px;
font-weight: 600;
line-height: 1;
padding: 2px 5px;
border-radius: 3px;
margin-left: 4px;
white-space: nowrap;
vertical-align: middle;
transform: translateY(-1px);
}
.aksrt-nav__badge--new {
color: #fff;
background: var(--color-error);
}
.aksrt-nav__badge--hot {
color: #fff;
background: var(--color-warning);
}
.aksrt-nav__badge--info {
color: #fff;
background: var(--color-info);
}
.aksrt-nav__badge--success {
color: #fff;
background: var(--color-success);
}
.aksrt-nav__badge--vip {
color: #fff;
background: linear-gradient(135deg, var(--color-warning), var(--color-error));
}
@@ -0,0 +1,20 @@
/* Menu item icon */
.aksrt-nav__icon {
font-size: 0.85em;
width: 1.2em;
text-align: center;
margin-right: 4px;
opacity: 0.7;
transition: opacity 0.2s;
}
.aksrt-nav__item--has-icon > a {
display: inline-flex;
align-items: center;
gap: 4px;
}
.aksrt-nav__item--has-icon:hover .aksrt-nav__icon {
opacity: 1;
}
@@ -0,0 +1,18 @@
/* Mobile theme toggle in drawer */
.nav-drawer__theme-toggle {
padding: 0 20px 16px;
}
.nav-drawer__theme-toggle .theme-toggle-mobile {
width: 100%;
min-height: 44px;
justify-content: center;
gap: 8px;
display: flex;
align-items: center;
}
/* ============================================================
* Menu Decoration — Icons, Badges, Hover Effects
* ============================================================ */
+604
View File
@@ -0,0 +1,604 @@
/* Mobile toggle */
.nav-toggle {
display: flex;
}
@media (max-width: 991px) {
.site-brand {
max-width: min(46vw, 311px);
}
.site-brand__media {
padding: 0 8px;
}
.nav-publish-btn {
display: none;
}
}
/* Desktop search icon: hide on mobile (use drawer search instead) */
@media (max-width: 767px) {
.site-brand {
max-width: min(62vw, 260px);
padding: 7px 0;
}
.site-brand__media {
padding: 0;
}
#search-toggle {
display: none;
}
/* Search panel only makes sense alongside the desktop search icon */
.nav-search-panel {
display: none !important;
}
}
@media (min-width: 768px) {
ul.nav-desktop,
.nav-desktop--fallback {
display: flex;
}
.nav-auth {
display: flex;
}
.nav-auth-dropdown {
display: flex;
}
.nav-toggle {
display: none;
}
}
/* ============================================================
* Header Layout Variants (desktop ≥768px)
* Layout 1: Standard — brand left, nav flex-1, actions right
* Layout 2: Centered — brand left, nav centered with flex, actions right
* Layout 3: Compact — brand left, nav pushed right, actions right
* ============================================================ */
@media (min-width: 768px) {
/* Layout 2: center the nav between brand and actions */
body.header-layout-2 .nav-desktop {
flex: 1;
justify-content: center;
}
body.header-layout-2 .nav-actions {
flex-shrink: 0;
}
/* Layout 3: push nav to the right side */
body.header-layout-3 .site-nav__row {
justify-content: flex-start;
}
body.header-layout-3 .nav-desktop {
flex: 1;
justify-content: flex-end;
margin-left: 24px;
}
body.header-layout-3 .nav-actions {
margin-left: 8px;
}
}
.nav-mobile-strip {
display: none;
width: calc(100% + 8px);
margin: 0 -4px;
padding: 0 0 12px;
}
.nav-mobile-strip__menu,
.nav-mobile-strip__menu ul {
display: flex;
align-items: center;
gap: 8px;
overflow-x: auto;
margin: 0;
padding: 0;
list-style: none;
scrollbar-width: none;
-ms-overflow-style: none;
}
.nav-mobile-strip__menu::-webkit-scrollbar,
.nav-mobile-strip__menu ul::-webkit-scrollbar {
display: none;
}
.nav-mobile-strip__menu a {
display: inline-flex;
align-items: center;
min-height: 34px;
padding: 0 12px;
border-radius: var(--radius-pill, 999px);
background: var(--surface-2);
color: var(--color-ink-2);
white-space: nowrap;
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
}
.nav-mobile-strip__menu .current-menu-item > a,
.nav-mobile-strip__menu .current_page_item > a {
background: var(--color-primary);
color: var(--color-on-primary, #fff);
}
@media (max-width: 767px) {
.nav-mobile-strip {
display: block;
}
}
/* ============================================================
* User avatar + dropdown
* ============================================================ */
.nav-user {
position: relative;
}
.nav-user__toggle {
width: 36px;
height: 36px;
border-radius: var(--radius-avatar);
padding: 0;
border: none; /* 对齐 zibll:头像无边框 */
cursor: pointer;
overflow: hidden;
background: var(--surface-2);
transition: box-shadow var(--dur-fast, 0.15s) var(--ease);
}
.nav-user__toggle:hover {
box-shadow: 0 0 0 2px var(--color-primary-soft);
}
.nav-user__toggle img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.user-dropdown {
position: absolute;
top: calc(100% + 8px);
right: 0;
width: 260px;
max-width: calc(100vw - 32px);
padding: 12px 0;
background: var(--surface-1);
border: 1px solid var(--color-line);
border-radius: var(--radius-lg, 8px);
box-shadow: var(--shadow-lg);
z-index: 1100;
opacity: 0;
visibility: hidden;
transform: translateY(-6px);
transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.user-dropdown.is-open {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.user-dropdown__profile {
display: flex;
align-items: center;
gap: 12px;
padding: 8px 16px 14px;
}
.user-dropdown__profile img {
width: 44px;
height: 44px;
border-radius: var(--radius-avatar);
object-fit: cover;
flex-shrink: 0;
}
.user-dropdown__name {
font-weight: 700;
font-size: 0.9375rem;
color: var(--color-ink);
}
.user-dropdown__email {
font-size: 0.75rem;
color: var(--color-ink-4);
word-break: break-all;
margin-top: 2px;
}
.user-dropdown__sep {
height: 1px;
background: var(--color-line);
margin: 6px 0;
}
.user-dropdown a,
.user-dropdown button {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
padding: 0 16px;
height: 44px;
border: none;
background: none;
font-size: 0.875rem;
color: var(--color-ink);
text-align: left;
cursor: pointer;
transition: background var(--dur-fast, 0.15s) var(--ease),
color var(--dur-fast, 0.15s) var(--ease);
}
.user-dropdown a:hover,
.user-dropdown button:hover {
background: var(--surface-3);
color: var(--color-primary-active);
}
/* dropdown 项内的 SVG 图标 */
.user-dropdown__item svg {
width: 16px;
height: 16px;
flex-shrink: 0;
opacity: 0.85;
}
.user-dropdown__item span:first-of-type:not(.user-dropdown__pill) {
flex: 1;
min-width: 0;
}
/* 未读消息数 badge */
.user-dropdown__badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 18px;
height: 18px;
padding: 0 5px;
margin-left: auto;
font-size: 11px;
font-weight: 600;
color: #fff;
background: var(--color-error, #ef4444);
border-radius: 9px;
line-height: 1;
}
.user-dropdown__credits {
display: flex;
align-items: center;
gap: 10px;
padding: 0 16px;
height: 44px;
font-size: 0.875rem;
color: var(--color-ink-2);
}
.user-dropdown__credits i {
color: var(--color-warning);
flex-shrink: 0;
}
.user-dropdown__credits-label {
flex: 1;
}
.user-dropdown__credits-value {
font-weight: 600;
color: var(--color-primary);
}
.user-dropdown__logout {
color: var(--color-error) !important;
}
.user-dropdown__logout svg {
color: var(--color-error);
}
.user-dropdown__logout:hover {
background: rgba(239, 68, 68, 0.08) !important;
color: var(--color-error) !important;
}
.user-dropdown .badge-dot {
margin-left: auto;
min-width: 8px;
height: 8px;
border-radius: var(--radius-pill);
background: var(--color-error);
}
/* ============================================================
* Search panel
* ============================================================ */
.nav-search-panel {
display: none;
padding: 12px 0 16px;
border-top: 1px solid var(--color-line);
}
.nav-search-panel.is-open {
display: block;
}
.nav-searchbox {
margin: 0;
}
.nav-searchbox__field {
display: flex;
align-items: center;
gap: 10px;
min-height: 42px;
padding: 0 6px 0 14px;
border: 1px solid var(--color-line);
border-radius: var(--radius-pill, 999px);
background: var(--surface-3);
box-sizing: border-box;
transition: border-color var(--dur-fast, 0.15s) var(--ease), box-shadow var(--dur-fast, 0.15s) var(--ease), background var(--dur-fast, 0.15s) var(--ease);
}
.nav-searchbox__icon {
order: 1;
flex: 0 0 16px;
width: 16px;
height: 16px;
color: var(--color-ink-4);
pointer-events: none;
}
.nav-searchbox__input {
order: 2;
flex: 1;
min-width: 0;
width: auto;
height: 40px;
padding: 0;
border: 0;
background: transparent;
color: var(--color-ink);
font-size: 0.9rem;
line-height: 1.2;
box-sizing: border-box;
}
.nav-searchbox__input:focus {
outline: none;
}
.nav-searchbox__input::placeholder {
color: var(--color-ink-4);
}
.nav-searchbox__submit {
order: 3;
flex: 0 0 auto;
height: 30px;
min-width: 64px;
padding: 0 14px;
border: 0;
border-radius: var(--radius-pill, 999px);
background: var(--color-primary);
color: #fff;
font-size: 0.8125rem;
font-weight: 600;
line-height: 1;
white-space: nowrap;
cursor: pointer;
}
.nav-searchbox__field:focus-within {
border-color: var(--color-primary);
box-shadow: 0 0 0 3px var(--color-primary-soft);
background: var(--surface-1);
}
.nav-searchbox__submit:hover {
background: var(--color-primary-active);
}
/* ============================================================
* Mobile drawer / mobile header
* ============================================================ */
.mobile-header.nav-drawer-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.45);
z-index: 1200;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s;
}
.mobile-header.nav-drawer-backdrop.is-open {
opacity: 1;
visibility: visible;
}
.mobile-header.nav-drawer {
position: fixed;
top: 0;
right: 0;
width: min(100vw, 360px);
height: 100vh;
max-height: 100dvh;
background: var(--surface-page);
z-index: 1210;
box-shadow: var(--shadow-drawer);
transform: translateX(100%);
transition: transform 0.32s var(--ease-out, ease);
display: flex;
flex-direction: column;
overflow: auto;
pointer-events: none;
visibility: hidden;
}
.mobile-header.nav-drawer.is-open {
transform: translateX(0);
pointer-events: auto;
visibility: visible;
}
.mobile-navbar {
display: flex;
flex-direction: column;
min-height: 100%;
}
.mobile-navbar .navbar-brand {
max-width: calc(100% - 52px);
padding: 7px 0;
}
.mobile-navbar .navbar-logo {
padding: 0;
}
.nav-drawer-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.45);
z-index: 1200;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s;
}
.nav-drawer-backdrop.is-open {
opacity: 1;
visibility: visible;
}
.nav-drawer {
position: fixed;
top: 0;
right: 0;
width: min(100vw, 360px);
height: 100vh;
max-height: 100dvh;
background: var(--surface-page);
z-index: 1210;
box-shadow: var(--shadow-drawer);
transform: translateX(100%);
transition: transform 0.32s var(--ease-out, ease);
display: flex;
flex-direction: column;
overflow: auto;
pointer-events: none;
visibility: hidden;
}
.nav-drawer.is-open {
transform: translateX(0);
pointer-events: auto;
visibility: visible;
}
.nav-drawer__head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 16px 20px;
border-bottom: 1px solid var(--color-line);
font-weight: 700;
font-size: 1rem;
}
.site-brand--drawer {
max-width: calc(100% - 52px);
padding: 7px 0;
}
.site-brand--drawer .site-brand__media {
padding: 0;
}
.nav-drawer__search {
padding: 16px 20px 0;
}
.nav-drawer__search .nav-searchbox__field {
min-height: 40px;
}
.nav-drawer__search .nav-searchbox__input {
height: 38px;
}
.nav-drawer__search .nav-searchbox__submit {
height: 28px;
min-width: 58px;
padding: 0 12px;
font-size: 0.75rem;
}
.nav-drawer__menu {
flex: 1;
padding: 16px 20px 32px;
}
.nav-drawer__menu a {
display: block;
padding: 14px 0;
font-size: 1rem;
font-weight: 500;
color: var(--color-ink);
border-bottom: 1px solid var(--color-line-soft);
}
.nav-drawer__menu a:hover {
color: var(--color-primary-active);
}
.nav-drawer__menu ul {
list-style: none;
margin: 0;
padding: 0;
}
.nav-drawer__auth {
padding: 20px;
display: flex;
flex-direction: column;
gap: 12px;
border-top: 1px solid var(--color-line);
}
.nav-drawer__auth .btn-outline,
.nav-drawer__auth .btn-primary {
width: 100%;
height: 44px;
}
.nav-drawer__publish {
padding: 0 20px 20px;
}
.nav-drawer__publish .btn-primary {
width: 100%;
min-height: 44px;
justify-content: center;
gap: 8px;
}
@@ -0,0 +1,10 @@
/* ===== nav_fixed mobile fallback ===== */
/* On mobile, static nav should remain sticky so the hamburger toggle stays accessible */
@media (max-width: 767px) {
.has-static-nav .site-nav--static {
position: sticky;
top: 0;
z-index: 1000;
}
}
@@ -0,0 +1,106 @@
/* Responsive Mega Menu */
@media (max-width: 767px) {
ul.nav-desktop .mega-menu-item > .mega-menu__panel {
position: static;
transform: none;
width: 100%;
max-width: none;
margin: 0;
box-shadow: none;
}
.mega-menu__columns-2,
.mega-menu__columns-3,
.mega-menu__columns-4,
.mega-menu__columns-5 {
grid-template-columns: 1fr;
}
}
/* ============================================================
* Right actions (icons + auth)
* ============================================================ */
.nav-actions {
display: flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
margin-left: auto;
}
.nav-settings-link,
.nav-publish-btn {
flex-shrink: 0;
}
.nav-settings-link svg {
width: 18px;
height: 18px;
}
.nav-publish-btn {
display: inline-flex;
align-items: center;
gap: 8px;
height: 36px;
padding: 0 14px;
font-size: 0.875rem;
font-weight: 600;
}
.nav-publish-btn i {
font-size: 0.8125rem;
}
.theme-toggle.is-animating svg {
transform: rotate(360deg);
}
/* ============================================================
* Auth buttons (in nav, when logged out)
* ============================================================ */
.nav-auth {
display: none;
align-items: center;
gap: 8px;
}
/* btn-outline / btn-primary 复用 core/buttons.css 的定义,
* 这里仅做导航专用调整(高度对齐、字体) */
.nav-auth .btn-outline,
.nav-auth .btn-primary {
height: 36px;
font-size: 0.875rem;
padding: 0 16px;
}
/* Auth dropdown variant (layouts 1/3) — icon trigger + panel */
.nav-auth-dropdown {
position: relative;
display: none;
align-items: center;
}
.nav-auth-dropdown__trigger {
width: 36px;
height: 36px;
}
.nav-auth-dropdown__trigger svg {
width: 20px;
height: 20px;
}
.nav-auth-dropdown__panel {
display: none;
position: absolute;
top: calc(100% + 8px);
right: 0;
min-width: 180px;
z-index: 1100;
}
.nav-auth-dropdown.is-open .nav-auth-dropdown__panel {
display: block;
}