Redesign image captions#247
Conversation
|
The issue I thought for customizing captions in #127 inside the post was Cover image is meant to be full sized and fits the width. While in case of images inside a post, the images can be smaller than width of Ex. |
I didn't think of that. Should I make the captions left-aligned as they were before, or should I try to center them to the image, even if the image is smaller than the page? |
|
Centering |
I am sorry but this is your preference, not everyone wants this |
a804990 to
16ae26f
Compare
I completely understand. I've rebased the code to remove the center-alignment. Captions are now aligned according to the language's direction, which fixes the problems with images that are smaller than the page width. Here are some example images: Left-to-right language directionRight-to-left language directionRight-to-left language direction with small image |
|
Well, these image orientations works for me too! I wouldn't mind that. Hugo's default formatting for Centering it wasn't specifically for my needs, but was rather a suggestion I thought would look nice with the theme. Apologies if my suggestions sounded otherwise. |
16ae26f to
779053b
Compare
|
Kudos, SonarCloud Quality Gate passed!
|




Changes the style of image captions. This creates a distinciton between the
titleandcaptionattributes. The former now shows up more prominently than the latter. Both are centered below the image, which resolves #246.Since there are no pages in the example site with images, I've added one in my fork's
exampleSitebranch: kdkasad/hugo-PaperMod@e7e62d9. Below are screenshots of the various images on that page.Screenshots
Edit: captions are no longer centered. See this comment for updated screenshots.
Cover image with caption:

Content image with title, caption, and attribution:

Content image with title and caption:

Content image with title:

Content image with caption:
