i18n: display selected locale as active wit bold text
This commit is contained in:
parent
227b1dc462
commit
02a19587b7
2 changed files with 6 additions and 2 deletions
|
@ -234,6 +234,10 @@ $header-mobile-breakpoint: 550px;
|
|||
display: flex;
|
||||
color: $black;
|
||||
|
||||
&.active {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $light-grey;
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
= image_tag "icons/translate-icon.svg", alt: t('.languages'), width: 24, height: 24, lazy: true, aria: { hidden: true }
|
||||
%ul.header-menu.dropdown-content
|
||||
%li
|
||||
= link_to save_locale_path(locale: :en), method: :post, class: "menu-item menu-link" do
|
||||
= active_link_to save_locale_path(locale: :en), method: :post, class: "menu-item menu-link", active: I18n.locale == :en do
|
||||
English
|
||||
%li
|
||||
= link_to save_locale_path(locale: :fr), method: :post, class: "menu-item menu-link" do
|
||||
= active_link_to save_locale_path(locale: :fr), method: :post, class: "menu-item menu-link", active: I18n.locale == :fr do
|
||||
Français
|
||||
|
|
Loading…
Reference in a new issue