<?php if(breek_lite_get_option('enable_single_author') == 1 || is_archive() ): ?>
	<?php
	$author_id = get_the_author_meta('ID');
    $author_avatar = get_avatar_url( get_the_author_meta('email'), array( 'size' => 192 ) );
	$author_name = get_the_author();
	$author_url = get_author_posts_url($author_id);
	$class = '';
	if($author_avatar) $class .= ' with-avatar'; else $class .= ' no-avatar';
	if( is_single() ) $class .= ' section';
    ?>    
    <!-- start: .author -->
    <section id="author" class="author <?php echo esc_attr($class); ?>">
        <?php if($author_avatar): ?>
            <div class="avatar">
                    <a href="<?php echo esc_url( $author_url ); ?>" class="hover-effect thumb"><span class="fullimage cover" style="background-image: url('<?php echo esc_url( $author_avatar ); ?>');"></span></a>
            </div>
        <?php endif; ?>
        <div class="info">
            <?php if( is_archive() ): ?>
                <h4 class="title author-name gradient-effect"><?php echo esc_html( $author_name ); ?></h4>
            <?php else: ?>
                <h4 class="title author-name gradient-effect"><a href="<?php echo esc_url($author_url); ?>"><?php echo esc_html( $author_name ); ?></a></h4>
            <?php endif; ?>	
            
            <p><?php the_author_meta('description'); ?></p>
            <div class="social">
                <?php
                $website = get_the_author_meta('user_url');
                ?>
                <?php if($website): ?>
                    <a href="<?php echo esc_url($website); ?>" class="website" title="<?php esc_attr_e('Website', 'breek-lite'); ?>: <?php echo esc_url($website); ?>" target="_blank" rel="nofollow noopener"><i class="fa fa-globe"></i></a>
                <?php endif; ?>
            </div>
        </div>
        <div class="clear"></div>
    </section>
    <!-- end: .author -->
    <div class="clear"></div>
<?php endif; ?>
