Omit text for top bar items with icon in large

This affects only top bar menu items for:

* Language
* Profile

This does not update the "Log in" menu item, because the currently
selected icon might not be self explanatory.
This commit is contained in:
Kristina Lim
2019-07-03 01:22:34 +08:00
parent 06ed9c838e
commit 653067f58c
3 changed files with 18 additions and 3 deletions

View File

@@ -13,6 +13,21 @@ nav.top-bar {
height: $topbar-height;
}
@media #{$large-only} {
.top-bar__menu-item-with-icon span {
display: none;
}
}
.top-bar-section ul li > a.top-bar__menu-item-with-icon {
display: inline;
}
.top-bar__menu-item-with-icon i,
.top-bar__menu-item-with-icon img {
line-height: $topbar-height;
}
.top-bar-section {
a.icon {
&:hover {

View File

@@ -1,8 +1,8 @@
%li.language-switcher.has-dropdown
%a{href: '#'}
%a{href: '#', class: "top-bar__menu-item-with-icon"}
%i.ofn-i_071-globe
%span= t 'language_name'
%ul.dropdown
- OpenFoodNetwork::I18nConfig.selectable_locales.each do |l|
%li
%a{href: "?locale=#{l.to_s}" }= t('language_name', locale: l)
%a{href: "?locale=#{l.to_s}" }= t('language_name', locale: l)

View File

@@ -6,7 +6,7 @@
%li.user-menu.has-dropdown.not-click
%a{href: "#"}
%a{href: "#", class: "top-bar__menu-item-with-icon"}
%img{ src: "/assets/menu/icn-profile.svg" }
%span
= t '.profile'