diff --git a/assets/css/routes/sign.css b/assets/css/routes/sign.css index ee51c7f9..5bfd96eb 100644 --- a/assets/css/routes/sign.css +++ b/assets/css/routes/sign.css @@ -38,6 +38,8 @@ object-fit: cover; } +/* The shared sheet leaves the modal close button in normal flow, so it would + * push the card content down. */ #u_sign .sign > .close { position: absolute; top: 10px; @@ -46,6 +48,12 @@ font-size: 18px; } +/* .fa sets display:inline-block, which outranks the UA [hidden] rule, so every + * hidden glyph (spinner, password eye) stayed visible without this. */ +.sign [hidden] { + display: none !important; +} + body.auth-modal-open { overflow: hidden; } @@ -90,6 +98,7 @@ body.auth-modal-open { z-index: 2; } +/* ---- card internals ---- */ .sign .sign-passw { border: 0; background: none; @@ -124,25 +133,10 @@ body.auth-modal-open { color: #ff5473; } -@media (max-width: 991px) { - #u_sign .modal-dialog, - #u_sign.has-sign-img .modal-dialog { - width: auto; - margin: 30px; - } -} - -@media (max-width: 767px) { - .sign-page { - padding-top: 20px; - } - - .sign-row { - min-height: calc(100vh - 110px); - } - - .sign-page .sign { - width: 340px; - max-width: 100%; +/* Between the 992px split and the 640px collapse the shared sheet still offsets + * the card by 55%, but the dialog has already shrunk — give the card the room. */ +@media (max-width: 991px) and (min-width: 641px) { + #u_sign .sign-img + .sign { + margin-left: 45%; } } diff --git a/inc/helpers/homepage/header-components.php b/inc/helpers/homepage/header-components.php index a59e85c6..8d309556 100644 --- a/inc/helpers/homepage/header-components.php +++ b/inc/helpers/homepage/header-components.php @@ -53,6 +53,12 @@ if (!function_exists('jio_header_slide_current_page_type')) { * opt out entirely, like the excluded templates. */ function jio_header_slide_current_page_type(): string { + // The /sign/ route is `index.php?jio_sign=1`, which WordPress reports as + // home — the auth surface must never inherit the home component scope. + // (Pages using the sign template are already excluded further down.) + if ((string) get_query_var('jio_sign') !== '') { + return ''; + } if ((string) get_query_var('jio_go_redirect') !== '') { return ''; } diff --git a/templates/parts/auth-content.php b/templates/parts/auth-content.php index 2689a674..9efe71cc 100644 --- a/templates/parts/auth-content.php +++ b/templates/parts/auth-content.php @@ -63,14 +63,16 @@ $oauth_bind_pass = $oauth_intent === 'bind' : ''; $initial_tab = $auth_tab; -if ($initial_tab === 'signin' && $close_signin && $registration_open) { - $initial_tab = 'signup'; +if ($initial_tab === 'signin' && $close_signin) { + // Account login is off: land on registration when it is open, otherwise on + // the social/QR pane so the modal never opens on an empty sign-in panel. + $initial_tab = $registration_open ? 'signup' : ($wechat_qr ? 'oauth' : 'signin'); } if ($initial_tab === 'signup' && !$registration_open) { $initial_tab = 'signin'; } if ($initial_tab === 'oauth' && !$wechat_qr) { - $initial_tab = 'signin'; + $initial_tab = $close_signin && $registration_open ? 'signup' : 'signin'; } if ($initial_tab === 'bind' && !$is_oauth_bind) { $initial_tab = 'signin'; @@ -81,7 +83,7 @@ $show_pas = !$passwordless || $passwordless_mode !== 'only_nopas'; $nopas_active = $show_nopas && $passwordless_mode !== 'pas'; $signin_user_hint = ($passwordless || $signin_phone) ? __('用户名/手机号/邮箱', 'jio') : __('用户名或邮箱', 'jio'); $social_html = ''; -if (!$is_oauth_bind && !$close_signin && !empty($oauth_providers) && class_exists('\Jio\Auth\OAuth')) { +if (!$is_oauth_bind && !empty($oauth_providers) && class_exists('\Jio\Auth\OAuth')) { $social_html = \Jio\Auth\OAuth::get_instance()->render_social_buttons(__('社交账号登录', 'jio')); } $ref_tooltip = $ref_hint !== '' ? wp_strip_all_tags($ref_hint) : ''; @@ -96,7 +98,24 @@ $invite_tooltip = ($invite_mode === 'optional' && $invite_hint !== '') ? wp_stri
