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">

View File

@@ -59,10 +59,11 @@ en:
password_label: "Password"
password_confirmation_label: "Confirm password"
submit: "Sign up"
organization_signup: "Do you represent an organization / group?"
organizations:
registrations:
new:
title: "Sign up as organization"
title: "Sign up as organization / collective"
organization_name_label: "Organization name"
email_label: "Email"
password_label: "Password"
@@ -86,7 +87,7 @@ en:
login: "Log in"
signup: "Sign up"
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_confirmation: "Didn't receive confirmation instructions?"
new_unlock: "Didn't receive unlock instructions?"

View File

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

View File

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

View File

@@ -32,14 +32,11 @@ es:
debates:
index:
create_debate: Crea un debate
showing: "Estás viendo"
tag: "con el tema"
filter_debates: debates
filter_initiatives: iniciativas
filter_debates_and_initiatives: debates e iniciativas
showing: "Estás viendo los debates"
filter_news: "más nuevos"
filter_votes: "más votados"
filter_rated: mejor valorados
filter_topic: "Estás viendo %{number} debates con el tema '%{topic}'"
debate:
debate: Debate
comments:
@@ -82,7 +79,7 @@ es:
one: 1 Comentario
other: "%{count} Comentarios"
leave_comment: Deja tu comentario
login_to_comment: Entra para participar
login_to_comment: "Necesitas %{signin} o %{signup} para comentar."
edit_debate_link: Editar
share: Compartir
edit:
@@ -137,7 +134,7 @@ es:
shared:
tags_cloud:
tags: Temas
organization: Organización
collective: Colectivo
mailer:
comment:
subject: Alguien ha comentado en tu debate
@@ -148,4 +145,4 @@ es:
manage:
all: "No tienes permiso para realizar la acción '%{action}' sobre %{subject}."
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
# 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_1_name', value: 'Organización Municipal')
Setting.create(key: 'official_level_2_name', value: 'Funcionariado')
Setting.create(key: 'official_level_1_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_4_name', value: 'Concejales')
Setting.create(key: 'official_level_5_name', value: 'Alcaldes')
Setting.create(key: 'official_level_5_name', value: 'Alcaldesa')