diff --git a/.gitignore b/.gitignore index d04dbfeb8..f4b9c99fb 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ /coverage /config/beta-testers.txt +.byebug_history # Mac finder artifacts .DS_Store diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 329ab5a0e..0698ee129 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 { @@ -445,7 +457,7 @@ header { } } -.subnavigation-container { +.subnavigation-background { background: white; height: rem-calc(50); margin-top: rem-calc(-50); @@ -456,17 +468,11 @@ header { @media (min-width: $small-breakpoint) { background: white; - padding-left: 0; - - & > .column { - padding-left: 0; - } } a { color: white; display: inline-block; - font-family: $font-sans; line-height: $line-height*2; position: relative; text-align: left; @@ -475,7 +481,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; @@ -496,6 +501,35 @@ header { } } +.submenu { + background: white; + border-bottom: 1px solid $border; + clear: both; + margin: $line-height 0 $line-height/2; + + a { + color: $text; + display: inline-block; + font-weight: bold; + margin-right: $line-height/2; + position: relative; + text-align: left; + + @media (min-width: $small-breakpoint) { + margin-right: $line-height*1.5; + } + + &:hover { + color: $link; + } + + &.active { + border-bottom: 2px solid $brand; + color: $brand; + } + } +} + // 03. Footer // - - - - - - - - - - - - - - - - - - - - - - - - - @@ -559,18 +593,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; } } } @@ -586,27 +619,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 @@ -1272,34 +1284,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/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/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 336b09919..6a61ec72c 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -45,11 +45,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/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index e28f053c7..824118c8d 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -7,7 +7,7 @@ class DebatesController < ApplicationController before_action :set_search_order, only: :index before_action :authenticate_user!, except: [:index, :show] - has_orders %w{hot_score confidence_score created_at most_commented random relevance}, only: :index + has_orders %w{hot_score confidence_score created_at relevance}, only: :index has_orders %w{most_voted newest oldest}, only: :show load_and_authorize_resource diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb index cc8a286ec..4a5e17af3 100644 --- a/app/controllers/proposals_controller.rb +++ b/app/controllers/proposals_controller.rb @@ -7,7 +7,7 @@ class ProposalsController < ApplicationController before_action :set_search_order, only: :index before_action :authenticate_user!, except: [:index, :show] - has_orders %w{hot_score confidence_score created_at most_commented random relevance}, only: :index + has_orders %w{hot_score confidence_score created_at relevance}, only: :index has_orders %w{most_voted newest oldest}, only: :show load_and_authorize_resource diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index b1a4b8007..3312fa0e7 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -24,30 +24,16 @@ <% end %> - <% if @tag_filter || @search_terms %> -
-
- <%= t("debates.index.select_order") %> -
- <%= render 'shared/order_selector', i18n_namespace: "debates.index" %> -
- <% else %> -
-

- <%= t("debates.index.select_order_long") %> -

- <%= render 'shared/order_selector', i18n_namespace: "debates.index" %> -
+ <% 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/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 98975bbaf..78899aba5 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -5,25 +5,7 @@ @@ -51,7 +33,7 @@ - + <% if home_page? %>
diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index 77a0a79a0..d7fdadee9 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -24,26 +24,6 @@ <% end %>
- <% if @tag_filter || @search_terms %> -
-
- <%= t("proposals.index.select_order") %> -
- <%= render 'shared/order_selector', i18n_namespace: "proposals.index" %> -
- <% else %> -
-

- <%= t("proposals.index.select_order_long") %> -

- <%= render 'shared/order_selector', i18n_namespace: "proposals.index" %> -
- <% end %> - -
- <%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: 'button radius expand' %> -
- <% if @featured_proposals.present? %> diff --git a/app/views/shared/_order_links.html.erb b/app/views/shared/_order_links.html.erb new file mode 100644 index 000000000..1e8554916 --- /dev/null +++ b/app/views/shared/_order_links.html.erb @@ -0,0 +1,7 @@ + diff --git a/app/views/shared/_order_selector.html.erb b/app/views/shared/_order_selector.html.erb index e120e98e5..cd3e2cbd5 100644 --- a/app/views/shared/_order_selector.html.erb +++ b/app/views/shared/_order_selector.html.erb @@ -1,5 +1,5 @@
- +