From 6bb4baa80972aa1817a9340bbdfac0c7688628f5 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 5 Jan 2016 17:07:27 +0100 Subject: [PATCH 1/5] Removes social icons from header --- app/assets/stylesheets/variables.scss | 4 ++-- app/views/layouts/_header.html.erb | 24 +++--------------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 72fb27788..d9da9c580 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -44,11 +44,11 @@ $line-height: rem-calc(24); // 02. Colors // - - - - - - - - - - - - - - - - - - - - - - - - - +$brand: #004A83; $body: #E9E9E9; $background: #EDEFF0; -$dark: #0B0C0C; $border: #DEE0E3; -$brand: #004A83; +$dark: darken($brand, 10%); $text: #222222; $text-medium: #999999; diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 98975bbaf..de706a66c 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -5,25 +5,7 @@ @@ -51,7 +33,7 @@ From 2948a2ebe4dfe8383e79c137a4315e2ccc3ca066 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 7 Jan 2016 12:05:05 +0100 Subject: [PATCH 2/5] Improves search form of header --- app/assets/stylesheets/layout.scss | 48 +++++++++++------------------- app/assets/stylesheets/mixins.scss | 7 +++-- config/locales/en.yml | 2 +- config/locales/es.yml | 2 +- 4 files changed, 23 insertions(+), 36 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index d47189d18..95dd958f6 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -232,14 +232,13 @@ header { } .selected { - border-bottom: 2px solid white; - padding-bottom: $line-height/12; + border-bottom: 1px solid white; position: relative; } .locale { float: none; - font-family: $font-sans; + height: $line-height*1.5; @media (min-width: $small-breakpoint) { float: left; @@ -264,7 +263,20 @@ header { } .postfix { + background: $border; + border: 1px solid #ccc; + border-left: 0; + color: $text; height: rem-calc(37); + + &:hover { + background: $brand; + color: white; + } + } + + input { + border-right: 0; } input, .button { @@ -456,11 +468,6 @@ header { @media (min-width: $small-breakpoint) { background: white; - padding-left: 0; - - & > .column { - padding-left: 0; - } } a { @@ -475,7 +482,6 @@ header { @media (min-width: $small-breakpoint) { color: $text; font-weight: bold; - margin-left: $line-height/2; margin-right: $line-height*1.5; margin-right: 12px\9; width: auto; @@ -1201,34 +1207,14 @@ table { } .social { - margin-top: $line-height; - padding-top: $line-height/4; - text-align: center; - vertical-align: middle; - - @media (min-width: $small-breakpoint) { - margin-top: 0; - text-align: right; - } a { - font-size: rem-calc(24); - line-height: $line-height; + font-size: $h3-font-size; margin: 0 $line-height/2; text-decoration: none; - vertical-align: middle; &:hover { - opacity: .5; - text-decoration: none; - } - - @media (min-width: $small-breakpoint) { - font-size: rem-calc(18); - } - - &:last-child { - margin-right: 0; + color: $brand; } } } diff --git a/app/assets/stylesheets/mixins.scss b/app/assets/stylesheets/mixins.scss index f913ed464..3b2bde372 100644 --- a/app/assets/stylesheets/mixins.scss +++ b/app/assets/stylesheets/mixins.scss @@ -18,8 +18,9 @@ font-weight: lighter; @media (min-width: $small-breakpoint) { - font-size: rem-calc(24); - line-height: rem-calc(48); + font-size: $h3-font-size; + line-height: $line-height*2; + margin-top: 0; } img { @@ -28,7 +29,7 @@ @media (min-width: $small-breakpoint) { height: 80px; - margin-right: rem-calc(12); + margin-right: $line-height/2; margin-top: 0; width: 80px; } diff --git a/config/locales/en.yml b/config/locales/en.yml index 3ee698c91..7c17e5b46 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -173,7 +173,7 @@ en: search_form: title: "Search" button: "Search" - placeholder: "Search citizen proposals..." + placeholder: "Search proposals..." search_results: one: " containing the term '%{search_term}'" other: " containing the term '%{search_term}'" diff --git a/config/locales/es.yml b/config/locales/es.yml index 46bb3b88b..1778ebd46 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -173,7 +173,7 @@ es: search_form: title: "Buscar" button: "Buscar" - placeholder: "Buscar propuestas ciudadanas..." + placeholder: "Buscar propuestas..." search_results: one: " que contiene '%{search_term}'" other: " que contienen '%{search_term}'" From 9b2ab35b98b3950f1ef51885f2ee146f73258a05 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 7 Jan 2016 12:47:21 +0100 Subject: [PATCH 3/5] Improves styles for tags --- app/assets/stylesheets/layout.scss | 32 +++++----------------------- app/views/shared/_tag_cloud.html.erb | 2 +- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 95dd958f6..189f2da15 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -565,18 +565,17 @@ footer { .tags, .tag-cloud { a { - background: $border; + background: #ececec; border-radius: rem-calc(6); - color: #4d4d4d; + color: $text; display: inline-block; font-size: $small-font-size; margin-bottom: $line-height/3; - padding: 0 $line-height/3; + padding: $line-height/4 $line-height/3; + text-decoration: none; &:hover { - color: $link; - cursor: pointer; - background: #E5F1F8; + background: #e0e0e0; } } } @@ -592,27 +591,6 @@ footer { padding-top: $line-height/4; text-transform: uppercase; } - - a { - background: white; - border: 2px solid $border; - padding: $line-height/4 $line-height/3; - - .label { - color: white; - - &.info { - background: rgba(0,0,0,.5); - } - } - - &:hover { - - .label { - background: $brand; - } - } - } } // 05. Auth pages diff --git a/app/views/shared/_tag_cloud.html.erb b/app/views/shared/_tag_cloud.html.erb index cc377f34d..fe46b6263 100644 --- a/app/views/shared/_tag_cloud.html.erb +++ b/app/views/shared/_tag_cloud.html.erb @@ -5,7 +5,7 @@ <% tag_cloud @tag_cloud, %w[s m l] do |tag, css_class| %> <%= link_to taggable_path(taggable, tag.name), class: css_class do %> <%= tag.name %> - <%= tag.send(taggable_counter_field(taggable)) %> + (<%= tag.send(taggable_counter_field(taggable)) %>) <% end %> <% end %> From 4ff27d3d1612ea90003f85c6cdea05a782afabdf Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 7 Jan 2016 17:05:21 +0100 Subject: [PATCH 4/5] Moves featured debates and proposals --- app/assets/stylesheets/layout.scss | 3 +-- app/assets/stylesheets/participation.scss | 2 +- app/views/debates/index.html.erb | 8 ++++---- app/views/proposals/index.html.erb | 12 ++++++------ 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index c817fe797..62226e967 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -511,8 +511,7 @@ header { color: $text; display: inline-block; font-weight: bold; - margin-right: $line-height; - margin-right: 12px\9; + margin-right: $line-height/2; position: relative; text-align: left; diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 57110299c..c7d296744 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -824,7 +824,7 @@ } .featured-debates-container, .featured-proposals-container { - margin: 0 !important; + margin: $line-height 0 !important; h2 { font-size: rem-calc(24); diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 16197f221..3312fa0e7 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -24,16 +24,16 @@ <% end %> + <% unless @tag_filter || @search_terms %> + <%= render "featured_debates_static" %> + <% end %> + <%= render 'shared/order_links', i18n_namespace: "debates.index" %>
<%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button radius expand' %>
- <% unless @tag_filter || @search_terms %> - <%= render "featured_debates_static" %> - <% end %> - <%= render @debates %> <%= paginate @debates %> diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index 6db5e3fc1..d7fdadee9 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -24,12 +24,6 @@ <% end %> - <%= render 'shared/order_links', i18n_namespace: "proposals.index" %> - -
- <%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: 'button radius expand' %> -
- <% if @featured_proposals.present? %> From 14e0cf29dabde78824bb4cffd477e6721a424e59 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 7 Jan 2016 17:21:51 +0100 Subject: [PATCH 5/5] Updates test --- spec/features/tags_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/features/tags_spec.rb b/spec/features/tags_spec.rb index 2bd729448..3f57c6b91 100644 --- a/spec/features/tags_spec.rb +++ b/spec/features/tags_spec.rb @@ -63,10 +63,10 @@ feature 'Tags' do visit debates_path within(:css, "#tag-cloud") do - expect(page.find("a:eq(1)")).to have_content("Economía 10") - expect(page.find("a:eq(2)")).to have_content("Corrupción 5") - expect(page.find("a:eq(3)")).to have_content("Educación 5") - expect(page.find("a:eq(4)")).to have_content("Medio Ambiente 1") + expect(page.find("a:eq(1)")).to have_content("Economía (10)") + expect(page.find("a:eq(2)")).to have_content("Corrupción (5)") + expect(page.find("a:eq(3)")).to have_content("Educación (5)") + expect(page.find("a:eq(4)")).to have_content("Medio Ambiente (1)") end end