diff --git a/assets/css/frontend/header-userbox.css b/assets/css/frontend/header-userbox.css index 938d4c0d..b3a686e4 100644 --- a/assets/css/frontend/header-userbox.css +++ b/assets/css/frontend/header-userbox.css @@ -5,6 +5,130 @@ * owns AKSRT-specific account content such as check-in, wallet and VIP rows. */ +/* The desktop action cluster owns one horizontal alignment context. */ +.navbar-top .aksrt-navbar-actions { + display: flex; + align-items: center; + gap: 10px; + min-height: 50px; + margin-top: 0; + margin-bottom: 0; + padding: 0; +} + +.navbar-top .aksrt-navbar-actions > *, +.navbar-top .aksrt-navbar-account, +.navbar-top .aksrt-navbar-account > li { + display: inline-flex; + align-items: center; + flex: 0 0 auto; +} + +.navbar-top .aksrt-navbar-account { + gap: 4px; + min-height: 50px; + margin: 0; +} + +.navbar-top .aksrt-navbar-account.navbar-text { + float: none; +} + +.navbar-top .aksrt-navbar-actions .navbar-cta { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 4px; + min-height: 29px; + margin: 0; + padding: .3em 1em !important; + border-radius: var(--radius-btn, 4px); + font-size: .8em; + line-height: 1.44; +} + +.navbar-top .aksrt-navbar-actions .navbar-cta.radius { + border-radius: 50px; +} + +.navbar-top .aksrt-nav-icon, +.navbar-top .aksrt-nav-avatar { + display: inline-flex !important; + align-items: center; + justify-content: center; + width: 34px; + height: 34px; + padding: 0 !important; + overflow: visible !important; + border: 0 !important; + border-radius: 0; + background: transparent !important; + box-shadow: none !important; +} + +.navbar-top .aksrt-nav-icon .icon { + width: 1.2em; + height: 1.2em; +} + +.navbar-top .aksrt-nav-avatar { + margin-top: 0; +} + +.navbar-top .aksrt-nav-avatar .avatar { + display: block; + width: 29px; + height: 29px; + border-radius: 50%; + object-fit: cover; +} + +.navbar-top .aksrt-navbar-actions .toggle-radius { + flex: 0 0 29px; + margin: 0; + vertical-align: middle; +} + +.navbar-top .aksrt-navbar-language { + margin: 0; +} + +/* The full search surface must sit above a fixed header (z-index: 999). */ +.navbar-search { + z-index: 1001; + height: 100%; + overflow: hidden; +} + +.navbar-search > .container { + position: relative; + height: 100%; + max-height: 100%; + padding-bottom: 76px; + overflow-y: auto; +} + +.navbar-search .search-close-box { + position: fixed; + right: max(30px, calc((100vw - var(--container, 1200px)) / 2 + 30px)); + bottom: 24px; + z-index: 2; + width: auto; + max-width: none; + margin: 0; +} + +.navbar-search .search-close-box > .but { + float: none; +} + +@media (max-width: 767.98px) { + .navbar-search .search-close-box { + right: 15px; + bottom: calc(15px + env(safe-area-inset-bottom, 0px)); + } +} + .aksrt-header-userbox { width: 260px; color: var(--color-ink-2); diff --git a/inc/helpers/header/aksrt-header-menu-search.php b/inc/helpers/header/aksrt-header-menu-search.php index 658d41ff..5bc26c74 100644 --- a/inc/helpers/header/aksrt-header-menu-search.php +++ b/inc/helpers/header/aksrt-header-menu-search.php @@ -103,9 +103,9 @@ if (!function_exists('aksrt_footer_navbar_search')) : echo '
'; } endif; diff --git a/inc/helpers/header/aksrt-header-navbar.php b/inc/helpers/header/aksrt-header-navbar.php index eb96b295..0f550efc 100644 --- a/inc/helpers/header/aksrt-header-navbar.php +++ b/inc/helpers/header/aksrt-header-navbar.php @@ -197,14 +197,10 @@ if (!function_exists('aksrt_header_user_box_html')) : } if (!empty($ctx['can_publish'])) { - $pub_text = (string) ($ctx['settings']['nav_user_newposts_btn_text'] ?? ''); - if ($pub_text === '') { - $pub_text = __('发布内容', 'aksrt'); - } $pub_url = (string) $ctx['publish_url']; $href .= ''; $href .= '