frontpack/photoswipe-handler

Default handler for PhotoSwipe

Installs: 1 032

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

v0.1.1 2019-04-28 09:33 UTC

This package is auto-updated.

Last update: 2024-11-28 23:01:15 UTC


README

Default handler for PhotoSwipe.

Installation

Download a latest package or use Composer:

composer require frontpack/photoswipe-handler

Include PhotoSwipe and photoswipe-handler.js file to HTML page.

<link rel="stylesheet" href="/path/to/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/path/to/photoswipe/default-skin/default-skin.css">

<script src="/path/to/photoswipe/photoswipe.min.js"></script>
<script src="/path/to/photoswipe/photoswipe-ui-default.min.js"></script>
<script src="/path/to/photoswipe-handler.js"></script>

Usage

Single photo

<a href="/path/to/original.jpg" class="photoswipe" data-size="<original size of image>">...</a>
<a href="/path/to/original.jpg" class="photoswipe" data-size="1024x768">...</a>

Gallery

<a href="/path/to/original.jpg" class="photoswipe" data-size="<original size of image>" data-gallery="<gallery-id>">...</a>
<a href="/path/to/original.jpg" class="photoswipe" data-size="1024x768" data-gallery="my-gallery">...</a>

License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/