molecules
Project card
A card for a project record that supplies title, image, video, client byline, and a deliverables line to the base card.
Specimens
James Zabiela, Bluecadet
Connecting a World-Famous DJ with His Fans
Winner of Best Music Site at SXSW
{{ Project.render({
project: (collections.projects | filterByKey("slug", "connecting-a-world-famous-dj-with-his-fans") | first)
}) }}
GSA, Office of Evaluation Sciences, Bixal
Improving Access to Government Benefits and Services
Evaluating digital forms to enhance public access to critical services like healthcare, housing, and financial aid.
{{ Project.render({
headingLevel: 4,
project: (collections.projects | filterByKey("slug", "improving-access-to-government-benefits-and-services") | first)
}) }}Params
| Param | Type | Description |
|---|---|---|
project | object | Project record: title, featuredImage, featuredVideo, url, abstract, organization (titles joined into the byline), rolesTitles, and activityTitles. |
title | string | Defaults to project.title, then “Untitled project”. |
image | Sanity image | Defaults to project.featuredImage. |
video | object | Defaults to project.featuredVideo. |
url | string | Defaults to project.url. |
description | string | Defaults to project.abstract. |
roles | string | Read to build a roles string that is never passed to the card. No effect. |
activities | string | Defaults to the joined project.activityTitles. Feeds the “Deliverables” meta row. |
meta | array | Defaults to one row: { key: "Deliverables", value: activities }. |
eager | boolean | Passed to the card. |
styles | object | Passed to the card. See the slot table. |
| Slot | Element |
|---|---|
image | The card’s media element (<img> or <video>). |
Notes
Pass the project record and the macro derives everything else. Params such as title, image, and meta override the record.