mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Starting to rework menu
This commit is contained in:
@@ -14,16 +14,18 @@
|
||||
= csrf_meta_tags
|
||||
|
||||
%body.off-canvas{"ng-app" => "Darkswarm"}
|
||||
= render partial: "shared/current_hub"
|
||||
= render partial: "shared/current_user"
|
||||
= render partial: "shared/menu"
|
||||
= display_flash_messages
|
||||
%ofn-flash
|
||||
.off-canvas-wrap
|
||||
.inner-wrap
|
||||
= render partial: "shared/current_hub"
|
||||
= render partial: "shared/current_user"
|
||||
= render partial: "shared/menu/menu"
|
||||
= display_flash_messages
|
||||
%ofn-flash
|
||||
|
||||
= render "shared/sidebar"
|
||||
= render "shared/sidebar"
|
||||
|
||||
%section{ role: "main" }
|
||||
= yield
|
||||
|
||||
#footer
|
||||
= yield :scripts
|
||||
%section{ role: "main" }
|
||||
= yield
|
||||
|
||||
#footer
|
||||
= yield :scripts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
%section#sidebar{ role: "complementary", "ng-controller" => "SidebarCtrl",
|
||||
%aside#sidebar.right-off-canvas-menu{ role: "complementary", "ng-controller" => "SidebarCtrl",
|
||||
"ng-class" => "{'active' : Sidebar.active()}"}
|
||||
|
||||
- if spree_current_user.nil?
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%li#login-name
|
||||
%a.sidebar-button{"ng-click" => "toggle('/account')"}
|
||||
%a{"ng-click" => "toggle('/account')"}
|
||||
= spree_current_user.email
|
||||
%li.divider
|
||||
%li#sign-out-link
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
-#%li#login-link
|
||||
-#%a.sidebar-button{"ng-click" => "toggle('/login')"} Login
|
||||
-#%li.divider
|
||||
-#%li#sign-up-link
|
||||
-#%a.sidebar-button{"ng-click" => "toggle('/signup')"} Sign Up
|
||||
%li#login-link
|
||||
%a{"ng-click" => "toggle('/login')"} Login
|
||||
%li.divider
|
||||
%li#sign-up-link
|
||||
%a{"ng-click" => "toggle('/signup')"} Sign Up
|
||||
|
||||
|
||||
29
app/views/shared/menu/_large_menu.html.haml
Normal file
29
app/views/shared/menu/_large_menu.html.haml
Normal file
@@ -0,0 +1,29 @@
|
||||
%nav.top-bar.hide-for-small
|
||||
%section.top-bar-section
|
||||
%ul.left
|
||||
-#%li
|
||||
-#%a.icon{"ng-click" => "Sidebar.toggle()"}
|
||||
-#%i.fi-list
|
||||
%li= link_to image_tag("ofn_logo_small.png"), root_path
|
||||
%li.divider
|
||||
%li
|
||||
%a{href: producers_path} Producers
|
||||
|
||||
%section.top-bar-section
|
||||
%ul.right{"ng-controller" => "AuthenticationActionsCtrl"}
|
||||
%li.divider
|
||||
- if spree_current_user.nil?
|
||||
= render 'shared/signed_out'
|
||||
- else
|
||||
= render 'shared/signed_in'
|
||||
%li.divider
|
||||
%li.current_hub{"ng-controller" => "CurrentHubCtrl", "ng-show" => "CurrentHub.id"}
|
||||
%a{href: main_app.shop_path}
|
||||
{{ CurrentHub.name }}
|
||||
%li.cart
|
||||
%a.icon{href: cart_url}
|
||||
%i.fi-shopping-cart
|
||||
%span
|
||||
= cart_count
|
||||
items
|
||||
|
||||
@@ -1,25 +1,2 @@
|
||||
%nav.top-bar
|
||||
%section.top-bar-section
|
||||
%ul.left{"ng-controller" => "AuthenticationActionsCtrl"}
|
||||
%li
|
||||
%a.icon{"ng-click" => "Sidebar.toggle()"}
|
||||
%i.fi-list
|
||||
|
||||
%li= link_to image_tag("ofn_logo_small.png"), root_path
|
||||
%li.divider
|
||||
- if spree_current_user.nil?
|
||||
= render 'shared/signed_out'
|
||||
- else
|
||||
= render 'shared/signed_in'
|
||||
|
||||
%section.top-bar-section
|
||||
%ul.right
|
||||
%li.current_hub{"ng-controller" => "CurrentHubCtrl", "ng-show" => "CurrentHub.id"}
|
||||
%a{href: main_app.shop_path}
|
||||
{{ CurrentHub.name }}
|
||||
%li.cart
|
||||
%a.icon{href: cart_url}
|
||||
%i.fi-shopping-cart
|
||||
%span
|
||||
= cart_count
|
||||
items
|
||||
= render partial: "shared/menu/large_menu"
|
||||
= render partial: "shared/menu/mobile_menu"
|
||||
|
||||
23
app/views/shared/menu/_mobile_menu.html.haml
Normal file
23
app/views/shared/menu/_mobile_menu.html.haml
Normal file
@@ -0,0 +1,23 @@
|
||||
%nav.tab-bar.show-for-small
|
||||
%section.left-small
|
||||
%a.left-off-canvas-toggle.menu-icon
|
||||
%span
|
||||
%section.right-small
|
||||
%a.icon{href: cart_url}
|
||||
%i.fi-shopping-cart
|
||||
%span
|
||||
= cart_count
|
||||
items
|
||||
%a{href: main_app.shop_path}
|
||||
{{ CurrentHub.name }}
|
||||
|
||||
%aside.left-off-canvas-menu.show-for-small
|
||||
%ul.off-canvas-list
|
||||
%li= link_to image_tag("ofn_logo_small.png"), root_path
|
||||
%li
|
||||
%a{href: producers_path} Producers
|
||||
%li
|
||||
- if spree_current_user.nil?
|
||||
= render 'shared/signed_out'
|
||||
- else
|
||||
= render 'shared/signed_in'
|
||||
Reference in New Issue
Block a user