Don
May 1, 2022, 11:27am
1
Hello
This theme component is modify the magnific popup (lightbox/gallery) to make it more user friendly especially on mobile.
This component will make a lot of changes on the default magnific popup.
More modern design
Fullscreen button (shortcut F key)
Show/hide title button
Touch swipe gestures
swipe right - previous image
swipe left - next image
swipe down - close lightbox
Theme translations to change the buttons title.
zoom_in_button_title: "Zoom In"
zoom_out_button_title: "Zoom Out"
close_button_title: "Close (Esc)"
fullscreen_button_title: "Fullscreen mode (F)"
toggle_title_button_title: "Toggle Info"
This new custom lightbox, inspired by New Discourse Lightbox Enabled on Meta - now disabled
Still want to use the old version?
You can with the old-custom-lightbox branch.
14 Likes
Would be great if scrolling could be done by swipe left right. Besides that, great tc.
3 Likes
Don
May 2, 2022, 12:38pm
3
Thanks! Yes that would be great but unfortunately Magnific Popup doesn’t support swipe gestures.
4 Likes
Don
May 4, 2022, 8:23am
4
I have updated the theme component and the OP.
4 Likes
Don
January 2, 2025, 9:50am
5
Hello
I’ve updated this theme component
This update contains the following:
Drop jQuery
Change the theme-color to black when the lightbox opens. (e.g. the status bar will also be black as the lightbox background)
Update to FontAwesome 6 icons.
Use zoom-in and zoom-out cursors on image.
I’ve added a preview link to the OP.
5 Likes
Very nice Don, any chance you could add an option to push the arrows, download button and image count to the outside of the image? On a photography site it’s not good to cover up parts of the photo, we want to see the entire photo without distractions. No worries if not, thanks!
2 Likes
Don
January 3, 2025, 5:17am
7
Thanks David, I will looking into a solution
The idea is create a new info button to show/hide the image informations such as download, original image, title and counter maybe.
1 Like
Thanks Don, I was thinking more like this:
But also move the arrows outside of the image, it would require the image being smaller to have some padding around the edges for this.
The other option would be hiding all the information until the cursor moves, not sure if that’s possible.
2 Likes
Don
January 5, 2025, 5:45am
9
I’ve got some inspiration from how it arranges with the new lightbox and I made a concept
I think something like this probably can works.
simplify buttons, change positions, smaller arrows
add fullscreen button and info button to show bottom infos
1 Like
Love it! Hope you can make it work
2 Likes
Don
January 6, 2025, 10:27am
12
Here is the update for this theme component It’s not merged yet but you can try how it works on Theme Creator.
Changes like I mentioned in this Custom Lightbox - modern, swipe gestures, fullscreen mode and more - #9 by Don post.
Fullscreen button (you can trigger it with F
key too)
Show/hide title button
Only show zoom-out icon when you zoomed in.
Hide arrows on mobile
Also added touch swipe actions to make it more comfortable to use on touchscreen devices.
swipe right - previous image
swipe left - next image
swipe down - close lightbox
Some UX tweaks
This update will also removes the settings.
2 Likes
Looks nice Don! The only issue I’m seeing is when I click the prev/next arrows it closes the lightbox, if you use the keyboard arrows it does work as expected. I tried various browsers and it does the same thing.
2 Likes
Don
January 6, 2025, 2:36pm
14
Thanks, I fixed it now. Can you check it?
1 Like
Don
January 7, 2025, 3:39pm
16
Hello
I’ve merged the new custom lightbox
Updated the OP too…
VaperinaDEV:main
← VaperinaDEV:modern-lightbox
opened 03:31PM - 07 Jan 25 UTC
This theme component is modify the magnific popup (lightbox/gallery) to make it … more *user friendly* especially on mobile.
* More modern design
* Fullscreen button (shortcut <kbd>F</kbd> key)
* Show/hide title button
* Touch swipe gestures
* swipe right - previous image
* swipe left - next image
* swipe down - close lightbox
3 Likes