Cleanup of comments theme

This commit is contained in:
Daniel Caine 2015-04-22 14:05:51 +12:00 committed by Damian Mooyman
parent 468df23801
commit e8e5abdc23
3 changed files with 308 additions and 302 deletions

View File

@ -1,69 +1,107 @@
/* line 12, ../scss/comments.scss */ /* line 1, ../scss/comments.scss */
#comments-holder { .comments-holder-container {
clear: both; clear: both;
} }
/* line 15, ../scss/comments.scss */ /* line 4, ../scss/comments.scss */
#comments-holder h2 { .comments-holder-container .field {
margin: 30px 0 10px;
padding-bottom: 5px;
border-bottom: 1px solid #eee;
}
/* line 21, ../scss/comments.scss */
#comments-holder h3 {
margin-top: 0;
}
/* line 25, ../scss/comments.scss */
#comments-holder .field {
clear: left; clear: left;
} }
/* line 29, ../scss/comments.scss */ /* line 8, ../scss/comments.scss */
#comments-holder .num, .comments-holder-container .num,
#comments-holder .author { .comments-holder-container .author {
font-size: 1.3em; font-size: 1.3em;
} }
/* line 34, ../scss/comments.scss */ /* line 13, ../scss/comments.scss */
#comments-holder .num { .comments-holder-container .num {
color: #999; color: #999;
margin-right: 5px; margin-right: 5px;
} }
/* line 39, ../scss/comments.scss */ /* line 18, ../scss/comments.scss */
#comments-holder .num-total { .comments-holder-container .num-total {
line-height: 40px; line-height: 40px;
margin-bottom: 0; margin-bottom: 0;
} }
/* line 44, ../scss/comments.scss */ /* line 23, ../scss/comments.scss */
#comments-holder .comments-list { .comments-holder-container .comments-list {
margin: 0; margin: 0;
} }
/* line 49, ../scss/comments.scss */ /* line 27, ../scss/comments.scss */
#comments-holder .comment { .comments-holder-container .comment-count {
margin: 15px 0;
}
/* line 32, ../scss/comments.scss */
.comments-holder-container .commenting-area {
margin-top: 50px;
}
/* line 35, ../scss/comments.scss */
.comments-holder-container .commenting-area label.left {
font-weight: normal;
}
/* line 40, ../scss/comments.scss */
.comments-holder-container .commenting-rss-feed {
margin-top: 4em;
text-align: right;
}
/* line 44, ../scss/comments.scss */
.comments-holder-container .commenting-rss-feed .action-links {
margin: 20px 0 10px;
}
/* line 47, ../scss/comments.scss */
.comments-holder-container .commenting-rss-feed .action-links li {
display: inline;
list-style-type: none;
margin-left: 20px;
}
/* line 52, ../scss/comments.scss */
.comments-holder-container .commenting-rss-feed .action-links li:first-child {
margin-left: 0;
}
/* line 56, ../scss/comments.scss */
.comments-holder-container .commenting-rss-feed .action-links li.comment-reply-action {
float: right;
}
/* line 61, ../scss/comments.scss */
.comments-holder-container .commenting-rss-feed .action-links a {
background-image: none;
}
/* line 64, ../scss/comments.scss */
.comments-holder-container .commenting-rss-feed .action-links a::first-letter {
text-transform: capitalize;
}
/* line 71, ../scss/comments.scss */
.comments-holder-container .no-comments-yet {
display: inline-block;
margin-top: 10px;
}
/* line 78, ../scss/comments.scss */
.comment {
clear: both; clear: both;
list-style-type: none; list-style-type: none;
overflow: auto; overflow: hidden;
padding: 20px 0 10px; padding: 20px 0 10px;
position: relative; position: relative;
} }
/* line 57, ../scss/comments.scss */ /* line 86, ../scss/comments.scss */
#comments-holder .comment.author-comment:after { .comment.author-comment:after {
content: 'Author'; content: 'Author';
float: right; float: right;
position: absolute; position: absolute;
top: 1.5em; top: 1.5em;
right: 0; right: 0.5em;
font-size: 1em; font-size: 1em;
font-weight: bold; font-weight: bold;
color: #00acee;
} }
/* line 68, ../scss/comments.scss */ /* line 96, ../scss/comments.scss */
#comments-holder .comment.author-comment .comment-text { .comment.author-comment > .comment-text {
border: 1px solid #00acee; border: 1px solid blue;
} }
/* line 75, ../scss/comments.scss */ /* line 103, ../scss/comments.scss */
#comments-holder .comment.spam .comment-text { .comment.spam .comment-text {
border: 1px dashed #f48b33; border: 1px dashed orange;
} }
/* line 80, ../scss/comments.scss */ /* line 108, ../scss/comments.scss */
#comments-holder .comment .comment-text { .comment .comment-text {
background-color: #fff; background-color: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
box-shadow: none; box-shadow: none;
@ -74,100 +112,73 @@
white-space: pre-line; white-space: pre-line;
word-wrap: break-word; word-wrap: break-word;
} }
/* line 91, ../scss/comments.scss */ /* line 119, ../scss/comments.scss */
#comments-holder .comment .comment-text p:last-child { .comment .comment-text p:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
/* line 96, ../scss/comments.scss */ /* line 124, ../scss/comments.scss */
#comments-holder .comment .date { .comment .date {
font-size: 16px; font-size: 16px;
} }
/* line 99, ../scss/comments.scss */ /* line 127, ../scss/comments.scss */
#comments-holder .comment .date:before { .comment .date:before {
content: '\0000a0\0000a0\0000a0\0000a0'; content: '\0000a0\0000a0\0000a0\0000a0';
} }
/* line 104, ../scss/comments.scss */ /* line 133, ../scss/comments.scss */
#comments-holder .comment.unmoderated { .comment.unmoderated > .comment-text {
border: 2px dashed gray; border: 1px solid yellow;
margin: 2em 0 4em;
padding: 2em;
} }
/* line 109, ../scss/comments.scss */ /* line 138, ../scss/comments.scss */
#comments-holder .comment.unmoderated .comment-moderation { .comment .info {
margin-bottom: 0;
}
/* line 114, ../scss/comments.scss */
#comments-holder .comment .info {
margin-bottom: 10px; margin-bottom: 10px;
} }
/* line 118, ../scss/comments.scss */ /* line 142, ../scss/comments.scss */
#comments-holder .comment.spam .comment { .comment.spam .comment {
border: 1px dashed #f48b33; border: 1px dashed orange;
color: #f48b33;
border-radius: 4px; border-radius: 4px;
padding: 2.5em 1em 1em; padding: 2.5em 1em 1em;
} }
/* line 125, ../scss/comments.scss */ /* line 148, ../scss/comments.scss */
#comments-holder .comment .comment-replies-container { .comment .comment-replies-container {
margin-left: 20px; clear: both;
padding-left: 10px; padding-left: 10px;
margin: 80px 0 0 0;
border-left: 1px dashed #999; border-left: 1px dashed #999;
} }
/* line 130, ../scss/comments.scss */ /* line 154, ../scss/comments.scss */
#comments-holder .comment .comment-replies-container .comment-reply-form-holder { .comment .comment-replies-container .comment-reply-form-holder {
padding: 0 10px; padding: 0 10px;
} }
/* line 133, ../scss/comments.scss */ /* line 157, ../scss/comments.scss */
#comments-holder .comment .comment-replies-container .comment-replies-holder { .comment .comment-replies-container .comment-replies-holder {
padding: 0 0 0 10px; padding: 0 0 0 10px;
} }
/* line 140, ../scss/comments.scss */
#comments-holder .comment-moderation { /* line 163, ../scss/comments.scss */
float: right; .comments-list.root-level {
margin: 1em 0 2em;
}
/* line 144, ../scss/comments.scss */
#comments-holder .comment-moderation .heading {
margin-bottom: 0;
}
/* line 149, ../scss/comments.scss */
#comments-holder .action-links {
margin: 20px 0 10px;
}
/* line 152, ../scss/comments.scss */
#comments-holder .action-links li {
display: inline;
list-style-type: none;
margin-left: 20px;
overflow: auto;
}
/* line 158, ../scss/comments.scss */
#comments-holder .action-links li:first-child {
margin-left: 0; margin-left: 0;
} }
/* line 162, ../scss/comments.scss */
#comments-holder .action-links li.comment-reply-action { /* line 167, ../scss/comments.scss */
.comment-reply-link {
float: right; float: right;
} }
/* line 168, ../scss/comments.scss */
#comments-holder .comment-count { /* line 171, ../scss/comments.scss */
margin: 15px 0; .comment-moderation-options {
float: left;
} }
/* line 173, ../scss/comments.scss */
#comments-holder .commenting-area { /* line 175, ../scss/comments.scss */
margin-top: 50px; .comment-action-links {
margin: 20px 0 10px;
} }
/* line 176, ../scss/comments.scss */ /* line 178, ../scss/comments.scss */
#comments-holder .commenting-area label.left { .comment-action-links a:not(:last-child) {
font-weight: normal; margin-right: 12px;
} }
/* line 181, ../scss/comments.scss */
#comments-holder .commenting-rss-feed { /* line 183, ../scss/comments.scss */
margin-top: 4em; .commenting-rss-feed ul {
text-align: right; list-style: none;
}
/* line 186, ../scss/comments.scss */
#comments-holder .no-comments-yet {
display: inline-block;
margin-top: 10px;
} }

