Skip to content

Commit

Permalink
Bumps version to v.0.6.0-alpha
Browse files Browse the repository at this point in the history
All foundations are setup. Development can begin.
  • Loading branch information
connor-baer committed Jun 28, 2016
1 parent d905f8f commit 90bd8bc
Show file tree
Hide file tree
Showing 38 changed files with 879 additions and 1,928 deletions.
66 changes: 47 additions & 19 deletions 404.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php
/**
* The template for displaying 404 pages (not found)
* The template for displaying 404 pages (not found).
*
* @package NC Template
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package NC_Template
*/

get_header(); ?>
Expand All @@ -12,21 +14,47 @@

<section class="error-404 not-found">
<header class="page-header">
<h1 class="page-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'nc-template' ); ?></h1>
</header><!-- .page-header -->

<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'nc-template' ); ?></h1>
</header>
<div class="page-content">
<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'nc-template' ); ?></p>

<?php get_search_form(); ?>
</div><!-- .page-content -->
</section><!-- .error-404 -->

</main><!-- .site-main -->

<?php get_sidebar( 'content-bottom' ); ?>

</div><!-- .content-area -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'nc-template' ); ?></p>

<?php
get_search_form();

the_widget( 'WP_Widget_Recent_Posts' );

// Only show the widget if site has multiple categories.
if ( nc_template_categorized_blog() ) :
?>

<div class="widget widget_categories">
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'nc-template' ); ?></h2>
<ul>
<?php
wp_list_categories( array(
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'title_li' => '',
'number' => 10,
) );
?>
</ul>
</div>
<?php
endif;

/* translators: %1$s: smiley */
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'nc-template' ), convert_smilies( ':)' ) ) . '</p>';
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );

the_widget( 'WP_Widget_Tag_Cloud' );
?>

</div>
</section>
</main>
</div>
<?php
get_footer();
44 changes: 15 additions & 29 deletions archive.php
Original file line number Diff line number Diff line change
@@ -1,63 +1,49 @@
<?php
/**
* The template for displaying archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* If you'd like to further customize these archive views, you may create a
* new template file for each one. For example, tag.php (Tag archives),
* category.php (Category archives), author.php (Author archives), etc.
* The template for displaying archive pages.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package NC Template
* @package NC_Template
*/

get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php if ( have_posts() ) : ?>
<?php
if ( have_posts() ) : ?>

<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->

</header>
<?php
// Start the Loop.
/* Start the Loop */
while ( have_posts() ) : the_post();

/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_format() );
get_template_part( 'components/post/content', get_post_format() );

// End the loop.
endwhile;

// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'nc-template' ),
'next_text' => __( 'Next page', 'nc-template' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'nc-template' ) . ' </span>',
) );
the_posts_navigation();

// If no content, include the "No posts found" template.
else :
get_template_part( 'template-parts/content', 'none' );

endif;
?>
get_template_part( 'components/post/content', 'none' );

</main><!-- .site-main -->
</div><!-- .content-area -->
endif; ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
</main>
</div>
<?php
get_sidebar();
get_footer();
87 changes: 47 additions & 40 deletions comments.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?php
/**
* The template for displaying comments
* The template for displaying comments.
*
* The area of the page that contains both current comments
* This is the template that displays the area of the page that contains both the current comments
* and the comment form.
*
* @package NC Template
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package NC_Template
*/

/*
Expand All @@ -20,58 +22,63 @@

<div id="comments" class="comments-area">

<?php if ( have_comments() ) : ?>
<?php
// You can start editing here -- including this comment!
if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
if ( 1 === $comments_number ) {
/* translators: %s: post title */
printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'nc-template' ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
_nx(
'%1$s thought on &ldquo;%2$s&rdquo;',
'%1$s thoughts on &ldquo;%2$s&rdquo;',
$comments_number,
'comments title',
'nc-template'
),
number_format_i18n( $comments_number ),
get_the_title()
);
}
printf( // WPCS: XSS OK.
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'nc-template' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
?>
</h2>

<?php the_comments_navigation(); ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'nc-template' ); ?></h2>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'nc-template' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'nc-template' ) ); ?></div>

</div>
</nav>
<?php endif; // Check for comment navigation. ?>

<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 42,
'style' => 'ol',
'short_ping' => true,
) );
?>
</ol><!-- .comment-list -->
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'nc-template' ); ?></h2>
<div class="nav-links">

<?php the_comments_navigation(); ?>
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'nc-template' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'nc-template' ) ); ?></div>

<?php endif; // Check for have_comments(). ?>
</div>
</nav>
<?php
endif; // Check for comment navigation.

endif; // Check for have_comments().

<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'nc-template' ); ?></p>
<?php endif; ?>

// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>

<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'nc-template' ); ?></p>
<?php
comment_form( array(
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</h2>',
) );
endif;

comment_form();
?>

</div><!-- .comments-area -->
</div><!-- #comments -->
12 changes: 12 additions & 0 deletions components/content-footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* Template part for displaying the content footer.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package NC_Template
*/

?><footer class="entry-footer">
<?php nc_template_entry_footer(); ?>
</footer><!-- .entry-footer -->
12 changes: 12 additions & 0 deletions components/content-meta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* Template part for displaying the content meta.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package NC_Template
*/

?><div class="entry-meta">
<?php nc_template_posted_on(); ?>
</div><!-- .entry-meta -->
36 changes: 36 additions & 0 deletions components/content-none.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/**
* Template part for displaying a message that posts cannot be found.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package NC_Template
*/

?>

<section class="no-results not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'nc-template' ); ?></h1>
</header>
<div class="page-content">
<?php
if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>

<p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'nc-template' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>

<?php elseif ( is_search() ) : ?>

<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'nc-template' ); ?></p>
<?php
get_search_form();

else : ?>

<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'nc-template' ); ?></p>
<?php
get_search_form();

endif; ?>
</div>
</section><!-- .no-results -->
39 changes: 39 additions & 0 deletions components/content-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
* Template part for displaying page content in page.php.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package NC_Template
*/

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>
<div class="entry-content">
<?php
the_content();

wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'nc-template' ),
'after' => '</div>',
) );
?>
</div>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'nc-template' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'
);
?>
</footer>
</article><!-- #post-## -->
Loading

0 comments on commit 90bd8bc

Please sign in to comment.