Skip to content

Commit

Permalink
删除ul ol前面的圆点
Browse files Browse the repository at this point in the history
comment计数排除waiting
调整index页面每个内容块的高度
修改h1字体,从px改为em,避免太吓人
调整index页面对齐方式,改为左对齐
修改评论头像和缩进
  • Loading branch information
lifishake committed Nov 1, 2018
1 parent 180aa4b commit 0bb7b8c
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 47 deletions.
30 changes: 18 additions & 12 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
$comment_arg['count']='true';
$comment_arg['user_id']=0;/*don't count for known users*/
$comment_arg['type']='comment';
$comment_arg['status']='approve';
printf('已有%1$s条评论', get_comments($comment_arg) );
?>
</h2>
Expand Down Expand Up @@ -74,30 +75,35 @@

<?php
function shisan_comment_cbk( $comment, $args, $depth ) {
$tag = ( 'div' === $args['style'] ) ? 'div' : 'li';
$comment_author_url = $comment->comment_author_url;
$avatar_img = get_avatar( $comment, $args['avatar_size'] );
$comment_author_name = $comment->comment_author;
$parent_comment_id = $comment->comment_parent ;
?>
<<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( ); ?>>
<li id="comment-<?php comment_ID(); ?>" <?php comment_class( ); ?>>
<article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
<footer class="comment-meta">
<div class="comment-author vcard">
<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
<?php
/* translators: %s: comment author link */
printf( '%s <span class="says">说:</span>' ,
sprintf( '<b class="fn">%s</b>', get_comment_author_link( $comment ) )
);
?>
<?php if ( $comment_author_url ) {
printf('<a class="url" href="%1$s" target="_blank" rel="external nofollow" title="%2$s">%3$s</a>', $comment_author_url, $comment_author_name, $avatar_img);
} else {
echo $avatar_img;
}
?>
</div><!-- .comment-author -->

<div class="comment-metadata">
<a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>">
<?php if (''===$comment_author_url || $parent_comment_id > 0) {
printf( '<b class="fn author-url">%s</b>', get_comment_author_link( $comment ) );
}
if ( $parent_comment_id > 0 ) {
printf( '<span class="mention"> @%1s </span>', get_comment_author($parent_comment_id) );
} ?>
<time datetime="<?php comment_time( 'c' ); ?>">
<?php
echo shisan_rel_comment_date();
?>
</time>
</a>
<?php edit_comment_link( '<span class="glyphicon glyphicon-edit"></span>', '<span class="edit-link">', '</span>' ); ?>
</div><!-- .comment-metadata -->

<?php if ( '0' == $comment->comment_approved ) : ?>
Expand Down
1 change: 0 additions & 1 deletion content.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
</div>
</div><!-- .entry-content -->
<?php endif;
edit_post_link( '<span class="glyphicon glyphicon-edit"></span>', '<span class="edit-link">', '</span>' );
?>


Expand Down
22 changes: 0 additions & 22 deletions js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,9 @@
}

if( y > 150 ) {

// On single post page show article title in header menu bar
// if ( jQuery('body').hasClass('single-post') ) {
// jQuery('.single-post .site-title a').text(jQuery('.entry-title').text());
// }

$('.site-header, .progress-bar').addClass('shrink');
$('body').addClass('sticky_header_active');
} else {

// Switch back to site title
// if ( jQuery('body').hasClass('single-post') ) {
// jQuery('.single-post .site-title a').text(site_title);
// }

$('.site-header, .progress-bar').removeClass('shrink');
$('body').removeClass('sticky_header_active');
}
Expand All @@ -129,11 +117,6 @@

