Gallery: ratio="original" keeps the images' aspect ratio, use it on the home page
This commit is contained in:
parent
79963f917b
commit
11712cd501
1 changed files with 44 additions and 9 deletions
|
|
@ -280,7 +280,9 @@ In the GeoJSON, `coordinates` are already in `[lon, lat]` order, the colour and
|
|||
| `alt` | yes | What the image shows. It is the thumbnail's alt text and the caption in the lightbox. |
|
||||
| `credit` | no | Photographer and licence, shown under the thumbnail and in the lightbox. |
|
||||
|
||||
Hugo crops the thumbnails to squares (keeping the most interesting part of the picture) at build time; the lightbox shows the original file. Without JavaScript, a thumbnail links to the original file. A missing image, a missing `alt` or a `gallery-image` outside a `gallery` stops the build with an error that names the page.
|
||||
`{{< gallery ratio="original" >}}` keeps each image's own aspect ratio instead of cropping it to a square; a gallery with a single image then spans the full width, as on the home page. Without `ratio` (or with `ratio="square"`), the thumbnails are square.
|
||||
|
||||
Hugo crops the square thumbnails (keeping the most interesting part of the picture) at build time; the lightbox shows the original file. Without JavaScript, a thumbnail links to the original file. A missing image, a missing `alt` or a `gallery-image` outside a `gallery` stops the build with an error that names the page.
|
||||
|
||||
## Shortcode: Event cards
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue