getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[lightbox-gallery] Can't change swipe effect and turn off fade-in-black effect in Lightbox Gallery for Mobile #450

Open stbs01 opened 4 months ago

stbs01 commented 4 months ago

Hi!

I am using a https://github.com/paulmassen/grav-theme-hyde Grav Theme (v0.2.2) with a Premium Lightbox Gallery Plugin (v1.0.6) on a Linux VPS Server. Now I have the following problem with the Lightbox Gallery Plugin:

I can't change the swipe effect and turn off fade-in-black effect in Lightbox Gallery for Mobile.

You can check the website-in-progress here: http://draft.teimur-bek-safiuli.com/

If you go to http://draft.teimur-bek-safiuli.com/works from your smartphone and click on any of the images, and try to swipe left, or right, you will see it. I want to have the same swipe effect as it is now if you see it from your PC.

Thanks for your help!

Best, Teimur

studio@teimur-bek-safiuli.com

P.S. I have a pretty experienced guy who helps me to build my artist portfolio website, but here he cant help me anymore, thats why I need your help 🙏🏼

rhukster commented 4 months ago

lightbox-gallery simply wraps the functionality of GLightbox (https://biati-digital.github.io/glightbox/) in a grav twig templates via ready-to-go modular templates and custom shortcodes. I did not write the orginal JS library so I don't have intimate knowledge about what and why things are different on mobile compared to the desktop view.

Can you confirm that what you are asking is possible even with the default GLightbox? The Docs are available here: https://github.com/biati-digital/glightbox/blob/master/README.md

All i'm doing is passing along any configuration options to the script :lightbox-gallery.php:117 -> getOptions() method:

    protected function getOptions() {
        $options = [];

        $defaults = [
            'selector' => '.glightbox',
            'elements' => null,
            'skin' => 'clean',
            'openEffect' => 'zoom',
            'closeEffect' => 'zoom',
            'slideEffect' => 'slide',
            'moreText' => 'See more',
            'moreLength' => 60,
            'closeButton' => true,
            'touchNavigation' => true,
            'touchFollowAxis' => true,
            'keyboardNavigation' => true,
            'closeOnOutsideClick' => true,
            'startAt' => 0,
            'width' => '900px',
            'height' => '506px',
            'videosWidth' => '960px',
            'descPosition' => 'bottom',
            'loop' => false,
            'zoomable' => true,
            'draggable' => true,
            'dragToleranceX' => 40,
            'dragToleranceY' => 65,
            'dragAutoSnap' => false,
            'preload' => true,
            'autoplayVideos' => true,
            'autofocusVideos' => false,
        ];

        ...

    }

If I'm missing anything that you need to modify to get your desired effect, then i'll gladly add that. Other than that there's not a whole lot I can do from the lightbox-gallery side, it is functionality that has to exist in the GLightbox JS script side.

stbs01 commented 4 months ago

Dear @rhukster Thanks again for your answer!

"Can you confirm that what you are asking is possible even with the default GLightbox?" Actually yes, I need this feature, but on the acquired plugin. Is it possible?

rhukster commented 4 months ago

I know you 'want' this feature, but if it's not in the GLightbox script, it won't be supported in lightbox-gallery. As I said lightbox-gallery is a Grav wrapper plugin for the GLightbox script. I don't modify or add functionality that the underlying script doesn't support.