Starting to work on anchor scrolling

This commit is contained in:
Will Marshall
2014-05-08 12:34:16 +10:00
parent 2563576f86
commit de369d938f
3 changed files with 8 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
Darkswarm.directive "ofnScrollTo", ($location, $anchorScroll)->
restrict: 'A'
link: (scope, element, attrs)->
element.bind 'click', ->
$location.hash attrs.ofnScrollTo
$anchorScroll()

View File

@@ -22,7 +22,7 @@
= display_flash_messages
%ofn-flash
= render "shared/sidebar"
-#= render "shared/sidebar"
%section{ role: "main" }
= yield

View File

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