fix(single): fill slide and video cover media like the image cover
Slide-mode images rendered at intrinsic ratio, top-aligned inside the swiper chain (--pc-height:auto left .swiper-wrapper content-sized), so the taller box showed a gap at the bottom and never center-cropped like the image cover. The video cover had the same problem through video-player.js (height:auto, capped at 70vh). - aksrt_render_slider scale mode emits --pc-height/--m-height 100% so the wrapper/slide/img chain fills the ratio box and object-fit: cover center-crops inside it (same pattern as the .scale-height widgets) - video-player.js renders the video at height:100% + object-fit:cover; with an undimensioned container height:100% degrades to auto, matching the previous behavior - drop the dead .single-cover padding-bottom rules (every producer owns its height inline, and the rule squeezed the absolutely positioned slide inner) and the orphaned --single-cover-scale var in tokens.css/compat-vars.css/main.css/InlineStyleBuilder - rebuild public bundles; extend the single-cover-height contract
This commit is contained in:
@@ -214,7 +214,6 @@ Full admin panel preserved (settings, OAuth, content tools, etc).
|
||||
--color-primary-dark: var(--color-primary-active);
|
||||
--shadow-md: var(--shadow);
|
||||
--mini-radius: calc(var(--radius) / 1.4);
|
||||
--single-cover-scale: 35%;
|
||||
|
||||
/* ===== Avatar size system — legacy --this-size 等价 ===== */
|
||||
--aksrt-avatar-size-xs: 24px;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -189,7 +189,6 @@
|
||||
--color-primary-dark: var(--color-primary-active);
|
||||
--shadow-md: var(--shadow);
|
||||
--mini-radius: calc(var(--radius) / 1.4);
|
||||
--single-cover-scale: 35%;
|
||||
|
||||
/* ===== Avatar size system — legacy --this-size 等价 ===== */
|
||||
--aksrt-avatar-size-xs: 24px;
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
/* Cards — 对齐 legacy 70% */
|
||||
--posts-card-scale: 70%;
|
||||
--posts-list-scale: 70%;
|
||||
--single-cover-scale: 35%;
|
||||
}
|
||||
|
||||
/* legacy --this-* context-coloring DEFAULTS live with the .but system in
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
* ============================================================ */
|
||||
|
||||
/* ===== Cover (in-column ratio box) — legacy .single-cover ===== */
|
||||
/* 高度由各模式的内联 padding-bottom 决定;此处不得再声明 padding-bottom,
|
||||
* 否则会挤压绝对定位轮播内层(同样挂 .single-cover 类)的 content box。 */
|
||||
.single-cover {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: var(--main-radius, var(--radius, 8px));
|
||||
box-shadow: 0 0 10px var(--main-shadow, rgba(116, 116, 116, 0.08));
|
||||
margin-bottom: 20px;
|
||||
/* legacy: padding-bottom: calc(var(--single-cover-scale) + 50px) */
|
||||
padding-bottom: calc(var(--single-cover-scale, 35%) + 50px);
|
||||
}
|
||||
|
||||
.single-cover > .fit-cover,
|
||||
|
||||
@@ -2,7 +2,6 @@ body {
|
||||
--mian-max-width: 1200px;
|
||||
--posts-card-scale: 70%;
|
||||
--posts-list-scale: 70%;
|
||||
--single-cover-scale: 35%;
|
||||
|
||||
--theme-color: #f04494;
|
||||
--focus-color: var(--theme-color);
|
||||
@@ -8497,10 +8496,6 @@ body.modal-open .float-btn.wait-pay-btn .hover-show-con {
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.single-cover {
|
||||
padding-bottom: calc(var(--single-cover-scale) + 50px);
|
||||
}
|
||||
|
||||
.single-cover-con {
|
||||
color: #fff;
|
||||
padding: 15px 15px 10px 15px;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -28,7 +28,9 @@
|
||||
style.id = STYLE_ID;
|
||||
style.textContent =
|
||||
'.aksrt-video{position:relative;background:#000;border-radius:12px;overflow:hidden;cursor:pointer;}' +
|
||||
'.aksrt-video video{display:block;width:100%;height:auto;max-height:70vh;}' +
|
||||
// 组件容器(文章封面比例盒)有确定高度:视频铺满并居中裁切,对齐单图封面;
|
||||
// 容器无确定高度时 height:100% 退化为 auto,行为与原 height:auto 一致。
|
||||
'.aksrt-video video{display:block;width:100%;height:100%;object-fit:cover;}' +
|
||||
'.aksrt-video__overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.3);transition:opacity 0.3s;pointer-events:none;}' +
|
||||
'.aksrt-video.is-playing .aksrt-video__overlay{opacity:0;}' +
|
||||
'.aksrt-video__play{width:60px;height:60px;border-radius:50%;background:rgba(255,255,255,0.9);display:flex;align-items:center;justify-content:center;font-size:24px;color:#1a1a2e;box-shadow:0 4px 20px rgba(0,0,0,0.3);transition:transform 0.2s;}' +
|
||||
|
||||
Reference in New Issue
Block a user