Merge pull request #141 from AyuntamientoMadrid/debates
Improves styles for debates
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
@mixin votes {
|
@mixin votes {
|
||||||
border-top: 1px solid $votes-border;
|
border-top: 1px solid $votes-border;
|
||||||
padding: rem-calc(14) rem-calc(12);
|
padding: rem-calc(14) rem-calc(12);
|
||||||
background: $votes-background;
|
background: $votes-bg;
|
||||||
margin: 0 -12px;
|
margin: 0 -12px;
|
||||||
|
|
||||||
.icon-like {
|
.icon-like {
|
||||||
@@ -178,6 +178,10 @@
|
|||||||
font-size: rem-calc(16);
|
font-size: rem-calc(16);
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $text-light;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.debate-description {
|
.debate-description {
|
||||||
@@ -320,6 +324,10 @@
|
|||||||
line-height: $line-height*2;
|
line-height: $line-height*2;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $text-light;
|
||||||
|
}
|
||||||
|
|
||||||
.bullet {
|
.bullet {
|
||||||
color: $border;
|
color: $border;
|
||||||
}
|
}
|
||||||
@@ -346,10 +354,17 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
border-top: 1px solid $border;
|
||||||
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
border-bottom: 2px solid $votes-border;
|
border-top: 1px solid $votes-border;
|
||||||
font-size: rem-calc(18);
|
display: inline-block;
|
||||||
margin: 0;
|
font-family: $font-family-sans-serif;
|
||||||
|
font-size: rem-calc(16);
|
||||||
|
margin: -1px 0 rem-calc(12);
|
||||||
|
padding-top: rem-calc(6);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,6 +384,11 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-top: $line-height;
|
margin-top: $line-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: block;
|
||||||
|
margin-top: $line-height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 04. New
|
// 04. New
|
||||||
@@ -443,12 +463,24 @@
|
|||||||
|
|
||||||
p {
|
p {
|
||||||
color: $comments-text;
|
color: $comments-text;
|
||||||
font-size: rem-calc(15);
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
.comment-votes {
|
||||||
color: $comments-info;
|
color: $comments-info;
|
||||||
|
font-weight: lighter;
|
||||||
|
margin: rem-calc(15) rem-calc(6) 0;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $comments-info;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class^="icon-"] {
|
||||||
|
font-size: rem-calc(20);
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-photo {
|
.user-photo {
|
||||||
@@ -456,7 +488,7 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
line-height: $line-height*2;
|
line-height: $line-height*2;
|
||||||
margin-right: $line-height/4;
|
margin-right: rem-calc(6);
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
width: 32px;
|
width: 32px;
|
||||||
}
|
}
|
||||||
@@ -465,13 +497,17 @@
|
|||||||
margin-left: $line-height*1.6;
|
margin-left: $line-height*1.6;
|
||||||
|
|
||||||
.reply {
|
.reply {
|
||||||
|
background: white;
|
||||||
|
border: 1px solid $border;
|
||||||
font-size: rem-calc(12);
|
font-size: rem-calc(12);
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
|
margin: rem-calc(6) 0;
|
||||||
|
padding: rem-calc(6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment-children {
|
.comment-children {
|
||||||
border-left: 1px dotted $border;
|
border-left: 1px dashed $border;
|
||||||
margin-left: $line-height*1.6;
|
margin-left: $line-height*1.6;
|
||||||
padding-left: $line-height/4;
|
padding-left: $line-height/4;
|
||||||
|
|
||||||
@@ -485,6 +521,11 @@
|
|||||||
font-size: rem-calc(13);
|
font-size: rem-calc(13);
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: $text-color;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -73,6 +73,14 @@ p {
|
|||||||
margin-bottom: $line-height/2;
|
margin-bottom: $line-height/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $link;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $link-hover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
padding: rem-calc(15) rem-calc(32);
|
padding: rem-calc(15) rem-calc(32);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ $comments-text: #3F4549;
|
|||||||
|
|
||||||
$header-color: #292B33;
|
$header-color: #292B33;
|
||||||
$link: #2895F1;
|
$link: #2895F1;
|
||||||
$link-hover: #2178BF;
|
$link-hover: #2178BF;
|
||||||
|
|
||||||
$tags-bg: #FAFAFA;
|
$tags-bg: #FAFAFA;
|
||||||
$tags-border: #F0F0F0;
|
$tags-border: #F0F0F0;
|
||||||
@@ -38,7 +38,7 @@ $text-medium: #999999;
|
|||||||
$text-light: #A3A6AD;
|
$text-light: #A3A6AD;
|
||||||
|
|
||||||
$votes: #31708f;
|
$votes: #31708f;
|
||||||
$votes-background: #26AEEE;
|
$votes-bg: #26AEEE;
|
||||||
$votes-border: #1F94CB;
|
$votes-border: #1F94CB;
|
||||||
$votes-like: #7BD2A8;
|
$votes-like: #7BD2A8;
|
||||||
$votes-like-act: #5D9E7F;
|
$votes-like-act: #5D9E7F;
|
||||||
@@ -59,7 +59,7 @@ $success-bg: #DFF0D8;
|
|||||||
$success-border: #D6E9C6;
|
$success-border: #D6E9C6;
|
||||||
$success-color: #3C763D;
|
$success-color: #3C763D;
|
||||||
|
|
||||||
$info-bg: #D9EDF7;
|
$info-bg: #D9EDF7;
|
||||||
$info-border: #BCE8F1;
|
$info-border: #BCE8F1;
|
||||||
$info-color: #31708F;
|
$info-color: #31708F;
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,29 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="comment-<%= comment.id %>" class="small-12 column comment">
|
<div id="comment-<%= comment.id %>" class="comment small-12 column">
|
||||||
|
|
||||||
<%= image_tag('user_default_2.jpg', class: 'user-photo left', size: '32x32') %>
|
<%= image_tag('user_default_2.jpg', class: 'user-photo left', size: '32x32') %>
|
||||||
|
|
||||||
<div class="comment-body">
|
<div class="comment-body">
|
||||||
<span class="comment-info">
|
<span class="comment-info">
|
||||||
<%= comment.user.name %> • <%= time_ago_in_words(comment.created_at) %>
|
<span><%= comment.user.name %></span> • <%= time_ago_in_words(comment.created_at) %>
|
||||||
</span>
|
</span>
|
||||||
<p><%= comment.body %></p>
|
<p><%= comment.body %></p>
|
||||||
|
|
||||||
<span id="<%= dom_id(comment) %>_votes">
|
<span id="<%= dom_id(comment) %>_votes" class="comment-votes right">
|
||||||
<%= render 'comments/votes', comment: comment %>
|
<%= render 'comments/votes', comment: comment %>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<% if user_signed_in? %>
|
<p class="reply">
|
||||||
<p class="reply"><%= render 'comments/form', {parent: comment, toggeable: true} %></p>
|
númerototal respuestas
|
||||||
<% end %>
|
<% if user_signed_in? %>
|
||||||
</div>
|
|
|
||||||
|
<%= render 'comments/form', {parent: comment, toggeable: true} %></p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="comment-children">
|
<div class="comment-children">
|
||||||
<%= render comment.children %>
|
<%= render comment.children %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,11 +1,19 @@
|
|||||||
|
<span>
|
||||||
|
númerototal votos
|
||||||
|
</span>
|
||||||
|
|
|
||||||
<span class="in_favor">
|
<span class="in_favor">
|
||||||
<%= link_to "up", vote_comment_path(comment, value: 'yes'),
|
<%= link_to vote_comment_path(comment, value: 'yes'),
|
||||||
method: "post", remote: true %>
|
method: "post", remote: true do %>
|
||||||
|
<i class="icon-angle-up"></i>
|
||||||
|
<% end %>
|
||||||
<%= comment.get_likes.size %>
|
<%= comment.get_likes.size %>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="against">
|
<span class="against">
|
||||||
<%= link_to "down", vote_comment_path(comment, value: 'no'),
|
<%= link_to vote_comment_path(comment, value: 'no'),
|
||||||
method: "post", remote: true %>
|
method: "post", remote: true do %>
|
||||||
|
<i class="icon-angle-down"></i>
|
||||||
|
<% end %>
|
||||||
<%= comment.get_dislikes.size %>
|
<%= comment.get_dislikes.size %>
|
||||||
</span>
|
</span>
|
||||||
@@ -9,8 +9,7 @@
|
|||||||
<h3><%= link_to debate.title, debate %></h3>
|
<h3><%= link_to debate.title, debate %></h3>
|
||||||
<p class="debate-info">
|
<p class="debate-info">
|
||||||
<i class="icon-chat-bubble-two"></i>
|
<i class="icon-chat-bubble-two"></i>
|
||||||
<%= pluralize(debate.comment_threads.count,
|
<%= link_to pluralize(debate.comment_threads.count, t("debates.debate.comment"), t("debates.debate.comments")), debate_path(debate, anchor: "comments") %>
|
||||||
t("debates.debate.comment"), t("debates.debate.comments")) %>
|
|
||||||
</p>
|
</p>
|
||||||
<div class="debate-description">
|
<div class="debate-description">
|
||||||
<%= link_to debate.description, debate %>
|
<%= link_to debate.description, debate %>
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
<h3><%= link_to featured_debate.title, featured_debate %></h3>
|
<h3><%= link_to featured_debate.title, featured_debate %></h3>
|
||||||
<p class="debate-info">
|
<p class="debate-info">
|
||||||
<i class="icon-chat-bubble-two"></i>
|
<i class="icon-chat-bubble-two"></i>
|
||||||
<%= pluralize(featured_debate.comment_threads.count,
|
<%= link_to pluralize(featured_debate.comment_threads.count, t("debates.show.comment"), t("debates.show.comments")), debate_path(featured_debate, anchor: "comments") %>
|
||||||
t("debates.show.comment"), t("debates.show.comments")) %>
|
|
||||||
</p>
|
</p>
|
||||||
<div class="debate-description">
|
<div class="debate-description">
|
||||||
<%= link_to featured_debate.description, featured_debate %>
|
<%= link_to featured_debate.description, featured_debate %>
|
||||||
|
|||||||
@@ -2,17 +2,22 @@
|
|||||||
<div id="debate-<%= @debate.id %>" class="row">
|
<div id="debate-<%= @debate.id %>" class="row">
|
||||||
<div class="small-12 medium-9 column">
|
<div class="small-12 medium-9 column">
|
||||||
<i class="icon-angle-left left"></i> <%= link_to t("debates.show.back_link"), debates_path, class: 'left back' %>
|
<i class="icon-angle-left left"></i> <%= link_to t("debates.show.back_link"), debates_path, class: 'left back' %>
|
||||||
|
<h1><%= @debate.title %></h1>
|
||||||
|
|
||||||
<div class="debate-info">
|
<div class="debate-info">
|
||||||
<%= image_tag('user_default.jpg', class: 'author-photo', size: '32x32') %>
|
<%= image_tag('user_default.jpg', class: 'author-photo', size: '32x32') %>
|
||||||
<span class="author"><%= @debate.author.name %></span><span class="bullet"> • </span> <%= l @debate.created_at.to_date %> <span class="bullet"> • </span><i class="icon-chat-bubble-two"></i> <%= pluralize(@debate.comment_threads.count, t("debates.show.comment"), t("debates.show.comments")) %>
|
<span class="author"><%= @debate.author.name %></span><span class="bullet"> • </span> <%= l @debate.created_at.to_date %> <span class="bullet"> • </span><i class="icon-chat-bubble-two"></i> <%= link_to pluralize(@debate.comment_threads.count, t("debates.show.comment"), t("debates.show.comments")), "#comments" %>
|
||||||
</div>
|
</div>
|
||||||
<h1><%= @debate.title %></h1>
|
|
||||||
<%= @debate.description %>
|
<%= @debate.description %>
|
||||||
<p><%= render 'shared/tags', debate: @debate %></p>
|
|
||||||
|
<%= render 'shared/tags', debate: @debate %>
|
||||||
|
|
||||||
<p><%= social_share_button_tag(@debate.title) %></p>
|
<p><%= social_share_button_tag(@debate.title) %></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="small-12 medium-3 column">
|
<aside class="small-12 medium-3 column">
|
||||||
|
<div class="sidebar"></div>
|
||||||
<h3><%= t("votes.supports") %></h3>
|
<h3><%= t("votes.supports") %></h3>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div id="<%= dom_id(@debate) %>_votes">
|
<div id="<%= dom_id(@debate) %>_votes">
|
||||||
@@ -24,8 +29,7 @@
|
|||||||
<%= link_to t("debates.show.login_to_comment"), new_user_session_path, class: "leave-comment" %>
|
<%= link_to t("debates.show.login_to_comment"), new_user_session_path, class: "leave-comment" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</aside>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -45,4 +49,4 @@
|
|||||||
<%= link_to t("debates.show.edit_debate_link"), edit_debate_path(@debate), :class => 'button radius right' %>
|
<%= link_to t("debates.show.edit_debate_link"), edit_debate_path(@debate), :class => 'button radius right' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
Reference in New Issue
Block a user