Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gunn/radiant-fancy_box-extension

Radiant extension. Makes it very easy to use fancy box for displaying images in "lightbox" style overlays
https://github.com/gunn/radiant-fancy_box-extension

Last synced: about 1 month ago
JSON representation

Radiant extension. Makes it very easy to use fancy box for displaying images in "lightbox" style overlays

Awesome Lists containing this project

README

        

= Radiant Fancy Box Extension

Makes it very easy to use {fancy box}[http://fancybox.net] for displaying images in "lightbox" style overlays

== Installation

git clone git://github.com/gunn/radiant-fancy_box-extension.git vendor/extensions/fancy_box
rake radiant:extensions:fancy_box:update

Add the necessary js, css and images, and add a snippets to include in your pages.

== Usage

in the heads of the pages you want fancybox functionality:

And also in those pages (at the bottom of the body means no extra wait time)


Wherever you want an image:

You must specify at least image_id or image_title.

== Advanced usage

tn_id and tn_title - default to image_id and image_title respectively.
tn_size defaults to "thumbnail"

tn_geometry - If your version of paperclipped supports it, you specify a custom size for the thumnail

Any attributes prepended with 'image_' will be passed through to the 'assets:url' tag, to find the large image to link to.
Any attributes prepended with 'tn_' will be passed through to the 'assets:url' tag, to display the thumnail.
All other attributes are used as html attributes for the link.

== Neat tricks

Because of the close integration with paperclipped you can use the fancy_img tag anywhere you can use the image tag.
Show the page's first attached asset:

Create a gallery with previous and next buttons containing each of the current page's attached assets:


Copyright © 2010 Arthur Gunn, released under the MIT license