prime-photo-gallery
An amazon prime photo gallery embed on your site
Usage:
- Install it with npm
npm install prime-photo-gallery
and bundle it with your distribution OR - embed it with unpkg.com
https://unpkg.com/prime-photo-gallery
.
When it's on your page, you can configure it with the following data-attributes
:
- Required:
data-share
: String - TheshareId
shown in the URL e.g./share/<share id>
- Optional:
data-blueimp
: Boolean - Whether to useblueimp-gallery
to display the full-size images in a lightbox format.- Warning: you must include
blueimp-gallery
yourself on the page.
- Warning: you must include
data-container
: String - The target container ID for your images. If it does not exist on the page, an empty div with this ID will be created.data-clip-thumb
: Boolean - Whether to clip the thumbnails on the page, or display them resized instead.data-cors-proxy
: String - An alternative cors proxy server tohttps://crossorigin.me/
(This must be the entire proxy path, so please include any query parameters if necessary, the photo gallery API will be appended directly to this string unmodified)data-sort-property
: String - Can becontentProperties.contentDate
(default) or one of [createdDate
,modifiedDate
,name
]data-sort-direction
: String - Can beASC
(default) orDESC
Warning: This requires jQuery or a jQuery-compatible library such as Zepto. It uses the get API, ID selectors, click events, dom insertion, and dom element creation.
Example usage:
<!-- this example includes blueimp-gallery --> ‹ › × <!-- given a share url formatted as follows: https://www.amazon.com/clouddrive/share/Y7cccQOkL9Xpq6BhXiz5xyuuvxDIjVGB693FB5RUDoL/album/Zl_RlStPSXuIp4i6Urs4Mg?_encoding=UTF8&*Version*=1&*entries*=0&mgh=1 ^ this is the share ID ^ given a share url formatted as follows: https://www.amazon.com/photos/share/Y7cccQOkL9Xpq6BhXiz5xyuuvxDIjVGB693FB5RUDoL ^ this is the share ID ^ data-share is the share ID as seen above -->