Permalink
Browse files

Update microformat structure for comments

  • Loading branch information...
manishsongirkar committed Mar 10, 2015
1 parent 5eb4ee1 commit 867e91259a87405ce21e2448190565f5e6bde475
Showing with 34 additions and 34 deletions.
  1. +13 −13 assets/rtpanel/scss/_comments.scss
  2. +11 −11 assets/rtpanel/scss/_settings.scss
  3. +1 −1 assets/rtpanel/style.scss
  4. +8 −8 lib/rtp-comments.php
  5. +1 −1 style.css
@@ -5,7 +5,7 @@ $rtp-comment-style-type: box; // you can use box, clean,...
@if $rtp-comment-style-type == box {
/* Comments */
- .rtp-comment-count {
+ .rtp-comment-count {
border-bottom: 1px dotted $border-color; color: $gray; padding: rem-calc(10 0);
&:empty { display: none; }
}
@@ -29,7 +29,7 @@ $rtp-comment-style-type: box; // you can use box, clean,...
.comment-form { overflow: hidden; }
// Commentlist
- .commentlist {
+ .commentlist {
clear: both; margin: 0; // Self
& > li {
@@ -39,7 +39,7 @@ $rtp-comment-style-type: box; // you can use box, clean,...
.children { margin-left: rem-calc(84); }
// Children
- .vcard {
+ .avatar-container {
border: 0; float: left; margin: rem-calc(8 15 3 8); padding: 0; // Self
img { @include border-radius($global-rounded); @include rtp-border($width: 2px, $color: $white); }
@@ -49,7 +49,7 @@ $rtp-comment-style-type: box; // you can use box, clean,...
// Trackback Pingback
.trackback,
- .pingback {
+ .pingback {
overflow: hidden; padding: rem-calc(0 0 15);
// EM Element
em { color: $gray; font-size: rem-calc(12); }
@@ -59,22 +59,22 @@ $rtp-comment-style-type: box; // you can use box, clean,...
}
// Comment Text
- .comment-text {
+ .comment-text {
clear: both; padding: rem-calc(15 15 0); overflow: hidden; @include rtp-border();
p { margin: rem-calc(0 0 15 0); }
& > ol, & > ul { margin-bottom: rem-calc(26); }
}
// Comment Body
- .comment-body { clear: both; margin: rem-calc(10 0); position: relative; }
+ .comment-body { display: block; clear: both; margin: rem-calc(10 0); position: relative; }
- .comment {
+ .comment {
list-style: none; // Self
code & { border-top: 0; }
li { margin-bottom: 0; }
}
- // Comment Author border-bottom: 1px solid $border-color;
+ // Comment Author border-bottom: 1px solid $border-color;
.comment-author { padding: rem-calc(17 5 5 5); }
.no-gravatar { padding: rem-calc(5); }
@@ -111,7 +111,7 @@ $rtp-comment-style-type: box; // you can use box, clean,...
.commentlist + & { margin: 0 0 1.5em; }
// Comment body
- .comment-body + & { margin-top: 0; padding: 0 0 0.8em; } // border-bottom: 1px solid $border-color;
+ .comment-body + & { margin-top: 0; padding: 0 0 0.8em; } // border-bottom: 1px solid $border-color;
// Comment
.comment & {
@@ -155,14 +155,14 @@ $rtp-comment-style-type: box; // you can use box, clean,...
.form-allowed-tags { background: darken($base-background, 2%); @include rtp-border(); color: $gray; font-size: emCalc(13); margin: rem-calc(0 0 14); padding: rem-calc(4); width: 96%; }
// Compact Form
- .compact-comment-form {
+ .compact-comment-form {
float: left; width: 33%; // Self
// Compact Form Label and Input
label { margin-left: rem-calc(2); }
input { width: 98%; }
}
- label[for=subscribe-reloaded] {
+ label[for=subscribe-reloaded] {
float: left; margin: rem-calc(10 0 40); width: 80%;
span { display: block; line-height: 1.6; }
}
@@ -186,8 +186,8 @@ $rtp-comment-style-type: box; // you can use box, clean,...
.commentlist + & { margin: rem-calc(10 0 0); }
// Trackbacks
- & + #trackbacks {
- margin: rem-calc(8 0 40 40);
+ & + #trackbacks {
+ margin: rem-calc(8 0 40 40);
li { margin-bottom: rem-calc(10); }
}
}
@@ -307,27 +307,27 @@ $list-ordered-side-margin: 2rem;
// $acronym-underline: 1px dotted $gainsboro;
// We use these to control padding and margin
-// $microformat-padding: rem-calc(10 12);
-// $microformat-margin: rem-calc(0 0 20 0);
+$microformat-padding: 0;
+$microformat-margin: 0;
// We use these to control the border styles
-// $microformat-border-width: 1px;
-// $microformat-border-style: solid;
-// $microformat-border-color: $gainsboro;
+$microformat-border-width: 0;
+$microformat-border-style: none;
+$microformat-border-color: transparent;
// We use these to control full name font styles
-// $microformat-fullname-font-weight: $font-weight-bold;
-// $microformat-fullname-font-size: rem-calc(15);
+$microformat-fullname-font-weight: inherit;
+$microformat-fullname-font-size: inherit;
// We use this to control the summary font styles
-// $microformat-summary-font-weight: $font-weight-bold;
+$microformat-summary-font-weight: inherit;
// We use this to control abbr padding
-// $microformat-abbr-padding: rem-calc(0 1);
+$microformat-abbr-padding: 0;
// We use this to control abbr font styles
-// $microformat-abbr-font-weight: $font-weight-bold;
-// $microformat-abbr-font-decoration: none;
+$microformat-abbr-font-weight: inherit;
+$microformat-abbr-font-decoration: none;
// 01. Accordion
// - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -15,4 +15,4 @@ Tags: black, blue, white, orange, light, one-column, two-columns, right-sidebar,
@import "scss/rtpanel";
-// ****** rtPanel Style Ends Here ***** //
+// ****** rtPanel Style Ends Here ***** //
View
@@ -23,37 +23,37 @@ function rtp_comment_list( $comment, $args, $depth ) {
?>
<li <?php comment_class( 'clearfix' ); ?> id="li-comment-<?php comment_ID(); ?>">
- <div id="comment-<?php comment_ID(); ?>" class="comment-body clearfix"><?php
+ <div id="comment-<?php comment_ID(); ?>" class="comment-body p-comment mfcomment h-entry vcard clearfix"><?php
if ( $rtp_post_comments[ 'gravatar_show' ] ) { // check if gravatar support is enabled
if ( isset( $rtp_post_comments[ 'gravatar_size' ] ) ) {
$gravatar_size = apply_filters( 'rtp_gravatar_size', $rtp_post_comments[ 'gravatar_size' ] );
} else {
$gravatar_size = apply_filters( 'rtp_gravatar_size', 48 );
}
?>
- <div class="vcard">
- <span class="fn"><?php echo get_avatar( $comment, $gravatar_size );
+ <div class="avatar-container">
+ <span><?php echo get_avatar( $comment, $gravatar_size );
rtp_hook_after_comment_author_avatar();
?></span>
</div><?php
}
?>
<div class="comment-author clearfix <?php echo ( $rtp_post_comments[ 'gravatar_show' ] ) ? '' : 'no-gravatar'; ?>">
- <cite class="fn"><?php comment_author_link(); ?></cite>
- <span class="comment-meta">
+ <cite class="fn p-author commenter h-card author"><?php comment_author_link(); ?></cite>
+ <span class="comment-meta entry-meta">
<a class="rtp-common-link rtp-comment-date" href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ); ?>" title="<?php comment_date(); ?>">
- <time datetime="<?php comment_date( 'Y-m-d' ); ?>"><?php printf( __( '%1$s at %2$s', 'rtPanel' ), get_comment_date(), get_comment_time() ); ?></time>
+ <time class="published dtcommented date updated u-url dt-published" datetime="<?php comment_date( 'Y-m-d' ); ?>"><?php printf( __( '%1$s at %2$s', 'rtPanel' ), get_comment_date(), get_comment_time() ); ?></time>
</a>
<?php edit_comment_link( __( '[ edit ]', 'rtPanel' ) ); ?>
</span>
<?php echo ( $comment->comment_approved == '0' ) ? '<span class="rtp-comment-await">' . __( 'Your comment is awaiting moderation. ', 'rtPanel' ) . '</span>' : ''; ?>
</div>
- <div class="comment-text">
+ <div class="comment-text description p-name p-content">
<?php comment_text(); ?>
</div>
- <div class="rtp-reply rtp-common-link"><?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args[ 'max_depth' ], 'reply_text' => __( 'Reply', 'rtPanel' ), ) ) ); ?></div>
+ <div class="rtp-reply u-in-reply-to rtp-common-link"><?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args[ 'max_depth' ], 'reply_text' => __( 'Reply', 'rtPanel' ), ) ) ); ?></div>
</div><!-- .comment-body --><?php
}
View

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 867e912

Please sign in to comment.