-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magnific popup gets in the way of Wikimedia links #3111
Comments
Surely there's a better way to fix this: Check if the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a follow-up to #1975, which was closed by its author without a real solution.
Environment
main
branch with markdown source: https://github.com/p3palazzo/tau0005/gh-pages
branch with generated website: https://github.com/p3palazzo/tau0005/tree/gh-pagesubuntu:latest
using:jekyll-pandoc
to process markdown instead of kramdown.Expected behavior
Links to Wikimedia commons pages should open as any regular link does. Instead, because the URL ends with
'.jpg'
or'.png'
, Minimal Mistakes tries to load them as a Magnific Popup lightbox.Steps to reproduce the behavior
[Harvey Barrison, 2012](https://commons.wikimedia.org/wiki/Image:Balloon_Safari_2012_06_01_3128_(7522677448).jpg)
(from line 72 of this file in the above-mentioned repository)<a href="https://commons.wikimedia.org/wiki/Image:Balloon_Safari_2012_06_01_3128_(7522677448).jpg">Harvey Barrison, 2012</a>
(line 285 on the corresponding generated HTML file)<a href="https://commons.wikimedia.org/wiki/Image:Balloon_Safari_2012_06_01_3128_(7522677448).jpg" class="image-popup">Harvey Barrison, 2012</a>
(can be seen here)Image#1 could not be loaded
Other
As pointed out by @mmistakes here, the lightbox can be disabled by editing l. 85-87 of the
assets/js/_main.js
file. However, having to checkout and the rebuild the whole theme Javascript seems like overkill.I suppose a regex similar to the one that activates the popup could be used to detect wikimedia URLs and disable the lightbox on them, but it would introduce other problems, e.g. what if someone actually points a link to the image itself that is hosted on Wikimedia?
The text was updated successfully, but these errors were encountered: