Permalink
Browse files

Completed pagination

  • Loading branch information...
lacymorrow committed Mar 21, 2014
1 parent 4ad1768 commit 4e6823ac496e39645788ccba8a135a52824ee6b1
Showing with 129 additions and 41 deletions.
  1. +1 βˆ’1 README.md
  2. +2 βˆ’2 content-single.php
  3. +1 βˆ’1 content.php
  4. +105 βˆ’1 css/screen.css
  5. +2 βˆ’1 footer.php
  6. +1 βˆ’1 header.php
  7. +12 βˆ’10 inc/template-tags.php
  8. +1 βˆ’0 index.php
  9. +0 βˆ’1 js/customizer.js
  10. +4 βˆ’23 sidebar.php
View
@@ -1,5 +1,5 @@
#Casper
*(for Wordpress)*
Casper *(for Wordpress)* is a simple yet beautiful theme for bloggers.
Inspired by the [Ghost](http://ghost.org) blogging platform, Casper is a [Wordpress](http://wordpress.org) port of the default theme by the same name. The goal of this project is to emulate the gorgeous theme while taking advantage of features exclusive to the Wordpress framework.
View
@@ -11,7 +11,7 @@
?>
<header class="post-header">
<?php if ( 'post' == get_post_type() ) : ?>
<span class="post-meta"><?php casper_posted_on(); ?> on <?php printf($category_list); ?></span>
<span class="post-meta"><?php casper_posted_on(); ?> | <?php printf($category_list); ?></span>
<?php endif; ?>
<h2 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</header>
@@ -21,7 +21,7 @@
</section><!-- .entry-summary -->
<?php else : ?>
<section class="post-content">
<?php the_content( __( '&hellip; <span class="meta-nav">&rarr;</span>', 'casper' ) ); ?>
<?php the_content( __( 'more&nbsp<span class="meta-nav">&rarr;</span>', 'casper' ) ); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'casper' ),
View
@@ -21,7 +21,7 @@
</section><!-- .entry-summary -->
<?php else : ?>
<section class="post-content">
<?php the_content( __( '&hellip; <span class="meta-nav">&rarr;</span>', 'casper' ) ); ?>
<?php the_content( __( 'more&nbsp;<span class="meta-nav">&rarr;</span>', 'casper' ) ); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'casper' ),
View
@@ -359,6 +359,13 @@ margin on the iframe, cause it breaks stuff. */
vertical-align: middle;
}
.clear {
clear: both;
height: 0;
padding: 0;
margin: 0;
}
/* ==========================================================================
4. General - The main styles for the the theme
@@ -375,6 +382,27 @@ margin on the iframe, cause it breaks stuff. */
color: #fff;
background: #303538 no-repeat center center;
background-size: cover;
border-bottom: #EBF2F6 1px solid;
}
.site-head:after {
display: block;
content: "";
width: 7px;
height: 7px;
border: #E7EEF2 1px solid;
position: absolute;
bottom: -5px;
left: 50%;
margin-left: -5px;
background: #fff;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
box-shadow: #fff 0 0 0 5px;
}
body.home .site-head:after {
z-index: -3;
}
.blog-logo {
@@ -575,6 +603,11 @@ margin on the iframe, cause it breaks stuff. */
margin-right: 180px;
}
.post-footer .author a{
text-decoration: none;
}
/* Drop the share links in the space to the right.
Doing it like this means it's easier for the author bio
to be flexible at smaller screen sizes while the share
@@ -615,6 +648,78 @@ margin on the iframe, cause it breaks stuff. */
font-size: 1.1rem;
}
/* Comments */
.comments-area {
width:80%;
max-width: 700px;
margin: 4rem auto;
padding-bottom: 4rem;
}
.comment-form-comment label{
width: 100%;
display: inline-block;
}
.form-allowed-tags {
width:80%;
float: right;
font-family: 'Open Sans', sans-serif;
font-size: 1.3rem;
color: #9EABB3;
margin: -1rem;
}
.form-submit #submit{
max-width: 18%;
float: left;
border-width: 3px;
background: none;
display: inline-block;
padding: 15px;
border: #EBF2F6 2px solid;
text-decoration: none;
transition: border ease 0.3s;
font-family: 'Open Sans', sans-serif;
font-size: 1.3rem;
color: #9EABB3;
}
/* Main widget wrapper */
.widget-area {
width:80%;
max-width: 700px;
margin: 4rem auto;
padding-bottom: 4rem;
font-family: 'Open Sans', sans-serif;
font-size: 1.3rem;
color: #9EABB3;
}
.widget-area h1 {
font-size: 2.5rem;
}
.widget-area aside {
float: left;
width: 30%;
padding: 2rem 1.5%;
}
.search-submit {
border-width: 3px;
background: none;
display: inline-block;
padding: 15px;
border: #EBF2F6 2px solid;
text-decoration: none;
border-radius: 30px;
transition: border ease 0.3s;
}
.search-submit:hover, .form-submit #submit {
border-color: #9EABB3;
}
/* ==========================================================================
7. Pagination - Tools to let you flick between pages
@@ -802,7 +907,6 @@ margin on the iframe, cause it breaks stuff. */
min-height: 240px;
padding: 15% 0;
}
.blog-title {
font-size: 4rem;
letter-spacing: -1px;
View
@@ -9,7 +9,8 @@
?>
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<a class="subscribe icon-feed" href="<?php bloginfo('rss2_url'); ?>"><span class="tooltip">Subscribe</span></a>
<div class="site-info inner">
<section class="copyright"><a href="https://github.com/lacymorrow/casper-wp" rel="home">Casper WP</a> &bull; Inspired by <a class="icon-ghost" href="http://ghost.org">Ghost</a>.</section>
<!-- <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'casper' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'casper' ), 'WordPress' ); ?></a>
<span class="sep"> | </span>
View
@@ -24,7 +24,7 @@
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<link rel="shortcut icon" href="<?php echo get_template_directory(); ?>/favicon.ico">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Noto+Serif:400,700,400italic|Open+Sans:700,400" />
<?php wp_head(); ?>
</head>
View
@@ -18,17 +18,17 @@ function casper_paging_nav() {
if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
return;
}
global $wp_query;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
?>
<nav class="navigation paging-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'casper' ); ?></h1>
<nav class="pagination navigation paging-navigation" role="navigation">
<div class="nav-links">
<?php if ( get_next_posts_link() ) : ?>
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'casper' ) ); ?></div>
<div class="older-posts"><?php next_posts_link( __( 'Older Posts <span class="meta-nav">&rarr;</span>', 'casper' ) ); ?></div>
<?php endif; ?>
<div class="screen-reader-text page-number"><?php _e( 'Page '.$paged.' of '.$wp_query->max_num_pages, 'casper' ); ?></div>
<?php if ( get_previous_posts_link() ) : ?>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'casper' ) ); ?></div>
<div class="newer-posts"><?php previous_posts_link( __( '<span class="meta-nav">&larr;</span> Newer Posts', 'casper' ) ); ?></div>
<?php endif; ?>
</div><!-- .nav-links -->
@@ -51,13 +51,15 @@ function casper_post_nav() {
if ( ! $next && ! $previous ) {
return;
}
global $wp_query;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
?>
<nav class="navigation post-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'casper' ); ?></h1>
<nav class="pagination navigation post-navigation" role="navigation">
<div class="nav-links">
<?php
previous_post_link( '<div class="nav-previous">%link</div>', _x( '<span class="meta-nav">&larr;</span> %title', 'Previous post link', 'casper' ) );
next_post_link( '<div class="nav-next">%link</div>', _x( '%title <span class="meta-nav">&rarr;</span>', 'Next post link', 'casper' ) );
previous_post_link( '<div class="older-posts">%link</div>', _x( '%title <span class="meta-nav">&rarr;</span>', 'Previous post link', 'casper' ) ); ?>
<div class="page-number">&bull;</div>
<?php next_post_link( '<div class="newer-posts">%link</div>', _x( '<span class="meta-nav">&larr;</span> %title', 'Next post link', 'casper' ) );
?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
View
@@ -31,6 +31,7 @@
<?php casper_paging_nav(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
View
@@ -65,7 +65,6 @@
// Circle logo
wp.customize( 'casper_logo_circle', function( value ) {
value.bind( function( to ) {
alert();
if (false == to){
$( '.blog-logo img' ).css( {'-webkit-border-radius' : '0',
'-moz-border-radius' : '0',
View
@@ -6,27 +6,8 @@
*/
?>
<div id="secondary" class="widget-area" role="complementary">
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
<aside id="search" class="widget widget_search">
<?php get_search_form(); ?>
</aside>
<aside id="archives" class="widget">
<h1 class="widget-title"><?php _e( 'Archives', 'casper' ); ?></h1>
<ul>
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
</ul>
</aside>
<aside id="meta" class="widget">
<h1 class="widget-title"><?php _e( 'Meta', 'casper' ); ?></h1>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</aside>
<?php endif; // end sidebar widget area ?>
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) :
// Put default widgets here
endif; // end sidebar widget area ?>
<div class="clear">&nbsp;</div>
</div><!-- #secondary -->

0 comments on commit 4e6823a

Please sign in to comment.