if( y > 500 ) {

// On single post page show article title in header menu bar
// if ( jQuery('body').hasClass('single-post') ) {
// jQuery('.single-post .site-title a').text(jQuery('.entry-title').text());
// }

jQuery('.site-header, .progress-bar').addClass('shrink');
jQuery('body').addClass('sticky_header_active');
} else {
Expand All @@ -150,11 +133,6 @@
}, 50);
} else {

// Switch back to site title
// if ( jQuery('body').hasClass('single-post') ) {
// jQuery('.single-post .site-title a').text(site_title);
// }

jQuery('.site-header, .progress-bar').removeClass('shrink');
jQuery('.site-header').removeClass('fixed');
}
Expand Down
72 changes: 60 additions & 12 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GitHub Theme URI://github.com/lifishake/shisan
Author: 大致
Author URI: //pewae.com
Description: 基于主题Longform修改。
Version: 1.1
Version: 1.2
License: GNU General Public License v3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Tags: custom-background, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, sticky-post, theme-options, translation-ready
Expand Down Expand Up @@ -347,12 +347,10 @@ ol {
}

ul {
list-style: disc;
list-style-position: inside;
}

ol {
list-style: decimal;
list-style-position: inside;
}

Expand Down Expand Up @@ -636,6 +634,12 @@ footer.entry-meta,
margin-right: auto;
}

body .site-content article .entry-header .entry-title,
body .site-content article .entry-meta {
text-align: left;
}


.tiled-gallery,
.tiled-gallery .gallery-row {
max-width: 800px !important;
Expand Down Expand Up @@ -2968,7 +2972,7 @@ body.archive .site-content > article:nth-of-type(1) {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin: 20px 0px 40px 0px;
margin: 20px 0px 10px 0px;
padding: 0px;
border-top: 1px dashed #e5e5e5;
padding-top: 40px;
Expand Down Expand Up @@ -3054,14 +3058,12 @@ body.archive .site-content > article:nth-of-type(1) {
.site-content article .entry-header .entry-title {
margin: 0 0 20px 0;
padding: 0 0 0 0;
font-size: 37px;
line-height: 47px;
font-size: 2.2em;
}

.without_thumbnail.container .entry-title,
.intro-effect-fadeout .intro-effect-bg-img-container .entry-title {
font-size: 66px;
line-height: 76px;
font-size: 3em;
margin-top: 30%;
text-align: center;
margin-right: auto;
Expand Down Expand Up @@ -3106,7 +3108,7 @@ body:not(.modify).intro-effect-fadeout .intro-effect-bg-img-container .entry-tit
}

.site-content article .entry-header {
padding: 35px 0 45px;
padding: 35px 0 15px;
text-align: center;
}

Expand Down Expand Up @@ -3524,7 +3526,7 @@ article .entry-content dd {

.comments-container ol.children {
margin-bottom: 0;
margin-left: 85px;
margin-left: 1em;
list-style-type: none;
}

Expand Down Expand Up @@ -3562,6 +3564,27 @@ article .entry-content dd {
color: #000;
}

.comment-author .avatar {
border: 3px solid #ccc;
border-radius: 100%;
-moz-border-radius: 100%;
-webkit-border-radius: 100%;
}

.comment-author.vcard a.url img.avatar {
border-color: #09c;
opacity: 0.5;
}

.comment-author.vcard a.url img.avatar:hover {
opacity: 1;
border-color: #ff5c1a;
-webkit-animation: swing 1s ease;
animation: swing 1s ease;
-webkit-animation-iteration-count: 1;
animation-iteration-count: 1;
}

.comments-container .comment-meta {
font-size: 12px;
}
Expand All @@ -3582,16 +3605,41 @@ article .entry-content dd {
margin-right: 20px;
}

.children .comment-author .avatar {
height: 40px;
left: -45px;
width: 40px;
display: none;
}

.bypostauthor > .comment-body > .comment-meta > .comment-author .avatar {
padding: 2px;
}

.bypostauthor > .comment-body .comment-meta > .author-url {
text-shadow: 0px 1px 2px #FFFFFF;
}

b.author-url,
b.author-url a {
font-weight: 700;
}

li.bypostauthor > article > footer > div.comment-metadata > b.author-url,
li.bypostauthor > article > footer > div.comment-metadata > b.author-url a {
color: #555;
}

.comments-container .comment {
margin-top: 25px;
}

.comment-content {
display: block;
display: inline-block;
clear: both;
overflow: hidden;
margin-top: 0;
margin-left: 84px;
margin-left: 1em;
padding-right: 35px;
padding-bottom: 10px;
}
Expand Down

0 comments on commit 0bb7b8c

Please sign in to comment.