Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
erlzhang committed Apr 27, 2017
1 parent c710c86 commit 90a61ea
Show file tree
Hide file tree
Showing 66 changed files with 6,353 additions and 706 deletions.
31 changes: 31 additions & 0 deletions 404.php
@@ -0,0 +1,31 @@
<?php get_header();?>
<div class="main">
<div class="nofound">
<h1>404</h1>
<h3>Page not found!</h3>
<div class="playball">
<div class="person person-left">
<span class="sec head"></span>
<span class="sec body"></span>
<span class="sec arm arm-left-top"></span>
<span class="sec arm arm-left-bottom"></span>
<span class="sec arm arm-right"></span>
<span class="sec leg leg-left-top"></span>
<span class="sec leg leg-left-bottom"></span>
<span class="sec leg leg-right"></span>
</div>
<div class="person person-right">
<span class="sec head"></span>
<span class="sec body"></span>
<span class="sec arm arm-left-top"></span>
<span class="sec arm arm-left-bottom"></span>
<span class="sec arm arm-right"></span>
<span class="sec leg leg-left-top"></span>
<span class="sec leg leg-left-bottom"></span>
<span class="sec leg leg-right"></span>
</div>
<div class="ball"></div>
</div>
<h2>Sorry,页面开小差了!</h2>
</div>
<?php get_footer();?>
Expand Down
17 changes: 17 additions & 0 deletions archive-book.php
@@ -0,0 +1,17 @@
<?php get_header();?>
<div class="main">
<div class="books">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>">
<?php $full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full');?>
<div class="book" style="background-image:url(<?php //echo $full_image_url[0];?>https://img.js.cn/images/2017/02/06/908fa0ec08fa513dfd470f4b3d6d55fbb3fbd9b2.jpg">
<div class="book-header">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
</div>
</a>
<?php endwhile; ?>
<?php endif;?>
</div>
<?php get_footer();?>
33 changes: 33 additions & 0 deletions archive.php
@@ -0,0 +1,33 @@
<?php get_header();?>
<div class="main">
<div class="posts">
<?php if (have_posts()) :?>
<nav class="breadcrumbs">
<?php if(function_exists('cmp_breadcrumbs')) cmp_breadcrumbs();?>
</nav>
<?php $i = 1;while (have_posts()) : $i++;the_post();?>
<article class="article <?php if($i%2 != 0){ echo 'odd';}?>">
<a href="<?php the_permalink(); ?>"><div class="article-thumb"><?php the_post_thumbnail();?>
</div></a>
<div class="article-content">
<?php the_title( sprintf( '<a href="%s" rel="bookmark"><h1>', esc_url( get_permalink() ) ), '</h1></a>' );?>
<?php the_excerpt();?>
<a href="<?php
if(has_post_format('link')){
echo get_url_in_content( get_the_content() );
}else{
the_permalink();
}
?>" class="more-link">阅读全文</a>
</div>
</article>
<?php endwhile; ?>
<?php the_posts_pagination( array(
'mid_size' =>2,
'prev_text' => '<i class="fa fa-angle-left" aria-hidden="true"></i>',
'next_text' => '<i class="fa fa-angle-right" aria-hidden="true"></i>',
'screen_reader_text' => ''
) ); ?>
<?php endif;?>
</div>
<?php get_footer();?>
9 changes: 8 additions & 1 deletion category-gallery.php
Expand Up @@ -11,6 +11,13 @@
<?php the_excerpt();?>
</figcaption>
</figure></a>
<?php endwhile; endif;?>
<?php endwhile; ?>
<?php the_posts_pagination( array(
'mid_size' => 2,
'prev_text' => '<i class="fa fa-angle-left" aria-hidden="true"></i>',
'next_text' => '<i class="fa fa-angle-right" aria-hidden="true"></i>',
'screen_reader_text' => ''
) ); ?>
<?php endif;?>
</div>
<?php get_footer();?>
67 changes: 36 additions & 31 deletions category.php
@@ -1,32 +1,37 @@
<?php get_header();?>
<div class="main">
<div class="posts">
<?php if (have_posts()) :
$i = 1;
while (have_posts()) :
$i++;
the_post();?>
<article class="article <?php if($i%2 == 0){ echo 'odd';}?>">
<a href="<?php the_permalink(); ?>"><div class="article-thumb"><?php the_post_thumbnail();?>
</div></a>
<div class="article-content">
<?php if( has_post_format('link')){
the_title( sprintf( '<a href="%s" rel="bookmark"><h1>', esc_url( get_url_in_content( get_the_content() ) ) ), '</h1></a>' );
}else{
the_title( sprintf( '<a href="%s" rel="bookmark"><h1>', esc_url( get_permalink() ) ), '</h1></a>' );
}
?>

