GithubHelp home page GithubHelp logo

lonestarinternet / slimbox2-rails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luciuschoi/slimbox2-rails

0.0 7.0 0.0 89 KB

Gemify Slimbox2 to use with Rails 3.1 asset pipeline.

License: MIT License

slimbox2-rails's Introduction

Slimbox2::Rails

Gemify Slimbox2 to use with Rails 3.1 asset pipeline.

If you want to see the more information about Slimbox2, click here.

With the help of Example 9 on Neil’s Slimbox Examples, Travis Hydzik has managed to hack together this feature which we are happy about.(v2.04.3)

Versioning

slimbox2-rails v2.04.x was built with Slimbox v2.04

Compatibility

Note : Confirmed at jQuery v1.7.1 and was not displayed well at 1.9.x

Installation

Add this line to your application's Gemfile:

gem 'slimbox2-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install slimbox2-rails

Usage

To require Slimbox2 UI modules, add the following to your application.js:

//= require slimbox2

Also add the Superfish UI CSS to your application.css:

/*
 *= require slimbox2
 */

ACTIVATE

Add the rel="lightbox" attribute to the links pointing to your full-sized images. Use the optional title attribute if you want to show a caption:

<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>

You can even use HTML in the caption if you want. You must replace the < and > characters with HTML entities and use single quotes instead of double quotes.

For sets of related images that you want to group and make navigable, add a group name to the rel attribute just after the “lightbox” word, for example:

<a href="images/image-1.jpg" rel="lightbox-cats">image #1</a>
<a href="images/image-2.jpg" rel="lightbox-cats">image #2</a>
<a href="images/image-3.jpg" rel="lightbox-cats">image #3</a>

I don’t recommend using square brackets “[ ]” around group names in the rel attribute like the original Lightbox script does because these characters are invalid for XHTML and XML attributes, meaning that your web page would not validate against the latest standards.

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

slimbox2-rails's People

Contributors

rorlab avatar

Watchers

Christopher Louis Hauboldt avatar James Cloos avatar Ken Biggs avatar  avatar Benjamin Nelson avatar  avatar Dan O'Brien avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.