Adds styles for deleted comments

This commit is contained in:
Alberto Garcia Cabeza
2015-08-27 20:21:26 +02:00
parent ec7da85949
commit 413a034e23
4 changed files with 20 additions and 8 deletions

View File

@@ -574,6 +574,8 @@
padding: rem-calc(6) rem-calc(12);
}
&.is-admin {
background: $comment-admin;
padding: rem-calc(6) rem-calc(12);
@@ -585,6 +587,12 @@
}
}
.is-deleted {
background: $deleted;
margin-left: rem-calc(42);
padding: rem-calc(6) rem-calc(12);
}
.comment-children {
border-left: 1px dashed $border;
margin-left: rem-calc(42);

View File

@@ -801,6 +801,10 @@ img.initialjs-avatar {
background: $association;
}
.is-deleted {
background: $deleted;
}
.level-1 {
background: $level-1;
}

View File

@@ -76,6 +76,7 @@ $level-5: #F08A24;
$author: #008CCF;
$association: #C0392B;
$deleted: #E7E7E7;
$comment-author: rgba(45,144,248,.15);
$comment-level-5: rgba(255,241,204,1);

View File

@@ -1,8 +1,10 @@
<div class="row">
<div id="<%= dom_id(comment) %>" class="comment small-12 column">
<% if comment.not_visible? %>
<%= t("debates.comment.deleted") %>
<% if comment.not_visible? && comment.children_count > 0 %>
<div class="is-deleted">
<p><%= t("debates.comment.deleted") %></p>
</div>
<% else %>
<% if comment.as_administrator? %>
@@ -10,7 +12,6 @@
<% elsif comment.as_moderator? %>
<%= image_tag("moderator_avatar.png", size: 32, class: "moderator-avatar left") %>
<% else %>
<% if comment.user.organization? %>
<%= image_tag("collective_avatar.png", size: 32, class: "avatar left") %>
<% else %>
@@ -19,7 +20,6 @@
<% if comment.user.hidden? %>
<i class="icon-deleted user-deleted"></i>
<% end %>
<% end %>
<div class="comment-body">
@@ -91,7 +91,6 @@
<% end %>
</div>
</div>
<% end %>
<div class="comment-children">