- rewrite post_list.page schema (JS+PHP 2.0.0) with the reference field set: three cover types with option fieldsets (image 20-200% / slide CFS_Module::slide full config with nested dependsOn / video 0-200%), hide-time, p_indent, breadcrumbs (home-text as switcher), prevnext, authordesc, maxheight slider, yiyan block, copyright, button toptext, front/after content, related posts - migrate share_s to share page basic group and post_rewards_* to users features rewards group (runtime keys unchanged) - remap get_post_page_settings() to reference keys, normalize slide cover option, hardcode non-reference runtime flags (reading progress, favorites, author card), drop dual-path legacy aliases - wire slide option into aksrt_render_slider (effect/direction/spaceBetween/ speed/interval/loop/autoplay/nav/pagination, scale vs fixed-height modes), clamp image scale 20-200 and video scale 0-200 with 16:9 fallback, wire p_indent container class + CSS, resync frontend-tags fallback and FacadeBulk fallback, remap PostMetaBox cover keys - add post-page reference contract test; update stale cover-height and user-features contract tests Validation: node --test 464/464 pass, audit-admin-contracts errors=0, vite build ok, build-public-assets ok, php -l clean.
341 lines
6.9 KiB
CSS
341 lines
6.9 KiB
CSS
/* ========== Single Post ========== */
|
|
|
|
/* legacy .article — card body padding wins over .box-body (main.css order) */
|
|
.article,
|
|
article.article.box-body,
|
|
.article.main-bg.box-body {
|
|
padding: 0 30px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
.article,
|
|
article.article.box-body,
|
|
.article.main-bg.box-body {
|
|
padding: 0 15px;
|
|
}
|
|
|
|
.article-header .article-title {
|
|
font-size: 18px;
|
|
}
|
|
}
|
|
|
|
.entry-header,
|
|
.article-header {
|
|
margin-bottom: 10px;
|
|
padding-bottom: 0;
|
|
border-bottom: none;
|
|
/* theme-box is spacing only — never paint a nested card here */
|
|
background: transparent;
|
|
box-shadow: none;
|
|
border-radius: 0;
|
|
}
|
|
|
|
/* 标题 — 对齐 legacy: 22px, bold, line-height 1.4 */
|
|
.entry-title,
|
|
.article-title {
|
|
font-size: 22px;
|
|
font-weight: bold;
|
|
margin: 0;
|
|
line-height: 1.4;
|
|
letter-spacing: 0;
|
|
color: var(--key-color, var(--color-ink));
|
|
}
|
|
|
|
.article-title > a:hover {
|
|
color: inherit;
|
|
}
|
|
|
|
.article-header .article-title {
|
|
font-size: 22px;
|
|
font-weight: bold;
|
|
color: var(--key-color, var(--color-ink));
|
|
margin-top: 15px;
|
|
}
|
|
|
|
.article-header .article-avatar {
|
|
margin-top: 15px;
|
|
}
|
|
|
|
.entry-meta {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 10px 16px;
|
|
font-size: 0.875rem;
|
|
color: var(--color-ink-4);
|
|
}
|
|
|
|
.entry-meta a {
|
|
color: var(--color-ink-3);
|
|
}
|
|
|
|
.entry-meta a:hover {
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
.entry-thumb {
|
|
margin: 0 0 28px;
|
|
border-radius: var(--radius-btn);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 内容区 — 对齐 legacy: 16px, line-height 2 */
|
|
.entry-content,
|
|
.wp-posts-content {
|
|
font-size: 16px;
|
|
line-height: 2;
|
|
color: var(--main-color, var(--color-ink));
|
|
overflow-wrap: break-word;
|
|
word-wrap: break-word;
|
|
min-height: 90px;
|
|
}
|
|
|
|
/* legacy content heading bars */
|
|
.wp-posts-content > h1:not([class]),
|
|
.wp-posts-content > h2:not([class]),
|
|
.wp-posts-content > h3:not([class]),
|
|
.wp-posts-content > h4:not([class]),
|
|
.wp-posts-content > h1.wp-block-heading,
|
|
.wp-posts-content > h2.wp-block-heading,
|
|
.wp-posts-content > h3.wp-block-heading,
|
|
.wp-posts-content > h4.wp-block-heading {
|
|
position: relative;
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.wp-posts-content > h1:not([class]):before,
|
|
.wp-posts-content > h2:not([class]):before,
|
|
.wp-posts-content > h3:not([class]):before,
|
|
.wp-posts-content > h4:not([class]):before,
|
|
.wp-posts-content > h1.wp-block-heading:before,
|
|
.wp-posts-content > h2.wp-block-heading:before,
|
|
.wp-posts-content > h3.wp-block-heading:before,
|
|
.wp-posts-content > h4.wp-block-heading:before {
|
|
content: "";
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: 40px;
|
|
height: 3px;
|
|
background: var(--theme-color, var(--focus-color, #f04494));
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.wp-posts-content > h3:not([class]):before,
|
|
.wp-posts-content > h4:not([class]):before,
|
|
.wp-posts-content > h3.wp-block-heading:before,
|
|
.wp-posts-content > h4.wp-block-heading:before {
|
|
width: 28px;
|
|
height: 2px;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) > *:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) p {
|
|
margin: 0 0 1.5em;
|
|
}
|
|
|
|
/* 段落首行缩进(参考主题 post_p_indent_s:开启后正文段落首行缩进 2em)。 */
|
|
.wp-posts-content.p-indent p {
|
|
text-indent: 2em;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) h2 {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
margin: 28px 0 14px;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) h3 {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
margin: 24px 0 12px;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) h4 {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
margin: 22px 0 10px;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) blockquote {
|
|
margin: 0 0 24px;
|
|
padding: 18px 20px;
|
|
border-left: 4px solid var(--color-primary);
|
|
background: var(--surface-4, rgba(0, 0, 0, 0.03));
|
|
border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
|
|
color: var(--color-ink-3);
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) img {
|
|
margin: 0 auto;
|
|
display: block;
|
|
max-width: 100%;
|
|
height: auto;
|
|
border-radius: min(8px, var(--main-radius, 8px));
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) figure {
|
|
max-width: 100%;
|
|
margin: 1.5em auto;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) figcaption {
|
|
margin-top: 8px;
|
|
color: var(--muted-color, #777);
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
text-align: center;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) iframe,
|
|
:is(.entry-content, .wp-posts-content) .wp-block-embed iframe,
|
|
:is(.entry-content, .wp-posts-content) video {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) .wp-block-embed {
|
|
position: relative;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
margin: 1.5em 0;
|
|
}
|
|
|
|
/* 行内代码 — 对齐 legacy: 粉色文字 + 粉色背景 */
|
|
:is(.entry-content, .wp-posts-content) code {
|
|
font-family: var(--font-mono);
|
|
font-size: 0.9em;
|
|
color: #ff3c98;
|
|
background: rgba(253, 153, 153, 0.2);
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) ul,
|
|
:is(.entry-content, .wp-posts-content) ol {
|
|
padding-left: 1.5em;
|
|
margin: 0 0 1.5em;
|
|
}
|
|
|
|
:is(.entry-content, .wp-posts-content) ul li::marker {
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
.entry-footer {
|
|
margin-top: 40px;
|
|
padding-top: 24px;
|
|
border-top: 1px solid var(--color-line);
|
|
}
|
|
|
|
.post-tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.post-tags a {
|
|
padding: 4px 10px;
|
|
border-radius: 50px;
|
|
background: var(--muted-bg-color, #eee);
|
|
border: 1px solid var(--main-border-color, rgba(50, 50, 50, 0.06));
|
|
font-size: 13px;
|
|
color: var(--muted-color, #777);
|
|
}
|
|
|
|
.post-tags a:hover {
|
|
border-color: var(--color-primary);
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
.related-posts {
|
|
margin-top: 48px;
|
|
padding: 20px 0 0;
|
|
border-top: 1px solid var(--color-line-soft);
|
|
}
|
|
|
|
.related-posts__title {
|
|
font-size: 15px;
|
|
font-weight: 700;
|
|
margin: 0 0 10px;
|
|
color: var(--key-color, #333);
|
|
}
|
|
|
|
.related-posts__title::before {
|
|
content: '';
|
|
display: inline-block;
|
|
width: 40px;
|
|
height: 3px;
|
|
background: var(--theme-color, #f04494);
|
|
border-radius: 5px;
|
|
vertical-align: middle;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.related-posts__grid {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0;
|
|
}
|
|
|
|
.related-card {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 10px 0;
|
|
border-bottom: 1px solid var(--main-border-color, rgba(50, 50, 50, 0.06));
|
|
transition: 0.15s;
|
|
}
|
|
|
|
.related-card:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.related-card a {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
color: var(--key-color, #333);
|
|
text-decoration: none;
|
|
width: 100%;
|
|
}
|
|
|
|
.related-card:hover a {
|
|
color: var(--focus-color, #f04494);
|
|
}
|
|
|
|
.related-card__thumb {
|
|
width: 96px;
|
|
min-width: 96px;
|
|
height: 64px;
|
|
border-radius: var(--main-radius, 8px);
|
|
overflow: hidden;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.related-card__thumb img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: transform 0.3s;
|
|
}
|
|
|
|
.related-card:hover .related-card__thumb img {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.related-card h4 {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
line-height: 1.4;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|