<?php
/**
 * Template file used as the fallback when there are no posts in the main loop.
 * 
 * @link http://themeshaper.com/2012/11/01/the-wordpress-theme-index-template/
 * @author Dan Suleski
 * @package bpq
 * @since bpq 1.0
 */

namespace bpq;
if ( !defined( 'ABSPATH' ) ) exit;  // Exit if accessed directly



//  Pre-content.
do_action( 'action_bpq_article_before' );

//  OPTION: Narrow or wide?
$opt_span = settings::format_span();
$span_class = ( $opt_span == 'bleed-narrow' ) ? 'container' : 'container-fluid';

//  The empty article should look similar to regular articles.
echo
    '<article id="post-empty" class="'.implode( ' ', get_post_class() ).'">'.
        '<div class="'.$span_class.'">'.
            '<div class="row">';

//  If the user is the primary user on the blog, offer a shortcut to add posts.
if ( is_home() && current_user_can( 'publish_posts' ) )
{
    echo
                sprintf( __( 'Ready to publish your first post?  <a href="%1$s">Get started here</a>.', 'bpq' ), admin_url( 'post-new.php' ) );
}

//  Search fails offer another search opportunity front-and-center.
elseif ( is_search() )
{
    echo
                __( 'Nothing found.  Would you like to search with different terms?', 'bpq' ).
                '<br>'.
                get_search_form( false );
}

//  Not sure which kind of page - might be a 404 error, could be something else.
else
{
    echo
                __( 'Unable to find what you seek.  Perhaps a search might help?', 'bpq' ).
                get_search_form( false );
}

//  Complete the article container.
echo
            '</div>'.
        '</div>'.
    '</article>';

//  Post-content.
do_action( 'action_bpq_article_after' );

?>