<?php
    $cat = get_post_primary_category(get_the_ID());
    $cat = $cat['primary_category'];
?>
<?php if (is_single()): ?>
        <?php if (get_post_format()): ?>
                <?php get_template_part( 'content', get_post_format() ); ?>
        <?php else: ?>
                <?php get_template_part( 'content-page' ); ?>
        <?php endif; ?>
<?php else: ?>
        <div class="col-12 col-md-6 col-xl-4 float-left">
                <div class="article cell">
                        <a class="article__frame" href="<?php echo esc_url( get_permalink() ); ?>">
                            <?php if (has_post_thumbnail()): ?>
                                <?php if(wp_is_mobile()): ?>
                                    <img loading="lazy" class="d-block lazyload" <?php if(wp_is_mobile()): ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload_m.webp"<?php else: ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload.jpg"<?php endif; ?> data-src="<?php echo get_the_post_thumbnail_url($post,'medium'); ?>" alt="<?php the_title(); ?>"  title="<?php the_title(); ?>" />
                                <?php else: ?>
                                    <img loading="lazy" class="d-block lazyload" width="469px" height="264px" <?php if(wp_is_mobile()): ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload_m.webp"<?php else: ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload.jpg"<?php endif; ?> data-src="<?php echo get_the_post_thumbnail_url($post,'medium'); ?>" alt="<?php the_title(); ?>"  title="<?php the_title(); ?>" />
                                <?php endif; ?>
                            <?php elseif($cat->term_id == 3396): ?>
                                <?php foreach (get_coauthors() as $author ): ?>
                                    <img loading="lazy" class="d-block lazyload" <?php if(wp_is_mobile()): ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload_m.webp"<?php else: ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload.jpg"<?php endif; ?> data-src="<?php echo coauthors_get_avatar_url($author,500, 500, '' ); ?>" alt="<?php echo $author->name; ?>" />
                                <?php endforeach; ?>
                            <?php endif; ?>
                        </a>
                        <div class="article__body">
                                <a class="article__title" href="<?php echo esc_url( get_permalink() ); ?>">
                                        <?php the_title(); ?>
                                </a>
                        </div>
                </div>
        </div>
        <!--preview-short-rubrick-->
<?php endif; ?>