fix(submit): drop the redundant featured preview type badge
The reference theme renders no type badge in the featured box; the swiper and dplayer previews are self-explanatory. Remove it from both preview branches and delete the now-unused CSS rule.
This commit is contained in:
@@ -504,16 +504,6 @@ body.aksrt-editor-media-open {
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.featured-edit .featured-type-badge {
|
|
||||||
position: absolute;
|
|
||||||
right: 12px;
|
|
||||||
bottom: 12px;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 30px;
|
|
||||||
background: rgba(0, 0, 0, 0.55);
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.featured-edit .btns-full {
|
.featured-edit .btns-full {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
border: 2px dashed var(--main-border-color, rgba(50, 50, 50, 0.08));
|
border: 2px dashed var(--main-border-color, rgba(50, 50, 50, 0.08));
|
||||||
|
|||||||
@@ -449,8 +449,7 @@
|
|||||||
'<div class="swiper-button-prev"></div>' +
|
'<div class="swiper-button-prev"></div>' +
|
||||||
'<div class="swiper-button-next"></div>' +
|
'<div class="swiper-button-next"></div>' +
|
||||||
'<div class="swiper-pagination"></div>' +
|
'<div class="swiper-pagination"></div>' +
|
||||||
'</div>' +
|
'</div>';
|
||||||
'<span class="featured-type-badge"><i class="fa fas fa-image"></i></span>';
|
|
||||||
} else if (t === 'video') {
|
} else if (t === 'video') {
|
||||||
html =
|
html =
|
||||||
'<div class="new-dplayer dplayer-scale-height" style="--scale-height:50%;" video-url="' +
|
'<div class="new-dplayer dplayer-scale-height" style="--scale-height:50%;" video-url="' +
|
||||||
@@ -459,8 +458,7 @@
|
|||||||
escapeHtml(d.pic || '') +
|
escapeHtml(d.pic || '') +
|
||||||
'"><div class="graphic" style="padding-bottom:50%;">' +
|
'"><div class="graphic" style="padding-bottom:50%;">' +
|
||||||
'<div class="abs-center text-center"><i class="fa fas fa-play-circle fa-4x muted-3-color opacity5" aria-hidden="true"></i></div>' +
|
'<div class="abs-center text-center"><i class="fa fas fa-play-circle fa-4x muted-3-color opacity5" aria-hidden="true"></i></div>' +
|
||||||
'</div></div>' +
|
'</div></div>';
|
||||||
'<span class="featured-type-badge"><i class="fa fas fa-video"></i></span>';
|
|
||||||
}
|
}
|
||||||
this.destroyFeaturedPlayer(preview);
|
this.destroyFeaturedPlayer(preview);
|
||||||
preview.innerHTML = html;
|
preview.innerHTML = html;
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ $can_video = !empty($ctx['can_cover_video']);
|
|||||||
<div class="swiper-button-next"></div>
|
<div class="swiper-button-next"></div>
|
||||||
<div class="swiper-pagination"></div>
|
<div class="swiper-pagination"></div>
|
||||||
</div>
|
</div>
|
||||||
<span class="featured-type-badge"><i class="fa fas fa-image"></i></span>
|
|
||||||
<?php elseif ($type === 'video') : ?>
|
<?php elseif ($type === 'video') : ?>
|
||||||
<div class="new-dplayer dplayer-scale-height" style="--scale-height:50%;"
|
<div class="new-dplayer dplayer-scale-height" style="--scale-height:50%;"
|
||||||
video-url="<?php echo esc_url((string) ($data['url'] ?? '')); ?>"
|
video-url="<?php echo esc_url((string) ($data['url'] ?? '')); ?>"
|
||||||
@@ -48,7 +47,6 @@ $can_video = !empty($ctx['can_cover_video']);
|
|||||||
<div class="abs-center text-center"><i class="fa fas fa-play-circle fa-4x muted-3-color opacity5" aria-hidden="true"></i></div>
|
<div class="abs-center text-center"><i class="fa fas fa-play-circle fa-4x muted-3-color opacity5" aria-hidden="true"></i></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="featured-type-badge"><i class="fa fas fa-video"></i></span>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns-full flex ac jc">
|
<div class="btns-full flex ac jc">
|
||||||
|
|||||||
@@ -65,6 +65,16 @@ test('slide cover preview renders a real swiper like the reference theme', () =>
|
|||||||
assert.doesNotMatch(js, /escapeHtml\(d\[0\]\.url\)/);
|
assert.doesNotMatch(js, /escapeHtml\(d\[0\]\.url\)/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('featured previews carry no type badge like the reference theme', () => {
|
||||||
|
const featured = read('templates/parts/submit/featured.php');
|
||||||
|
const js = read('assets/js/front-submit.js');
|
||||||
|
const css = read('assets/css/frontend/pages/submit.css');
|
||||||
|
|
||||||
|
assert.doesNotMatch(featured, /featured-type-badge/);
|
||||||
|
assert.doesNotMatch(js, /featured-type-badge/);
|
||||||
|
assert.doesNotMatch(css, /featured-type-badge/);
|
||||||
|
});
|
||||||
|
|
||||||
test('submit.css mirrors the reference visibility matrix for the buttons row', () => {
|
test('submit.css mirrors the reference visibility matrix for the buttons row', () => {
|
||||||
const css = read('assets/css/frontend/pages/submit.css');
|
const css = read('assets/css/frontend/pages/submit.css');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user