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; background: $comment-level-5;
padding: rem-calc(6) rem-calc(12); padding: rem-calc(6) rem-calc(12);
} }
@elseif $n == "1" {
background: none;
padding: rem-calc(6) rem-calc(12);
}
@else { @else {
background: $comment-official; background: $comment-official;
padding: rem-calc(6) rem-calc(12); padding: rem-calc(6) rem-calc(12);

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,11 @@
<%= t("debates.comment.deleted") %> <%= t("debates.comment.deleted") %>
<% else %> <% 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? %> <% if comment.user.hidden? %>
<i class="icon-deleted user-deleted"></i> <i class="icon-deleted user-deleted"></i>
<% end %> <% end %>
@@ -27,7 +31,7 @@
<% if comment.user.verified_organization? %> <% if comment.user.verified_organization? %>
&nbsp;&bullet;&nbsp; &nbsp;&bullet;&nbsp;
<span class="label round is-association"> <span class="label round is-association">
<%= t("shared.organization") %> <%= t("shared.collective") %>
</span> </span>
<% end %> <% end %>
<% if comment.user_id == @debate.author_id %> <% if comment.user_id == @debate.author_id %>
@@ -39,7 +43,9 @@
&nbsp;&bullet;&nbsp;<%= time_ago_in_words(comment.created_at) %> &nbsp;&bullet;&nbsp;<%= time_ago_in_words(comment.created_at) %>
</div> </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> <p class="comment-user level-<%= comment.user.official_level %>"><%= comment.body %></p>
<% elsif comment.user_id == @debate.author_id %> <% elsif comment.user_id == @debate.author_id %>
<p class="comment-user is-author"><%= comment.body %></p> <p class="comment-user is-author"><%= comment.body %></p>

View File

@@ -5,18 +5,6 @@
<div class="small-12 column"> <div class="small-12 column">
<h2><%= t("debates.index.showing") %></h2> <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"> <select class="inline-block">
<option value="filter_news"> <option value="filter_news">
<%= t("debates.index.filter_news") %> <%= t("debates.index.filter_news") %>
@@ -35,39 +23,11 @@
<!-- Filter topic results --> <!-- Filter topic results -->
<div class="filters row"> <div class="filters row">
<div class="small-12 column"> <div class="small-12 column">
<h2><%= t("debates.index.showing") %></h2> <h2>
<%= t("debates.index.filter_topic",
<select class="inline-block"> number: "N",
<option value="filter_debates"> topic: "topic").html_safe %>
<%= t("debates.index.filter_debates") %> </h2>
</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>
</div> </div>
</div> </div>
<!-- /. Filter topic results --> <!-- /. Filter topic results -->

View File

@@ -33,7 +33,7 @@
<% if @debate.author.verified_organization? %> <% if @debate.author.verified_organization? %>
&nbsp;&bullet;&nbsp; &nbsp;&bullet;&nbsp;
<span class="label round is-association"> <span class="label round is-association">
<%= t("shared.organization") %> <%= t("shared.collective") %>
</span> </span>
<% end %> <% end %>
<span class="bullet">&nbsp;&bullet;&nbsp;</span> <span class="bullet">&nbsp;&bullet;&nbsp;</span>
@@ -65,12 +65,6 @@
<div class="sidebar-divider"></div> <div class="sidebar-divider"></div>
<h3><%= t("debates.show.share") %></h3> <h3><%= t("debates.show.share") %></h3>
<%= social_share_button_tag(@debate.title) %> <%= 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> </aside>
</div> </div>
</section> </section>
@@ -85,6 +79,13 @@
</h2> </h2>
<% if user_signed_in? %> <% if user_signed_in? %>
<%= render 'comments/form', {parent: @debate, toggeable: false} %> <%= 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 %> <% end %>
<%= render @comments %> <%= render @comments %>

View File

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

View File

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

View File

@@ -59,10 +59,11 @@ en:
password_label: "Password" password_label: "Password"
password_confirmation_label: "Confirm password" password_confirmation_label: "Confirm password"
submit: "Sign up" submit: "Sign up"
organization_signup: "Do you represent an organization / group?"
organizations: organizations:
registrations: registrations:
new: new:
title: "Sign up as organization" title: "Sign up as organization / collective"
organization_name_label: "Organization name" organization_name_label: "Organization name"
email_label: "Email" email_label: "Email"
password_label: "Password" password_label: "Password"
@@ -86,7 +87,7 @@ en:
login: "Log in" login: "Log in"
signup: "Sign up" signup: "Sign up"
signin_with_provider: "Sign in with %{provider}" signin_with_provider: "Sign in with %{provider}"
organization_signup: "Sign up as an organization" organization_signup: "Sign up as an organization / collective"
new_password: "Forgot your password?" new_password: "Forgot your password?"
new_confirmation: "Didn't receive confirmation instructions?" new_confirmation: "Didn't receive confirmation instructions?"
new_unlock: "Didn't receive unlock instructions?" new_unlock: "Didn't receive unlock instructions?"

View File

@@ -59,10 +59,11 @@ es:
password_label: "Contraseña" password_label: "Contraseña"
password_confirmation_label: "Confirmar contraseña" password_confirmation_label: "Confirmar contraseña"
submit: "Registrarse" submit: "Registrarse"
organization_signup: "¿Representas a una organización / colectivo?"
organizations: organizations:
registrations: registrations:
new: new:
title: "Registrarse como organización" title: "Registrarse como organización / colectivo"
organization_name_label: "Nombre de la organización" organization_name_label: "Nombre de la organización"
email_label: "Email" email_label: "Email"
password_label: "Contraseña" password_label: "Contraseña"
@@ -85,7 +86,7 @@ es:
links: links:
login: "Entrar" login: "Entrar"
signup: "Registrarse" signup: "Registrarse"
organization_signup: "Registro para organizaciones" organization_signup: "Registro para organizaciones / colectivos"
signin_with_provider: "Entrar con %{provider}" signin_with_provider: "Entrar con %{provider}"
new_password: "¿Olvidaste tu contraseña?" new_password: "¿Olvidaste tu contraseña?"
new_confirmation: "¿No has recibido instrucciones para confirmar tu cuenta?" new_confirmation: "¿No has recibido instrucciones para confirmar tu cuenta?"

View File

@@ -32,14 +32,12 @@ en:
debates: debates:
index: index:
create_debate: Create a debate create_debate: Create a debate
showing: You are seeing showing: You are seeing debates
tag: with the topic tag: with the topic
filter_debates: debates
filter_initiatives: initiatives
filter_debates_and_initiatives: debates and initiatives
filter_news: the newest filter_news: the newest
filter_votes: the most voted filter_votes: the most voted
filter_rated: the best rated filter_rated: the best rated
filter_topic: "You are seeing %{number} debates with the topic '%{topic}'"
debate: debate:
debate: Debate debate: Debate
comments: comments:
@@ -82,7 +80,7 @@ en:
one: 1 Comment one: 1 Comment
other: "%{count} Comments" other: "%{count} Comments"
leave_comment: Write a comment leave_comment: Write a comment
login_to_comment: Log in to participate login_to_comment: "You need to %{signin} or %{signup} to comment."
edit_debate_link: Edit edit_debate_link: Edit
share: Share share: Share
edit: edit:
@@ -137,7 +135,7 @@ en:
shared: shared:
tags_cloud: tags_cloud:
tags: Topics tags: Topics
organization: Organization collective: Collective
mailer: mailer:
comment: comment:
subject: Someone has commented on your debate subject: Someone has commented on your debate
@@ -148,4 +146,4 @@ en:
manage: manage:
all: "You are not authorized to %{action} %{subject}." all: "You are not authorized to %{action} %{subject}."
welcome: welcome:
featured_debates: Features debates last_debates: Last debates

View File

@@ -32,14 +32,11 @@ es:
debates: debates:
index: index:
create_debate: Crea un debate create_debate: Crea un debate
showing: "Estás viendo" showing: "Estás viendo los debates"
tag: "con el tema"
filter_debates: debates
filter_initiatives: iniciativas
filter_debates_and_initiatives: debates e iniciativas
filter_news: "más nuevos" filter_news: "más nuevos"
filter_votes: "más votados" filter_votes: "más votados"
filter_rated: mejor valorados filter_rated: mejor valorados
filter_topic: "Estás viendo %{number} debates con el tema '%{topic}'"
debate: debate:
debate: Debate debate: Debate
comments: comments:
@@ -82,7 +79,7 @@ es:
one: 1 Comentario one: 1 Comentario
other: "%{count} Comentarios" other: "%{count} Comentarios"
leave_comment: Deja tu comentario leave_comment: Deja tu comentario
login_to_comment: Entra para participar login_to_comment: "Necesitas %{signin} o %{signup} para comentar."
edit_debate_link: Editar edit_debate_link: Editar
share: Compartir share: Compartir
edit: edit:
@@ -137,7 +134,7 @@ es:
shared: shared:
tags_cloud: tags_cloud:
tags: Temas tags: Temas
organization: Organización collective: Colectivo
mailer: mailer:
comment: comment:
subject: Alguien ha comentado en tu debate subject: Alguien ha comentado en tu debate
@@ -148,4 +145,4 @@ es:
manage: manage:
all: "No tienes permiso para realizar la acción '%{action}' sobre %{subject}." all: "No tienes permiso para realizar la acción '%{action}' sobre %{subject}."
welcome: welcome:
featured_debates: Debates destacados last_debates: Úlitmos debates

View File

@@ -1,8 +1,8 @@
# Names for the moderation console, as a hint for moderators # Names for the moderation console, as a hint for moderators
# to know better how to assign users with official positions # to know better how to assign users with official positions
Setting.create(key: 'official_level_0_name', value: 'No cargo público') Setting.create(key: 'official_level_0_name', value: 'No cargo público')
Setting.create(key: 'official_level_1_name', value: 'Organización Municipal') Setting.create(key: 'official_level_1_name', value: 'Funcionariado')
Setting.create(key: 'official_level_2_name', value: 'Funcionariado') Setting.create(key: 'official_level_2_name', value: 'Organización Municipal')
Setting.create(key: 'official_level_3_name', value: 'Directores generales') Setting.create(key: 'official_level_3_name', value: 'Directores generales')
Setting.create(key: 'official_level_4_name', value: 'Concejales') Setting.create(key: 'official_level_4_name', value: 'Concejales')
Setting.create(key: 'official_level_5_name', value: 'Alcaldes') Setting.create(key: 'official_level_5_name', value: 'Alcaldesa')