Adds styles for deleted users, improves previous
This commit is contained in:
@@ -544,14 +544,24 @@
|
|||||||
|
|
||||||
.comment-user {
|
.comment-user {
|
||||||
margin-top: rem-calc(6);
|
margin-top: rem-calc(6);
|
||||||
padding: rem-calc(6) rem-calc(12);
|
padding: rem-calc(6) 0;
|
||||||
|
|
||||||
&.is-official {
|
@each $n in ("1", "2", "3","4", "5") {
|
||||||
background: $comment-official;
|
&.level-#{$n} {
|
||||||
|
@if $n == "5" {
|
||||||
|
background: $comment-level-5;
|
||||||
|
padding: rem-calc(6) rem-calc(12);
|
||||||
|
}
|
||||||
|
@else {
|
||||||
|
background: $comment-official;
|
||||||
|
padding: rem-calc(6) rem-calc(12);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-author {
|
&.is-author {
|
||||||
background: $comment-author;
|
background: $comment-author;
|
||||||
|
padding: rem-calc(6) rem-calc(12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -579,7 +589,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.faded {
|
.faded {
|
||||||
|
|||||||
@@ -589,6 +589,21 @@ form {
|
|||||||
|
|
||||||
img.initialjs-avatar {
|
img.initialjs-avatar {
|
||||||
border-radius: rem-calc(1000);
|
border-radius: rem-calc(1000);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author-deleted {
|
||||||
|
background-color: rgba(255,255,255,.5);
|
||||||
|
color: rgba(0,0,0,.4);
|
||||||
|
font-size: rem-calc(40);
|
||||||
|
left: 11px;
|
||||||
|
position: absolute;
|
||||||
|
top: 63px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-deleted {
|
||||||
|
@extend .author-deleted;
|
||||||
|
top: -9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 11. Filters
|
// 11. Filters
|
||||||
|
|||||||
@@ -76,4 +76,5 @@ $author: #008CCF;
|
|||||||
$association: #222222;
|
$association: #222222;
|
||||||
|
|
||||||
$comment-author: rgba(45,144,248,.15);
|
$comment-author: rgba(45,144,248,.15);
|
||||||
$comment-official: rgba(255,241,204,1);
|
$comment-official: rgba(70,219,145,.3);
|
||||||
|
$comment-level-5: rgba(255,241,204,1);
|
||||||
|
|||||||
@@ -6,10 +6,18 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
<%= avatar_image(comment.user, size: 32, class: 'left') %>
|
<%= avatar_image(comment.user, size: 32, class: 'left') %>
|
||||||
|
<!-- if user deleted -->
|
||||||
|
<i class="icon-deleted user-deleted"></i>
|
||||||
|
<!-- end -->
|
||||||
|
|
||||||
<div class="comment-body">
|
<div class="comment-body">
|
||||||
<div class="comment-info">
|
<div class="comment-info">
|
||||||
<span class="user-name"><%= comment.user.name %></span>
|
|
||||||
|
<!-- if user deleted -->
|
||||||
|
<span class="user-name"><%= t("debates.comment.user_deleted") %></span>
|
||||||
|
<!-- else -->
|
||||||
|
<span class="user-name"><%= comment.user.name %></span>
|
||||||
|
<!-- end -->
|
||||||
• <%= time_ago_in_words(comment.created_at) %>
|
• <%= time_ago_in_words(comment.created_at) %>
|
||||||
<% if comment.user.official? %>
|
<% if comment.user.official? %>
|
||||||
•
|
•
|
||||||
@@ -32,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if comment.user.official? %>
|
<% if comment.user.official? %>
|
||||||
<p class="comment-user is-official"><%= comment.body %></p>
|
<p class="comment-user level-<%= comment.user.official_level %>"><%= comment.body %></p>
|
||||||
<% elsif comment.user == @debate.author %>
|
<% elsif comment.user == @debate.author %>
|
||||||
<p class="comment-user is-author"><%= comment.body %></p>
|
<p class="comment-user is-author"><%= comment.body %></p>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|||||||
@@ -14,9 +14,28 @@
|
|||||||
|
|
||||||
<div class="debate-info">
|
<div class="debate-info">
|
||||||
<%= avatar_image(@debate.author, size: 32, class: 'author-photo') %>
|
<%= avatar_image(@debate.author, size: 32, class: 'author-photo') %>
|
||||||
|
<!-- if user deleted -->
|
||||||
|
<i class="icon-deleted author-deleted"></i>
|
||||||
|
<span class="author">
|
||||||
|
<%= t("debates.show.author_deleted") %>
|
||||||
|
</span>
|
||||||
|
<!-- else -->
|
||||||
<span class="author">
|
<span class="author">
|
||||||
<%= @debate.author.name %>
|
<%= @debate.author.name %>
|
||||||
</span>
|
</span>
|
||||||
|
<!-- end -->
|
||||||
|
<% if @debate.author.official? %>
|
||||||
|
•
|
||||||
|
<span class="label round level-<%= @debate.author.official_level %>">
|
||||||
|
<%= @debate.author.official_position %>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
<% if @debate.author.verified_organization? %>
|
||||||
|
•
|
||||||
|
<span class="label round is-association">
|
||||||
|
<%= t("shared.organization") %>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
<span class="bullet"> • </span>
|
<span class="bullet"> • </span>
|
||||||
<%= l @debate.created_at.to_date %>
|
<%= l @debate.created_at.to_date %>
|
||||||
<span class="bullet"> • </span>
|
<span class="bullet"> • </span>
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ en:
|
|||||||
comment:
|
comment:
|
||||||
author: Debate's author
|
author: Debate's author
|
||||||
deleted: This comment has been deleted
|
deleted: This comment has been deleted
|
||||||
|
user_deleted: Deleted user
|
||||||
responses:
|
responses:
|
||||||
zero: No Responses
|
zero: No Responses
|
||||||
one: 1 Response
|
one: 1 Response
|
||||||
@@ -73,6 +74,7 @@ en:
|
|||||||
Some suggestions:
|
Some suggestions:
|
||||||
show:
|
show:
|
||||||
back_link: Back
|
back_link: Back
|
||||||
|
author_deleted: Deleted user
|
||||||
comments_title: Comments
|
comments_title: Comments
|
||||||
comments:
|
comments:
|
||||||
zero: No comments
|
zero: No comments
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ es:
|
|||||||
comment:
|
comment:
|
||||||
author: Autor del debate
|
author: Autor del debate
|
||||||
deleted: Este comentario ha sido eliminado
|
deleted: Este comentario ha sido eliminado
|
||||||
|
user_deleted: Usuario eliminado
|
||||||
responses:
|
responses:
|
||||||
zero: Sin respuestas
|
zero: Sin respuestas
|
||||||
one: 1 Respuesta
|
one: 1 Respuesta
|
||||||
@@ -73,6 +74,7 @@ es:
|
|||||||
Algunas recomendaciones:
|
Algunas recomendaciones:
|
||||||
show:
|
show:
|
||||||
back_link: Volver
|
back_link: Volver
|
||||||
|
author_deleted: Usuario eliminado
|
||||||
comments_title: Comentarios
|
comments_title: Comentarios
|
||||||
comments:
|
comments:
|
||||||
zero: Sin comentarios
|
zero: Sin comentarios
|
||||||
|
|||||||
Reference in New Issue
Block a user