feat(auth): rebuild the sign-in surfaces on the shared sign-card contract

The login/register page and the auth modal had drifted into a parallel
system: floating-input fields, a sign-page-card shell and a bespoke
jio-auth-modal wrapper that none of the theme's own sign CSS targeted.
The reference card rules (.sign, .sign-img, .sign-content, .line-form-input,
.scale-placeholder, .social_loginbar, .title-h-left, #u_sign .modal-dialog,
.qrcode-signin-container) have been in main.css all along, so the fix is to
render the reference DOM instead of re-styling a second one.

auth-content.php now emits one .sign.jio-panel.blur-bg.relative card with a
.tab-content of #tab-sign-in / #tab-sign-up / #tab-resetpassword /
#tab-qrcode-signin / #tab-bind panes. Each pane opens with a
.title-h-left.fa-2x heading plus a .muted-color.px12 link, fields are
.relative.line-form.mb10 > .line-form-input + .scale-placeholder +
.line-form-line, the verification trigger is the .yztx.abs-right captchsubmit
button, and submits are .but.radius.jb-blue|jb-green.padding-lg.btn-block.
Social entries come from the shared render_social_buttons() separator +
.social_loginbar, and the OAuth bind pane uses the oauth-data-box avatar card.

The modal shell is #u_sign.modal > .modal-dialog > .sign-content >
.sign-img.absolute.hide-sm + .sign, and the page shell is the reference
.container.sign-page > .row.sign-row.gutters-5 > .col-md-6(.col-md-offset-6/
.col-md-offset-3).sign-col with a .fixed.lazyload background and a blurred
fixed footer. auth.js drives .in instead of .is-open, toggles the new
password/signin-mode/invite-gate controls and no longer touches the retired
markup. The page also drops two footer-hook removals that targeted functions
which no longer exist, and opts out of the fixed-nav offset.

The sign page's custom theme setting now actually applies: Router answers
jio_forced_theme_mode, jioData.themeForced wins over the stored cookie in
theme.js, theme-toggle positions are suppressed, and the page marks html/body
dark or white accordingly.

sign.css shrinks from ~114 lines of bespoke component styling to a thin
positioning layer, and the retired classes are gone rather than kept.

Verification: php -l on every changed PHP file, node --check on both JS files,
node --test across widget-system, navigation and front-submit (873 passing),
and tools/audit-psr4-paths.php / audit-admin-contracts.php both at 0 errors.
assets/js/runtime/main.min.js was rebuilt because theme.js gained the forced
theme branch.
This commit is contained in:
kate522 committed 2026-11-04 16:04:24 +08:00
1 parent d40906b4a3
commit 41366e7fc4
15 files changed
+664 -281

No files matched your search

