Files
wordpress-theme-aksrt/assets/css/frontend/enhancements/components/base.css
T
kate522 4f2d17f6ee 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
2026-09-05 18:22:37 +08:00

156 lines
2.9 KiB
CSS

/* ============================================================
* 8. 打赏按钮
* ============================================================ */
.action-btn--reward {
position: relative;
}
.action-btn--reward.is-active {
color: var(--color-warning, #F59E0B);
}
.reward-modal {
position: fixed;
inset: 0;
z-index: 99999;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s, visibility 0.3s;
}
.reward-modal.is-open {
opacity: 1;
visibility: visible;
}
.reward-modal__overlay {
position: absolute;
inset: 0;
background: rgba(0,0,0,0.5);
}
.reward-modal__card {
position: relative;
background: var(--surface-1, #fff);
border-radius: var(--radius-lg, 8px);
padding: 32px;
max-width: 360px;
width: 90%;
text-align: center;
box-shadow: 0 8px 32px rgba(0,0,0,0.15);
z-index: 1;
}
.reward-modal__title {
margin: 0 0 8px;
font-size: 18px;
font-weight: 600;
color: var(--color-ink);
}
.reward-modal__desc {
margin: 0 0 20px;
font-size: 14px;
color: var(--color-ink-3);
}
.reward-modal__qr {
width: 200px;
height: 200px;
margin: 0 auto 16px;
border-radius: var(--radius, 10px);
overflow: hidden;
}
.reward-modal__qr img {
width: 100%;
height: 100%;
object-fit: contain;
}
.reward-modal__close {
position: absolute;
top: 12px;
right: 12px;
width: 32px;
height: 32px;
border: none;
border-radius: 50%;
background: var(--surface-2, #F4F5F7);
color: var(--color-ink-3);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
}
.reward-modal__close:hover {
background: var(--surface-3, #ECEEF1);
}
.reward-modal__content > p {
margin: -4px 0 18px;
}
.reward-amounts {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
margin: 18px 0;
}
.reward-amount {
min-height: 42px;
border: 1px solid var(--color-line-soft, rgba(15, 23, 42, 0.1));
border-radius: 10px;
background: var(--surface-2);
color: var(--color-ink-2);
cursor: pointer;
font-weight: 700;
}
.reward-amount.is-active {
border-color: var(--color-primary);
background: var(--color-primary-soft);
color: var(--color-primary);
}
.reward-custom {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 16px;
color: var(--color-ink-3);
font-size: 13px;
}
.reward-custom input {
width: 140px;
min-height: 40px;
border: 1px solid var(--color-line-soft, rgba(15, 23, 42, 0.1));
border-radius: 9px;
background: var(--surface-1);
color: var(--color-ink);
padding: 0 12px;
}
.reward-modal__submit {
width: 100%;
min-height: 42px;
}
.reward-modal__message {
min-height: 20px;
margin-top: 10px;
color: var(--color-primary);
font-size: 12px;
text-align: center;
}