<?php 
/**
 * Template part for displaying About Us Section
 *
 *@package Rock Singer
 */

?>

<?php
    $about_us_subtitle          = rock_singer_get_option( 'about_us_subtitle' );
    $about_us_section_title     = rock_singer_get_option( 'about_us_section_title' );
    $about_us_featured_image    = rock_singer_get_option( 'about_us_featured_image' );
    $about_us_content           = rock_singer_get_option( 'about_us_content' );
    $about_us_btn_label         = rock_singer_get_option( 'about_us_btn_label' );
    $about_us_btn_url           = rock_singer_get_option( 'about_us_btn_url' );   
?>

<article>
    <?php if( !empty( $about_us_featured_image ) ): ?>
        <div class="featured-image" style="background-image: url('<?php echo esc_url( $about_us_featured_image ); ?>');">
        </div><!-- .featured-image -->
    <?php endif; ?>
    
    <div class="entry-container">
        <?php if( !empty( $about_us_subtitle ) || !empty( $about_us_section_title ) ): ?>
            <div class="section-header">
                <?php if( !empty( $about_us_subtitle ) ): ?>
                    <h3 class="section-subtitle"><?php echo esc_html( $about_us_subtitle ); ?></h3>
                <?php endif; ?>

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

        <?php if( !empty( $about_us_content ) ): ?>
            <div class="entry-content">
                <p><?php echo esc_html( $about_us_content ); ?></p>
            </div><!-- .entry-content -->
        <?php endif; ?>

        <?php if( !empty( $about_us_btn_label ) ): ?>
            <div class="read-more">
                <a href="<?php echo esc_attr( $about_us_btn_url ); ?>" class="btn"><?php echo esc_html( $about_us_btn_label ); ?><i class="fa-solid fa-arrow-up-right-from-square"></i></a>
            </div><!-- .read-more -->
        <?php endif; ?>
    </div><!-- .entry-container -->
</article>