View File

@ -1,190 +1,185 @@
// Colours .comments-holder-container {
$blue: #00acee !default; clear: both;
$blueDark: #0064cd !default;
$green: #46a546 !default;
$redLight: #DB4A39 !default;
$red: #9d261d !default;
$yellow: #ffc40d !default;
$orange: #f48b33 !default;
$pink: #c3325f !default;
$purple: #7a43b6 !default;
#comments-holder { .field {
clear: both; clear: left;
}
h2 { .num,
margin: 30px 0 10px; .author {
padding-bottom: 5px; font-size: 1.3em;
border-bottom: 1px solid #eee; }
}
h3 { .num {
margin-top: 0; color: #999;
} margin-right: 5px;
}
.field { .num-total {
clear: left; line-height: 40px;
} margin-bottom: 0;
}
.num, .comments-list {
.author { margin: 0;
font-size: 1.3em; }
}
.num { .comment-count {
color: #999; margin: 15px 0;
margin-right: 5px; }
}
.num-total { // The comment form
line-height: 40px; .commenting-area {
margin-bottom: 0; margin-top: 50px;
}
.comments-list {
margin: 0;
}
// A published comment
.comment {
clear:both;
list-style-type: none;
overflow: auto;
padding: 20px 0 10px;
position: relative;
&.author-comment {
&:after {
content: 'Author';
float: right;
position: absolute;
top: 1.5em;
right: 0;
font-size: 1em;
font-weight: bold;
color: $blue;
}
.comment-text {
border: 1px solid $blue;
}
label.left{
font-weight: normal;
} }
}
&.spam { .commenting-rss-feed {
.comment-text { margin-top: 4em;
border: 1px dashed $orange; text-align: right;
.action-links {
margin: 20px 0 10px;
li {
display: inline;
list-style-type: none;
margin-left: 20px;
&:first-child {
margin-left: 0;
}
&.comment-reply-action {
float: right;
}
}
a {
background-image: none;
&::first-letter {
text-transform: capitalize;
}
} }
} }
}
.comment-text { .no-comments-yet {
background-color: #fff; display: inline-block;
border: 1px solid #ddd; margin-top: 10px;
box-shadow: none; }
margin: 0; }
padding: 0 15% 0 20px;
white-space: pre; // A published comment
white-space: pre-wrap; .comment {
white-space: pre-line; clear:both;
word-wrap: break-word; list-style-type: none;
overflow: hidden;
p:last-child { padding: 20px 0 10px;
margin-bottom: 0; position: relative;
}
} &.author-comment {
&:after {
.date { content: 'Author';
font-size: 16px; float: right;
position: absolute;
&:before { top: 1.5em;
content: '\0000a0\0000a0\0000a0\0000a0'; right: 0.5em;
} font-size: 1em;
} font-weight: bold;
}
&.unmoderated {
border: 2px dashed gray; > .comment-text {
margin: 2em 0 4em; border: 1px solid blue;
padding: 2em; }
.comment-moderation { }
margin-bottom: 0; // Remove the margin to compensate for unmoderated comment padding.
} &.spam {
} .comment-text {
border: 1px dashed orange;
.info { }
margin-bottom: 10px; }
}
.comment-text {
&.spam .comment{ background-color: #fff;
border: 1px dashed $orange; border: 1px solid #ddd;
color: $orange; box-shadow: none;
border-radius: 4px; margin: 0;
padding: 2.5em 1em 1em; padding: 0 15% 0 20px;
} white-space: pre;
white-space: pre-wrap;
.comment-replies-container { white-space: pre-line;
margin-left: 20px; word-wrap: break-word;
padding-left: 10px;
border-left: 1px dashed #999; p:last-child {
margin-bottom: 0;
.comment-reply-form-holder { }
padding: 0 10px; // Prevent clipping issues on slideUp/Down }
}
.comment-replies-holder { .date {
padding: 0 0 0 10px; font-size: 16px;
}
} &:before {
} content: '\0000a0\0000a0\0000a0\0000a0';
}
// Admin actions }
.comment-moderation {
float: right; &.unmoderated {
margin: 1em 0 2em; > .comment-text {
border: 1px solid yellow;
.heading { }
margin-bottom: 0; }
}
} .info {
margin-bottom: 10px;
.action-links { }
margin: 20px 0 10px;
&.spam .comment {
li { border: 1px dashed orange;
display: inline; border-radius: 4px;
list-style-type: none; padding: 2.5em 1em 1em;
margin-left: 20px; }
overflow: auto;
.comment-replies-container {
&:first-child { clear: both;
margin-left: 0; padding-left: 10px;
} margin: 80px 0 0 0;
border-left: 1px dashed #999;
&.comment-reply-action {
float: right; .comment-reply-form-holder {
} padding: 0 10px; // Prevent clipping issues on slideUp/Down
} }
} .comment-replies-holder {
padding: 0 0 0 10px;
.comment-count { }
margin: 15px 0; }
} }
// The comment form .comments-list.root-level {
.commenting-area { margin-left: 0;
margin-top: 50px; }
label.left{ .comment-reply-link {
font-weight: normal; float: right;
} }
}
.comment-moderation-options {
.commenting-rss-feed { float: left;
margin-top: 4em; }
text-align: right;
} .comment-action-links {
margin: 20px 0 10px;
.no-comments-yet {
display: inline-block; a:not(:last-child) {
margin-top: 10px; margin-right: 12px;
} }
}
.commenting-rss-feed ul {
list-style: none;
} }

View File

@ -11,32 +11,32 @@
<% end_if %> <% end_if %>
</p> </p>
<% end_if %> <% end_if %>
<div class="comment-text" id="<% if $isPreview %>comment-preview<% else %>$Permalink<% end_if %>"> <div class="comment-text" id="<% if $isPreview %>comment-preview<% else %>$Permalink<% end_if %>">
<p>$EscapedComment</p> <p>$EscapedComment</p>
</div> </div>
<% if not $isPreview %> <% if not $isPreview %>
<% if $ApproveLink || $SpamLink || $HamLink || $DeleteLink || $RepliesEnabled %> <% if $ApproveLink || $SpamLink || $HamLink || $DeleteLink || $RepliesEnabled %>
<ul class="action-links"> <div class="comment-action-links">
<% if $ApproveLink %> <div class="comment-moderation-options">
<li><a href="$ApproveLink.ATT" class="approve"><% _t('CommentsInterface_singlecomment_ss.APPROVE', 'approve this comment') %></a></li> <% if $ApproveLink %>
<% end_if %> <a href="$ApproveLink.ATT" class="approve"><% _t('CommentsInterface_singlecomment_ss.APPROVE', 'approve it') %></a>
<% if $SpamLink %> <% end_if %>
<li><a href="$SpamLink.ATT" class="spam"><% _t('CommentsInterface_singlecomment_ss.ISSPAM','this comment is spam') %></a></li> <% if $SpamLink %>
<% end_if %> <a href="$SpamLink.ATT" class="spam"><% _t('CommentsInterface_singlecomment_ss.ISSPAM','spam it') %></a>
<% if $HamLink %> <% end_if %>
<li><a href="$HamLink.ATT" class="ham"><% _t('CommentsInterface_singlecomment_ss.ISNTSPAM','this comment is not spam') %></a></li> <% if $HamLink %>
<% end_if %> <a href="$HamLink.ATT" class="ham"><% _t('CommentsInterface_singlecomment_ss.ISNTSPAM','not spam') %></a>
<% if $DeleteLink %> <% end_if %>
<li><a href="$DeleteLink.ATT" class="delete"><% _t('CommentsInterface_singlecomment_ss.REMCOM','remove this comment') %></a></li> <% if $DeleteLink %>
<% end_if %> <a href="$DeleteLink.ATT" class="delete"><% _t('CommentsInterface_singlecomment_ss.REMCOM','reject it') %></a>
<% end_if %>
</div>
<% if $RepliesEnabled %> <% if $RepliesEnabled %>
<li class="comment-reply-action"> <a class="comment-reply-link" href="#{$ReplyForm.FormName}">Reply to $AuthorName.XML</a>
<a class="comment-reply-link" href="#{$ReplyForm.FormName}">Reply to $AuthorName.XML</a>
</li>
<% end_if %> <% end_if %>
</ul> </div>
<% end_if %> <% end_if %>
<% include CommentReplies %> <% include CommentReplies %>