<html>
<?php
/**
 * Template part for displaying posts
 *
 *
 * @package luxia
 */

?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    <div class="bsingle__post mb-50">
        <div class="bsingle__post-thumb">
             <?php
                if (has_post_thumbnail()) :
                    the_post_thumbnail( 'luxia-featured-large', array( 'alt' => get_the_title() ) );
                else :

                endif;
             ?>
        </div>
        <div class="bsingle__content">
            <div class="admin">
               <i class="far fa-user"></i> <?php esc_html_e( 'By', 'luxia' ); ?> <?php the_author(); ?> 
            </div>
            <?php
                if ( is_singular() ) :
                    the_title( '<h2 class="single">', '</h2>' );
                else :
                    the_title( '<h2 class="single"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
                endif;

                if ( 'post' === get_post_type() ) :
                ?>

                <?php endif; ?>

                <?php if (is_single() ) {
                the_content();

            } elseif ( is_search() OR is_archive() ) {?>
                <p>
                    <?php echo substr(get_the_excerpt(), 0 ,180); ?>

                                </p>

                    <?php } else {
                if ($post) { ?>

                    <p>
                        <?php echo substr(get_the_excerpt(), 0 ,190); ?>	

                    </p>

                    <?php } else {
                    the_content();

                }

            } ?>
            <div class="meta-info">
                <ul>
                    <li><i class="fal fa-comments"></i>  <?php echo comments_number(__('No Comments', 'luxia'), __('1 Comment', 'luxia'), __('% Comments', 'luxia'));?></li>
                    <li><i class="fal fa-calendar-alt"></i> <?php echo get_the_date(); ?> </li>
                </ul>
            </div>

        </div>
    </div>

</article><!-- #post-## -->