mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Starting to work on anchor scrolling
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
Darkswarm.directive "ofnScrollTo", ($location, $anchorScroll)->
|
||||
restrict: 'A'
|
||||
link: (scope, element, attrs)->
|
||||
element.bind 'click', ->
|
||||
$location.hash attrs.ofnScrollTo
|
||||
$anchorScroll()
|
||||
@@ -22,7 +22,7 @@
|
||||
= display_flash_messages
|
||||
%ofn-flash
|
||||
|
||||
= render "shared/sidebar"
|
||||
-#= render "shared/sidebar"
|
||||
|
||||
%section{ role: "main" }
|
||||
= yield
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
%li.divider
|
||||
- if current_page? root_path
|
||||
%li
|
||||
%a{href: "#hubs", "ofn-scroll-to" => true}
|
||||
%a{"ofn-scroll-to" => "hubs"}
|
||||
%span.nav-primary Hubs
|
||||
- else
|
||||
%li
|
||||
|
||||
Reference in New Issue
Block a user