<?php 
/**
 * Template part for displaying Our Gallery Section
 *
 *@package Rock Singer
 */
    $our_gallery_section_subtitle        = rock_singer_get_option( 'our_gallery_section_subtitle' );
    $our_gallery_section_title           = rock_singer_get_option( 'our_gallery_section_title' );
    $number_of_our_gallery_items         = rock_singer_get_option( 'number_of_our_gallery_items' ); ?>

    <?php if( !empty($our_gallery_section_subtitle) || !empty($our_gallery_section_title) ):?>
        <div class="section-header">
            <?php if( !empty($our_gallery_section_subtitle) ): ?>
                <h3 class="section-subtitle"><?php echo esc_html($our_gallery_section_subtitle);?></h3>
            <?php endif; ?>
            
            <?php if( !empty($our_gallery_section_title) ): ?>
                <h2 class="section-title"><?php echo esc_html($our_gallery_section_title);?></h2>
            <?php endif; ?>
        </div><!-- .section-header -->
    <?php endif; ?>

    <div class="section-content gallery-popup col-3 clear">
        <?php for( $i=1; $i<=$number_of_our_gallery_items; $i++ ) : 
            $our_gallery_image[$i]  = rock_singer_get_option( 'our_gallery_image_'. $i ); ?>

            <?php if( !empty($our_gallery_image[$i]) ): ?>
                <article>
                    <div class="gallery-item-wrapper">
                        <div class="featured-image" style="background-image: url('<?php echo esc_html($our_gallery_image[$i]); ?>');">
                            <a href="<?php echo esc_url($our_gallery_image[$i]); ?>" class="popup"><i class="fas fa-search"></i></a>
                        </div><!-- .featured-image -->
                    </div><!-- .gallery-item-wrapper -->
                </article>
            <?php endif; ?>
        <?php endfor; ?>
    </div><!-- .section-content -->