Skip to content
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

Disable Magnific Popup for specific image links #1975

Closed
jounathaen opened this issue Nov 25, 2018 · 2 comments
Closed

Disable Magnific Popup for specific image links #1975

jounathaen opened this issue Nov 25, 2018 · 2 comments

Comments

@jounathaen
Copy link

I'd like to link to some pages from wikidata, like for example this one: https://commons.wikimedia.org/wiki/File:Antinous_Mandragone_profil.jpg and I do it like this:

html style <a href="https://commons.wikimedia.org/wiki/File:Antinous_Mandragone_profil.jpg"> link </a>
or the same link [in markdown](https://commons.wikimedia.org/wiki/File:Antinous_Mandragone_profil.jpg)

But despite the suffix, this is not a link to the image itself, but to the corresponding wikidata page.

Unfortunately, it seems like minimal-mistakes adds the "image-popup" class to all links which end with jpg, png, etc.
This results in a broken Magnific popup.
Can I disable the Magnific popup for these links?

Best regards and thanks for the work!

@mmistakes
Copy link
Owner

Sounds like you’ll need to customize the theme’s JavaScript. Here’s the appropriate lines that add the light box class to all image links.

@jounathaen
Copy link
Author

Hmm, ok.
I just removed the lines from the Javascript.
I still think a switch would be better in the long run, but this does the job and my JS/html skills are not sufficient for this.
Thanks for the Tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants