进行了一些小修复
This commit is contained in:
1 parent
6eb189ca88
commit
1d073ea293
8 files changed
+15
-57
No files matched your search
@@ -1371,14 +1371,6 @@ html.dark .post-drop-meta__item:hover {
|
||||
--this-bg: var(--body-bg-color, #f5f5f5);
|
||||
}
|
||||
|
||||
.single-metabox.cover-meta {
|
||||
font-size: 14px;
|
||||
right: 1em;
|
||||
top: 1.6em;
|
||||
--meta-color: rgba(255, 255, 255, 0.8);
|
||||
--body-bg-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
/* line-form-line owned by legacy-utilities.css — only context here */
|
||||
.article-avatar .line-form-line {
|
||||
display: block;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.relative{position:relative}.flex{display:flex}.flex.ac,.ac{align-items:center}.flex.jc,.jc{justify-content:center}.flex.jsb,.jsb{justify-content:space-between}.flex.at,.at{align-items:flex-start}.flex.ae,.ae{align-items:flex-end}.flex0{flex:0 0 auto}.flex1{flex:1 1 auto;min-width:0}.flex.column{flex-direction:column}.flex.wrap{flex-wrap:wrap}.flex.flex-row,.flex-row{flex-direction:row}.flex.jse,.jse{justify-content:space-evenly}.flex.jsa,.jsa{justify-content:space-around}.flex>.flex1,.flex .flex1{flex:1;overflow:hidden;min-width:0}.relative-h{position:relative;height:100%}.padding-10{padding:10px}.font-bold{font-weight:700}.mt6{margin-top:6px}.gutters-5{margin:-5px}.gutters-5>*{padding:5px}@media(max-width:767px){.flex.flex-row.flex-col-sm-2{flex-wrap:wrap}.flex.flex-row.flex-col-sm-2>*{flex-basis:50%}}.clearfix:before,.clearfix:after{content:"";display:table}.clearfix:after{clear:both}.abs-right{position:absolute;right:0;top:0}.abs-center{position:absolute;left:0;width:100%;top:50%;right:.7em;transform:translateY(-50%);z-index:1}.abs-center.left-top,.abs-center.right-top{transform:unset;top:0}.abs-center.right-top{left:auto;width:auto;text-align:right}.abs-center.left-top{text-align:left}.abs-center.conter-bottom,.abs-center.conter-conter{text-align:center}.abs-center.right-top,.abs-center.right-bottom,.abs-center.right-conter{text-align:right}.abs-center.conter-bottom,.abs-center.right-bottom,.abs-center.left-bottom{top:auto;transform:unset;bottom:0}.abs-center.left-bottom{left:0;right:auto;text-align:left}.abs-center.right-bottom,.abs-center.right-conter{left:auto;right:0;text-align:right}.graphic,.page-cover{text-shadow:0 0 5px rgba(0,0,0,.2);--main-color: #fff;color:#fff;position:relative;overflow:hidden;box-shadow:0 0 10px var(--main-shadow, rgba(116, 116, 116, .08));padding:0 0 70%;border-radius:var(--main-radius, var(--radius, 8px))}.graphic>.fit-cover,.graphic>img.fit-cover{position:absolute;width:100%;height:100%;object-fit:cover;inset:0}.fit-cover{object-fit:cover;max-width:100%}.title-h-left{position:relative;padding-bottom:8px}.title-h-left:before{transition:.4s;transform-origin:left;position:absolute;content:"";width:40px;height:3px;background:var(--theme-color, var(--focus-color, #f04494));left:0;bottom:3px;border-radius:5px;box-shadow:1px 1px 3px -1px var(--theme-color, var(--focus-color, #f04494))}.line-form-line,.line-form-line:before{position:absolute;bottom:0;left:0;height:1px;width:100%;transition:.8s;background:var(--main-border-color, rgba(50, 50, 50, .06))}.line-form-line:before{content:"";width:0;background:var(--focus-color, #f04494)}.avatar-img{position:relative;display:inline-block;flex-shrink:0;--this-size: 38px;width:var(--this-size);height:var(--this-size)}.avatar-img .avatar,.avatar-img img{width:100%;height:100%;border-radius:50%;object-fit:cover}.avatar-lg{--this-size: 80px}.avatar-md{--this-size: 55px}.avatar-mini{--this-size: 20px}.shrink0{flex-shrink:0}.opacity8{opacity:.8}.muted-color{color:var(--muted-color, var(--color-ink-3))}.muted-2-color{color:var(--muted-2-color, var(--color-ink-4))}.muted-3-color{color:var(--muted-3-color, #b1b1b1)}.muted-4-color{color:var(--muted-4-color, #d2d2d2)}.text-center{text-align:center}.em09{font-size:.9em}.em12{font-size:1.2em}.px12-sm{font-size:12px}.ml3{margin-left:3px}.ml6{margin-left:6px}.ml10{margin-left:10px}.mr3{margin-right:3px}.mr6{margin-right:6px}.mt10{margin-top:10px}.mt20{margin-top:20px}.mb10{margin-bottom:10px}.mb20{margin-bottom:20px}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.text-ellipsis-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}.main-bg{background-color:var(--main-bg-color, var(--surface-1))}.separator{position:relative;letter-spacing:.08em}.icon-circle+.icon-circle:before{content:"·";display:inline-block;margin:0 .45em;opacity:.55}.article-avatar name,.article-avatar .name,.user-name{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%}.pull-right{float:right}.pull-left{float:left}body.single main.container .content-layout{display:block;min-width:0}body.single main.container .content-layout>*{min-width:0;max-width:100%}body.single main.container .content-layout>.breadcrumb,body.single main.container .content-layout>ul.breadcrumb,body.single main.container .content-layout>.breadcrumb-nav,body.single main.container .content-layout>.breadcrumbs-wrap{position:relative;z-index:1;margin-top:0;margin-bottom:12px;padding-top:2px}body.single .sidebar .aksrt-panel,body.single .sidebar .widget{margin-bottom:15px}body.single main.container{box-sizing:border-box}.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;background:tranLine truncated
|
||||
.relative{position:relative}.flex{display:flex}.flex.ac,.ac{align-items:center}.flex.jc,.jc{justify-content:center}.flex.jsb,.jsb{justify-content:space-between}.flex.at,.at{align-items:flex-start}.flex.ae,.ae{align-items:flex-end}.flex0{flex:0 0 auto}.flex1{flex:1 1 auto;min-width:0}.flex.column{flex-direction:column}.flex.wrap{flex-wrap:wrap}.flex.flex-row,.flex-row{flex-direction:row}.flex.jse,.jse{justify-content:space-evenly}.flex.jsa,.jsa{justify-content:space-around}.flex>.flex1,.flex .flex1{flex:1;overflow:hidden;min-width:0}.relative-h{position:relative;height:100%}.padding-10{padding:10px}.font-bold{font-weight:700}.mt6{margin-top:6px}.gutters-5{margin:-5px}.gutters-5>*{padding:5px}@media(max-width:767px){.flex.flex-row.flex-col-sm-2{flex-wrap:wrap}.flex.flex-row.flex-col-sm-2>*{flex-basis:50%}}.clearfix:before,.clearfix:after{content:"";display:table}.clearfix:after{clear:both}.abs-right{position:absolute;right:0;top:0}.abs-center{position:absolute;left:0;width:100%;top:50%;right:.7em;transform:translateY(-50%);z-index:1}.abs-center.left-top,.abs-center.right-top{transform:unset;top:0}.abs-center.right-top{left:auto;width:auto;text-align:right}.abs-center.left-top{text-align:left}.abs-center.conter-bottom,.abs-center.conter-conter{text-align:center}.abs-center.right-top,.abs-center.right-bottom,.abs-center.right-conter{text-align:right}.abs-center.conter-bottom,.abs-center.right-bottom,.abs-center.left-bottom{top:auto;transform:unset;bottom:0}.abs-center.left-bottom{left:0;right:auto;text-align:left}.abs-center.right-bottom,.abs-center.right-conter{left:auto;right:0;text-align:right}.graphic,.page-cover{text-shadow:0 0 5px rgba(0,0,0,.2);--main-color: #fff;color:#fff;position:relative;overflow:hidden;box-shadow:0 0 10px var(--main-shadow, rgba(116, 116, 116, .08));padding:0 0 70%;border-radius:var(--main-radius, var(--radius, 8px))}.graphic>.fit-cover,.graphic>img.fit-cover{position:absolute;width:100%;height:100%;object-fit:cover;inset:0}.fit-cover{object-fit:cover;max-width:100%}.title-h-left{position:relative;padding-bottom:8px}.title-h-left:before{transition:.4s;transform-origin:left;position:absolute;content:"";width:40px;height:3px;background:var(--theme-color, var(--focus-color, #f04494));left:0;bottom:3px;border-radius:5px;box-shadow:1px 1px 3px -1px var(--theme-color, var(--focus-color, #f04494))}.line-form-line,.line-form-line:before{position:absolute;bottom:0;left:0;height:1px;width:100%;transition:.8s;background:var(--main-border-color, rgba(50, 50, 50, .06))}.line-form-line:before{content:"";width:0;background:var(--focus-color, #f04494)}.avatar-img{position:relative;display:inline-block;flex-shrink:0;--this-size: 38px;width:var(--this-size);height:var(--this-size)}.avatar-img .avatar,.avatar-img img{width:100%;height:100%;border-radius:50%;object-fit:cover}.avatar-lg{--this-size: 80px}.avatar-md{--this-size: 55px}.avatar-mini{--this-size: 20px}.shrink0{flex-shrink:0}.opacity8{opacity:.8}.muted-color{color:var(--muted-color, var(--color-ink-3))}.muted-2-color{color:var(--muted-2-color, var(--color-ink-4))}.muted-3-color{color:var(--muted-3-color, #b1b1b1)}.muted-4-color{color:var(--muted-4-color, #d2d2d2)}.text-center{text-align:center}.em09{font-size:.9em}.em12{font-size:1.2em}.px12-sm{font-size:12px}.ml3{margin-left:3px}.ml6{margin-left:6px}.ml10{margin-left:10px}.mr3{margin-right:3px}.mr6{margin-right:6px}.mt10{margin-top:10px}.mt20{margin-top:20px}.mb10{margin-bottom:10px}.mb20{margin-bottom:20px}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.text-ellipsis-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}.main-bg{background-color:var(--main-bg-color, var(--surface-1))}.separator{position:relative;letter-spacing:.08em}.icon-circle+.icon-circle:before{content:"·";display:inline-block;margin:0 .45em;opacity:.55}.article-avatar name,.article-avatar .name,.user-name{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%}.pull-right{float:right}.pull-left{float:left}body.single main.container .content-layout{display:block;min-width:0}body.single main.container .content-layout>*{min-width:0;max-width:100%}body.single main.container .content-layout>.breadcrumb,body.single main.container .content-layout>ul.breadcrumb,body.single main.container .content-layout>.breadcrumb-nav,body.single main.container .content-layout>.breadcrumbs-wrap{position:relative;z-index:1;margin-top:0;margin-bottom:12px;padding-top:2px}body.single .sidebar .aksrt-panel,body.single .sidebar .widget{margin-bottom:15px}body.single main.container{box-sizing:border-box}.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;background:tranLine truncated
|
||||
@@ -631,14 +631,6 @@ html.dark .post-drop-meta__item:hover {
|
||||
--this-bg: var(--body-bg-color, #f5f5f5);
|
||||
}
|
||||
|
||||
.single-metabox.cover-meta {
|
||||
font-size: 14px;
|
||||
right: 1em;
|
||||
top: 1.6em;
|
||||
--meta-color: rgba(255, 255, 255, 0.8);
|
||||
--body-bg-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
/* line-form-line owned by legacy-utilities.css — only context here */
|
||||
.article-avatar .line-form-line {
|
||||
display: block;
|
||||
|
||||
@@ -78,8 +78,7 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.single-cover__meta,
|
||||
.single-cover__content .cover-meta {
|
||||
.single-cover__meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
@@ -87,8 +86,7 @@
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.single-cover__meta span,
|
||||
.single-cover__content .cover-meta .meta-view {
|
||||
.single-cover__meta span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
@@ -223,9 +221,6 @@
|
||||
.single-head-cover .featured-video-episode .switch-video.active {
|
||||
background: var(--color-primary-soft, rgba(240, 68, 148, 0.12)); color: var(--color-primary);
|
||||
}
|
||||
.single-head-cover .cover-meta.single-metabox {
|
||||
display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; color: var(--color-ink-4);
|
||||
}
|
||||
/* Cover meta pills + title-h-left */
|
||||
.single-cover-con .article-title.title-h-left,
|
||||
.single-cover .article-title.title-h-left {
|
||||
@@ -233,14 +228,6 @@
|
||||
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
|
||||
margin: 0;
|
||||
}
|
||||
.single-metabox.cover-meta,
|
||||
.cover-meta.abs-right {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
}
|
||||
.single-metabox .post-metas item,
|
||||
.single-metabox .post-metas item a {
|
||||
color: inherit;
|
||||
@@ -334,6 +321,3 @@
|
||||
.aksrt-slider-overlay .article-title.title-h-left { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.45); }
|
||||
.aksrt-slider-overlay .breadcrumb a,
|
||||
.aksrt-slider-overlay .breadcrumb li { color: rgba(255,255,255,.9); }
|
||||
.aksrt-slider-overlay .single-metabox,
|
||||
.aksrt-slider-overlay .cover-meta { pointer-events: auto; }
|
||||
.aksrt-slider-overlay .post-drop-meta { pointer-events: auto; }
|
||||
@@ -190,7 +190,6 @@ if (($settings['cover_type'] ?? '') === 'video' && (string) ($settings['cover_ur
|
||||
$settings['show_cover'] = true;
|
||||
}
|
||||
$settings['video_episodes'] = $episodes;
|
||||
$settings['episode_count'] = count($episodes);
|
||||
$settings['video_poster'] = (string) ($meta['cover_image'] ?? '');
|
||||
return $settings;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,8 @@ if (!function_exists('aksrt_single_render_cover')) :
|
||||
$type = (string) $ctx['cover_type'];
|
||||
$badge = (string) $ctx['status_badge'];
|
||||
$crumbs = (string) $ctx['breadcrumbs_html'];
|
||||
$meta_box = (string) ($ctx['meta_box_html'] ?? '');
|
||||
$img_scale = max(10, min(100, (int) $ctx['img_scale']));
|
||||
$video_scale = max(20, min(100, (int) $ctx['video_scale']));
|
||||
$episode = (int) $ctx['episode_count'];
|
||||
$slides = is_array($ctx['slide_images'] ?? null) ? $ctx['slide_images'] : [];
|
||||
$poster = (string) ($ctx['video_poster'] ?? '');
|
||||
$title_html = (string) ($ctx['title_html'] ?? esc_html(get_the_title()));
|
||||
@@ -37,14 +35,9 @@ if (!function_exists('aksrt_single_render_cover')) :
|
||||
<div class="aksrt-video single-cover__player" data-aksrt-video data-src="<?php echo esc_url($ctx['cover_url']); ?>"<?php echo $poster !== '' ? ' data-poster="' . esc_url($poster) . '"' : ''; ?> style="position:absolute;inset:0;width:100%;height:100%;"></div>
|
||||
</div>
|
||||
<div class="single-video-footer dplayer-featured">
|
||||
<div class="flex jsb at">
|
||||
<?php if ($crumbs !== '') : ?>
|
||||
<div class="post-breadcrumbs"><?php echo $crumbs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($meta_box !== '') : ?>
|
||||
<?php echo str_replace('single-metabox', 'single-metabox mb10 ml10 shrink0', $meta_box); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($crumbs !== '') : ?>
|
||||
<div class="post-breadcrumbs"><?php echo $crumbs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
||||
<?php endif; ?>
|
||||
<h1 class="article-title">
|
||||
<?php
|
||||
$episodes = is_array($ctx['video_episodes'] ?? null) ? $ctx['video_episodes'] : [];
|
||||
@@ -95,8 +88,7 @@ if (!function_exists('aksrt_single_render_cover')) :
|
||||
. '<h1 class="article-title title-h-left">' . $title_html . '</h1>'
|
||||
. ($crumbs !== '' ? $crumbs : '')
|
||||
. $badge
|
||||
. '</div>'
|
||||
. ($meta_box !== '' ? str_replace('single-metabox', 'single-metabox cover-meta abs-right', $meta_box) : '');
|
||||
. '</div>';
|
||||
$slider_html = '';
|
||||
if (function_exists('aksrt_render_slider')) {
|
||||
$slider_html = aksrt_render_slider([
|
||||
@@ -142,9 +134,6 @@ if (!function_exists('aksrt_single_render_cover')) :
|
||||
<?php endif; ?>
|
||||
<?php echo $badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
<?php if ($meta_box !== '') : ?>
|
||||
<?php echo str_replace('single-metabox', 'single-metabox cover-meta abs-right', $meta_box); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@@ -153,7 +142,7 @@ endif;
|
||||
|
||||
if (!function_exists('aksrt_single_render_box_header')) :
|
||||
/**
|
||||
* Title + author bar (when no cover).
|
||||
* Title + author bar and the canonical article meta row.
|
||||
*
|
||||
* @param array<string,mixed> $ctx Single context.
|
||||
*/
|
||||
@@ -172,7 +161,7 @@ if (!function_exists('aksrt_single_render_box_header')) :
|
||||
aksrt_single_render_author_bar([
|
||||
'show_actions' => true,
|
||||
'show_time' => empty($settings['hide_time']),
|
||||
'meta_html' => empty($ctx['show_cover']) ? (string) ($ctx['meta_box_html'] ?? '') : '',
|
||||
'meta_html' => (string) ($ctx['meta_box_html'] ?? ''),
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -93,14 +93,13 @@ if (!function_exists('aksrt_single_build_context')) :
|
||||
'post_id' => $post_id,
|
||||
'settings' => $settings,
|
||||
'show_cover' => $show_cover,
|
||||
'cover_url' => (string) ($settings['cover_url'] ?? ''),
|
||||
'cover_url' => (string) ($settings['cover_url'] ?? ''),
|
||||
'cover_type' => (string) ($settings['cover_type'] ?? 'none'),
|
||||
'img_scale' => (int) ($settings['article_image_cover_scale'] ?? 35),
|
||||
'video_scale' => (int) ($settings['article_video_cover_scale'] ?? 56),
|
||||
'slide_images' => array_values(array_filter((array) ($settings['slide_images'] ?? []))),
|
||||
'episode_count' => max(0, (int) ($settings['episode_count'] ?? 0)),
|
||||
'video_episodes' => is_array($settings['video_episodes'] ?? null) ? array_values($settings['video_episodes']) : [],
|
||||
'video_poster' => (string) ($settings['video_poster'] ?? ''),
|
||||
'video_episodes' => is_array($settings['video_episodes'] ?? null) ? array_values($settings['video_episodes']) : [],
|
||||
'video_poster' => (string) ($settings['video_poster'] ?? ''),
|
||||
'meta_items' => $meta_items,
|
||||
'meta_box_html' => $meta_box_html,
|
||||
'title_html' => function_exists('aksrt_get_single_title_html') ? aksrt_get_single_title_html($post_id) : esc_html(get_the_title($post_id)),
|
||||
|
||||
@@ -498,6 +498,7 @@ test('single post more menu has one accessible runtime and an in-flow author anc
|
||||
const article = read('assets/js/core/article.js');
|
||||
const components = read('inc/helpers/aksrt-single-components.php');
|
||||
const single = read('inc/helpers/aksrt-single.php');
|
||||
const singleRender = read('inc/helpers/aksrt-single-render.php');
|
||||
const authorBar = read('templates/parts/single-author-bar.php');
|
||||
const styles = read('assets/css/frontend/single-post/author-actions.css');
|
||||
|
||||
@@ -516,6 +517,8 @@ test('single post more menu has one accessible runtime and an in-flow author anc
|
||||
assert.doesNotMatch(components, /\$direction/);
|
||||
assert.match(authorBar, /class="single-meta-row"/);
|
||||
assert.doesNotMatch(authorBar, /single-metabox abs-right/);
|
||||
assert.match(singleRender, /'meta_html'\s*=>\s*\(string\) \(\$ctx\['meta_box_html'\] \?\? ''\)/);
|
||||
assert.doesNotMatch(singleRender, /cover-meta|str_replace\('single-metabox'/);
|
||||
assert.match(styles, /\.single-meta-row > \.single-metabox\s*\{[^}]*position:\s*relative;[^}]*transform:\s*none;/s);
|
||||
assert.match(styles, /\.post-drop-meta__menu\s*\{[^}]*position:\s*absolute;[^}]*right:\s*0;/s);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user