Improves general styles

This commit is contained in:
Alberto Garcia Cabeza
2015-08-21 18:57:09 +02:00
parent e69688e91f
commit ff6285d114
15 changed files with 89 additions and 104 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -552,6 +552,10 @@
background: $comment-level-5;
padding: rem-calc(6) rem-calc(12);
}
@elseif $n == "1" {
background: none;
padding: rem-calc(6) rem-calc(12);
}
@else {
background: $comment-official;
padding: rem-calc(6) rem-calc(12);

View File

@@ -193,6 +193,8 @@ header {
.locale {
float: none;
height: rem-calc(48);
padding-top: rem-calc(3);
text-align: center;
@media (min-width: 480px) {
@@ -201,7 +203,9 @@ header {
}
.external-links {
@extend .locale;
float: none;
padding: rem-calc(12) 0;
text-align: center;
@media (min-width: 480px) {
float: right;
@@ -274,7 +278,11 @@ header {
font-size: rem-calc(14);
}
ul li, ul li:hover:not(.has-form) > a {
ul li > a.button:hover, .top-bar-section ul li > a.button:focus {
background-color: #007095 !important;
}
ul li, ul li:hover:not(.has-form) > a:not(.button) {
line-height: $line-height;
@media (min-width: $small-breakpoint) {
@@ -284,24 +292,28 @@ header {
}
}
li:not(.has-form) a:not(.button) {
background: none;
color: white;
ul {
margin-right: rem-calc(12);
@media (min-width: $small-breakpoint) {
li:not(.has-form) a:not(.button) {
background: none;
color: white;
@media (min-width: $small-breakpoint) {
line-height: $line-height*4;
}
&:hover {
background: none;
color: $link-hover;
}
}
li.active:not(.has-form) a:not(.button) {
background: none;
height: rem-calc(96);
line-height: $line-height*4;
}
&:hover {
background: none;
color: $link-hover;
}
}
li.active:not(.has-form) a:not(.button) {
background: none;
height: rem-calc(96);
line-height: $line-height*4;
}
}
@@ -309,7 +321,6 @@ header {
color: white;
font-size: rem-calc(14);
height: rem-calc(72);
padding: rem-calc(12) 0;
@media (min-width: 480px) {
height: rem-calc(48);
@@ -477,6 +488,12 @@ footer {
font-weight: bolder;
}
}
form {
.button {
margin-top: rem-calc(24);
}
}
}
// 08. Forms
@@ -550,10 +567,6 @@ form {
margin-bottom: 0 !important;
}
}
.button {
margin-top: rem-calc(24);
}
}
// 09. Alerts
@@ -652,7 +665,7 @@ form {
}
}
img.initialjs-avatar {
img.initialjs-avatar, img.avatar {
border-radius: rem-calc(1000);
position: relative;
}

View File

@@ -67,14 +67,14 @@ $alert-color: #A94442;
// 05. Levels
// - - - - - - - - - - - - - - - - - - - - - - - - -
$level-1: #43AC6A;
$level-1: #1ABC9C;
$level-2: #43AC6A;
$level-3: #43AC6A;
$level-4: #43AC6A;
$level-5: #F08A24;
$author: #008CCF;
$association: #222222;
$association: #C0392B;
$comment-author: rgba(45,144,248,.15);
$comment-official: rgba(70,219,145,.3);

View File

@@ -2,7 +2,7 @@ class WelcomeController < ApplicationController
skip_authorization_check
def index
@featured_debates = Debate.includes(:tags).limit(9)
@featured_debates = Debate.includes(:tags).limit(3)
set_debate_votes(@featured_debates)
end

View File

@@ -5,7 +5,11 @@
<%= t("debates.comment.deleted") %>
<% else %>
<%= avatar_image(comment.user, size: 32, class: 'left') %>
<% if comment.user.organization? %>
<%= image_tag("collective_avatar.png", size: 32, class: "avatar left") %>
<% else %>
<%= avatar_image(comment.user, size: 32, class: "left") %>
<% end %>
<% if comment.user.hidden? %>
<i class="icon-deleted user-deleted"></i>
<% end %>
@@ -27,7 +31,7 @@
<% if comment.user.verified_organization? %>
&nbsp;&bullet;&nbsp;
<span class="label round is-association">
<%= t("shared.organization") %>
<%= t("shared.collective") %>
</span>
<% end %>
<% if comment.user_id == @debate.author_id %>
@@ -39,7 +43,9 @@
&nbsp;&bullet;&nbsp;<%= time_ago_in_words(comment.created_at) %>
</div>
<% if comment.user.official? %>
<% if comment.user.official? && comment.user_id == @debate.author_id %>
<p class="comment-user level-<%= comment.user.official_level %> is-author"><%= comment.body %></p>
<% elsif comment.user.official? %>
<p class="comment-user level-<%= comment.user.official_level %>"><%= comment.body %></p>
<% elsif comment.user_id == @debate.author_id %>
<p class="comment-user is-author"><%= comment.body %></p>

View File

@@ -5,18 +5,6 @@
<div class="small-12 column">
<h2><%= t("debates.index.showing") %></h2>
<select class="inline-block">
<option value="filter_debates">
<%= t("debates.index.filter_debates") %>
</option>
<option value="filter_initiatives">
<%= t("debates.index.filter_initiatives") %>
</option>
<option value="filter_debates_and_initiatives">
<%= t("debates.index.filter_debates_and_initiatives") %>
</option>
</select>
<select class="inline-block">
<option value="filter_news">
<%= t("debates.index.filter_news") %>
@@ -35,39 +23,11 @@
<!-- Filter topic results -->
<div class="filters row">
<div class="small-12 column">
<h2><%= t("debates.index.showing") %></h2>
<select class="inline-block">
<option value="filter_debates">
<%= t("debates.index.filter_debates") %>
</option>
<option value="filter_initiatives">
<%= t("debates.index.filter_initiatives") %>
</option>
<option value="filter_debates_and_initiatives">
<%= t("debates.index.filter_debates_and_initiatives") %>
</option>
</select>
<select class="inline-block">
<option value="filter_news">
<%= t("debates.index.filter_news") %>
</option>
<option value="filter_votes">
<%= t("debates.index.filter_votes") %>
</option>
<option value="filter_rated">
<%= t("debates.index.filter_rated") %>
</option>
</select>
<h2><%= t("debates.index.tag") %></h2>
<select class="inline-block">
<option value="">Lista de temas</option>
</select>
<h2>(43)</h2>
<h2>
<%= t("debates.index.filter_topic",
number: "N",
topic: "topic").html_safe %>
</h2>
</div>
</div>
<!-- /. Filter topic results -->

View File

@@ -33,7 +33,7 @@
<% if @debate.author.verified_organization? %>
&nbsp;&bullet;&nbsp;
<span class="label round is-association">
<%= t("shared.organization") %>
<%= t("shared.collective") %>
</span>
<% end %>
<span class="bullet">&nbsp;&bullet;&nbsp;</span>
@@ -65,12 +65,6 @@
<div class="sidebar-divider"></div>
<h3><%= t("debates.show.share") %></h3>
<%= social_share_button_tag(@debate.title) %>
<% if user_signed_in? %>
<%= link_to t("debates.show.leave_comment"), "#comments", class: "leave-comment" %>
<% else %>
<%= link_to t("debates.show.login_to_comment"), new_user_session_path, class: "leave-comment" %>
<% end %>
</aside>
</div>
</section>
@@ -85,6 +79,13 @@
</h2>
<% if user_signed_in? %>
<%= render 'comments/form', {parent: @debate, toggeable: false} %>
<% else %>
<br>
<div class="alert-box radius info">
<%= t("debates.show.login_to_comment",
signin: link_to(t("votes.signin"), new_user_session_path),
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
</div>
<% end %>
<%= render @comments %>

View File

@@ -4,6 +4,10 @@
<h2><%= t("devise_views.users.registrations.new.title") %></h2>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= render 'shared/errors', resource: resource %>
<%= link_to t("devise_views.users.registrations.new.organization_signup"), new_organization_registration_path %><br>
<br>
<div class="row">
<div class="small-12 column">
<%= f.text_field :first_name, autofocus: true,

View File

@@ -1,7 +1,7 @@
<section role="main">
<div class="filters row">
<div class="small-12 column">
<h2><%= t("welcome.featured_debates") %></h2>
<h2><%= t("welcome.last_debates") %></h2>
</div>
</div>
<div id="featured-debates" class="row">