Merge pull request 'Worktree fix top multifunc cards' (#273) from worktree-fix-top-multifunc-cards into main

Reviewed-on: CYL/wordpress-theme-aksrt#273
This commit is contained in:
kate522 committed 2026-07-24 12:51:56 +08:00
commit b5f13c4a1f
7 files changed
+566 -23

No files matched your search

+23 -3
View File
@@ -179,7 +179,11 @@
.but a { color: inherit; }
.but .icon,
.but > .fa:not(.fa-angle-right) { margin-right: 0.25em; }
.but > .fa:not(.fa-angle-right),
.but > .fas:not(.fa-angle-right),
.but > .far:not(.fa-angle-right),
.but > .fab:not(.fa-angle-right),
.but > i[class*="fa-"]:not(.fa-angle-right) { margin-right: 0.25em; }
/* hover / active */
.but:focus,
@@ -253,7 +257,7 @@
.active.badg.hollow,
.active > .hollow:not(.vip-tag) { --this-color: var(--focus-color); }
/* toggle-radius (round 29px toggle) */
/* toggle-radius (round 29px toggle) — zibll 1:1 */
.toggle-radius {
background: var(--this-bg);
width: 29px;
@@ -265,8 +269,24 @@
vertical-align: text-top;
--this-bg: var(--main-border-color);
}
/* zibll groups these with abs-* : absolute + vertical center; then pin left/right 0 */
.toggle-radius .fa,
.toggle-radius .icon { right: 0 !important; left: 0 !important; margin: auto; }
.toggle-radius .icon,
.toggle-radius > i {
position: absolute;
top: 50%;
right: 0 !important;
left: 0 !important;
margin: auto;
transform: translateY(-50%);
line-height: 1;
width: 1em;
height: 1em;
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
}
/* solid color modifiers — set --this-bg; default --this-color white */
.b-gray, .b-theme, .b-red, .b-yellow, .b-blue, .b-blue-2, .b-black,
+333 -1
View File
@@ -7,4 +7,336 @@
@import url("nav/zib-nav-style.css");
@import url("nav/header-menu-buttons.css");
@import url("nav/header-userbox.css");
@import url("nav/dark-mode-submenu.css");
@import url("nav/dark-mode-submenu.css");
/* ==========================================================================
* Top navbar icon/text alignment — 1:1 zibll (demo.zibll.com / main.css)
* Kept INLINE in the aggregator so browsers cannot miss it via stale @import.
* ========================================================================== */
/* --- Shell row --- */
.navbar-top {
margin: 0;
border-radius: 0 !important;
font-size: 15px;
}
.navbar-top .navbar-form,
.navbar-top .navbar-right,
.navbar-top .navbar-form.flex.ac {
display: flex !important;
align-items: center !important;
margin-top: 0;
margin-bottom: 0;
}
.navbar-top .list-inline {
display: flex;
align-items: center;
margin: 0;
padding: 0;
list-style: none;
}
.navbar-top .list-inline > li {
display: flex;
align-items: center;
margin: 0;
vertical-align: middle;
}
.navbar-top .list-inline.splitters > li + li {
margin-left: 6px;
}
/* --- Logo --- */
.navbar-top .navbar-brand {
display: flex;
align-items: center;
padding: 7px 10px;
line-height: 1;
}
.navbar-logo {
display: inline-flex;
align-items: center;
line-height: 0;
}
.navbar-logo > img {
display: block;
height: 36px;
padding: 0 30px;
width: auto;
max-height: 36px;
}
/* --- Primary menu text/icons --- */
.navbar-top .nav > li > a {
padding-left: 10px;
padding-right: 10px;
border-radius: 4px;
display: inline-flex !important;
align-items: center !important;
overflow: hidden;
line-height: 1.44;
}
.navbar-top .nav > li > a > .menu-item-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
line-height: 1.44;
display: inline-block;
vertical-align: middle;
}
.navbar-top .nav > li > a > .menu-item-icon,
.navbar-top .nav > li > a > i.menu-item-icon,
.navbar-top .nav > li > a > .fa.menu-item-icon,
.navbar-top .nav > li > a > .fas.menu-item-icon {
margin-right: 0.25em !important;
margin-left: 0 !important;
line-height: 1 !important;
position: static !important;
transform: none !important;
top: auto !important;
flex-shrink: 0;
vertical-align: 0 !important;
}
.navbar-top .nav > li > a > .fa-angle-down {
margin-left: 0.2em;
margin-right: 0 !important;
line-height: 1;
flex-shrink: 0;
}
.navbar-nav li a,
.navbar-nav li {
max-height: 50px;
position: relative;
}
/* --- CTA (发布 / 会员): icon + label --- */
.navbar-top .navbar-but .but,
.navbar-top a.navbar-cta.but {
font-size: 0.8em;
padding: 0.3em 1em !important;
margin: 0.4em;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
line-height: 1.44 !important;
vertical-align: middle;
box-sizing: border-box;
gap: 0;
}
.navbar-top .navbar-but .but > i,
.navbar-top a.navbar-cta.but > i,
.navbar-top .navbar-but .but > .fa,
.navbar-top .navbar-but .but > .fas,
.navbar-top a.navbar-cta.but > .fa,
.navbar-top a.navbar-cta.but > .fas {
margin: 0 0.25em 0 0 !important;
line-height: 1 !important;
position: static !important;
transform: none !important;
top: auto !important;
flex-shrink: 0;
vertical-align: 0 !important;
display: inline-block;
}
.navbar-top .navbar-but .but > .navbar-cta-text,
.navbar-top a.navbar-cta.but > .navbar-cta-text {
line-height: 1.44;
display: inline-block;
vertical-align: middle;
white-space: nowrap;
}
/* --- Icon-only .btn chips (user / search) --- */
.navbar-top .list-inline > li > a.btn,
.navbar-top a.btn.signin-loader,
.navbar-top a.btn.nav-search-btn,
.navbar-top a.btn.main-search-btn {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
width: 36px !important;
height: 36px !important;
min-width: 36px !important;
min-height: 36px !important;
max-height: 36px !important;
padding: 0 !important;
gap: 0 !important;
line-height: 1 !important;
border-radius: 4px;
box-sizing: border-box;
vertical-align: middle;
font-size: 16px;
}
.navbar-top .list-inline > li > a.btn > i,
.navbar-top a.btn.signin-loader > i,
.navbar-top a.btn.nav-search-btn > i,
.navbar-top a.btn.main-search-btn > i {
margin: 0 !important;
line-height: 1 !important;
position: static !important;
transform: none !important;
top: auto !important;
left: auto !important;
right: auto !important;
width: 1em;
height: 1em;
display: inline-flex !important;
align-items: center;
justify-content: center;
vertical-align: 0 !important;
}
/* Avatar trigger */
.navbar-top a.navbar-avatar {
display: inline-flex !important;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
padding: 0 !important;
line-height: 0;
}
.navbar-top a.navbar-avatar img,
.navbar-top a.navbar-avatar .avatar {
width: 32px !important;
height: 32px !important;
border-radius: 50%;
display: block;
margin: 0 !important;
}
/* --- Theme toggle (zibll toggle-radius 29px) --- */
.navbar-top a.toggle-theme.toggle-radius,
.navbar-top .toggle-theme.toggle-radius,
.navbar-but-cluster .toggle-theme {
position: relative !important;
width: 29px !important;
height: 29px !important;
min-width: 29px !important;
min-height: 29px !important;
display: inline-block !important;
overflow: hidden !important;
vertical-align: middle;
border-radius: 100% !important;
box-sizing: border-box;
padding: 0 !important;
flex: 0 0 auto;
line-height: 1;
}
.navbar-top a.toggle-theme.toggle-radius > i,
.navbar-top .toggle-theme.toggle-radius > i,
.navbar-top a.toggle-theme.toggle-radius .fa,
.navbar-top a.toggle-theme.toggle-radius .fas {
position: absolute !important;
top: 50% !important;
left: 0 !important;
right: 0 !important;
margin: auto !important;
transform: translateY(-50%) !important;
line-height: 1 !important;
width: 1em !important;
height: 1em !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
text-align: center;
vertical-align: 0 !important;
}
/* Only one glyph visible */
.navbar-top .toggle-theme .theme-icon-sun[style*="display:none"],
.navbar-top .toggle-theme .theme-icon-moon[style*="display:none"] {
display: none !important;
}
/* --- Dropdown circular badges (header-user-href) keep 36px --- */
.navbar-top .header-user-href .toggle-radius,
.navbar-top .badg.toggle-radius {
position: relative !important;
width: 36px !important;
height: 36px !important;
display: inline-block !important;
text-align: center;
vertical-align: middle;
overflow: hidden;
border-radius: 100%;
box-sizing: border-box;
}
.navbar-top .header-user-href .toggle-radius > i,
.navbar-top .header-user-href .toggle-radius .fa,
.navbar-top .header-user-href .toggle-radius .fas,
.navbar-top .badg.toggle-radius > i,
.navbar-top .badg.toggle-radius .fa,
.navbar-top .badg.toggle-radius .fas {
position: absolute !important;
top: 50% !important;
left: 0 !important;
right: 0 !important;
margin: auto !important;
transform: translateY(-50%) !important;
line-height: 1 !important;
width: 1em;
height: 1em;
display: inline-flex !important;
align-items: center;
justify-content: center;
vertical-align: 0 !important;
}
/* --- FA general --- */
.navbar-top .fa,
.navbar-top .fas,
.navbar-top .far,
.navbar-top .fab {
line-height: 1;
transition: 0.2s;
}
.navbar-top .css-icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
display: inline-block;
position: relative;
}
/* Fold / bars but in mid widths */
.navbar-top .show-nav-but .but {
display: inline-flex !important;
align-items: center;
justify-content: center;
line-height: 1;
padding: 0.3em 0.6em !important;
}
.navbar-top .show-nav-but .but > i {
margin: 0 !important;
line-height: 1 !important;
}
/* Direct single-type publish CTA (<a class="newadd-btns ... navbar-cta">) — never line-height:0 */
.navbar-top a.newadd-btns.navbar-cta,
.navbar-top a.navbar-newposts.navbar-cta,
.navbar-top a.payvip-icon.navbar-cta {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
line-height: 1.44 !important;
height: auto !important;
min-height: 0 !important;
max-height: none !important;
white-space: nowrap;
}
.navbar-top a.newadd-btns.navbar-cta > i,
.navbar-top a.navbar-newposts.navbar-cta > i,
.navbar-top a.payvip-icon.navbar-cta > i {
margin: 0 0.25em 0 0 !important;
line-height: 1 !important;
position: static !important;
transform: none !important;
flex-shrink: 0;
}
.navbar-top a.newadd-btns.navbar-cta > .navbar-cta-text,
.navbar-top a.navbar-newposts.navbar-cta > .navbar-cta-text,
.navbar-top a.payvip-icon.navbar-cta > .navbar-cta-text {
line-height: 1.44 !important;
display: inline-block;
vertical-align: middle;
}
+34 -14
View File
@@ -144,7 +144,8 @@
.navbar-but-cluster .navbar-but .newadd-btns.hover-show,
.navbar-but-cluster .newadd-btns.hover-show,
.newadd-btns.hover-show {
span.newadd-btns.hover-show,
div.newadd-btns.hover-show {
position: relative !important;
display: block !important;
width: fit-content !important;
@@ -611,35 +612,47 @@ body.theme-dark body > .drop-newadd .newadd-btns__item {
color: #fff;
}
/* Theme toggle */
/* Theme toggle — zibll toggle-radius (29px) + absolute FA center, not flex+translate(-50%) */
.navbar-but-cluster .theme-toggle-desktop,
.navbar-but-cluster .toggle-theme {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
.navbar-but-cluster .toggle-theme,
.navbar-top .toggle-theme.toggle-radius {
display: inline-block;
align-items: unset;
justify-content: unset;
width: 29px;
height: 29px;
padding: 0;
border-radius: 999px;
border-radius: 100%;
flex: 0 0 auto;
position: relative;
overflow: hidden;
vertical-align: middle;
box-sizing: border-box;
}
.navbar-but-cluster .theme-toggle-desktop > i,
.navbar-but-cluster .toggle-theme > i {
.navbar-but-cluster .toggle-theme > i,
.navbar-top .toggle-theme.toggle-radius > i {
margin: 0 !important;
line-height: 1;
line-height: 1 !important;
position: absolute;
left: 50%;
left: 0 !important;
right: 0 !important;
top: 50%;
transform: translate(-50%, -50%);
transform: translateY(-50%);
width: 1em;
height: 1em;
text-align: center;
display: inline-flex;
align-items: center;
justify-content: center;
}
.theme-toggle-desktop,
.theme-toggle-mobile,
.toggle-theme {
position: relative;
overflow: hidden;
}
.theme-toggle-desktop .theme-icon-moon,
@@ -649,11 +662,18 @@ body.theme-dark body > .drop-newadd .newadd-btns__item {
.toggle-theme .theme-icon-moon,
.toggle-theme .theme-icon-sun {
margin: 0 !important;
line-height: 1;
line-height: 1 !important;
width: 1em;
height: 1em;
text-align: center;
}
/* Hide inactive sun/moon without leaving layout shift */
.toggle-theme .theme-icon-sun[style*="display:none"],
.toggle-theme .theme-icon-moon[style*="display:none"] {
display: none !important;
}
/* float commerce */
.float-btn-shop-cart {
position: relative;
+44 -1
View File
@@ -296,6 +296,11 @@ badge.top,
font-size: 0.8em;
padding: 0.3em 1em !important;
margin: 0.4em;
display: inline-flex !important;
align-items: center;
justify-content: center;
line-height: 1.44;
vertical-align: middle;
}
.navbar-top .navbar-but .but.hover-show {
@@ -304,11 +309,22 @@ badge.top,
.navbar-top .navbar-brand {
padding: 7px 10px;
display: flex;
align-items: center;
line-height: 1;
}
.navbar-logo {
display: inline-flex;
align-items: center;
line-height: 0;
}
.navbar-logo > img {
height: 36px;
padding: 0 30px;
display: block;
vertical-align: middle;
}
.navbar-top .nav > li > a {
@@ -318,12 +334,16 @@ badge.top,
display: inline-flex !important;
overflow: hidden;
align-items: center;
line-height: 1.44;
}
.navbar-top .nav > li > a > .menu-item-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
line-height: 1.44;
display: inline-block;
vertical-align: middle;
}
.menu-item > a > .but {
@@ -338,8 +358,31 @@ badge.top,
color: var(--focus-color);
}
.navbar-top .fa {
.navbar-top .fa,
.navbar-top .fas,
.navbar-top .far,
.navbar-top .fab {
transition: 0.2s;
line-height: 1;
}
/* Override AKSRT .btn chrome when used as pure icon hit-targets in the bar */
.navbar-top a.btn.signin-loader,
.navbar-top a.btn.nav-search-btn,
.navbar-top a.btn.main-search-btn {
height: 36px !important;
width: 36px !important;
min-height: 36px !important;
padding: 0 !important;
gap: 0 !important;
line-height: 1 !important;
border-radius: 4px;
font-size: 16px;
}
.navbar-top .navbar-form {
display: flex;
align-items: center;
}
.navbar-collapse .search-input {
+103
View File
@@ -242,6 +242,109 @@ body.mobile-navbar-show { overflow: hidden; }
justify-content: center;
width: 36px;
height: 36px;
padding: 0 !important;
line-height: 1;
gap: 0;
vertical-align: middle;
}
/* Icon-only nav chips: neutralize .btn padding/height so FA sits dead-center */
.navbar-top .list-inline > li > a.btn > i,
.navbar-top .list-inline > li > a.btn > .fa,
.navbar-top .list-inline > li > a.btn > .fas,
.navbar-top .list-inline > li > a.btn > .far,
.navbar-top a.btn.nav-search-btn > i,
.navbar-top a.btn.main-search-btn > i,
.navbar-top a.btn.signin-loader > i {
margin: 0 !important;
line-height: 1 !important;
width: 1em;
height: 1em;
display: inline-flex;
align-items: center;
justify-content: center;
vertical-align: 0;
position: relative;
top: 0;
transform: none;
}
/* Navbar CTA: icon + text baseline (zibll .navbar-but .but) */
.navbar-top .navbar-but .but,
.navbar-top a.navbar-cta.but {
display: inline-flex !important;
align-items: center;
justify-content: center;
line-height: 1;
vertical-align: middle;
}
.navbar-top .navbar-but .but > i,
.navbar-top a.navbar-cta.but > i {
margin: 0 0.25em 0 0 !important;
line-height: 1 !important;
position: relative;
top: 0;
transform: none;
vertical-align: 0;
}
.navbar-top .navbar-but .but > i:last-child,
.navbar-top a.navbar-cta.but > i:only-child {
margin-right: 0 !important;
}
/* Theme toggle in navbar-form (not only cluster) */
.navbar-top .navbar-form .toggle-theme.toggle-radius,
.navbar-top a.toggle-theme.toggle-radius {
display: inline-block;
width: 29px;
height: 29px;
overflow: hidden;
vertical-align: middle;
flex-shrink: 0;
}
.navbar-top .navbar-form .toggle-theme.toggle-radius > i,
.navbar-top a.toggle-theme.toggle-radius > i {
position: absolute;
top: 50%;
left: 0;
right: 0;
margin: auto;
transform: translateY(-50%);
line-height: 1;
}
/* Menu item title + icon baseline (when menu is assigned) */
.navbar-top .nav > li > a {
display: inline-flex !important;
align-items: center;
line-height: 1.44;
}
.navbar-top .nav > li > a > .menu-item-icon,
.navbar-top .nav > li > a > i.menu-item-icon,
.navbar-top .nav > li > a > .fa.menu-item-icon {
margin-right: 0.25em;
line-height: 1;
flex-shrink: 0;
position: relative;
top: 0;
transform: none;
vertical-align: 0;
}
.navbar-top .nav > li > a > .menu-item-title {
line-height: 1.44;
display: inline-block;
vertical-align: middle;
}
/* FA in header: kill common FA vertical drift vs flex centers */
.navbar-top .fa,
.navbar-top .fas,
.navbar-top .far,
.navbar-top .fab {
line-height: 1;
vertical-align: -0.05em;
}
.navbar-top .css-icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
display: inline-block;
position: relative;
}
/* Sub-user-box width */
.navbar-top .navbar-right .sub-menu {
+3 -2
View File
@@ -142,11 +142,12 @@ if (!function_exists('aksrt_normalize_header_cta_label')) :
$label = preg_replace('/<i\s+class=(["\'])(?!fas\b|far\b|fab\b)/', '<i class=$1fas ', $label) ?? $label;
if (stripos($label, '<i') === false) {
$label = '<i class="' . esc_attr($fallback_icon) . '" aria-hidden="true"></i> <span class="navbar-cta-text">' . esc_html(wp_strip_all_tags($label)) . '</span>';
// No space between icon and label — spacing via CSS margin (zibll .but > .fa).
$label = '<i class="' . esc_attr($fallback_icon) . '" aria-hidden="true"></i><span class="navbar-cta-text">' . esc_html(wp_strip_all_tags($label)) . '</span>';
} else {
$label = preg_replace(
'/(<\/i>)\s*([^<].*)$/u',
'$1 <span class="navbar-cta-text">$2</span>',
'$1<span class="navbar-cta-text">$2</span>',
$label
) ?? $label;
}
+26 -2
View File
@@ -50,9 +50,21 @@ trait ScriptsPart1b {
);
$core_dep = 'aksrt-core-bundle';
} else {
wp_enqueue_style('aksrt-tokens', $base_uri . '/assets/css/core/tokens.css', ['aksrt-style'], $version);
$tokens_path = get_template_directory() . '/assets/css/core/tokens.css';
wp_enqueue_style(
'aksrt-tokens',
$base_uri . '/assets/css/core/tokens.css',
['aksrt-style'],
file_exists($tokens_path) ? (string) filemtime($tokens_path) : $version
);
foreach (['reset', 'typography', 'buttons', 'forms', 'alerts'] as $slug) {
wp_enqueue_style('aksrt-core-' . $slug, $base_uri . '/assets/css/core/' . $slug . '.css', ['aksrt-tokens'], $version);
$core_path = get_template_directory() . '/assets/css/core/' . $slug . '.css';
wp_enqueue_style(
'aksrt-core-' . $slug,
$base_uri . '/assets/css/core/' . $slug . '.css',
['aksrt-tokens'],
file_exists($core_path) ? (string) filemtime($core_path) : $version
);
}
$core_dep = 'aksrt-tokens';
}
@@ -162,6 +174,18 @@ trait ScriptsPart1b {
);
}
// Final nav alignment overrides AFTER header-menu-buttons (zibll text/icon baseline).
// Re-enqueue shell nav.css last so inline critical rules win the cascade.
$nav_css = get_template_directory() . '/assets/css/frontend/nav.css';
if (file_exists($nav_css)) {
wp_enqueue_style(
'aksrt-nav-align',
$base_uri . '/assets/css/frontend/nav.css',
['aksrt-header-menu-buttons'],
(string) filemtime($nav_css)
);
}
$inline_search_js = get_template_directory() . '/assets/js/header-inline-search.js';
if (file_exists($inline_search_js)) {