Files
wordpress-theme-aksrt/assets/css/frontend/single-post/cover.css
T

193 lines
3.7 KiB
CSS

/* ============================================================
* v4.3 cover, author bar, actions, author card, nav, and related posts
* The cover stays inside the content column with a fixed aspect ratio box.
* ============================================================ */
/* ===== Cover (in-column ratio box) ===== */
.single-cover {
position: relative;
overflow: hidden;
border-radius: 8px;
margin-bottom: 16px;
padding-bottom: var(--single-cover-scale, 35%);
}
.single-cover > .fit-cover,
.single-cover > img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.single-cover__overlay {
position: absolute;
inset: 0;
background: linear-gradient(
to bottom,
rgba(0, 0, 0, 0) 30%,
rgba(0, 0, 0, 0.6) 100%
);
pointer-events: none;
}
.single-cover__content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 20px;
color: #fff;
border-radius: 0 0 8px 8px;
}
.single-cover__title,
.single-cover__content .article-title {
font-size: clamp(1.125rem, 2.5vw, 1.5rem);
font-weight: 700;
margin: 0 0 6px;
line-height: 1.35;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
color: #fff;
}
.single-cover__meta,
.single-cover__content .cover-meta {
display: flex;
flex-wrap: wrap;
gap: 12px;
font-size: 12px;
opacity: 0.85;
}
.single-cover__meta span,
.single-cover__content .cover-meta .meta-view {
display: inline-flex;
align-items: center;
gap: 4px;
}
/* ===== Video Cover ===== */
.single-cover--video {
background: #000;
}
.single-cover--video .single-cover__video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
/* ===== Slide Cover ===== */
.single-cover--slide {
background: var(--color-bg-2, #f5f5f5);
}
.single-cover__slides {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.single-cover__slide {
position: absolute;
inset: 0;
opacity: 0;
transition: opacity 0.6s ease;
}
.single-cover__slide.is-active {
opacity: 1;
}
.single-cover__slide img {
width: 100%;
height: 100%;
object-fit: cover;
}
.single-cover__dots {
position: absolute;
bottom: 12px;
right: 16px;
display: flex;
gap: 6px;
z-index: 2;
}
.single-cover__dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.5);
transition: background 0.3s ease;
cursor: pointer;
}
.single-cover__dot.is-active {
background: #fff;
}
/* ===== 面包屑 ===== */
.post-breadcrumbs {
margin-bottom: 12px;
font-size: 13px;
color: var(--color-ink-4, var(--color-ink-4));
}
.article-title + .img-badge,
.single-head-cover .img-badge.right,
.article-header .img-badge.right {
position: absolute;
top: 14px;
right: 14px;
z-index: 2;
}
.article-avatar {
position: relative;
}
.article-avatar .line-form-line,
.article-avatar .line-form-line::before {
position: absolute;
top: 50%;
left: calc(52px + 16px);
right: 120px;
height: 1px;
transform: translateY(-50%);
background: var(--color-line);
}
.article-avatar .line-form-line::before {
content: "";
right: auto;
width: 42px;
background: var(--color-primary, #f04494);
opacity: 0.3;
}
/* ===== Article Card ===== */
.article-card {
margin-bottom: 16px;
}
.article-card__header {
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid var(--color-line);
}
.article-card__title {
font-size: clamp(1.25rem, 3vw, 1.75rem);
font-weight: 800;
margin: 0;
line-height: 1.35;
color: var(--color-ink);
}