<?php
if($bloc['banner_img']){
    $bg = $bloc['banner_img'];
    if($bloc['banner_img_title']){
        $title = $bloc['banner_img_title'];
    }else{
        $title = null;
    }
    if($bloc['banner_img_link']){
        $link = $bloc['banner_img_link'];
    }else{
        $link = null;
    }
    ?>
    <div class="container-fluid bloc_banner" style="background: url(<?php echo $bg['sizes']['c_slider'];?>) no-repeat center center / cover;">
        <?php
        if($link){
            echo '<a href="">';
        }
        if($title){
            echo '<span class="cover"></span>';
        }
        ?>

                <div class="banner_title" >
                    <h2 class="brown"><?php echo $title;?></h2>
                </div>

        <?php
        if($link){
            echo '</a>';
        }
        ?>
    </div>
    <?php
}
?>
