npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

prime-photo-gallery

v2.0.1

Published

A javascript utility to allow you to embed a shared prime photo gallery on your own site.

Downloads

41

Readme

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 - The shareId shown in the URL e.g. /share/<share id>
  • Optional:
    • data-blueimp: Boolean - Whether to use blueimp-gallery to display the full-size images in a lightbox format.
      • Warning: you must include blueimp-gallery yourself on the page.
    • 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 to https://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 be contentProperties.contentDate (default) or one of [createdDate, modifiedDate, name]
    • data-sort-direction: String - Can be ASC (default) or DESC

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 -->
<html>
  <head>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.21.3/css/blueimp-gallery.min.css">
  </head>
  <body>
    <div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-continuous="true" data-toggle-controls-on-return="true" data-toggle-slideshow-on-space="true" data-enable-keyboard-navigation="true" data-close-on-escape="true" data-close-on-slide-click="true">
      <div class="slides"></div>
      <h3 class="title"></h3>
      <a class="prev">‹</a>
      <a class="next">›</a>
      <a class="close">×</a>
      <a class="play-pause"></a>
      <ol class="indicator"></ol>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
    <!-- 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 -->
    <script data-share="Y7cccQOkL9Xpq6BhXiz5xyuuvxDIjVGB693FB5RUDoL" data-blueimp data-container="pics" src="https://unpkg.com/prime-photo-gallery"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.21.3/js/blueimp-gallery.min.js"></script>
  </body>
</html>