<?php the_excerpt();?>
<a href="<?php
if(has_post_format('link')){
echo get_url_in_content( get_the_content() );
}else{
the_permalink();
}
?>" class="more-link">阅读全文</a>
</div>
</article>
<?php endwhile; endif;?>
</div>
<?php get_header();?>
<div class="main">
<div class="posts">
<?php if (have_posts()) : $i = 1;?>
<nav class="breadcrumbs">
<?php if(function_exists('cmp_breadcrumbs')) cmp_breadcrumbs();?>
</nav>
<div class="category-description">
<?php echo category_description(); ?>
</div>
<?php while (have_posts()) : $i++; the_post();?>
<article class="article <?php if($i%2 == 1){ echo 'odd';}?>">
<a href="<?php the_permalink(); ?>"><div class="article-thumb"><?php the_post_thumbnail();?>
</div></a>
<div class="article-content">
<?php the_title( sprintf( '<a href="%s" rel="bookmark"><h1>', esc_url( get_permalink() ) ), '</h1></a>' );?>
<p class="small"><em><i class="fa fa-clock-o"></i>&nbsp;<?php the_time('Y-m-d H:i') ?></em></p>
<?php the_excerpt();?>
<a href="<?php
if(has_post_format('link')){
echo get_url_in_content( get_the_content() );
}else{
the_permalink();
}
?>" class="more-link">阅读全文</a>
</div>
</article>
<?php endwhile; ?>
<?php the_posts_pagination( array(
'mid_size' => 2,
'prev_text' => '<i class="fa fa-angle-left" aria-hidden="true"></i>',
'next_text' => '<i class="fa fa-angle-right" aria-hidden="true"></i>',
'screen_reader_text' => ''
) ); ?>
<?php endif;?>
</div>
<?php get_footer();?>
Expand Down
102 changes: 68 additions & 34 deletions comments.php
@@ -1,62 +1,95 @@
<?php
if ( post_password_required() ) {
return;
}
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('请勿直接加载此页。谢谢!');
if ( post_password_required() ) { ?>
<p class="nocomments"><?php _e('必须输入密码,才能查看评论!'); ?></p>
<?php
return;
}
?>

<?php if ('open' == $post->comment_status) : ?>
<div id="comments" class="comments-area">
<div class="response-show-btn" id="response-show-btn"><i class="fa fa-edit"></i></div>
<div id="respond" class="response">
<?php if ('open' == $post->comment_status) : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<div class="bottom-comment-bar show <?php if(!$user_ID && ($comment_author_email == '' || $comment_author == '' )){ echo 'forbid';} ?>">
<div id="bottom-comment-mask" class="bottom-comment-mask"></div>
<div class="bottom-comment-bar">
<div class="respond-box">
<div class="comment-author-avatar"><?php
if( $user_ID ){
echo get_avatar($user_ID);
}else if( '' != $comment_author_email ){
echo get_avatar($comment_author_email);
}else{
echo '<img src="http://secure.gravatar.com/avatar/aae066320acf9cfddf355c97fa345d4c?s=32&d=mm&f=y&r=g" class="avatar" width="50" height="50">';
}
?>
<div class="comment-author-info">
<div class="comment-author-avatar">
<?php
if( $user_ID ){
echo get_avatar($user_ID);
}else if( '' != $comment_author_email ){
echo get_avatar($comment_author_email);
}else{
echo '<img src="https://secure.gravatar.com/avatar/aae066320acf9cfddf355c97fa345d4c?s=32&d=mm&f=y&r=g" class="avatar" width="40" height="40">';
}
?>
</div>
<div class="comment-author-info-mask"></div>
<div class="comment-author-info">
<?php if ( ! $user_ID ): ?>
<div class="comment-author-tooltip">
<?php if( $user_ID ) {
echo "你好,<a href=\"".get_option('siteurl')."/wp-admin/profile.php\">".$user_identity."</a>!&nbsp;&nbsp;&nbsp;&nbsp;<a href=".wp_logout_url(get_permalink())." title=\"退出\" class=\"change-identity\">[ 退出登陆 ]</a>";
}else{
echo "你好,<span id=\"current-comment-author\">";
if( '' != $comment_author ){
echo $comment_author;
}else{
echo "游客";
}
echo "</span>!(点击更改信息)";
}
?>
</div>
</div>

