<?php 
$post_id = get_the_ID();
$post_format = get_post_format();
$post_style = '';
// Author information
$author_id = get_the_author_meta('ID');
$author_avatar = get_avatar_url( get_the_author_meta('email') );
$author_name = get_the_author();
?>
<header>

    <div class="post-format-image post-format-wrapper">
        <?php if( has_post_thumbnail() ): ?>
            <div class="featured-image">
                <?php the_post_thumbnail('large', array( 'class' => 'fullwidth', 'fetchpriority' => 'high', 'decoding' => 'async' ) ); ?>  
                <?php echo breek_lite_render_categories(); ?>
            </div>
        <?php else: ?>
            <?php echo breek_lite_render_categories( '' ); ?>
        <?php endif; ?>
    </div>
            
    <!-- start: .meta -->
    <div class="meta">
        <?php if( breek_lite_get_option('enable_author_top') == '1' ): ?>
            <a href="<?php echo get_author_posts_url($author_id); ?>" title="<?php echo esc_attr($author_name); ?>" class="author meta-info hide-on-mobile">                                        
                <?php if($author_avatar): ?>
                    <span class="author-image cover" style="background-image: url('<?php echo esc_url($author_avatar); ?>');"></span>
                <?php endif; ?>
                <span class="author-name"><?php echo esc_html($author_name); ?></span>
            </a>
        <?php endif; ?>    

        <?php if( breek_lite_get_option('single_enable_meta_data') !== '0' ): ?>  

            <?php if( breek_lite_get_option('enable_global_date') !== '0' ): ?>                   
                <time class="meta-info" datetime="<?php the_time('Y-m-d'); ?>"><i class="remixicon remixicon-calendar-line"></i> <?php the_time( get_option('date_format') ); ?></time>
            <?php endif; ?>

            <?php if( breek_lite_get_option('enable_global_comments') !== '0' ): ?>
                <a href="#comments" class="comments tooltip" title="<?php esc_attr_e('Go to comments', 'breek-lite'); ?>">
                    <i class="remixicon remixicon-chat-1-line fa-flip-horizontal"></i>
                    <span class="comment-count"><?php echo get_comments_number($post_id); ?></span>
                </a>   
            <?php endif; ?>

        <?php endif; ?>

        <div class="clear"></div>
    
        <h1 class="title no-thumb large bold"><?php the_title(); ?></h1>
    </div>
    <!-- end: .meta -->

	<div class="clear"></div>

</header>