mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-05 02:41:33 +00:00
Merge pull request #3982 from luisramos0/mobile_bug
Fixes menu problem with long shop names
This commit is contained in:
@@ -13,6 +13,34 @@ nav.top-bar {
|
||||
height: $topbar-height;
|
||||
}
|
||||
|
||||
@media #{$large-only} {
|
||||
.top-bar--menu-item-with-icon span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.top-bar--current-hub-prefix,
|
||||
.top-bar--current-hub-name {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.top-bar--current-hub-name {
|
||||
max-width: 10em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.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 {
|
||||
|
||||
@@ -14,7 +14,8 @@ $brand-colour: #f27052;
|
||||
|
||||
// Topbar
|
||||
$topbar-height: rem-calc(64);
|
||||
$topbar-link-padding: $topbar-height / 3;
|
||||
$topbar-link-padding: $topbar-height / 4;
|
||||
$topbar-arrows: false;
|
||||
|
||||
$topbar-bg: $white;
|
||||
$topbar-bg-color: $topbar-bg;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -29,8 +29,9 @@
|
||||
|
||||
%li.current_hub{"ng-controller" => "CurrentHubCtrl", "ng-show" => "CurrentHub.hub.id", "ng-cloak" => true}
|
||||
%a{href: main_app.shop_path}
|
||||
= t 'label_shopping'
|
||||
= '@'
|
||||
%span {{ CurrentHub.hub.name | truncate:25 }}
|
||||
%span{ class: "top-bar--current-hub-prefix" }
|
||||
= t 'label_shopping'
|
||||
= '@'
|
||||
%span{ class: "top-bar--current-hub-name" } {{ CurrentHub.hub.name | truncate:25 }}
|
||||
%li.cart{"ng-cloak" => true}
|
||||
= render partial: "shared/menu/cart"
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user