Adds styles for associations comments

This commit is contained in:
Alberto Garcia Cabeza
2015-08-18 17:01:48 +02:00
committed by Juanjo Bazán
parent 87d921b3c7
commit 04db8112b4
8 changed files with 27 additions and 15 deletions

View File

@@ -497,7 +497,7 @@
font-weight: bold;
span {
font-size: rem-calc(14);
font-size: rem-calc(18);
font-weight: normal;
opacity: .8;
}
@@ -546,11 +546,11 @@
margin-top: rem-calc(6);
padding: rem-calc(6) rem-calc(12);
&.official {
&.is-official {
background: $comment-official;
}
&.author {
&.is-author {
background: $comment-author;
}
}

View File

@@ -631,8 +631,12 @@ img.initialjs-avatar {
color: white;
}
.author-debate {
background: $author-debate;
.is-author {
background: $author;
}
.is-association {
background: $association;
}
.level-1 {

View File

@@ -72,7 +72,8 @@ $level-3: #43AC6A;
$level-4: #43AC6A;
$level-5: #F08A24;
$author-debate: $debates;
$author: #008CCF;
$association: #222222;
$comment-author: rgba(45,144,248,.15);
$comment-official: rgba(255,241,204,1);

View File

@@ -16,18 +16,23 @@
<span class="label round level-1">
Cargo oficial
</span>
<!-- if user is a VERIFICATED association -->
&nbsp;&bullet;&nbsp;
<span class="label round is-association">
Puesto en la asociación
</span>
<!-- if user is debate's author -->
&nbsp;&bullet;&nbsp;
<span class="label round author-debate">
<span class="label round is-author">
<%= t("debates.comment.author") %>
</span>
<!-- end -->
</div>
<!-- if user is official -->
<p class="comment-user official"><%= comment.body %></p>
<p class="comment-user is-official"><%= comment.body %></p>
<!-- elsif user is author -->
<p class="comment-user author"><%= comment.body %></p>
<p class="comment-user is-author"><%= comment.body %></p>
<!-- else -->
<p class="comment-user"><%= comment.body %></p>
<!-- end -->

View File

@@ -1,6 +1,6 @@
<div id="js-comment-form-<%= dom_id(parent) %>" <%= "style='display:none'".html_safe if toggeable %>>
<%= form_for [@debate, Comment.new], remote: true do |f| %>
<%= f.text_area :body %>
<%= f.text_area :body, label: t("comments.form.leave_comment") %>
<%= f.hidden_field :commentable_type, value: parent.class %>
<%= f.hidden_field :commentable_id, value: parent.id %>

View File

@@ -10,7 +10,6 @@
<% end %>
<% end %>
<h1><%= @debate.title %></h1>
<div class="debate-info">
@@ -63,13 +62,10 @@
<h2>
<%= t("debates.show.comments_title") %>
<span>(<%= t("debates.show.comments", count: @debate.comment_threads.count) %>)</span>
<span>(<%= @debate.comment_threads.count %>)</span>
</h2>
<% if user_signed_in? %>
<div>
<%= t("debates.show.leave_comment") %>
<%= render 'comments/form', {parent: @debate, toggeable: false} %>
</div>
<% end %>
<%= render @comments %>

View File

@@ -93,6 +93,9 @@ en:
recommendation_one: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
recommendation_two: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
recommendation_three: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
comments:
form:
leave_comment: Write a comment
comments_helper:
comment_link: Comment
comment_button: Publish comment

View File

@@ -93,6 +93,9 @@ es:
recommendation_one: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
recommendation_two: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
recommendation_three: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"
comments:
form:
leave_comment: Deja tu comentario
comments_helper:
comment_link: Comentar
comment_button: Publicar comentario