mrt:pirobox

v1.3.2Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

meteor-pirobox

Pirobox is yet another Lightbox-like plugin by Diego Valobra. It's been repackaged for the Meteor.js framework.

How to use

mrt install pirobox


You mark up your Meteor/Handlebars template this:
<a href="{{bigimageurl}}" data-pirobox="single" class="pirobox" 
  title="{{title}}"><img src="{{iconurl}}" alt="{{title}}"></a>

You can use data-pirobox="gallery" if you want a gallery
(you also have to change the class to "pirobox_gall")
You can also use media="inline" if you want inline HTML.
Galleries support mixed content.

Then you can initialize it in your template's rendered method like this:
  Template.gallery.rendered = function () {
        $.pirobox_ext({
          attribute: 'data-pirobox',
          piro_speed : 700,
          bg_alpha : 0.5,
          piro_scroll : true //pirobox always positioned at the center of the page
        });
      }
To enable facebook/twitter sharing, you can also add the "share:true" parameter.

The full documentation is here http://jquery.pirolab.it/pirobox/. You can look at the examples there for alternative ways of setting up Pirobox.

style_8 is included in this packaging of Pirobox...there should be a way to give Meteor's packaging system a parameter so you can select alternative styles in the package, but AFAIK, there is none.