fix(runtime): 按参考主题硬切换为 loader/main/auto_fun 单一 DOM 生命周期

- 删除 AksrtFrontend registry/rehydrate 双路架构及 build/public.js 拼包入口,
  前台唯一初始路径为 PHP 本地栈(jQuery 1.9.1 → Bootstrap 3.4.1)
  → loader_js(_win/aksrtData 唯一注入)→ tbquire(['main']) → runtime/main.min.js
- window.auto_fun = debounce(z_auto_fun, 100) 为唯一重扫入口;所有模块改为
  执行一次 + off/on('auto_fun.aksrt-*') 命名空间重扫,data/class 标记幂等
- 局部更新协议统一:HTML 注入 → post_ajax.ed → auto_fun();
  远程 modal → loaded.bs.modal → auto_fun();JSON 成功 → zib_ajax.success
- 灯箱恢复 Miniimgbox/imgbox 唯一 owner(imgbox-container、a[data-imgbox]、
  imgbox_data),删除 AksrtLightbox/data-aksrt-lightbox 第二实现及 CSS/overlay,
  _win.imgbox* 重新接上 post-display 设置
- 死代码清理:runtime 下 11 组被自有实现替代的旧模块副本、无消费 vendored 库、
  顶层 grade.min.js、revenue.js、无调用方的 aksrt_get_win_runtime_config(),
  以及 loader 中 16 条死 mapping
- PHP 入队改为本地栈 + loader_js,routed/widget/submit 依赖统一换绑;
  用户卡片发布按钮恢复 nav_user_newposts_btn 设置门控
- 测试对齐:新增 frontend-lifecycle-contract,重写 navigation/lazyload/toast/
  auth-source/comment/page-display/post-visual 等断言为目标架构契约

