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

Show caption/description in lightbox #4

Closed monfortm closed 1 year ago

monfortm commented 1 year ago

Hello,

This is a question but I can't myself label it as so. I was wondering if the description is shown when the lightbox is open?

With the following

<figure class="image">
  <img src="url" alt="description">
  <figcaption>description</figcaption>
</figure>

Would (Could) the description be shown in full screen view?

Cheers, M

blueswen commented 1 year ago

@monfortm Thanks for the advice. The caption feature in v0.3.0 may meet your requirements, you can check the demo on https://blueswen.github.io/mkdocs-glightbox/caption/caption/.

monfortm commented 1 year ago

Thank you. Could not double check yet but will ASAP. Cheers

ofek commented 1 year ago

For me, the examples in demo don't work and captions only show up in the lightbox.

e.g.

![FastAPI readme](release-hatch-160/rich-readme.png){ data-title="foo" }
blueswen commented 1 year ago

The caption feature only adds the caption in the lightbox, not affecting the image on the page.

I used the figure and figcaption and GLightbox caption feature at the same time in the demo page before, which seems may confuse users. I just removed the figure and figcaption of all demos and added another demo about the figure and figcaption on caption page. Hopes this could make the descriptions of caption feature clear.

ofek commented 1 year ago

Oh nice, thanks!!!