+136 -102
View File
@@ -1,114 +1,148 @@
/* Shared authentication contract: modal and /sign/. */
.sign {
max-width: 330px;
margin: auto;
padding: 30px 0;
color: var(--main-color, #4e5358);
/* Authentication surfaces: modal (#u_sign) and the /sign/ page.
*
* Card, line inputs, tab panes, social bar and title rules come from the shared
* theme stylesheet; this file only positions the shells around them.
*/
#u_sign.jio-auth-modal {
z-index: 100050;
}
.sign [hidden] { display: none !important; }
.sign button { font: inherit; }
.sign-logo { margin-bottom: 24px; text-align: center; }
.sign-logo img { max-width: 180px; max-height: 70px; }
.sign-logo .sign-logo-dark { display: none; }
.dark-theme .sign-logo .sign-logo-light { display: none; }
.dark-theme .sign-logo .sign-logo-dark { display: inline-block; }
.sign-logo__text { font-size: 22px; font-weight: 700; color: inherit; }
.sign-panel { animation: auth-panel-in .24s ease both; }
@keyframes auth-panel-in {
from { opacity: 0; transform: translateY(5px); }
to { opacity: 1; transform: none; }
#u_sign.jio-auth-modal.in {
display: block;
overflow-x: hidden;
overflow-y: auto;
background: rgba(0, 0, 0, 0.4);
}
.sign-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 23px; }
.sign-header h2 { margin: 0; font-size: 22px; line-height: 1.4; color: var(--key-color, #333); }
.sign-header span { font-size: 12px; color: var(--muted-2-color, #999); }
.sign-header button,
.sign-options button,
.sign-mode-switch { padding: 0; border: 0; background: none; color: var(--focus-color, #f04494); cursor: pointer; }
.sign-form { display: grid; gap: 17px; }
#u_sign.jio-auth-modal .modal-dialog {
opacity: 0;
transform: translateY(-12px);
transition: opacity 0.2s ease, transform 0.25s ease;
}
.floating-input { position: relative; min-height: 42px; border-bottom: 1px solid var(--main-border-color, rgba(50, 50, 50, .12)); }
.floating-input::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--focus-color, #f04494); transform: scaleX(0); transition: transform .25s; }
.floating-input:focus-within::after { transform: scaleX(1); }
.floating-input input { width: 100%; height: 42px; padding: 13px 4px 2px; border: 0; outline: 0; background: transparent; color: inherit; font-size: 14px; box-shadow: none !important; }
.floating-input label { position: absolute; top: 12px; left: 4px; color: var(--muted-color, #777); font-size: 14px; font-weight: 400; pointer-events: none; transition: all .18s; }
.floating-input input:focus + label,
.floating-input input:not(:placeholder-shown) + label,
.floating-input.is-filled label { top: 0; font-size: 10px; color: var(--focus-color, #f04494); }
.floating-input.has-action input { padding-right: 94px; }
.floating-input .password-show,
.floating-input .send-code { position: absolute; right: 0; bottom: 6px; z-index: 2; border: 0; background: none; color: var(--muted-2-color, #999); cursor: pointer; }
.floating-input .send-code { color: var(--focus-color, #f04494); font-size: 12px; }
.floating-input .send-code:disabled { color: var(--muted-2-color, #999); cursor: default; }
#u_sign.jio-auth-modal.in .modal-dialog {
opacity: 1;
transform: none;
}
.sign-options { display: flex; align-items: center; justify-content: space-between; color: var(--muted-2-color, #999); font-size: 12px; }
.sign-options label { margin: 0; font-weight: 400; }
.sign-submit { width: 100%; min-height: 42px; padding: 10px 16px; border: 0; border-radius: 5px; color: #fff; cursor: pointer; transition: opacity .2s, transform .2s; }
.sign-submit:hover { opacity: .88; transform: translateY(-1px); }
.sign-submit:disabled { opacity: .55; cursor: wait; transform: none; }
.sign-submit.jb-blue { background: linear-gradient(135deg, #59c3ff, #2b70ff); }
.sign-submit.jb-green { background: linear-gradient(135deg, #50e3a4, #16a085); }
.sign-mode-switch { justify-self: center; font-size: 12px; }
.sign-notice { margin-bottom: 16px; padding: 10px 12px; border-radius: 5px; background: rgba(255, 86, 86, .08); color: #e55353; font-size: 12px; }
.sign-hint { margin-top: -10px; color: var(--muted-2-color, #999); font-size: 11px; }
.sign-agreement { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--muted-2-color, #999); font-size: 11px; font-weight: 400; }
.sign-agreement a { color: var(--focus-color, #f04494); }
.sign-agreement-implicit { justify-content: center; text-align: center; }
#u_sign .sign-img {
inset: 0;
overflow: hidden;
}
.social-login { margin-top: 24px; text-align: center; }
.social-login > span { display: flex; align-items: center; gap: 10px; color: var(--muted-2-color, #999); font-size: 11px; }
.social-login > span::before,
.social-login > span::after { content: ""; flex: 1; height: 1px; background: var(--main-border-color, rgba(50, 50, 50, .08)); }
.social-login-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 13px; margin-top: 14px; }
.social-login-item { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50px; background: var(--body-bg-color, #f5f6f7); color: #fff; text-decoration: none; cursor: pointer; }
.social-login-item:hover { transform: translateY(-2px); color: var(--focus-color, #f04494); }
.oauth-button-lg .social-login-item { width: auto; padding: 0 14px; }
.oauth-button-lg .social-login-item i,
.oauth-button-lg .social-login-item svg { margin-right: 6px; font-size: 1.2em; }
.social-login-item.weibo { background: #ea5d5c; }
.social-login-item.weixingzh,
.social-login-item.weixin { background: #24b76a; }
.social-login-item.qq { background: #1296db; }
.social-login-item.github { background: #505050; }
.social-login-item.gitee { background: #c2292f; }
.social-login-item.google { background: var(--main-shadow, rgba(116, 116, 116, .08)); color: var(--main-color, #4e5358); }
.auth-qrcode { display: grid; place-items: center; width: 180px; min-height: 180px; margin: 20px auto; background: #fff; color: #38b766; text-align: center; }
.auth-qrcode [data-auth-qr-content] { display: grid; place-items: center; width: 100%; min-height: 180px; }
.auth-qrcode i { font-size: 46px; }
.auth-qrcode span { color: #777; font-size: 12px; }
#u_sign .sign-img img {
display: block;
width: 100%;
height: 100%;
border-radius: var(--main-radius);
object-fit: cover;
}
.jio-auth-modal { position: fixed; inset: 0; z-index: 100050; display: none; place-items: center; padding: 18px; }
.jio-auth-modal.is-open { display: grid; }
.auth-modal-backdrop { position: absolute; inset: 0; background: rgba(14, 18, 24, .62); backdrop-filter: blur(2px); }
#u_sign .modal-dialog { position: relative; z-index: 1; width: 400px; max-width: calc(100vw - 30px); margin: 0; }
#u_sign.has-sign-img .modal-dialog { width: 800px; }
#u_sign .modal-content { position: relative; min-height: 300px; max-height: calc(100vh - 36px); overflow-x: hidden; overflow-y: auto; border: 0; border-radius: 8px; background: var(--main-bg-color, #fff); box-shadow: 0 12px 50px rgba(0, 0, 0, .22); }
.auth-modal-close { position: absolute; top: 13px; right: 15px; z-index: 4; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .04); color: var(--muted-color, #777); cursor: pointer; }
#u_sign .sign-img { position: absolute; inset: 0 45% 0 0; overflow: hidden; padding: 0; }
#u_sign .sign-img img { display: block; width: 100%; height: 100%; border-radius: 8px 0 0 8px; object-fit: cover; }
#u_sign .sign-img + .sign { max-width: unset; margin-left: 55%; padding: 34px 44px; }
#u_sign .sign > .close {
position: absolute;
top: 10px;
right: 15px;
z-index: 3;
font-size: 18px;
}
.page-template-user-sign { min-height: 100vh; background: var(--body-bg-color, #f5f6f7); }
.sign-page-background { position: fixed; inset: 0; z-index: 0; background-position: center; background-size: cover; }
.sign-topbar { position: fixed; top: 0; right: 0; left: 0; z-index: 3; display: flex; justify-content: space-between; padding: 15px 24px; background: rgba(255, 255, 255, .75); backdrop-filter: blur(12px); }
.sign-page { position: relative; z-index: 1; display: flex; align-items: center; min-height: 100vh; padding: 76px max(5vw, 20px) 56px; }
.sign-page.sign-card-position-left { justify-content: flex-start; }
.sign-page.sign-card-position-center { justify-content: center; }
.sign-page.sign-card-position-right { justify-content: flex-end; }
.sign-page-card { width: 400px; max-width: 100%; padding: 0 35px; border-radius: 8px; background: var(--main-bg-color, #fff); box-shadow: 0 10px 40px rgba(0, 0, 0, .12); }
.sign-page-footer { position: fixed; right: 0; bottom: 12px; left: 0; z-index: 2; text-align: center; color: var(--muted-2-color, #999); font-size: 12px; }
.white-theme { --main-bg-color: #fff; --body-bg-color: #f5f6f7; --main-color: #4e5358; --key-color: #333; }
.dark-theme { --main-bg-color: #24272b; --body-bg-color: #17191c; --main-color: #d7d9dc; --key-color: #fff; --main-border-color: rgba(255, 255, 255, .12); }
body.auth-modal-open { overflow: hidden; }
body.auth-modal-open {
overflow: hidden;
}
/* ---- /sign/ page shell ---- */
.page-template-user-sign {
min-height: 500px;
}
.page-template-user-sign > .fixed {
z-index: 0;
}
.sign-page {
position: relative;
z-index: 1;
min-height: 500px;
padding-top: 70px;
padding-bottom: 60px;
}
.sign-row {
min-height: calc(100vh - 130px);
display: flex;
flex-wrap: wrap;
}
.sign-page .sign {
width: 350px;
}
.sign-col {
display: flex;
justify-content: center;
align-items: center;
}
.sign-page-footer {
top: auto;
height: auto;
padding: 10px;
z-index: 2;
}
.sign .sign-passw {
border: 0;
background: none;
padding: 0;
line-height: 1;
cursor: pointer;
}
.sign .oauth-data-box .muted-box {
margin-bottom: 10px;
}
.sign .oauth-data-box .avatar-img {
--this-size: 60px;
}
.sign [data-auth-qr-content] {
display: grid;
place-items: center;
min-height: 180px;
}
.sign .qrcode-signin-container button[data-auth-refresh-qr] {
border: 0;
background: none;
padding: 10px;
color: var(--focus-color);
cursor: pointer;
}
.sign [data-invite-feedback].is-error {
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) {
#u_sign .modal-dialog,
#u_sign.has-sign-img .modal-dialog { width: 400px; }
#u_sign .sign-img { display: none; }
#u_sign .sign-img + .sign { max-width: 340px; margin-left: auto; padding: 30px 0; }
#u_sign .modal-content { padding: 0 24px; }
.sign-page { justify-content: center !important; padding-right: 14px; padding-left: 14px; }
.sign-page-card { padding: 0 24px; }
.sign-page {
padding-top: 20px;
}
.sign-row {
min-height: calc(100vh - 110px);
}
.sign-page .sign {
width: 340px;
max-width: 100%;
}
}