This package provides a custom set of directives to make it easy to customize different gallery templates.
These directives are: *galleryItemDef, *galleryImageDef, *galleryThumbDef
and *galleryBoxDef
*galleryItemDef overrides the gallery item template, useful if you want create your own gallery
template for any type from scratch.
Example:
*galleryImageDef applies only on image items - the image will still be displayed, but this adds an
custom inner template, useful to add text overlay on top of the image.
Example:
*galleryThumbDef applies on all thumbnails types, image will still displayed, but adds an custom
inner template.
Example:
The following adds a Youtube icon on Youtube thumbnails, a Vimeo icon on Vimeo thumbnails, and video icon on video thumbnails
Passing in data to a custom template
When using one of the previous templates above, additional context data can be used to render the data as needed.
Available data:
let itemObject of the item, including properties likesrc,thumbandalt... etc.let index = indexIndex of the item.let type = typeType of the item, default ones areimage,video,youtube,vimeoandiframe.let active = activeTrue if this item is the active one.let count = countThe number of total items.let first = firstTrue if this item is first.let last = lastTrue if this item is last.
*galleryBoxDef Adds a single static template on top of the gallery items.
Example:
Available data:
let state = stateGallery state object.let config = configGallery config object.