miromannino / Justified-Gallery

Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.
http://miromannino.github.io/Justified-Gallery/
MIT License
1.69k stars 299 forks source link

Combine Justified-Gallery and PhotoSwipe #205

Open freyana opened 7 years ago

freyana commented 7 years ago

Hi,

I would like to combine Justified-Gallery with PhotoSwipe (http://photoswipe.com/). However, PhotoSwipe requires the following structure for each image inside a gallery:

<figure>
  <a href="imagename.jpg" title="" data-size="1920x1800">
    <img alt="" src="thumbmailname.jpg" />
  </a>
  <figcaption>Captiontext</figcaption>
</figure>

But Justified-Gallery does not work with the

tag around the link. (However, it was possible with an older version of Justified-Gallery).

Is there any option to make this work?

Thanks for your help. Regards, Freyana

acwolff commented 6 years ago

This is available in the PhotoSwipe skin to see an example album open: https://andrewolff.jalbum.net/PS_JustifiedGallery/

jrondorf commented 6 years ago

I guess this issue can be closed, as PhotoSwipe is already updated to v4: https://github.com/dimsemenov/photoswipe

acwolff commented 6 years ago

@jrondorf this issue has nothing to do with the version number I think. I use the latest version of PhotoSwipe.

jrondorf commented 6 years ago

I am able to use photoswipe with Justified Gallery.

acwolff commented 6 years ago

Me too!

freyana commented 6 years ago

Could you please share a sample of PhotoSwipe and JustifiedGallery working together? For me it's not working (latest version of both plugins) so I guess my implementation is incorrect. Any help is very much appreciated.

acwolff commented 6 years ago

@freyana, here is another example: https://www.andrewolff.nl/FotoSerie/Twente/Ootmarsum-Springendal/Springendal/

decourse commented 6 years ago

Add the following to the justified gallery call: selector: 'a, figure:not(.spinner)' and it should work. It worked for me.

freyana commented 6 years ago

@decourse, thank you so much, that's exactly what was needed to make it work for me :-)

I have a follow-up question: How exactly does the "selector" option work and what is the syntax for it? Would it be possible to select e.g. DIVs with a certain class?

decourse commented 6 years ago

My pleasure. I'm no coder, so I don't know how it works exactly. I'm just happy that I found something that works.