Closed ezvirtual closed 6 years ago
I use it. It's based on http://photoswipe.com/
You have to install plone.patternslib to install the resource definitions. Then include the pattern JS + LESS in your bundle:
your custom bundle JS:
require([
'jquery',
'pat-registry',
'pat-gallery'
], function($, registry) {
if (window.parent === window) {
$(document).ready(function() {
if (!registry.initialized) {
registry.init();
}
});
}
});
And in your custom bundle LESS:
@import (less) "@{photoswipe-ui}";
@import (less) "@{photoswipe}";
Unfortunately, the plone.patternslib bundle doesn't provide the gallery integration. If it would, the steps above would be obsolete.
And use it in your template:
<div class="pat-gallery">
<figure tal:repeat="item view/results">
<a href="${item/url}">
<img tal:replace="structure item/imagetag" />
</a>
</figure>
</div>
That's it, basically.
Also see: https://github.com/Patternslib/Patterns/blob/master/src/pat/gallery/documentation.md
Nice one, thank you very much for that assistance :)
Hi there, I was hoping that someone could shed some insight into the status of the patternslib gallery:
Thanks in advance for any assistance you can provide.