Canvas Design System
Main Site Tokens

Listing Card

Content card for listing pages — workshops, exercises, and icebreakers. Wraps the includes/partials/listing-card.php partial as a component helper.

When to Use

Use Listing Card when: Displaying content library items (workshops, exercises, icebreakers) in a grid or list. Each card links to a detail page.
Don't use when: Displaying generic content — use Card instead. For feature marketing grids, use Feature Card.

Live Demo

Cards rendered with sample data. In production these are populated from the database via prepareCardData().

Design Sprint

5 days 3

A 5-day process for answering critical business questions through design, prototyping, and testing ideas with customers.

Crazy Eights

8 min

A fast sketching exercise that challenges people to sketch 8 distinct ideas in 8 minutes.

Two Truths and a Lie

15 min 7

A classic icebreaker where each person shares two true statements and one false one. The group guesses the lie.

Usage

The helper function wraps the partial and accepts a prepared card data array.

<?php
require_once 'includes/listing-helpers.php';

// Option 1: Using prepareCardData() on listing pages
$card = prepareCardData($item, $pageData);
echo ws_listing_card($card);

// Option 2: Direct include (existing pattern, still works)
$card = prepareCardData($item, $pageData);
include 'includes/partials/listing-card.php';
?>

Card Data Structure

The $card array from prepareCardData() contains:

Key Type Description
idstringItem ID
titlestringDisplay title
categorystringCategory name
category_iconstringMaterial icon name
category_colorstringHex color for category
durationstringFormatted duration (e.g., "45 min")
overviewstringDescription text (truncated in card)
detail_urlstringLink to detail page
typestringContent type (workshop, exercise, icebreaker)
viewsintView count
in_collectionboolWhether item is in user's collection
created_atstringISO date string for sorting
comment_countintNumber of comments (shown as badge in meta when > 0)

Anatomy

The listing card contains four parts:

Header: Category icon + title + duration badge + comment count (if > 0)
Description: Truncated overview text (150 chars)
Footer: Category badge + action buttons (notes, favorite, share). Notes button only visible when item has user notes (red note_add icon via .has-note class added by JS).

Files

FilePurpose
includes/components/helpers.phpws_listing_card() helper function
includes/partials/listing-card.phpCard template partial
includes/listing-helpers.phpprepareCardData() and category utilities
css/listing-redesign.cssCard styles