2017 © Pedro Peláez
 

neos-plugin photoswipe

PhotoSwipe for Neos CMS

image

jonnitto/photoswipe

PhotoSwipe for Neos CMS

  • Friday, July 13, 2018
  • by jonnitto
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,410 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 30 Versions
  • 37 % Grown

The README.md

![Latest stable version] ![Total downloads] ![License] ![GitHub forks] ![GitHub stars] ![GitHub watchers] ![GitHub followers] ![Follow Jon on Twitter], (*1)

Jonnitto.PhotoSwipe

This package includes PhotoSwipe into Neos CMS, (*2)

Version Neos Maintained
0.* 2.*
> 1.4 3.* + 4.*
2.* 3.3 + 4.*
> 3.* 3.3 + 4.*
>= 3.1.2 3.3 - 8.*
4.* 7.3 - 8.*

Required HTML markup

Each element that matches the selector a.lightbox must have such attributes:, (*3)

  • Image URL in href or data-pswp-src attribute (latter has higher priority).
  • Image width in data-pswp-width.
  • Image height in data-pswp-height.

And optionally:, (*4)

  • <img> thumbnail within the link element that will be displayed before the large image is loaded
  • Optional data-cropped="true" attribute if thumbnail is cropped. See also Animating from Cropped Thumbnail. PhotoSwipe API supports almost any markup and any data source, read more about it here.

Example:, (*5)

<a
  class="lightbox"
  data-pswp-width="2560"
  data-pswp-height="1200"
  href="path/to/image.jpg"
  >...</a
>

Javascript variables

There is one global variable who get set during the intialisation:, (*6)

neosPhotoSwipe This object stores the lightbox variables from PhotoSwiper. (The variable who get used to call lightbox.init()). With this, you can add you own event listener or trigger methods., (*7)

Javascript event listener

If you dispatch the event neos-photoswipe:init all type of lightboxes get initialized. Great if you work in AJAX enviroments. You can also activate a specific type of lightbox: neos-photoswipe.images:init, neos-photoswipe.fetch:init or neos-photoswipe.template:init., (*8)

Example:, (*9)

window.dispatchEvent(new Event("neos-photoswipe:init"));

Alter generated markup

Adding custom attributes to the PhotoSwipe container

You can add custom attributes to the PhotoSwipe container like this:, (*10)

Jonnitto:
  PhotoSwipe:
    additonalPswpContainerAttributes:
      data-turbo-temporary: true
      class: 'my-custom-class'
Jonnitto:
  PhotoSwipe:
    fetchAttributeErrorMessages: 'data-pswp-type="fetch" data-turbo="false"'

Installation

Most of the time you have to make small adjustments to a package (e.g. configuration in [Settings.yaml]). Because of that, it is important to add the corresponding package to the composer from your theme package. Mostly this is the site packages located under Packages/Sites/. To install it correctly go to your theme package (e.g.Packages/Sites/Foo.Bar) and run following command:, (*11)

composer require jonnitto/photoswipe --no-update

The --no-update command prevent the automatic update of the dependencies. After the package was added to your theme composer.json, go back to the root of the Neos installation and run composer update. Et voilà! Your desired package is now installed correctly., (*12)

The Versions

13/07 2018

dev-master

9999999-dev

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

13/07 2018

2.0.1

2.0.1.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

12/07 2018

2.0.0

2.0.0.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

03/05 2018

1.4.1

1.4.1.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

03/05 2018

v1.x-dev

1.9999999.9999999.9999999-dev

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

29/04 2018

1.4.0

1.4.0.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

16/01 2018

1.3.2

1.3.2.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

11/12 2017

1.3.1

1.3.1.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

11/12 2017

dev-Neos-2

dev-Neos-2

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

11/12 2017

0.2.1

0.2.1.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

04/12 2017

1.3.0

1.3.0.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

04/12 2017

0.2.0

0.2.0.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

08/11 2017

1.2.2

1.2.2.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

22/10 2017

1.2.1

1.2.1.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

21/10 2017

1.2.0

1.2.0.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

01/06 2017

1.1.0

1.1.0.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

20/04 2017

1.0.4

1.0.4.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

20/04 2017

0.1.8

0.1.8.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

29/03 2017

1.0.3

1.0.3.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

22/03 2017

1.0.2

1.0.2.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

27/02 2017

1.0.1

1.0.1.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

24/02 2017

1.0.0

1.0.0.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

08/09 2016

0.1.7

0.1.7.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

04/09 2016

0.1.6

0.1.6.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

28/08 2016

0.1.5

0.1.5.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

12/08 2016

0.1.4

0.1.4.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

10/05 2016

0.1.3

0.1.3.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

09/05 2016

0.1.2

0.1.2.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

24/04 2016

0.1.1

0.1.1.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox

24/04 2016

0.1.0

0.1.0.0

PhotoSwipe for Neos CMS

  Sources   Download

MIT

The Requires

 

gallery image photo flow neos lightbox