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

Captions #11

Closed
KosmosisDire opened this issue Feb 5, 2024 · 11 comments
Closed

Captions #11

KosmosisDire opened this issue Feb 5, 2024 · 11 comments

Comments

@KosmosisDire
Copy link

KosmosisDire commented Feb 5, 2024

I have a few comments on the current captions:

  • I feel a better way to approach setting a caption is to just write the caption under the link to each image. This makes defining the caption much easier.
  • It only shows one caption for the whole layout but I would like one caption per image with each caption centered on it's image.
  • The text also doesn't follow the theme, so it is invisible in dark mode.

image
You can barely see the caption there at the bottom.

Here is my proposed way of setting per image captions.
I think this would also translate much better if the plugin were to be uninstalled. Because then the caption will show up as text underneath each image by default (once the codeblock is removed). Frontmatter is not human friendly

```image-layout-a
You could write text here for a caption of the whole layout

![[ASEE Paper - Full Render.png]]
Or caption for *first* image here.
You could even use multiple lines.
And the caption _should_ be rendered as markdown.
![[ASEE Paper - Full CAD.png]]
Caption for second image here!
```
@KosmosisDire
Copy link
Author

KosmosisDire commented Feb 6, 2024

I realize after I posted this that the overlays are meant to be per image. Maybe I can just style the overlay to look like a caption and make it show even when not hovered. In this case I still like the idea of writing the overlay text under the image link, and the caption is still not visible.

@scokobro
Copy link

scokobro commented Feb 8, 2024

Great plugin!
For markdown-style image links - ![alt text](path/to/image) - it might be sensible to use the alt text as the overlay, this would make it similar to tools like pandoc.
Also. I can't get overlays/captions to work with the masonry layouts.

@vertis
Copy link
Owner

vertis commented Feb 9, 2024

@scokobro yeah, that seems like something I would like in the next little while. Gotta work on the RegEx to extract the alt text :)

Edit: Ah, I haven't implemented them for Masonry yet, that would be why :D

@vertis
Copy link
Owner

vertis commented Feb 9, 2024

@KosmosisDire yeah, that should be a pretty easy modification to make it show all the time vs only on hover

It's in my todolist to make the CSS a lot more configurable

@vertis
Copy link
Owner

vertis commented Feb 9, 2024

@scokobro @KosmosisDire I've just released an update that covers all these issues

  • Masonry overlays and captions should now work
  • Putting the [Text](image.jpg) in a markdown link should now cause it to be the overlay
  • putting permanentOverlay: true in the front matter will cause it to display the overlay all the time rather than on hover.

@KosmosisDire
Copy link
Author

Amazing, thank you!

@vertis
Copy link
Owner

vertis commented Feb 9, 2024

Ah I still need to fix the dark mode issue

@vertis
Copy link
Owner

vertis commented Feb 9, 2024

Dark mode issue is now fixed in 0.14.1

@vertis vertis closed this as completed Feb 9, 2024
@scokobro
Copy link

Very impressive! That was some speedy work - many thanks!

@saipavanc
Copy link

saipavanc commented Apr 19, 2024

I am sorry to add a comment here, but how are you adding caption when the image is from the local store?

```image-layout-a
![[Pasted image 20240419115508.png]]
![[Pasted image 20240419120314.png]]

I have tried and it just does not work. 

@johnrobertcobbold
Copy link

@saipavanc: I have the same issue trying to use local images. I have read the docs multiple times but still do not understand how captions work. Great plugin though, I am loving the masonry.

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

No branches or pull requests

5 participants