heimrichhannot / contao-lightbox-gallery-bundle
This bundle offers a contao extension for lightbox-gallery based on mcstudios/glightbox
Installs: 433
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 1
Type:contao-bundle
Requires
- php: ^7.1
- contao/core-bundle: ^4.4
- heimrichhannot-contao-components/glightbox-gallery: ^1.0
- heimrichhannot/contao-utils-bundle: ^2.4
Requires (Dev)
- contao/manager-plugin: ^2.0
- contao/test-case: ^1.1
- friendsofphp/php-cs-fixer: ^2.2
- php-http/guzzle6-adapter: ^1.1
- php-http/message-factory: ^1.0.2
- phpunit/php-token-stream: ^1.4|^2.0|^3.0
- phpunit/phpunit: ^6.5
- phpunit/phpunit-mock-objects: ^4.0|^5.0
- satooshi/php-coveralls: ^2.0
- symfony/phpunit-bridge: ^3.2
Suggests
- heimrichhannot/contao-encore-bundle: Provide webpack encore asset support.
README
Usage
To add images to an gallery define an unique data lightbox id for the elements. Each a tag must have the same data lightbox id to be in the same gallery.
To add an title to the gallery simply add a title attribute to the a tag. If you want to add a caption add an figcaption element after the a tag.
<div class="gallery"> <a href="img/2-1.jpg" data-caption="Image caption" data-lightbox="193910782" title="Title"> <img src="img/thumbnails/2-1.jpg" alt="First image"> </a> <figcaption class="caption">Caption</figcaption> <a href="img/2-2.jpg" data-lightbox="193910782"> <img src="img/thumbnails/2-2.jpg" alt="Second image"> </a> ... </div>