<?php
    $publiData = array();
    $publiData['title'] = get_the_title($publi->ID);
    $publiData['surtitle'] = get_field('surtitle', $publi->ID);
    $publiData['id'] = get_field('id', $publi->ID);
    $publiData['cover'] = getImageUrl(get_field('cover', $publi->ID));
    $publiData['cover_object'] = get_field('cover', $publi->ID);
    $publiData['file'] = get_field('file', $publi->ID);
?>
<div class="publicationBloc">
    <?php if ($publiData['file']): ?>
    <a href="<?php echo $publiData['file']['url']; ?>" target="_blank" class="publicationBloc_link" aria-label="<?php echo pradel_format_attr($publiData['title']); ?>"></a>
    <?php endif; ?>
    <div class="publicationBloc_coverWrap">
        <div class="publicationBloc_cover imageRender" style="<?php /*background-image: url(<?php echo $publiData['cover']; ?>); */ ?>">
            <img src="<?php echo getImageUrl($publiData['cover_object'], 'lazy'); ?>"
                <?php echo getImageSrcSetSizes($publiData['cover_object']); ?>
                alt="<?php echo pradel_format_attr($publiData['title']); ?>" class="__vhidden">
        </div>
    </div>
    <div class="publicationBloc_content">
        <div class="publicationBloc_surtitle">
            <div><?php echo $publiData['surtitle']; ?></div>
            <strong><?php echo $publiData['id']; ?></strong>
        </div>
        <h4 class="publicationBloc_title"><?php echo $publiData['title']; ?></h4>
    </div>
</div>