<?php
/**
 * The template use to display document's search results.
 *
 * @package DoC8
 * @version 1.0.0
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit; // No direct access
}
get_header( 'document' );

	doc8_get_template_part( 'document-heading' );

	?>
	<div class="documents">
		<div class="documents-container">
			<?php
			doc8_get_template_part( 'document-searchform' );
			?>

			<div class="document-results">
				<?php if ( have_posts() ) : ?>
					<?php
					while ( have_posts() ) :
						the_post();

						doc8_get_template_part( 'content-document' );
					endwhile;

					the_posts_pagination( array(
						'prev_text' => '<span class="screen-reader-text">' . __( 'Previous page', 'docu' ) . '</span>',
						'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'docu' ) . '</span>',
						'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'docu' ) . ' </span>',
					) );
					?>
				<?php else : ?>

				<div class="no-results">
					<p><?php _e( 'No documents found. Perhaps a different keywords.', 'docu' ); ?></p>
				</div>

				<?php endif; ?>
			</div>
		</div>
	</div>
	<?php

get_footer( 'document' );