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

get_header();
?>

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

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

		if ( have_posts() ) {

            /**
             * Functions hooked into basho_before_loop action.
             *
             * basho_loop_wrapper_start                                    - 10
             */
            do_action( 'basho_before_loop' );

            // Loop.
            while ( have_posts() ) {
                the_post();
                get_template_part( 'partials/content', 'loop' );
            }

            /**
             * Functions hooked into basho_after_loop action.
             *
             * basho_loop_wrapper_end                                      - 5
             */
            do_action( 'basho_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', 'basho' ),
                    )
                );
    			?>
    		</div> <!-- .no-search-results -->
    		<?php
    	}
		?>

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

<?php
get_footer();
