Files
openfoodnetwork/app/views/shared/menu/_large_menu.html.haml
Pau Perez b5f27d48df Fix .top-bar-section not to wrap the icons-menu
This line-wrap makes the icons-menu overlap the OC selector. The menu's
background is transparent, what makes it look even more broken.

The fix involves refactoring the `.top-bar-section` into using flexbox
instead of this highly coupled CSS and floats. With flexbox it becomes
as easy as telling the browser to space the three sections evenly
filling-up the window, while scaling down the logo if there's not enough
room.

The root cause is that every instance uses a custom logo, which wasn't
the one we used while designing and implementing. This is why using
fixed-sizes in pixels won't work.
2020-11-06 17:35:24 +01:00

38 lines
1.3 KiB
Plaintext

%nav.top-bar.show-for-large-up{'data-topbar' => true}
%section.top-bar-section
%ul.nav-logo
%li.ofn-logo
%a{href: main_app.root_path}
%img{src: ContentConfig.logo.url}
%li.powered-by
%img{src: '/favicon.ico'}
%span
= t 'powered_by'
%a{href: '/'}
= t 'title'
%ul.nav-main-menu
- [*1..7].each do |menu_number|
- menu_name = "menu_#{menu_number}"
- if ContentConfig[menu_name].present?
%li
%a{href: t("#{menu_name}_url") }
%span.nav-primary
= t "#{menu_name}_title"
%ul.nav-icons-menu
- if OpenFoodNetwork::I18nConfig.selectable_locales.count > 1
= render 'shared/menu/language_selector'
- if spree_current_user.nil?
= render 'shared/menu/signed_out'
- else
= render 'shared/menu/signed_in'
%li.current_hub{"ng-controller" => "CurrentHubCtrl", "ng-show" => "CurrentHub.hub.id", "ng-cloak" => true}
%a{href: main_app.shop_path}
%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"