Section Component

Image Grid

A justified gallery layout where images in each row share the same height but have varying widths based on their aspect ratios. Row heights may differ to ensure images fill the available width. Perfect for artist portfolios, photo galleries, and visual showcases.

Data is loaded from JSON files in /lib/data/, making content management simple and reusable. Aspect ratios are calculated automatically from loaded images.

On hover, a dark overlay appears showing the image title, details, and date. Items with a link property display an arrow icon indicating navigation to a detail page.

Examples

Sample Gallery

#95
#95 24 x 30 x 8 inches, bronze 2022
#76
#76 42 x 36 x 12 inches, steel and wood 2020
#65
#65 20 x 22 x 8 inches, marble 2018
#58
#58 28 x 32 x 10 inches, aluminum 2017

Larger Row Height

#95
#95 24 x 30 x 8 inches, bronze 2022
#76
#76 42 x 36 x 12 inches, steel and wood 2020
#65
#65 20 x 22 x 8 inches, marble 2018
#58
#58 28 x 32 x 10 inches, aluminum 2017

Configuration

Frontmatter

- sectionType: image-grid
  dataSource: artworks-2024
  text:
    title: "Sculptures 2024"
    titleTag: h2
  settings:
    gap: "6"
    targetRowHeight: "200"

Data File Structure

Create a JSON file in /lib/data/ with your image data:

[
  {
    "image": "/assets/images/artworks/piece-1.jpg",
    "title": "#108",
    "details": "36.5 x 55 x 13 inches, painted resin",
    "date": "2023",
    "link": "/artworks/piece-108/"
  },
  {
    "image": "/assets/images/artworks/piece-2.jpg",
    "title": "#95",
    "details": "24 x 30 x 8 inches, bronze",
    "date": "2022"
  }
]

Items without a link property will not show the arrow icon and won't be clickable.

Configuration Options

PropertyTypeRequiredDescription
dataSourcestringYesName of the JSON file in /lib/data/ (without .json extension)
text.titlestringNoOptional section title
text.titleTagstringNoHTML heading tag (h1-h6), defaults to h2
settings.gapstringNoGap between images in pixels (default: 6)
settings.targetRowHeightstringNoTarget height for rows in pixels (default: 200)

Data Item Properties

PropertyTypeRequiredDescription
imagestringYesPath to the image file
titlestringNoTitle shown in hover overlay
detailsstringNoDetails text (dimensions, materials, etc.)
datestringNoDate or year
linkstringNoURL to detail page (shows arrow icon when present)