0.0
No commit activity in last 3 years
No release in over 3 years
Adds shadowbox.js to your assets pipeline
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Shadowbox for Rails 3.x

Include the lightbox effect from shadowbox to your photos, videos, flash, etc. This gem will include the latest shadowbox.js, shadowbox.css and shadowbox required images to your assets pipeline so it's ready for deploy.

Installation

Add the gem

Add this line to your application's Gemfile:

gem 'shadowbox-rails'

And then execute:

bundle

Or install it yourself as:

gem install shadowbox-rails

Add Shadowbox to the asset pipeline like usual

application.js

require shadowbox

application.css.scss

@import 'shadowbox';

Usage

Add rel='shadowbox' to links where the href is your full size image like this:

link_to 'Test me!', asset_path('path_to_my_img.jpg'), rel: 'shadowbox'

Go to http://www.shadowbox-js.com/ for more details.

Configure

Add Shadowbox.init(); in <head> tag

<script type="text/javascript">
  Shadowbox.init();
</script>

Go to http://www.shadowbox-js.com/usage.html for a complete list of all options.

Contributing

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