Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Latest commit

 

History

History
64 lines (42 loc) · 1.83 KB

README.md

File metadata and controls

64 lines (42 loc) · 1.83 KB

🌠 lightbox2-rails

Gem Version Gem Downloads

Lightbox2 for Rails asset pipeline

Installation

  1. Add to your Gemfile and install with bundler:
gem 'lightbox2-rails'
bundle install
  1. Add to your config/initializers/assets.rb in order to have the images for lightbox precompiled:
Rails.application.config.assets.precompile += %w( lightbox/* )
  1. Require the modified Lightbox2 javascript file in app/assets/javascripts/application.js:
//= require lightbox

Or in app/assets/javascripts/application.js.coffee:

#= require lightbox
  1. Require the modified Lightbox2 css file in app/assets/stylesheets/application.css:
*= require lightbox

Or in app/assets/javascripts/application.css.scss / app/assets/javascripts/application.css.sass:

@import 'lightbox';
@import lightbox
  1. Changing default options (Optional)

Please refer to Lightbox2 project page.

Acknowledgements

Lightbox2 created by Lokesh Dhakar, licensed under the Creative Commons Attribution 2.5 License

Copyright Gavin Lam, released under the MIT License.