验证:node --test widget-system+navigation 223 通过 0 失败;
构建脚本重建 main/imgbox min 与 CSS bundles;改动 PHP php -l、JS node --check
全部通过;git diff --check 干净;credits 重入 harness 通过。
This commit is contained in:
2026-09-03 12:44:31 +08:00
parent 1cd81fb61a
commit 5fd7c212ed
124 changed files with 2128 additions and 17328 deletions
File diff suppressed because one or more lines are too long
+1 -8
View File
File diff suppressed because one or more lines are too long
+2 -251
View File
@@ -234,257 +234,8 @@ body.aksrt-body-scroll .aksrt-show-on-scroll {
transition: opacity 0.3s, visibility 0.3s;
}
/* ============================================================
* 5. 图片灯箱
* ============================================================ */
[data-aksrt-lightbox="1"] img:not(.no-imgbox):not(.no-lightbox),
.aksrt-lightbox-trigger img:not(.no-imgbox):not(.no-lightbox),
.imgbox-container img:not(.no-imgbox):not(.no-lightbox),
.comment-content .box-img {
/* 可缩放图片的光标 */
.aksrt-cursor-zoom-in {
cursor: zoom-in;
}
.aksrt-lightbox {
--imgbox-origin-left: 50vw;
--imgbox-origin-top: 50vh;
position: fixed;
inset: 0;
z-index: 100000;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.88);
opacity: 0;
visibility: hidden;
transition: opacity 0.25s ease, visibility 0.25s ease;
}
.aksrt-lightbox.is-open {
opacity: 1;
visibility: visible;
}
.aksrt-lightbox__stage {
position: absolute;
inset: 64px 72px 82px;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.aksrt-lightbox__img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain;
transform: scale(1);
transform-origin: center;
transition: transform 0.25s ease, opacity 0.2s ease;
cursor: zoom-in;
user-select: none;
-webkit-user-drag: none;
}
.aksrt-lightbox.from-origin.is-open .aksrt-lightbox__img {
animation: aksrt-lightbox-enter 0.3s ease both;
}
.aksrt-lightbox.is-zoomed .aksrt-lightbox__img {
cursor: zoom-out;
}
.aksrt-lightbox__toolbar {
position: absolute;
z-index: 3;
top: 14px;
right: 14px;
display: flex;
align-items: center;
gap: 8px;
}
.aksrt-lightbox__tool,
.aksrt-lightbox__nav {
border: 0;
background: rgba(255, 255, 255, 0.14);
color: #fff;
box-shadow: none;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.2s ease;
}
.aksrt-lightbox__tool {
display: inline-flex;
align-items: center;
justify-content: center;
width: 38px;
height: 38px;
padding: 0;
border-radius: 999px;
font-size: 16px;
}
.aksrt-lightbox__tool:hover,
.aksrt-lightbox__tool:focus-visible,
.aksrt-lightbox__nav:hover,
.aksrt-lightbox__nav:focus-visible {
background: rgba(255, 255, 255, 0.28);
color: #fff;
}
.aksrt-lightbox__tool:focus-visible,
.aksrt-lightbox__nav:focus-visible,
.aksrt-lightbox__thumb:focus-visible {
outline: 2px solid #fff;
outline-offset: 2px;
}
.aksrt-lightbox__counter {
min-width: 48px;
color: rgba(255, 255, 255, 0.84);
font-size: 14px;
text-align: center;
}
.aksrt-lightbox__nav {
position: absolute;
z-index: 2;
top: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
border-radius: 999px;
font-size: 22px;
transform: translateY(-50%);
}
.aksrt-lightbox__nav--prev {
left: 16px;
}
.aksrt-lightbox__nav--next {
right: 16px;
}
.aksrt-lightbox__caption {
position: absolute;
z-index: 2;
right: 20px;
bottom: 18px;
left: 20px;
color: rgba(255, 255, 255, 0.88);
font-size: 14px;
line-height: 1.6;
text-align: center;
pointer-events: none;
}
.aksrt-lightbox__thumbs {
position: absolute;
z-index: 3;
right: 50%;
bottom: 18px;
display: flex;
gap: 8px;
max-width: min(70vw, 760px);
padding: 6px;
overflow-x: auto;
border-radius: 8px;
background: rgba(0, 0, 0, 0.38);
transform: translateX(50%);
scrollbar-width: thin;
}
.aksrt-lightbox__thumb {
flex: 0 0 auto;
width: 56px;
height: 44px;
padding: 0;
overflow: hidden;
border: 2px solid transparent;
border-radius: 5px;
background: transparent;
opacity: 0.6;
cursor: pointer;
}
.aksrt-lightbox__thumb.is-active {
border-color: #fff;
opacity: 1;
}
.aksrt-lightbox__thumb img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.aksrt-lightbox__thumbs:not([hidden]) ~ .aksrt-lightbox__caption {
bottom: 78px;
}
.aksrt-lightbox [hidden] {
display: none !important;
}
@keyframes aksrt-lightbox-enter {
from {
transform-origin: var(--imgbox-origin-left) var(--imgbox-origin-top);
transform: scale(0.82);
opacity: 0;
}
to {
transform-origin: center;
transform: scale(1);
opacity: 1;
}
}
@media (max-width: 767px) {
.aksrt-lightbox__stage {
inset: 58px 10px 78px;
}
.aksrt-lightbox__toolbar {
top: 10px;
right: 10px;
gap: 5px;
}
.aksrt-lightbox__tool {
width: 34px;
height: 34px;
font-size: 14px;
}
.aksrt-lightbox__counter {
min-width: 36px;
font-size: 12px;
}
.aksrt-lightbox__nav {
width: 40px;
height: 40px;
font-size: 18px;
background: rgba(0, 0, 0, 0.34);
}
.aksrt-lightbox__nav--prev {
left: 8px;
}
.aksrt-lightbox__nav--next {
right: 8px;
}
.aksrt-lightbox__thumbs {
max-width: calc(100vw - 20px);
}
}
+7 -2
View File
@@ -7431,7 +7431,12 @@ badge.top,
color: var(--this-bg-b);
}
.imgbox {
display: none;
}
.comment-content .box-img,
.alone-imgbox-img,
.cursor-zoom-in {
cursor: zoom-in;
}
@@ -8104,7 +8109,7 @@ badge.top,
body:has(.modal.in) .float-right,
.modal-open .float-right,
.aksrt-lightbox-open .float-right,
.imgbox-show .float-right,
.scroll-down .scroll-down-hide.float-right,
.scroll-ing .scrolling-hide.float-right {
transform: translateX(200%);
@@ -8112,7 +8117,7 @@ body:has(.modal.in) .float-right,
body:has(.modal.in) .float-right.position-center,
.modal-open .float-right.position-center,
.aksrt-lightbox-open .float-right.position-center,
.imgbox-show .float-right.position-center,
.scroll-down .scroll-down-hide.float-right.position-center,
.scroll-ing .scrolling-hide.float-right.position-center {
transform: translate(200%, -50%);
+1 -1
View File
File diff suppressed because one or more lines are too long
+254
View File
@@ -215,6 +215,8 @@
--swiper-navigation-color: #000000;
}
.swiper-thumbsbox .swiper-button-next,
.swiper-thumbsbox .swiper-button-prev,
.swiper-scroll .swiper-button-next,
.swiper-scroll .swiper-button-prev {
background-color: rgba(0, 0, 0, 0.5);
@@ -631,6 +633,248 @@ button.swiper-pagination-bullet {
}
/****其它*****/
.imgbox-show {
overflow: hidden;
}
.imgbox-show * {
-webkit-backdrop-filter: unset !important;
backdrop-filter: unset !important;
-webkit-filter: unset !important;
filter: unset !important;
}
.imgbox {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
}
.imgbox {
z-index: 100000;
transition: 0.4s;
--imgbox-origin-left: center;
--imgbox-origin-top: center;
}
.imgbox-bg {
z-index: 1;
opacity: 0.7;
}
.full-screen .imgbox-bg {
opacity: 1;
}
.imgbox-an {
position: fixed;
z-index: 3;
top: 13px;
right: 15px;
}
.hide-but,
.imgbox-an > a {
color: #fff;
background: rgba(41, 41, 41, 0.7);
}
.imgbox-an > a {
width: 34px;
height: 34px;
}
.hide-but {
padding: 4px 20px;
margin-right: 5px;
border-radius: 0 0 4px 4px;
cursor: pointer;
}
.is-play .fa-play:before {
content: '\f04c';
}
.swiper-imgbox {
width: 100%;
height: 100%;
transition: height 0.3s;
z-index: 10001;
}
.swiper-thumbsbox {
background: rgba(41, 41, 41, 0.6);
padding: 10px;
position: relative;
z-index: 2;
}
.swiper-thumbsbox .swiper-slide {
width: 100px;
height: 100px;
margin: 0 3px;
opacity: 0.8;
transition: border 0.3s;
cursor: pointer;
}
.show-thumb .swiper-imgbox {
height: calc(100% - 120px);
}
.swiper-thumbsbox .swiper-slide.swiper-slide-thumb-active {
opacity: 1;
border: 4px solid var(--focus-color);
}
.imgbox.show {
opacity: 1;
-webkit-animation: fade 0.4s;
animation: fade 0.4s;
visibility: visible;
}
.imgbox.hideing {
opacity: 0;
visibility: visible;
display: block !important;
}
.imgbox .swiper-slide {
transform-origin: var(--imgbox-origin-left) var(--imgbox-origin-top);
}
.imgbox.show .swiper-imgbox .swiper-slide {
-webkit-animation: scale_in 0.6s;
animation: scale_in 0.6s;
-webkit-animation-timing-function: cubic-bezier(0.1, 0.73, 0.41, 1.1);
animation-timing-function: cubic-bezier(0.1, 0.73, 0.41, 1.1);
transform: scale(1);
}
.imgbox.hideing .swiper-imgbox .swiper-slide {
-webkit-animation: scale_out 0.4s;
animation: scale_out 0.4s;
transform: scale(1);
}
.swiper-imgbox .lazyloading,
.swiper-imgbox .lazyload {
transform: scale(0.7);
}
.swiper-imgbox .lazyloaded:not(.lazyloadafter):not(.ls-is-cached) {
-webkit-animation: imgbox_lazy_in 0.4s;
animation: imgbox_lazy_in 0.4s;
}
@-webkit-keyframes imgbox_lazy_in {
0% {
transform: scale(0.7);
}
100% {
transform: scale(1);
}
}
@keyframes imgbox_lazy_in {
0% {
transform: scale(0.7);
}
100% {
transform: scale(1);
}
}
@-webkit-keyframes scale_in {
0% {
transform: scale(0.2);
}
100% {
transform: scale(1);
}
}
@keyframes scale_in {
0% {
transform: scale(0.2);
}
100% {
transform: scale(1);
}
}
@-webkit-keyframes scale_out {
0% {
transform: scale(1);
}
100% {
transform: scale(0.2);
}
}
@keyframes scale_out {
0% {
transform: scale(1);
}
100% {
transform: scale(0.2);
}
}
.counter-con {
transform: none;
top: 10px;
}
.counter {
padding: 4px 12px;
font-size: 16px;
margin: 10px;
background: rgba(41, 41, 41, 0.7);
}
.swiper-imgbox .swiper-slide img {
width: auto;
height: auto;
max-width: 90%;
max-height: 90%;
transition-duration: 0s;
position: relative;
}
.swiper-imgbox .counter-con {
transform: none;
top: 10px;
right: auto;
bottom: auto;
width: auto;
left: 10px;
}
.full-screen .swiper-slide img {
max-width: 100%;
max-height: 100%;
}
.swiper-close {
height: 100%;
transition: 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.lazyloaded + .swiper-lazy-preloader {
display: none;
}
.swiper-pagination-bullets > .swiper-pagination-bullet {
width: 4px;
@@ -661,6 +905,16 @@ button.swiper-pagination-bullet {
}
@media (max-width: 767px) {
.imgbox.show .swiper-imgbox .swiper-slide {
-webkit-animation: scale_in 0.4s;
animation: scale_in 0.4s;
}
.swiper-imgbox .swiper-slide img {
max-width: calc(100% - 10px);
max-height: calc(100% - 10px);
}
.swiper-container-horizontal > .swiper-pagination-bullets,
.swiper-pagination-custom,
.swiper-pagination-fraction {
+1 -1
View File
File diff suppressed because one or more lines are too long