Course Map 1
Course map: the members-area program as a path the student walks. Finished stops sit behind, and the current stop is raised with one Resume click back into the course.
Use it in a prompt
Use content/course-map from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/content/course-map.tsx. - Import it and pass your copy and images (Props tab):
import { CourseMap } from "@/components/funneldna/content/course-map"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/course-map/component.tsx 472 lines
// layout: unboxing-flatlay
// Course map: the members-area program as a path the student walks. Finished stops sit behind, and the current stop is raised with one Resume click back into the course.
import React from "react";
import { Check, Lock } from "lucide-react";
import { Backdrop, Divider, FX_HOST } from "../fx/fx";
export type CourseMapStatus = "done" | "current" | "locked";
export type CourseMapModule = {
title: string;
// number of lessons in the module
lessons: number;
status: CourseMapStatus;
// lessons finished so far (current module)
lessonsDone?: number;
// title of the next lesson (current module)
nextLesson?: string;
// drip date for a locked module, e.g. "Mar 14"
opens?: string;
// module page for done modules (title becomes a link)
href?: string;
};
export type CourseMapCopy = {
// "{number}" is the module number
module: string;
// "{count}" is the lesson count
lessons: string;
lessonsOne: string;
done: string;
locked: string;
// "{date}" is the module's opens value
opens: string;
// "{done}" and "{count}" lessons
progress: string;
upNext: string;
// "{number}" is the current module number
resume: string;
secondary: string;
// "{total}" is the module count
tallyOf: string;
tallyLabel: string;
mapLabel: string;
empty: string;
};
export type CourseMapProps = {
headline?: string;
// phrase inside the headline that gets the marker stroke
headlineHighlight?: string;
// one-sentence paragraphs under the headline
lines?: string[];
// single-word closing line for emphasis
punch?: string;
modules?: CourseMapModule[];
// scene slot: full-bleed photo behind the band (under a token scrim)
sceneImage?: string;
// Resume destination
href?: string;
onAction?: (module: CourseMapModule, index: number) => void;
// quiet secondary line under the Resume button
secondaryHref?: string;
onSecondary?: () => void;
disabled?: boolean;
// stepped edge handing off to the next (surface) section
edge?: boolean;
state?: "default" | "hover" | "active" | "disabled";
copy?: Partial<CourseMapCopy>;
className?: string;
};
const DEFAULT_COPY: CourseMapCopy = {
module: "Module {number}",
lessons: "{count} lessons",
lessonsOne: "{count} lesson",
done: "Done",
locked: "Locked",
opens: "Opens {date}",
progress: "{done} of {count} lessons done",
upNext: "Up next",
resume: "Resume Module {number}",
secondary: "or see every lesson in this module",
tallyOf: "of {total}",
tallyLabel: "modules complete",
mapLabel: "Course map",
empty: "Your modules appear here as soon as they are published.",
};
export function CourseMap(props: CourseMapProps) {
const {
headline = "Pick up right where you left off",
headlineHighlight = "where you left off",
lines = ["Every module builds on the one before it.", "Finish this stop and the next one opens."],
punch = "Onward.",
modules = [],
sceneImage,
href,
onAction,
secondaryHref,
onSecondary,
disabled = false,
edge = true,
state = "default",
className = "",
} = props;
const c: CourseMapCopy = { ...DEFAULT_COPY, ...props.copy };
const headingId = React.useId();
const total = modules.length;
const cols = total * 2;
const doneCount = modules.filter((m) => m.status === "done").length;
const isDisabled = disabled || state === "disabled";
const long = total > 8;
const pos = (i: number) => ({ x: ((i + 0.5) / Math.max(total, 1)) * 1000, y: i % 2 === 0 ? 25 : 75 });
const walked = (i: number) => {
const a = modules[i];
const b = modules[i + 1];
return !!a && !!b && a.status === "done" && b.status !== "locked";
};
const lessonCount = (m: CourseMapModule) => fill(m.lessons === 1 ? c.lessonsOne : c.lessons, { count: m.lessons });
const lessonsDone = (m: CourseMapModule) => Math.max(0, Math.min(m.lessons, m.lessonsDone ?? 0));
const lessonPct = (m: CourseMapModule) => (m.lessons > 0 ? Math.round((lessonsDone(m) / m.lessons) * 100) : 0);
const btnClass = ["cf-course-map__btn", state === "hover" ? "is-hover" : "", state === "active" ? "is-active" : ""]
.filter(Boolean)
.join(" ");
const renderActions = (m: CourseMapModule, i: number) => {
const label = fill(c.resume, { number: i + 1 });
const action =
href && !isDisabled ? (
<a className={btnClass} href={href} onClick={onAction ? () => onAction(m, i) : undefined}>
{label}
</a>
) : (
<button
type="button"
className={btnClass}
disabled={isDisabled}
onClick={() => {
if (!isDisabled) onAction?.(m, i);
}}
>
{label}
</button>
);
const secondary = secondaryHref ? (
<a className="cf-course-map__quiet" href={secondaryHref} onClick={onSecondary}>
{c.secondary}
</a>
) : onSecondary ? (
<button type="button" className="cf-course-map__quiet" onClick={onSecondary}>
{c.secondary}
</button>
) : null;
return (
<div className="cf-course-map__actions">
{action}
{secondary}
</div>
);
};
const renderCurrent = (m: CourseMapModule, i: number) => (
<div className="cf-course-map__card">
<h3 className="cf-course-map__card-title">{m.title}</h3>
<p className="cf-course-map__card-meta">
{fill(c.module, { number: i + 1 })} · {lessonCount(m)}
</p>
{m.lessonsDone !== undefined && m.lessons > 0 ? (
<div className="cf-course-map__prog">
<p className="cf-course-map__prog-label">{fill(c.progress, { done: lessonsDone(m), count: m.lessons })}</p>
<span className="cf-course-map__bar" aria-hidden="true">
<span style={{ width: `${lessonPct(m)}%` }} />
</span>
</div>
) : null}
{m.nextLesson ? (
<p className="cf-course-map__next">
<span className="cf-course-map__next-label">{c.upNext}</span>
<span className="cf-course-map__next-title">{m.nextLesson}</span>
</p>
) : null}
{renderActions(m, i)}
</div>
);
const renderPlain = (m: CourseMapModule, i: number) => (
<>
<h3 className="cf-course-map__title">
{m.href && m.status === "done" ? (
<a className="cf-course-map__title-link" href={m.href}>
{m.title}
</a>
) : (
m.title
)}
</h3>
<p className="cf-course-map__meta">
{fill(c.module, { number: i + 1 })} · {lessonCount(m)}
</p>
<p className="cf-course-map__status">
{m.status === "done" ? (
<Check className="cf-course-map__icon" size={16} strokeWidth={2.5} aria-hidden="true" />
) : (
<Lock className="cf-course-map__icon" size={16} strokeWidth={2.5} aria-hidden="true" />
)}
{m.status === "done" ? c.done : m.opens ? fill(c.opens, { date: m.opens }) : c.locked}
</p>
</>
);
const renderStop = (m: CourseMapModule, i: number) => (m.status === "current" ? renderCurrent(m, i) : renderPlain(m, i));
const placement = (i: number, current: boolean) => {
const start = current ? Math.max(1, 2 * i) : 2 * i + 1;
const end = current ? Math.min(cols + 1, 2 * i + 4) : 2 * i + 3;
const align = current ? (2 * i < 1 ? "start" : 2 * i + 4 > cols + 1 ? "end" : "center") : "center";
return {
align,
style: { gridColumn: `${start} / ${end}`, gridRow: i % 2 === 0 ? 1 : 3, "--cm-i": i } as React.CSSProperties,
};
};
const rootClass = ["cf-course-map", long ? "cf-course-map--long" : "", edge ? "cf-course-map--edge" : "", className]
.filter(Boolean)
.join(" ");
return (
<section className={rootClass} style={FX_HOST} aria-labelledby={headingId}>
<style>{CSS}</style>
{sceneImage ? <Backdrop src={sceneImage} treatment="duotone" /> : null}
{sceneImage ? <div className="cf-course-map__veil" aria-hidden="true" /> : null}
<div className="cf-course-map__inner">
<div className="cf-course-map__head">
<div className="cf-course-map__copy">
<h2 id={headingId} className="cf-course-map__h2">
{withHighlight(headline, headlineHighlight)}
</h2>
{lines.map((line, i) => (
<p key={i} className="cf-course-map__line">
{line}
</p>
))}
{punch ? <p className="cf-course-map__punch">{punch}</p> : null}
</div>
{total > 0 ? (
<div className="cf-course-map__tally">
<p className="cf-course-map__tally-row">
<span className="cf-course-map__tally-num">{doneCount}</span>
<span className="cf-course-map__tally-of">{fill(c.tallyOf, { total })}</span>
</p>
<p className="cf-course-map__tally-label">{c.tallyLabel}</p>
<span className="cf-course-map__segs" aria-hidden="true">
{modules.map((m, i) => (
<span
key={i}
className={`cf-course-map__seg cf-course-map__seg--${m.status}`}
style={m.status === "current" ? ({ "--cm-fill": `${lessonPct(m)}%` } as React.CSSProperties) : undefined}
/>
))}
</span>
</div>
) : null}
</div>
{total === 0 ? (
<p className="cf-course-map__empty">{c.empty}</p>
) : (
<>
<div className="cf-course-map__map" style={{ "--cm-cols": cols } as React.CSSProperties}>
<ol className="cf-course-map__list" role="list" aria-label={c.mapLabel}>
{modules.map((m, i) => {
const current = m.status === "current";
const place = placement(i, current);
return (
<li
key={i}
className={`cf-course-map__stop cf-course-map__stop--${i % 2 === 0 ? "top" : "bottom"} cf-course-map__stop--align-${place.align}`}
style={place.style}
aria-current={current ? "step" : undefined}
>
{renderStop(m, i)}
</li>
);
})}
</ol>
<div className="cf-course-map__track" aria-hidden="true">
<svg className="cf-course-map__svg" viewBox="0 0 1000 100" preserveAspectRatio="none" focusable="false">
{modules.slice(0, -1).map((_, i) => {
const p = pos(i);
const q = pos(i + 1);
const mx = (p.x + q.x) / 2;
const d = `M ${p.x} ${p.y} C ${mx} ${p.y}, ${mx} ${q.y}, ${q.x} ${q.y}`;
return walked(i) ? (
<g key={i}>
<path className="cf-course-map__casing" d={d} vectorEffect="non-scaling-stroke" />
<path className="cf-course-map__walked" d={d} vectorEffect="non-scaling-stroke" />
</g>
) : (
<path key={i} className="cf-course-map__ahead" d={d} vectorEffect="non-scaling-stroke" />
);
})}
</svg>
{modules.map((m, i) => (
<Disc key={i} status={m.status} number={i + 1} style={{ left: `${pos(i).x / 10}%`, top: `${pos(i).y}%` }} />
))}
</div>
</div>
<ol className="cf-course-map__rail" role="list" aria-label={c.mapLabel}>
{modules.map((m, i) => (
<li
key={i}
className="cf-course-map__rail-item"
style={{ "--cm-i": i } as React.CSSProperties}
aria-current={m.status === "current" ? "step" : undefined}
>
{i < total - 1 ? (
<span className={`cf-course-map__vseg cf-course-map__vseg--${walked(i) ? "walked" : "ahead"}`} aria-hidden="true" />
) : null}
<Disc status={m.status} number={i + 1} />
<div className={m.status === "current" ? "cf-course-map__rail-body cf-course-map__rail-body--card" : "cf-course-map__rail-body"}>
{renderStop(m, i)}
</div>
</li>
))}
</ol>
</>
)}
</div>
{edge ? <Divider shape="step" tone="surface" height={56} /> : null}
</section>
);
}
export default CourseMap;
function Disc({ status, number, style }: { status: CourseMapStatus; number: number; style?: React.CSSProperties }) {
return (
<span className={`cf-course-map__disc cf-course-map__disc--${status}`} style={style} aria-hidden="true">
{status === "done" ? <Check size={20} strokeWidth={3} /> : number}
</span>
);
}
function withHighlight(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="cf-course-map__hl">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
function fill(template: string, vars: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (all: string, key: string) => (key in vars ? String(vars[key]) : all));
}
const CSS = `
.cf-course-map{--cm-soft:color-mix(in oklch,var(--band-ink) 80%,var(--band));--cm-path:var(--accent-fill,var(--accent));--cm-shadow:var(--shadow,oklch(0.22 0.03 260));position:relative;overflow:hidden;isolation:isolate;background:var(--band);color:var(--band-ink);font-family:var(--font-body)}
.cf-course-map *{box-sizing:border-box}
.cf-course-map__veil{position:absolute;inset:0;background:oklch(from var(--band) l c h / 0.55);pointer-events:none}
.cf-course-map__inner{position:relative;z-index:1;max-width:calc(1120px + 2 * clamp(16px,5vw,48px));margin:0 auto;padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-course-map--edge .cf-course-map__inner{padding-bottom:calc(clamp(64px,8.5vw,120px) + 56px)}
.cf-course-map__head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:clamp(32px,5vw,72px);align-items:start}
.cf-course-map__copy{max-width:42rem}
.cf-course-map__h2{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);text-wrap:balance;color:var(--band-ink)}
.cf-course-map__hl{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));padding:0 .12em;border-radius:.2em .1em .16em .08em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-course-map__line{margin:0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--cm-soft);text-wrap:pretty}
.cf-course-map__line+.cf-course-map__line{margin-top:8px}
.cf-course-map__punch{margin:16px 0 0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;color:var(--band-ink)}
.cf-course-map__tally{min-width:15rem;padding-top:4px}
.cf-course-map__tally-row{display:flex;align-items:baseline;gap:8px;margin:0}
.cf-course-map__tally-num{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--band-ink)}
.cf-course-map__tally-of{font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;line-height:1.4;color:var(--cm-soft)}
.cf-course-map__tally-label{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--cm-soft)}
.cf-course-map__segs{display:flex;gap:4px;margin-top:16px}
.cf-course-map__seg{position:relative;flex:1 1 0;min-width:12px;height:8px;border-radius:999px;overflow:hidden;background:oklch(from var(--band-ink) l c h / 0.22)}
.cf-course-map__seg--done{background:var(--band-ink)}
.cf-course-map__seg--current::after{content:"";position:absolute;inset:0 auto 0 0;width:var(--cm-fill,0%);background:var(--band-ink);border-radius:inherit}
.cf-course-map__map{display:grid;grid-template-columns:repeat(var(--cm-cols),minmax(0,1fr));grid-template-rows:auto 160px auto;margin-top:clamp(40px,5vw,64px)}
.cf-course-map__list{display:contents;list-style:none;margin:0;padding:0}
.cf-course-map__stop{padding:0 8px;text-align:center;animation:cfcm-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(min(var(--cm-i,0),4) * .07s)}
.cf-course-map__stop--top{align-self:end;padding-bottom:4px}
.cf-course-map__stop--bottom{align-self:start;padding-top:4px}
.cf-course-map__stop--align-start .cf-course-map__card{margin-inline:0 auto}
.cf-course-map__stop--align-end .cf-course-map__card{margin-inline:auto 0}
.cf-course-map__title{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.25;letter-spacing:-0.01em;text-wrap:balance;color:var(--band-ink)}
.cf-course-map__title-link{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:oklch(from var(--band-ink) l c h / 0.45);text-underline-offset:.18em;border-radius:4px;transition:text-decoration-color .16s ease}
.cf-course-map__title-link:hover{text-decoration-color:var(--band-ink)}
.cf-course-map__title-link:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-course-map__meta,.cf-course-map__status{margin:8px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--cm-soft);text-wrap:pretty}
.cf-course-map__status{margin-top:4px;font-weight:700;color:var(--band-ink)}
.cf-course-map__icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-course-map__card{width:min(100%,22rem);margin-inline:auto;padding:clamp(20px,2.4vw,24px);background:var(--card);color:var(--ink);border:1px solid var(--card-border,color-mix(in oklch,var(--accent) 35%,var(--card)));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32)));text-align:left}
.cf-course-map__card-title{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance;color:var(--ink)}
.cf-course-map__card-meta{margin:8px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted)}
.cf-course-map__prog{margin-top:16px}
.cf-course-map__prog-label{margin:0;font-size:.9375rem;line-height:1.4;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}
.cf-course-map__bar{display:block;height:8px;margin-top:8px;border-radius:999px;overflow:hidden;background:color-mix(in oklch,var(--ink) 9%,var(--card))}
.cf-course-map__bar>span{display:block;height:100%;border-radius:inherit;background:var(--accent-fill,var(--accent))}
.cf-course-map__next{margin:16px 0 0;padding:12px 14px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-course-map__next-label{display:block;margin-bottom:4px;font-size:.875rem;line-height:1.2;font-weight:800;color:var(--muted)}
.cf-course-map__next-title{display:block;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.35;font-weight:700;color:var(--ink);text-wrap:pretty}
.cf-course-map__actions{margin-top:20px}
.cf-course-map__btn{display:flex;width:100%;min-height:56px;padding:0 16px;align-items:center;justify-content:center;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + 0.04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--cm-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--cm-shadow) l c h / 0.4));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-course-map__btn:hover:not(:disabled),.cf-course-map__btn.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - 0.01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.12) c h / 0.7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.18) c h),0 1px 2px oklch(from var(--cm-shadow) l c h / 0.32),0 10px 18px -6px oklch(from var(--cm-shadow) l c h / 0.48))}
.cf-course-map__btn:active:not(:disabled),.cf-course-map__btn.is-active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 3px oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.12) c h / 0.55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--cm-shadow) l c h / 0.3)}
.cf-course-map__btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / 0.55);outline-offset:3px}
.cf-course-map__btn:disabled{background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));text-shadow:none;cursor:not-allowed}
.cf-course-map__quiet{display:block;width:100%;margin-top:12px;padding:0;border:0;background:none;font:inherit;font-size:.9375rem;line-height:1.4;font-weight:500;text-align:center;color:var(--muted);text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:oklch(from var(--muted) l c h / 0.45);text-underline-offset:.18em;cursor:pointer;border-radius:4px}
.cf-course-map__quiet:hover{color:var(--ink);text-decoration-color:var(--ink)}
.cf-course-map__quiet:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / 0.55);outline-offset:2px}
.cf-course-map__track{position:relative;grid-column:1 / -1;grid-row:2}
.cf-course-map__svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.cf-course-map__casing{fill:none;stroke:var(--band-ink);stroke-width:12;stroke-linecap:round}
.cf-course-map__walked{fill:none;stroke:var(--cm-path);stroke-width:6;stroke-linecap:round}
.cf-course-map__ahead{fill:none;stroke:oklch(from var(--band-ink) l c h / 0.55);stroke-width:4;stroke-linecap:round;stroke-dasharray:10 12}
.cf-course-map__disc{position:absolute;z-index:1;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;transform:translate(-50%,-50%);font-family:var(--font-display);font-weight:800;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1;font-variant-numeric:tabular-nums;box-shadow:0 1px 2px oklch(from var(--cm-shadow) l c h / 0.35),0 4px 8px -2px oklch(from var(--cm-shadow) l c h / 0.35)}
.cf-course-map__disc--done{background:var(--success);color:var(--cm-glyph,#fff);border:3px solid var(--band-ink)}
.cf-course-map__disc--locked{background:oklch(from var(--band) calc(l + 0.1) c h);color:var(--band-ink);border:2px solid color-mix(in oklch,var(--band-ink) 45%,var(--band))}
.cf-course-map__disc--current{width:64px;height:64px;background:linear-gradient(oklch(from var(--cm-path) calc(l + 0.05) c h),oklch(from var(--cm-path) calc(l - 0.04) c h));color:var(--accent-fill-ink,var(--card));border:3px solid var(--band-ink);font-size:clamp(1.3125rem,1.8vw,1.625rem)}
.cf-course-map__disc--current::before,.cf-course-map__disc--current::after{content:"";position:absolute;inset:-9px;border-radius:50%;pointer-events:none}
.cf-course-map__disc--current::before{border:2px solid oklch(from var(--cm-path) l c h / 0.5)}
.cf-course-map__disc--current::after{border:3px solid var(--cm-path);opacity:0;animation:cfcm-pulse 2.4s cubic-bezier(.2,.7,.2,1) .5s 3 both}
.cf-course-map__rail{display:none;list-style:none;margin:40px 0 0;padding:0;gap:20px}
.cf-course-map__rail-item{position:relative;display:grid;grid-template-columns:56px minmax(0,1fr);column-gap:16px;align-items:start;animation:cfcm-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(min(var(--cm-i,0),4) * .07s)}
.cf-course-map__rail-item .cf-course-map__disc{position:relative;transform:none;justify-self:center;margin-top:6px}
.cf-course-map__rail-item .cf-course-map__disc--current{width:56px;height:56px;margin-top:0}
.cf-course-map__vseg{position:absolute;z-index:0;left:28px;top:28px;height:calc(100% + 20px);transform:translateX(-50%)}
.cf-course-map__vseg--walked{width:12px;background:var(--cm-path);border-inline:3px solid var(--band-ink)}
.cf-course-map__vseg--ahead{width:4px;background:repeating-linear-gradient(to bottom,oklch(from var(--band-ink) l c h / 0.55) 0 10px,transparent 10px 22px)}
.cf-course-map__rail-body{padding-top:16px}
.cf-course-map__rail-body--card{padding-top:0}
.cf-course-map__rail .cf-course-map__card{width:100%;margin:0}
.cf-course-map__rail .cf-course-map__title{font-size:clamp(1.0625rem,1.25vw,1.125rem)}
.cf-course-map__empty{margin:40px 0 0;padding:20px 24px;border-radius:var(--radius,12px);background:oklch(from var(--band-ink) l c h / 0.12);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:600;color:var(--band-ink);text-align:center;text-wrap:pretty}
.cf-course-map--long .cf-course-map__map{display:none}
.cf-course-map--long .cf-course-map__rail{display:grid;max-width:46rem}
@media (max-width:959px){
.cf-course-map__head{grid-template-columns:minmax(0,1fr);gap:32px}
.cf-course-map__tally{min-width:0;padding-top:0}
.cf-course-map__map{display:none}
.cf-course-map__rail{display:grid}
}
@keyframes cfcm-rise{from{opacity:.82;translate:0 8px}to{opacity:1;translate:0 0}}
@keyframes cfcm-pulse{0%{opacity:.75;transform:scale(.86)}70%{opacity:0;transform:scale(1.35)}100%{opacity:0;transform:scale(1.35)}}
@media (prefers-reduced-motion:reduce){
.cf-course-map__stop,.cf-course-map__rail-item{animation:none}
.cf-course-map__disc--current::after{animation:none;opacity:0}
.cf-course-map__btn,.cf-course-map__title-link{transition:none}
}
`;
pieces/content/course-map/specimen.tsx 39 lines
import __studioImageb9add797 from "../assets/1645e2f358ec383c.webp";
import CourseMap from "../course-map";
export const states = ["default", "hover", "active", "disabled"];
type SpecimenState = "default" | "hover" | "active" | "disabled";
export default function CourseMapSpecimen({ state = "default" }: { state?: SpecimenState }) {
return (
<CourseMap
state={state}
headline="Pick up the dough right where you left it"
headlineHighlight="right where you left it"
lines={[
"Your starter is alive and your bake schedule is set.",
"This week you learn to shape a full batch in one session.",
]}
punch="Ready?"
sceneImage={__studioImageb9add797}
href="#resume-module-3"
secondaryHref="#module-3-lessons"
modules={[
{ title: "A Starter That Never Quits", lessons: 6, status: "done", href: "#module-1" },
{ title: "The Production Schedule", lessons: 8, status: "done", href: "#module-2" },
{
title: "Shaping at Volume",
lessons: 9,
status: "current",
lessonsDone: 4,
nextLesson: "Pre-shape a full batch in one pass",
href: "#module-3",
},
{ title: "Proofing and Cold Retard", lessons: 7, status: "locked", opens: "Mar 14" },
{ title: "Scoring and Oven Loading", lessons: 6, status: "locked", opens: "Mar 21" },
{ title: "Pricing the Wholesale Loaf", lessons: 5, status: "locked", opens: "Mar 28" },
]}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalCourseMap |
string |
|
headlineHighlight OptionalCourseMap |
string |
|
lines OptionalCourseMap |
string[] |
|
punch OptionalCourseMap |
string |
|
modules OptionalCourseMap |
CourseMapModule[] |
|
sceneImage OptionalCourseMap |
string |
|
href OptionalCourseMap |
string |
|
onAction OptionalCourseMap |
(module: CourseMapModule, index: number) => void |
|
secondaryHref OptionalCourseMap |
string |
|
onSecondary OptionalCourseMap |
() => void |
|
disabled OptionalCourseMap |
boolean |
|
edge OptionalCourseMap |
boolean |
|
state OptionalCourseMap |
"default" | "hover" | "active" | "disabled" |
|
copy OptionalCourseMap |
Partial<CourseMapCopy> |
|
className OptionalCourseMap |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
1645e2f358ec383c.webp
image/webp · 226 KB