mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Starting to partialise things
This commit is contained in:
@@ -4,4 +4,4 @@
|
||||
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
||||
*= require_self
|
||||
*= require_tree .
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -8,3 +8,25 @@
|
||||
= favicon_link_tag "favicon.png"
|
||||
|
||||
= stylesheet_link_tag "darkswarm/all"
|
||||
= javascript_include_tag "darkswarm/all"
|
||||
|
||||
= render "layouts/bugherd_script"
|
||||
= csrf_meta_tags
|
||||
|
||||
|
||||
%body.off-canvas
|
||||
= render partial: "shared/menu"
|
||||
|
||||
%section{ role: "main" }
|
||||
= yield
|
||||
|
||||
%section#sidebar{ role: "complementary" }
|
||||
.login-panel
|
||||
#login-content.hide
|
||||
= render "home/login"
|
||||
#sign-up-content.hide
|
||||
= render "home/signup"
|
||||
|
||||
|
||||
= yield :scripts
|
||||
|
||||
|
||||
12
app/views/shared/_login.html.haml
Normal file
12
app/views/shared/_login.html.haml
Normal file
@@ -0,0 +1,12 @@
|
||||
- if spree_current_user.nil?
|
||||
%li#login-link= link_to "Login", "#sidebar", id: "sidebarLoginButton", class: "sidebar-button"
|
||||
%li#login-name.hide
|
||||
%li.divider
|
||||
%li#sign-up-link= link_to "Sign Up", "#sidebar", id: "sidebarSignUpButton", class: "sidebar-button"
|
||||
%li#sign-out-link.hide= link_to "Sign Out", "/logout"
|
||||
- else
|
||||
%li#login-link.hide= link_to "Login", "#sidebar", id: "sidebarLoginButton", class: "sidebar-button"
|
||||
%li#login-name= link_to "#{spree_current_user.email}", "#"
|
||||
%li.divider
|
||||
%li#sign-up-link.hide= link_to "Sign Up", "#"
|
||||
%li#sign-out-link= link_to "Sign Out", "/logout"
|
||||
11
app/views/shared/_menu.html.haml
Normal file
11
app/views/shared/_menu.html.haml
Normal file
@@ -0,0 +1,11 @@
|
||||
%nav.top-bar
|
||||
%section.top-bar-section
|
||||
%ul.left
|
||||
%li= link_to image_tag("ofn_logo_small.png"), new_landing_page_path
|
||||
%li.divider
|
||||
= render partial: "shared/login"
|
||||
|
||||
%ul.right
|
||||
%li= link_to "Distributors", "#", :data => { "reveal-id" => "become-distributor" }
|
||||
%li.divider
|
||||
%li= link_to "Farmers", "#", :data => { "reveal-id" => "become-farmer" }
|
||||
Reference in New Issue
Block a user