<?php
/**
 * The main template file.
 */

get_header();
?>

<main id="site-content" role="main">

        <?php
        /**
         * Functions hooked into eisai_archive_header action.
         *
         * eisai_archive_header                                            - 5
         */
        do_action( 'eisai_site_content_header' );

		if ( have_posts() ) {

            /**
             * Functions hooked into eisai_before_loop action.
             *
             * eisai_loop_wrapper_start                                    - 10
             */
            do_action( 'eisai_before_loop' );

            // Loop.
            $i = 0;
            while ( have_posts() ) {
                the_post();
                $i++;
                $eisai_delay = eisai_get_animation_delay( $i );

                get_template_part( 'partials/content', 'loop' );
            }

            /**
             * Functions hooked into eisai_after_loop action.
             *
             * eisai_loop_wrapper_end                                      - 5
             */
            do_action( 'eisai_after_loop' );

			get_template_part( 'partials/pagination' );

		} elseif ( is_search() ) {
    		?>
    		<div class="no-search-results uk-container uk-container-small">
                <?php
    			get_search_form(
    				array(
    					'label' => __( 'Search again', 'eisai' ),
    				)
    			);
    			?>
    		</div> <!-- .no-search-results -->
    		<?php
    	}
		?>

</main> <!-- #site-content -->

<?php
get_footer();
