blueswen / mkdocs-glightbox

A MkDocs plugin supports image lightbox (zoom effect) with GLightbox.
https://blueswen.github.io/mkdocs-glightbox/
MIT License
115 stars 14 forks source link

Ignore Shields #6

Closed TRaSH- closed 1 year ago

TRaSH- commented 1 year ago

After installing glightbox, i noticed when you click on a shield it also opens the image, what breaks the actual action of the shields.

image

Any way to disable/ignore shields ?

blueswen commented 1 year ago

Adding an off-glb class to the image attribute or adding an existing image class as skip_classes to plugin options could disable glightbox effect by the image. Check more details on Disable by image.

TRaSH- commented 1 year ago

I tried that, but it breaks the shield, or I'm doing something wrong. [![Discord chat](https://img.shields.io/discord/492590071455940612?style=for-the-badge&color=4051B5&logo=discord)](https://trash-guides.info/discord){:target="_blank" rel="noopener noreferrer"}

Added as test at the end and after the URL

blueswen commented 1 year ago

Try to add off-glb class to the image as follows:

[![Discord chat](https://img.shields.io/discord/492590071455940612?style=for-the-badge&color=4051B5&logo=discord){.off-glb}](https://trash-guides.info/discord){:target="_blank" rel="noopener noreferrer"}

It's working on my machine with your doc Guides.

TRaSH- commented 1 year ago

Hmm Back to the drawing board when I get home and retest it. Thnx I'll report back

TRaSH- commented 1 year ago

Thnx it works, i was trying to add it outside the brackets and that didn't work for the shields.