Git Product home page Git Product logo

pyrocms.jqlightbox's Introduction

JQLightBox Module for PyroCMS.

A jQuery LightBox gallery where images are shown in popup window.

Summary

  • Use it with Gallery module
  • Change design of the gallery
  • Configure javascript which images will open in popup window or some other options which uses JQLightBox
  • Don't want to use it just unpublish it and thats it

Compatible with

PyroCMS >= 2.1

#Dependencies

You can use it wit module Gallery

How to integrate on the page

This is the code wich shows your particular gallery on any page and it works great with this module. If you change anything here band the gallery doesnt work as you expected it is probably because you also have to change JS code in the settings.

If you want to use with gallery pages than you have to change the gallery module templates.

    <ul id="gallery">
        {{ galleries:images slug="dive" limit="5" }}
            <li><a href="{{ url:base }}files/large/{{ file_id }}" title="{{ name }}">
                <img src="{{ url:site }}files/thumb/{{ file_id }}/75/75" alt="{{ description }}"/>
            </a></li>
        {{ /galleries:images }}
    </ul>

Example of CSS

#gallery {
  	background-color: #444;
	padding: 10px;
	width: 520px;
}
#gallery ul { list-style: none; }
#gallery ul li { display: inline; }
#gallery ul img {
	border: 5px solid #3e3e3e;
	border-width: 5px 5px 20px;
}
#gallery ul a:hover img {
	border: 5px solid #fff;
	border-width: 5px 5px 20px;
	color: #fff;
}
#gallery ul a:hover { color: #fff; }

Example of JavaScript

$(function() {
	$('#gallery li a').lightBox({
		imageLoading: '{{ asset:image_path file="jqlightbox::lightbox-ico-loading.gif" }}',
		imageBtnClose: '{{ asset:image_path file="jqlightbox::lightbox-btn-close.gif" }}',
		imageBtnPrev: '{{ asset:image_path file="jqlightbox::lightbox-btn-prev.gif" }}',
		imageBtnNext: '{{ asset:image_path file="jqlightbox::lightbox-btn-next.gif" }}',
	});
});

That's it. Any questions?

pyrocms.jqlightbox's People

Contributors

bojangles-m avatar

Stargazers

Lungoupao Khongsai avatar

Watchers

James Cloos avatar  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.