
Comment consists of users' avatar, meta information and comment content. (Just like comment in github.)
Basic structure:
<article class="am-comment"> <!-- Container -->
<a href="">
<img class="am-comment-avatar" alt=""/> <!-- Avatar -->
</a>
<div class="am-comment-main"> <!-- Content Container -->
<header class="am-comment-hd">
<!--<h3 class="am-comment-title">Title</h3>-->
<div class="am-comment-meta"> <!-- Meta -->
<a href="#link-to-user" class="am-comment-author">..</a> <!-- Author -->
Comment at <time datetime="">...</time>
</div>
</header>
<div class="am-comment-bd">...</div> <!-- 评论内容 -->
</div>
</article>
Usually we won't use .am-comment-title
.
Every day is a new day. It is better to be lucky. But I would rather be exact. Then when luck comes you are ready.
Luck is a thing that comes in many forms and who can recognize her?
She's gone; I've already known
She will leave from my life
@Ernest Hemingway Good luck!
@Betty Got it!
@Ernest Hemingway Bye-Bye
@路人乙 Bye
@Ernest Hemingway Love you.
@路人乙 Me too.
<ul class="am-comments-list am-comments-list-flip">
<li class="am-comment">
...
</li>
<li class="am-comment">
...
</li>
...
<li class="am-comment am-comment-flip"></li>
<li class="am-comment am-comment-highlight"></li>
</ul>
Add the .am-comments-list-flip
class to .am-comments-list
to align the comments alternately to left and right (works in medium-up
).
Suggestion from users: Not everyone like alternately align their comments, so we make this a seperate class. You may use it as your wish.
Add the status classes to comments (like the last comments in example above).
.am-comment-flip
Show avatar on the right.am-comment-primary
Highlight Comment (primary border).am-comment-highlight
/ .am-comment-highlight
Highlight Comment (secondary border).am-comment-success
Highlight Comment (green border).am-comment-warning
Highlight Comment (orange border).am-comment-danger
Highlight Comment (red border)<article class="am-comment am-comment-flip">
...
</article>
<article class="am-comment am-comment-flip">
...
</article>
<article class="am-comment am-comment-flip am-comment-highlight">
...
</article>
Every day is a new day. It is better to be lucky. But I would rather be exact. Then when luck comes you are ready.