<?php
$html_id = pxl_get_element_id($settings);
if ( ! empty( $settings['link']['url'] ) ) {
    $widget->add_render_attribute( 'link_text', 'href', $settings['link']['url'] );

    if ( $settings['link']['is_external'] ) {
        $widget->add_render_attribute( 'link_text', 'target', '_blank' );
    }

    if ( $settings['link']['nofollow'] ) {
        $widget->add_render_attribute( 'link_text', 'rel', 'nofollow' );
    }
}
?>
<div class="pxl-banner-box pxl-banner-box8 <?php echo esc_attr($settings['pxl_animate']); ?>" data-wow-delay="<?php echo esc_attr($settings['pxl_animate_delay']); ?>ms">
    <div class="pxl-banner-inner">
        <?php if(!empty($settings['image']['id'])) : 
            $image_size = !empty($settings['img_size']) ? $settings['img_size'] : '671x694'; 
            $img = pxl_get_image_by_size( array(
                'attach_id'  => $settings['image']['id'],
                'thumb_size' => $image_size,
            ));
            $thumbnail = $img['thumbnail'];
            ?>
            <div class="pxl-item--img">
                <div class="pxl-image">
                    <?php echo pxl_print_html($thumbnail); ?>
                </div>
            </div>
        <?php endif; ?>
        <div class="pxl-content-section">
            <div class="pxl-banner-button">
                <a class="pxl-button-link" <?php pxl_print_html($widget->get_render_attribute_string( 'link_text' )); ?>>
                    <span class="pxl-btn-icon">
                        <svg xmlns="http://www.w3.org/2000/svg" fill="#000" height="512" viewBox="0 0 24 24" width="512"><path d="m16.0039 9.414-8.60699 8.607-1.414-1.414 8.60599-8.607h-7.58499v-2h10.99999v11h-2z" fill="rgb(0,0,0)"></path></svg>
                    </span>
                </a>
            </div>
            <div class="pxl-item-content">
                <a class="pxl-item-title" <?php pxl_print_html($widget->get_render_attribute_string( 'link_text' )); ?>>
                    <?php echo esc_attr($settings['title_lv2']); ?>
                </a>
                <div class="pxl-item-desc">
                    <?php echo esc_attr($settings['desc']); ?>
                </div>
            </div>
        </div>
    </div>
</div>