<?php if ( ! $user_ID ): ?>
<div class="comment-author-input-mask"></div>
<div class="comment-author-input">
<div class="comment-author-input-avatar">
<?php
if( $user_ID ){
echo get_avatar($user_ID);
}else if( '' != $comment_author_email ){
echo get_avatar($comment_author_email);
}else{
echo '<img src="https://secure.gravatar.com/avatar/aae066320acf9cfddf355c97fa345d4c?s=32&d=mm&f=y&r=g" class="avatar" width="40" height="40">';
}
?>
</div>
<p>您的电子邮件不会被公布,带*为必填。</p>
<li>
<label for="author"><small><i class="fa fa-user"></i></small></label>
<input type="text" name="author" id="author" class="input-text" placeholder="Name" value="<?php echo $comment_author; ?>" size="22" tabindex="1" placeholder="Name*" />
<label for="author"><small><i class="fa fa-user fa-fw"></i></small></label>
<input type="text" name="author" id="author" class="input-text" value="<?php echo $comment_author; ?>" size="22" tabindex="1" placeholder="Name*" />
</li>
<li>
<label for="email"><small><i class="fa fa-envelope"></i></small></label>
<label for="email"><small><i class="fa fa-envelope fa-fw"></i></small></label>
<input type="text" name="email" id="email" class="input-text" value="<?php echo $comment_author_email; ?>" size="22" placeholder="Email*" tabindex="2" />
</li>
<li>
<label for="url"><small><i class="fa fa-globe"></i></small></label>
<label for="url"><small><i class="fa fa-globe fa-fw"></i></small></label>
<input type="text" name="url" id="url" class="input-text" value="<?php echo $comment_author_url; ?>" size="22"placeholder="http://" tabindex="3" />
</li>
</div>
<?php else : ?>
<p>你好,<a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>!&nbsp;&nbsp;<a href="<?php echo wp_logout_url(get_permalink()); ?>" title="退出" class="change-identity"><?php print '<i class="fa fa-sign-out"></i>&nbsp;&nbsp;退出登陆'; ?></a></p>

<?php endif;?>
<textarea name="comment" id="comment" class="textarea" rows="1" placeholder="要说点什么么……" tabindex="4" rows="1"></textarea>
<button class="submit" name="submit" type="submit" id="submit" tabindex="5" disabled="disabled"><i class="fa fa-paper-plane"></i></button>
<div class="smiley" id="comment-smiley">
<?php include("smiley.php");?>
</div>
<div class="respond-status">
<div id="loading" class="loading"><i class="fa fa-spinner fa-spin"></i>&nbsp;&nbsp;正在提交中,请稍候...</div>
<div id="error" class="warning"></div>
<div id="success" class="success"><i class="fa fa-check"></i>&nbsp;&nbsp;评论提交成功</div>
<div id="replying" class="info">回复 <strong id="replying-parent"></strong> 的评论,点击取消回复。</div>
</div>
<textarea name="comment" id="comment" class="textarea" rows="1" placeholder="要说点什么么……" tabindex="4"></textarea>
<input class="submit" name="submit" type="submit" id="submit" tabindex="5" value="留言" />
</div>
<?php comment_id_fields(); ?>
<?php do_action('comment_form', $post->ID); ?>
<div class="respond-status">
<div id="loading" class="loading"><i class="fa fa-spinner fa-spin"></i>&nbsp;&nbsp;正在提交中,请稍候...</div>
<div id="error" class="warning"></div>
<div id="success" class="success"><i class="fa fa-check"></i>&nbsp;&nbsp;评论提交成功</div>
<div id="replying" class="info">回复 <strong id="replying-parent"></strong> 的评论,点击取消回复。</div>
</div>
</div>
</form>
</div>
<?php endif; ?>

