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;
|
display: flex;
|
||||||
color: $black;
|
color: $black;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: $light-grey;
|
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 }
|
= image_tag "icons/translate-icon.svg", alt: t('.languages'), width: 24, height: 24, lazy: true, aria: { hidden: true }
|
||||||
%ul.header-menu.dropdown-content
|
%ul.header-menu.dropdown-content
|
||||||
%li
|
%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
|
English
|
||||||
%li
|
%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
|
Français
|
||||||
|
|
Loading…
Reference in a new issue