Permalink
Browse files

Add jQuery-One-Page-Nav.

* Temporarily replace Twitter Bootstrap's scrollspy until I submit
  a patch to fix an issue: last section does not have enough content
  to be selected in the navigation bar when scrolling.
  • Loading branch information...
1 parent dfceacf commit f03b6a011d5056b6209b5785fd4b8e5853beeebe @doubleotoo committed Mar 21, 2012

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -6,11 +6,7 @@
= javascript_include_tag "application"
= csrf_meta_tags
- :javascript
- $('navbar').scrollspy();
-
-
- %body(data-spy="scroll")
+ %body
%div(class="navbar navbar-fixed-top")
%div(class="navbar-inner")
%div(class="container")
@@ -19,16 +15,16 @@
%span(class="icon-bar")
%span(class="icon-bar")
%a(class="brand" href="#") Project name
- %div(id="navbar" class="nav-collapse")
- %ul(class="nav")
+ %div(class="nav-collapse")
+ %ul(id="navbar" class="nav")
%li(class="active")
%a(href="#home") Home
%li
%a(href="#contact") Contact
%li
%a(href="#about") About
%li
- %a(href="#end") About
+ %a(href="#end") End
%div id="home" class="container"
@@ -48,3 +44,11 @@
- (0...2).each do |i|
%p= 'End'
+ :javascript
+ $('#navbar').onePageNav({
+ currentClass: 'active',
+ changeHash: true,
+ scrollSpeed: 750,
+ easing: 'swing'
+ });
+

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
@@ -1,6 +1,6 @@
---
rails.png: rails-e4b51606cd77fda2615e7439907bfc92.png
-application.js: application-bab741de25507045bff682d84cef45b1.js
+application.js: application-1dc28a92ed3e3ccc103ef0f4a86fe050.js
application.css: application-c499f625af413f3d53e1cc07dcf452e8.css
glyphicons-halflings-white.png: glyphicons-halflings-white-33137abcd2c204b90921315632a32a69.png
glyphicons-halflings.png: glyphicons-halflings-16cd9c1e6492843e6e32e0ab12967378.png

0 comments on commit f03b6a0

Please sign in to comment.