fix(single): align slide and video cover heights with image cover
The image-mode cover reserves +50px for the title/breadcrumb overlay (calc(scale% + 50px)), but the slide cover wrapper was given a bare inline padding-bottom by aksrt_render_slider, permanently defeating the .cover-slide rule, and the video cover used a bare video_scale%. - aksrt_render_slider: add scale_extra so scale mode emits calc(ratio% + extra); the single cover passes 50px so all three modes share one height formula - drop the unreachable static slide fallback and function_exists guard (the helper is unconditionally loaded by inc/bootstrap.php), the always-true cover_url/ep_count conditions, and the dead --scale-ratio and inner swiper padding emitted in scale mode - remove the dead cover CSS cluster with no producer: .single-cover-slide (main.css/main.min.css/cover.css), .single-cover-slider family (components/base.css), .single-cover-slide-wrap and .single-cover__* helpers (cover.css), and initSlideCovers in misc.js - rebuild public bundles via tools/build-public-assets.mjs - add single-cover-height-contract test covering the shared formula and the dead-code removals
This commit is contained in:
@@ -1,108 +1,3 @@
|
||||
/* ============================================================
|
||||
* 7. 文章封面轮播
|
||||
* ============================================================ */
|
||||
.single-cover-slider {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border-radius: var(--radius-lg, 8px);
|
||||
}
|
||||
|
||||
.single-cover-slider .swiper-slide {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.single-cover-slider__img {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.single-cover-slider__overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6) 100%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.single-cover-slider__content {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 24px;
|
||||
color: #fff;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.single-cover-slider__title {
|
||||
margin: 0 0 8px;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
text-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.single-cover-slider__meta {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
font-size: 13px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.single-cover-slider__pagination {
|
||||
position: absolute;
|
||||
bottom: 12px;
|
||||
right: 16px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.single-cover-slider__pagination .swiper-pagination-bullet {
|
||||
background: rgba(255,255,255,0.6);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.single-cover-slider__pagination .swiper-pagination-bullet-active {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.single-cover-slider__prev,
|
||||
.single-cover-slider__next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
z-index: 3;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: rgba(0,0,0,0.3);
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.single-cover-slider__prev:hover,
|
||||
.single-cover-slider__next:hover {
|
||||
background: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.single-cover-slider__prev { left: 12px; }
|
||||
.single-cover-slider__next { right: 12px; }
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.single-cover-slider__img {
|
||||
height: 240px;
|
||||
}
|
||||
.single-cover-slider__title {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* 8. 打赏按钮
|
||||
* ============================================================ */
|
||||
|
||||
Reference in New Issue
Block a user