<?php if ( have_comments() ) : ?>
<ul class="comment-list">
<?php
Expand All @@ -69,3 +102,4 @@
</ul><!-- .comment-list -->
<?php endif; // have_comments() ?>
</div><!-- .comments-area -->
<?php endif; ?>
41 changes: 41 additions & 0 deletions content-aside.php
@@ -0,0 +1,41 @@
<div class="main">
<div class="novel-left">
<div class="novel-header">
<h1>乐园 Paradise</h1>
<p>“只有人,他的寿命不会很长,无论他做什么,都只是一场虚无。”</p>
<span class="toggle-novel-catalog"><i class="fa fa-th"></i><em>章节列表</em></span>
</div>

<div class="novel-catalog">
<?php
$chapters = new WP_Query( 'cat=19&posts_per_page=-1&order=ASC' );
if ( $chapters -> have_posts() ) : $cha_ID = 0;
?>
<?php while ( $chapters -> have_posts() ) : $chapters ->the_post();?>
<a href="<?php the_permalink(); ?>">
<?php
echo ++$cha_ID;
?>
</a>
<?php endwhile; endif; wp_reset_query();?>
</div>
</div>
<div class="novel-right">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<article class="content">
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php
the_post_navigation( array(
'prev_text' => __( '<i class="fa fa-long-arrow-left"></i>&nbsp;&nbsp;上一章' ),
'next_text' => __( '下一章&nbsp;&nbsp;<i class="fa fa-long-arrow-right"></i>' ),
'in_same_term' => true,
'screen_reader_text' => __( 'Continue Reading' ),
) );
?>
</article>
<?php comments_template(); ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
Expand Down
20 changes: 16 additions & 4 deletions content-gallery.php
Expand Up @@ -6,23 +6,35 @@
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<figure class="photo">

</figure>
<div class="gallery-turn left"><i class="fa fa-angle-left fa-5x"></i></div>
<div class="gallery-turn right"><i class="fa fa-angle-right fa-5x"></i></div>
<div class="gallery-caption">
<h1><?php the_title(); ?></h1>
<?php the_excerpt();?>
<?php
the_post_navigation( array(
'prev_text' => __( '<span class="icon-mobile"><i class="fa fa-chevron-circle-left"></i></span><span class="icon-pc"><i class="fa fa-long-arrow-left"></i>&nbsp;&nbsp;%title</span>' ),
'next_text' => __( '<span class="icon-mobile"><i class="fa fa-chevron-circle-right"></i><span class="icon-pc">%title&nbsp;&nbsp;<i class="fa fa-long-arrow-right"></i></span>' ),
'in_same_term' => true,
'screen_reader_text' => __( 'Continue Reading' ),
) );
?>
</div>
</div>
<div class="photolist">
<ul>
<?php
if ( get_post_gallery() ) :
$gallery = get_post_gallery( get_the_ID(), false );
foreach( $gallery['src'] AS $src ){?>
<li><img src="<?php echo $src;?>" /></li>
<?php
}endif;?>
$gallery = explode(',',$gallery['ids']);
foreach( $gallery as $id ){
$thumb = wp_get_attachment_image_src($id);
$full = wp_get_attachment_image_src($id,'full');
echo '<li data-img="'.$full[0].'" data-width="'.$full[1].'" data-height="'.$full[2].'"><img src="'.$thumb[0].'"></li>';
}
endif;?>
</ul>
</div>
<?php endwhile; ?>
Expand Down

0 comments on commit 90a61ea

Please sign in to comment.