diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 189f2da15..c817fe797 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -457,7 +457,7 @@ header { } } -.subnavigation-container { +.subnavigation-background { background: white; height: rem-calc(50); margin-top: rem-calc(-50); @@ -473,7 +473,6 @@ header { a { color: white; display: inline-block; - font-family: $font-sans; line-height: $line-height*2; position: relative; text-align: left; @@ -502,6 +501,36 @@ 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; + margin-right: 12px\9; + 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 // - - - - - - - - - - - - - - - - - - - - - - - - - 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..16197f221 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -24,21 +24,7 @@ <% 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" %> -
- <% end %> + <%= render 'shared/order_links', i18n_namespace: "debates.index" %>
<%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button radius expand' %> diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index de706a66c..78899aba5 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -49,7 +49,7 @@
- + <% if home_page? %>
diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index 77a0a79a0..6db5e3fc1 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -24,21 +24,7 @@ <% 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 %> + <%= render 'shared/order_links', i18n_namespace: "proposals.index" %>
<%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: 'button radius expand' %> 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 @@
- +