Skip to content

Releases: jonnitto/Jonnitto.PhotoSwipe

4.5.0

25 Jul 11:41
e060ac6
Compare
Choose a tag to compare

Add captions to PhotoSwipe

Full Changelog: 4.4.3...4.5.0

4.4.3

19 Jul 21:59
3bb1bc1
Compare
Choose a tag to compare

4.4.2

16 Jul 12:36
53016d6
Compare
Choose a tag to compare

Full Changelog: 4.4.1...4.4.2

4.4.1

28 May 18:56
65a9f48
Compare
Choose a tag to compare

Upgrade to PhotoSwipe 5.4.4

Full Changelog: 4.4.0...4.4.1

4.4.0

07 Feb 15:00
a8b3a11
Compare
Choose a tag to compare

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.

Example:

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

Full Changelog: 4.3.0...4.4.0

4.3.0

07 Feb 08:39
93dcf5f
Compare
Choose a tag to compare

Alter generated markup

Adding custom attributes to the PhotoSwipe container

You can add custom attributes to the PhotoSwipe container like this:

Jonnitto:
  PhotoSwipe:
    additonalPswpContainerAttributes:
      data-turbo-temporary: true
      class: 'my-custom-class'

Adding custom attributes to the link in the error fetch message

Jonnitto:
  PhotoSwipe:
    fetchAttributeErrorMessages: 'data-pswp-type="fetch" data-turbo="false"'

Full Changelog: 4.2.0...4.3.0

4.2.0

10 Jan 10:45
3ebf7a9
Compare
Choose a tag to compare

Full Changelog: 4.1.0...4.2.0

4.1.0

05 Jan 16:18
b08e4d5
Compare
Choose a tag to compare

What's Changed

  • New: Add possibillity to fetch documents by @jonnitto in #30

Full Changelog: 4.0.0...4.1.0

4.0.0

24 Dec 15:56
Compare
Choose a tag to compare

💥 Breaking

Upgrade to PhotoSwipe 5 in #29

Required HTML markup

Each element that matches the selector a.lightbox must have such attributes:

  • 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:

  • <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:

<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:

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

Full Changelog: 3.4.1...4.0.0

3.4.1

23 Aug 14:40
bb1dd90
Compare
Choose a tag to compare

Allow new version of Carbon.IncludeAssets

Full Changelog: 3.4.0...3.4.1