improves styles on comments votes

This commit is contained in:
Alberto Garcia Cabeza
2016-11-02 12:17:15 +01:00
parent e9b5a8980e
commit f8649ad6c2
2 changed files with 47 additions and 17 deletions

View File

@@ -1550,7 +1550,7 @@ table {
.comment-votes {
color: $text-medium;
font-size: rem-calc(14);
font-size: $small-font-size;
line-height: $line-height;
a {
@@ -1560,12 +1560,21 @@ table {
&:hover {
color: $text-medium;
text-decoration: none;
.icon-like {
color: $like;
}
.icon-unlike {
color: $unlike;
}
}
}
[class^="icon-"] {
font-size: rem-calc(20);
vertical-align: middle;
font-size: $base-font-size;
vertical-align: sub;
}
}
@@ -1685,7 +1694,8 @@ table {
}
.flag-disable, .flag-active {
vertical-align: middle;
line-height: 0;
vertical-align: sub;
}
.flag-disable {

View File

@@ -6,13 +6,17 @@
<span class="in_favor">
<% if can?(:vote, comment) %>
<%= link_to vote_comment_path(comment, value: 'yes'),
method: "post", remote: true do %>
<span class="icon-angle-up">
method: "post", remote: true, title: t('votes.agree') do %>
<span class="icon-like">
<span class="sr-only"><%= t('votes.agree') %></span>
</span>
<% end %>
<% else %>
<span class="icon-angle-up"></span>
<%= link_to new_user_session_path do %>
<span class="icon-like">
<span class="sr-only"><%= t('votes.agree') %></span>
</span>
<% end %>
<% end %>
<%= comment.total_likes %>
</span>
@@ -20,13 +24,15 @@
<span class="against">
<% if can?(:vote, comment) %>
<%= link_to vote_comment_path(comment, value: 'no'),
method: "post", remote: true do %>
<span class="icon-angle-down">
method: "post", remote: true, title: t('votes.disagree') do %>
<span class="icon-unlike">
<span class="sr-only"><%= t('votes.disagree') %></span>
</span>
<% end %>
<% else %>
<span class="icon-angle-down"></span>
<span class="icon-unlike">
<span class="sr-only"><%= t('votes.disagree') %></span>
</span>
<% end %>
<%= comment.total_dislikes %>
</span>
@@ -40,26 +46,40 @@
<span class="in_favor">
<% if can?(:vote, comment) %>
<%= link_to vote_comment_path(comment, value: 'yes'),
method: "post", remote: true do %>
<span class="icon-angle-up"></span>
method: "post", remote: true, title: t('votes.agree') do %>
<span class="icon-like">
<span class="sr-only"><%= t('votes.agree') %></span>
</span>
<% end %>
<% else %>
<span class="icon-angle-up"></span>
<%= link_to new_user_session_path do %>
<span class="icon-like">
<span class="sr-only"><%= t('votes.agree') %></span>
</span>
<% end %>
<% end %>
<%= comment.total_likes %>
</span>
<span class="against">
<% if can?(:vote, comment) %>
<%= link_to vote_comment_path(comment, value: 'no'),
method: "post", remote: true do %>
<span class="icon-angle-down"></span>
method: "post", remote: true, title: t('votes.disagree') do %>
<span class="icon-unlike">
<span class="sr-only"><%= t('votes.disagree') %></span>
</span>
<% end %>
<% else %>
<span class="icon-angle-down"></span>
<%= link_to new_user_session_path do %>
<span class="icon-unlike">
<span class="sr-only"><%= t('votes.disagree') %></span>
</span>
<% end %>
<% end %>
<%= comment.total_dislikes %>
</span>
</div>
</div>
<div class="participation-not-allowed" style='display:none' aria-hidden="false">
<%= t("votes.comment_unauthenticated",
signin: link_to(t("votes.signin"), new_user_session_path),