diff --git a/app/assets/javascripts/darkswarm/directives/scrollto.js.coffee b/app/assets/javascripts/darkswarm/directives/scrollto.js.coffee new file mode 100644 index 0000000000..3925480228 --- /dev/null +++ b/app/assets/javascripts/darkswarm/directives/scrollto.js.coffee @@ -0,0 +1,6 @@ +Darkswarm.directive "ofnScrollTo", ($location, $anchorScroll)-> + restrict: 'A' + link: (scope, element, attrs)-> + element.bind 'click', -> + $location.hash attrs.ofnScrollTo + $anchorScroll() diff --git a/app/views/layouts/darkswarm.html.haml b/app/views/layouts/darkswarm.html.haml index 52d0b74601..ab46b1f139 100644 --- a/app/views/layouts/darkswarm.html.haml +++ b/app/views/layouts/darkswarm.html.haml @@ -22,7 +22,7 @@ = display_flash_messages %ofn-flash - = render "shared/sidebar" + -#= render "shared/sidebar" %section{ role: "main" } = yield diff --git a/app/views/shared/menu/_large_menu.html.haml b/app/views/shared/menu/_large_menu.html.haml index 49f6dbf1a3..d7a4b996e9 100644 --- a/app/views/shared/menu/_large_menu.html.haml +++ b/app/views/shared/menu/_large_menu.html.haml @@ -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