fixed up the marquee comment section for less then 3 comments
This commit is contained in:
@@ -41,8 +41,8 @@
|
||||
|
||||
.pexpo-core-comment-group {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
padding-right: 20px;
|
||||
gap: 100px;
|
||||
/* padding-right: 20px; */
|
||||
}
|
||||
|
||||
.pexpo-core-comment {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user