Starting to rework menu

This commit is contained in:
Will Marshall
2014-05-05 15:43:33 +10:00
parent 1774bc1e19
commit dd25bfd345
7 changed files with 75 additions and 43 deletions

View File

@@ -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

View File

@@ -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?

View File

@@ -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

View File

@@ -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

View 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

View File

@@ -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"

View 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'