From 5cb04d5ee04f843d9cacc8033b160cae1dd78215 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 8 Apr 2024 17:40:01 +0300 Subject: [PATCH] Use secondary text color in header menu --- app/assets/stylesheets/common.scss | 5 --- app/helpers/application_helper.rb | 4 +-- app/views/layouts/_header.html.erb | 42 ++++++++++++------------- test/helpers/application_helper_test.rb | 2 +- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index ba976ff2b..618ce444e 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -150,11 +150,6 @@ nav.primary { nav.secondary { .nav-link { padding: 0.2rem; - color: $darkgrey; - } - - > ul li.current a { - color: darken($darkgrey, 25%); } #inboxanchor { diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 17c36bdfe..368668a9b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -41,8 +41,8 @@ module ApplicationHelper end end - def current_page_class(path) - :current if current_page?(path) + def header_nav_link_class(path) + ["nav-link", current_page?(path) ? "text-secondary-emphasis" : "text-secondary"] end def application_data diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 0fafc3c7f..6a926d692 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -34,48 +34,48 @@