Skip to content

Natd/nivo-rails

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nivo with Ruby on Rails

NivoSlider is one of the most Javascript slider. There was unfortunately no good integration for Ruby on Rails so I write my own. Feel free to contribute to improve this project if you want.

This gem requires Rails 3.1+ (with the asset pipeline enabled).

Installation

First, add this to your Gemfile:

gem 'nivo-rails'

Then run the bundle command to install the gem.

Usage

This gem provides files required to setup correctly NivoSlider to your site. It requires few lines of code to make a slideshow works. First, edit your application.css file and add at the top:

*= require nivo

Just make the same thing in your javascript application file:

# require nivo

That's it! You can now make slideshows in your web pages easily. The code required by NivoSlider is pretty boring to write. You can simply use the nivo_slider helper like that:

<%= nivo_slider do %>
  <%= image_tag "foo.png", :title => "Caption" %>
  <%= image_tag "bar.png" %>
<% end %>

Enjoy!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

This project is released under the MIT license. Please see the LICENSE file for more information.

About

Nivo slider integration for Ruby on Rails

Resources

License

Stars

Watchers

Forks

Packages

No packages published