]> git.maquefel.me Git - brevno-suite/hugo/commit
images: Add option for vertical alignment to images.Text
authorPranshu Gaba <pranshugaba@gmail.com>
Mon, 17 Feb 2025 23:51:42 +0000 (05:21 +0530)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 24 Apr 2025 12:09:13 +0000 (14:09 +0200)
commit2fce0bac033d8b7e98046f85f669ba813d862788
tree5463da788d59b654d58397684e9461d307400765
parent179aea11ac2ce80a38b211e11fd513cead63b17e
images: Add option for vertical alignment to images.Text

Add option ``aligny`` to specify the vertical alignment of the text
with respect to the ``y`` offset from the top of the image. Possible
values of ``aligny`` are ``top`` (default), ``center``, and ``bottom``.

The height of the block of text is measured from the top of the first
line to the baseline of the last line.

- ``top``: (Current behaviour) The top of the first line of the block of
  text is at an offset of ``y`` from the top of the image.

- ``center``: The vertical center of the block of text is at an offset of
  ``y`` from the top of the image.

- ``bottom``: The baseline of the last line of the text is at an offset
  of ``y`` from the top of the image.

Resolves #13414
docs/content/en/functions/images/Text.md
resources/images/filters.go
resources/images/text.go