Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

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.
latest commit f03b6a011d
doubleotoo authored
Octocat-spinner-32 app Add jQuery-One-Page-Nav.
Octocat-spinner-32 config Add scrollspy from Twitter Bootstrap.
Octocat-spinner-32 db New rails project.
Octocat-spinner-32 doc New rails project.
Octocat-spinner-32 lib New rails project.
Octocat-spinner-32 log New rails project.
Octocat-spinner-32 public Add jQuery-One-Page-Nav.
Octocat-spinner-32 script New rails project.
Octocat-spinner-32 test Add scrollspy from Twitter Bootstrap.
Octocat-spinner-32 vendor New rails project.
Octocat-spinner-32 .gitignore New rails project.
Octocat-spinner-32 Gemfile Add scrollspy from Twitter Bootstrap.
Octocat-spinner-32 Gemfile.lock Add scrollspy from Twitter Bootstrap.
Octocat-spinner-32 README.md Add initial README file.
Octocat-spinner-32 Rakefile New rails project.
Octocat-spinner-32 config.ru New rails project.
README.md

Rails 3, Compass, and (Twitter) Bootstrap Tutorial

$ rvm ruby-1.9.2-p290@rails-compass_twitter_bootstrap-demo
$ rvm do gem install bundler

$RAILS_APP/app/assets/stylesheets/application.css.scss

/*
 * This is a manifest file that'll automatically include all the stylesheets available in this directory
 * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
 * the top of the compiled file, but it's generally better to create a new file per style scope.
 *= require_self
*/
@import "compass_twitter_bootstrap";
@import "compass/css3";
@import "base";

$RAILS_APP/app/assets/javascripts/application.js

// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require_tree .

//= require bootstrap-scrollspy
$ RAILS_ENV=development bundle exec rake assets:precompile
$ RAILS_ENV=production bundle exec rake assets:precompile

Important: If you add a new Javascript or CSS file, you must precompile the code so it will be available in public/assets for production.

HAML

  gem "haml-rails"
  $ rails generate controller home index
  • Creates Home#index (i.e. a controller named Home with a method called index)
Something went wrong with that request. Please try again.