From 0bf31bde6c38fde915266ced77dac8502cc4e396 Mon Sep 17 00:00:00 2001 From: decabeza Date: Tue, 17 Apr 2018 13:18:49 +0200 Subject: [PATCH] Updates all active to is-active classes --- app/assets/stylesheets/admin.scss | 10 ++-- app/assets/stylesheets/layout.scss | 14 ++--- app/assets/stylesheets/legislation.scss | 2 +- .../stylesheets/legislation_process.scss | 4 +- app/assets/stylesheets/participation.scss | 4 +- app/helpers/budgets_helper.rb | 2 +- app/helpers/layouts_helper.rb | 2 +- app/helpers/welcome_helper.rb | 2 +- app/views/admin/_menu.html.erb | 58 +++++++++---------- app/views/budgets/_phases.html.erb | 2 +- app/views/budgets/index.html.erb | 2 +- .../budgets/investments/_categories.html.erb | 2 +- app/views/budgets/results/show.html.erb | 2 +- .../legislation/processes/_key_dates.html.erb | 10 ++-- .../proposals/_categories.html.erb | 2 +- .../questions/_answer_form.html.erb | 4 +- app/views/management/_menu.html.erb | 20 +++---- app/views/moderation/_menu.html.erb | 8 +-- app/views/officing/_menu.html.erb | 4 +- app/views/polls/_gallery.html.erb | 4 +- app/views/proposals/_categories.html.erb | 2 +- .../shared/_filter_subnav_vertical.html.erb | 2 +- app/views/shared/_order_links.html.erb | 2 +- app/views/shared/_subnavigation.html.erb | 2 +- app/views/valuation/_menu.html.erb | 4 +- .../budget_investments/index.html.erb | 2 +- .../spending_proposals/index.html.erb | 2 +- app/views/verification/letter/new.html.erb | 2 +- app/views/verification/residence/new.html.erb | 2 +- app/views/verification/sms/edit.html.erb | 2 +- app/views/verification/sms/new.html.erb | 2 +- .../welcome/_recommended_carousel.html.erb | 4 +- spec/features/budgets/ballots_spec.rb | 6 +- spec/features/budgets/budgets_spec.rb | 2 +- spec/features/budgets/investments_spec.rb | 4 +- spec/features/budgets/results_spec.rb | 2 +- spec/features/debates_spec.rb | 12 ++-- spec/features/legislation/questions_spec.rb | 2 +- spec/features/proposals_spec.rb | 12 ++-- 39 files changed, 113 insertions(+), 113 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 0862f5a0b..bcb0498b4 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -199,7 +199,7 @@ $sidebar-active: #f4fcd0; margin-bottom: $line-height / 3; } - .active { + .is-active { border-bottom: 2px solid $admin-color; color: $admin-color; font-weight: bold; @@ -334,7 +334,7 @@ $sidebar-active: #f4fcd0; padding-left: $line-height / 2; } - &.active a { + &.is-active a { background: $sidebar-hover; border-left: 2px solid $sidebar-active; font-weight: bold; @@ -384,7 +384,7 @@ $sidebar-active: #f4fcd0; font-weight: normal; } - .active { + .is-active { border-bottom: 0; } } @@ -600,7 +600,7 @@ $sidebar-active: #f4fcd0; a { display: block; - &.active { + &.is-active { color: $brand; font-weight: bold; text-decoration: underline; @@ -694,7 +694,7 @@ table { } .legislation-admin { - .menu .active > a { + .menu .is-active > a { background: none; } } diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index f7daaf3dd..9376570f1 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -288,7 +288,7 @@ a { color: $text-medium; padding: 0; - &.active { + &.is-active { font-weight: bold; color: $brand; } @@ -298,7 +298,7 @@ a { font-size: $base-font-size; } - &.active { + &.is-active { border-bottom: 2px solid $brand; color: $brand; } @@ -629,7 +629,7 @@ header { } } - &.active { + &.is-active { color: #fff; @include breakpoint(medium) { @@ -676,7 +676,7 @@ header { .top-bar-right { - .active { + .is-active { font-weight: bold; text-decoration: underline; } @@ -704,7 +704,7 @@ header { } } - .active { + .is-active { border-bottom: 2px solid $brand; color: $brand; @@ -808,7 +808,7 @@ footer { color: $link; &:hover, - &.active { + &.is-active { background: $brand; color: #fff; } @@ -1822,7 +1822,7 @@ table { } } - &.active { + &.is-active { background: #43ac6a; color: #fff; } diff --git a/app/assets/stylesheets/legislation.scss b/app/assets/stylesheets/legislation.scss index a3d46a88d..6247b64b9 100644 --- a/app/assets/stylesheets/legislation.scss +++ b/app/assets/stylesheets/legislation.scss @@ -48,7 +48,7 @@ max-width: 80%; } - &.active { + &.is-active { font-weight: 700; } } diff --git a/app/assets/stylesheets/legislation_process.scss b/app/assets/stylesheets/legislation_process.scss index 1d6bcbc59..5105a459a 100644 --- a/app/assets/stylesheets/legislation_process.scss +++ b/app/assets/stylesheets/legislation_process.scss @@ -99,7 +99,7 @@ } } - .active { + .is-active { border-bottom: 2px solid $brand; } } @@ -244,7 +244,7 @@ position: relative; } - .active { + .is-active { background: #ccdbe6; border: 0; } diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 8a6867565..2fb35ba6f 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -1536,7 +1536,7 @@ padding: $line-height / 4; } -.select-district .active a { +.select-district .is-active a { background: #f9f9f9; border-radius: rem-calc(3); color: $budget; @@ -1629,7 +1629,7 @@ z-index: 99; } - &.active { + &.is-active { h3 { background: $budget; diff --git a/app/helpers/budgets_helper.rb b/app/helpers/budgets_helper.rb index b4a207ed6..d6700b321 100644 --- a/app/helpers/budgets_helper.rb +++ b/app/helpers/budgets_helper.rb @@ -49,7 +49,7 @@ module BudgetsHelper def css_for_ballot_heading(heading) return '' if current_ballot.blank? - current_ballot.has_lines_in_heading?(heading) ? 'active' : '' + current_ballot.has_lines_in_heading?(heading) ? 'is-active' : '' end def current_ballot diff --git a/app/helpers/layouts_helper.rb b/app/helpers/layouts_helper.rb index b6da582b5..782d9c639 100644 --- a/app/helpers/layouts_helper.rb +++ b/app/helpers/layouts_helper.rb @@ -3,7 +3,7 @@ module LayoutsHelper def layout_menu_link_to(text, path, is_active, options) if is_active content_tag(:span, t('shared.you_are_in'), class: 'show-for-sr') + ' ' + - link_to(text, path, options.merge(class: "active")) + link_to(text, path, options.merge(class: "is-active")) else link_to(text, path, options) end diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 0b483468f..07d7b380a 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -1,6 +1,6 @@ module WelcomeHelper - def active_class(index) + def is_active_class(index) "is-active is-in" if index.zero? end diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index e72b65985..d1663652c 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -7,7 +7,7 @@ <%= t("admin.menu.title_categories") %> @@ -20,22 +20,22 @@ @@ -48,7 +48,7 @@ <%= t("admin.menu.title_budgets") %> @@ -62,31 +62,31 @@ <%= t("admin.menu.title_polls") %> -
  • "> +
  • "> <%= link_to admin_geozones_path do %> <%= t('admin.menu.geozones') %> @@ -195,7 +195,7 @@
  • <% if feature?(:signature_sheets) %> -
  • "> +
  • "> <%= link_to admin_signature_sheets_path do %> <%= t("admin.menu.signature_sheets") %> @@ -203,16 +203,16 @@
  • <% end %> -
  • > +
  • > <%= t("admin.menu.emails") %> diff --git a/app/views/budgets/_phases.html.erb b/app/views/budgets/_phases.html.erb index 2d11ef01f..a5461b6be 100644 --- a/app/views/budgets/_phases.html.erb +++ b/app/views/budgets/_phases.html.erb @@ -1,6 +1,6 @@