fixed up the marquee comment section for less then 3 comments

This commit is contained in:
2026-03-11 22:24:32 +01:00
parent 61d2425632
commit 678541f54c
3 changed files with 10 additions and 5 deletions

View File

@@ -41,8 +41,8 @@
.pexpo-core-comment-group {
display: flex;
gap: 20px;
padding-right: 20px;
gap: 100px;
/* padding-right: 20px; */
}
.pexpo-core-comment {

View File

@@ -25,7 +25,12 @@
if ( ! empty( $comments ) ) {
echo '<div class="pexpo-core-comment-groups-wrapper">';
for ($i = 0; $i < 2; $i++) {
if ( count( $comments ) < 3 ) {
$groups = 6 / count( $comments );
} else {
$groups = 2;
}
for ($i = 0; $i < $groups; $i++) {
echo '<div class="pexpo-core-comment-group"'.($i ? ' aria-hidden="true"' : '').'>';
foreach ($comments as $comment) {