@cogenta/theme-entreprise 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +373 -0
- package/dist/src/index.d.ts +16 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +16 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/render/blocks/accordion.d.ts +4 -0
- package/dist/src/render/blocks/accordion.d.ts.map +1 -0
- package/dist/src/render/blocks/accordion.js +24 -0
- package/dist/src/render/blocks/accordion.js.map +1 -0
- package/dist/src/render/blocks/collection-list.d.ts +14 -0
- package/dist/src/render/blocks/collection-list.d.ts.map +1 -0
- package/dist/src/render/blocks/collection-list.js +55 -0
- package/dist/src/render/blocks/collection-list.js.map +1 -0
- package/dist/src/render/blocks/cta.d.ts +12 -0
- package/dist/src/render/blocks/cta.d.ts.map +1 -0
- package/dist/src/render/blocks/cta.js +19 -0
- package/dist/src/render/blocks/cta.js.map +1 -0
- package/dist/src/render/blocks/embed.d.ts +4 -0
- package/dist/src/render/blocks/embed.d.ts.map +1 -0
- package/dist/src/render/blocks/embed.js +92 -0
- package/dist/src/render/blocks/embed.js.map +1 -0
- package/dist/src/render/blocks/faq.d.ts +4 -0
- package/dist/src/render/blocks/faq.d.ts.map +1 -0
- package/dist/src/render/blocks/faq.js +25 -0
- package/dist/src/render/blocks/faq.js.map +1 -0
- package/dist/src/render/blocks/feature-grid.d.ts +4 -0
- package/dist/src/render/blocks/feature-grid.d.ts.map +1 -0
- package/dist/src/render/blocks/feature-grid.js +33 -0
- package/dist/src/render/blocks/feature-grid.js.map +1 -0
- package/dist/src/render/blocks/gallery.d.ts +15 -0
- package/dist/src/render/blocks/gallery.d.ts.map +1 -0
- package/dist/src/render/blocks/gallery.js +28 -0
- package/dist/src/render/blocks/gallery.js.map +1 -0
- package/dist/src/render/blocks/hero.d.ts +15 -0
- package/dist/src/render/blocks/hero.d.ts.map +1 -0
- package/dist/src/render/blocks/hero.js +31 -0
- package/dist/src/render/blocks/hero.js.map +1 -0
- package/dist/src/render/blocks/logo-strip.d.ts +4 -0
- package/dist/src/render/blocks/logo-strip.d.ts.map +1 -0
- package/dist/src/render/blocks/logo-strip.js +21 -0
- package/dist/src/render/blocks/logo-strip.js.map +1 -0
- package/dist/src/render/blocks/logos.d.ts +4 -0
- package/dist/src/render/blocks/logos.d.ts.map +1 -0
- package/dist/src/render/blocks/logos.js +30 -0
- package/dist/src/render/blocks/logos.js.map +1 -0
- package/dist/src/render/blocks/media-figure.d.ts +13 -0
- package/dist/src/render/blocks/media-figure.d.ts.map +1 -0
- package/dist/src/render/blocks/media-figure.js +28 -0
- package/dist/src/render/blocks/media-figure.js.map +1 -0
- package/dist/src/render/blocks/pricing-table.d.ts +4 -0
- package/dist/src/render/blocks/pricing-table.d.ts.map +1 -0
- package/dist/src/render/blocks/pricing-table.js +33 -0
- package/dist/src/render/blocks/pricing-table.js.map +1 -0
- package/dist/src/render/blocks/prose.d.ts +9 -0
- package/dist/src/render/blocks/prose.d.ts.map +1 -0
- package/dist/src/render/blocks/prose.js +10 -0
- package/dist/src/render/blocks/prose.js.map +1 -0
- package/dist/src/render/blocks/quote.d.ts +18 -0
- package/dist/src/render/blocks/quote.d.ts.map +1 -0
- package/dist/src/render/blocks/quote.js +31 -0
- package/dist/src/render/blocks/quote.js.map +1 -0
- package/dist/src/render/blocks/stat-counter.d.ts +4 -0
- package/dist/src/render/blocks/stat-counter.d.ts.map +1 -0
- package/dist/src/render/blocks/stat-counter.js +23 -0
- package/dist/src/render/blocks/stat-counter.js.map +1 -0
- package/dist/src/render/blocks/stats.d.ts +4 -0
- package/dist/src/render/blocks/stats.d.ts.map +1 -0
- package/dist/src/render/blocks/stats.js +23 -0
- package/dist/src/render/blocks/stats.js.map +1 -0
- package/dist/src/render/blocks/testimonial.d.ts +16 -0
- package/dist/src/render/blocks/testimonial.d.ts.map +1 -0
- package/dist/src/render/blocks/testimonial.js +25 -0
- package/dist/src/render/blocks/testimonial.js.map +1 -0
- package/dist/src/render/chrome.d.ts +3 -0
- package/dist/src/render/chrome.d.ts.map +1 -0
- package/dist/src/render/chrome.js +101 -0
- package/dist/src/render/chrome.js.map +1 -0
- package/dist/src/render/render-block.d.ts +24 -0
- package/dist/src/render/render-block.d.ts.map +1 -0
- package/dist/src/render/render-block.js +108 -0
- package/dist/src/render/render-block.js.map +1 -0
- package/dist/src/render/term-archive.d.ts +12 -0
- package/dist/src/render/term-archive.d.ts.map +1 -0
- package/dist/src/render/term-archive.js +34 -0
- package/dist/src/render/term-archive.js.map +1 -0
- package/dist/theme.config.d.ts +16 -0
- package/dist/theme.config.d.ts.map +1 -0
- package/dist/theme.config.js +46 -0
- package/dist/theme.config.js.map +1 -0
- package/package.json +57 -0
- package/src/index.ts +15 -0
- package/src/render/blocks/accordion.ts +60 -0
- package/src/render/blocks/collection-list.ts +122 -0
- package/src/render/blocks/cta.ts +48 -0
- package/src/render/blocks/embed.ts +115 -0
- package/src/render/blocks/faq.ts +61 -0
- package/src/render/blocks/feature-grid.ts +73 -0
- package/src/render/blocks/gallery.ts +48 -0
- package/src/render/blocks/hero.ts +60 -0
- package/src/render/blocks/logo-strip.ts +36 -0
- package/src/render/blocks/logos.ts +60 -0
- package/src/render/blocks/media-figure.ts +43 -0
- package/src/render/blocks/pricing-table.ts +77 -0
- package/src/render/blocks/prose.ts +11 -0
- package/src/render/blocks/quote.ts +48 -0
- package/src/render/blocks/stat-counter.ts +45 -0
- package/src/render/blocks/stats.ts +50 -0
- package/src/render/blocks/testimonial.ts +41 -0
- package/src/render/chrome.ts +128 -0
- package/src/render/render-block.ts +144 -0
- package/src/render/term-archive.ts +80 -0
- package/src/styles/archive.css +68 -0
- package/src/styles/base.css +895 -0
- package/src/styles/blocks.css +1433 -0
- package/src/styles/theme.css +36 -0
- package/src/styles/tokens.css +326 -0
- package/tokens.json +36 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { aspectRatio, h } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* Nothing here contacts a third party before the visitor has consented.
|
|
4
|
+
*
|
|
5
|
+
* When `consentRequired` is true the block renders a self-contained card and
|
|
6
|
+
* an outbound link — no `<iframe>`, no `<script>`, no preconnect, no poster
|
|
7
|
+
* image fetched from the provider. An embed that "only" loads a thumbnail
|
|
8
|
+
* has already handed the visitor's IP address and a cookie to the provider,
|
|
9
|
+
* which is the exact transfer consent was supposed to gate.
|
|
10
|
+
*
|
|
11
|
+
* The theme ships no consent *button*, because it ships no JavaScript:
|
|
12
|
+
* granting consent is a site-wide decision that belongs to the consent
|
|
13
|
+
* layer, not to a block. Until that layer exists, the card is the honest
|
|
14
|
+
* rendering — it says what would be loaded and lets the visitor go there
|
|
15
|
+
* deliberately. The card is framed the same way `mediaFigure` and `gallery`
|
|
16
|
+
* are (a thin bordered plate with a small provider tag), so the three read
|
|
17
|
+
* as one family of "media placeholder" treatments.
|
|
18
|
+
*/
|
|
19
|
+
/** `null` means "this provider has no embeddable frame we trust". */
|
|
20
|
+
function frameSource(provider, rawUrl) {
|
|
21
|
+
const url = URL.parse(rawUrl);
|
|
22
|
+
if (url === null)
|
|
23
|
+
return null;
|
|
24
|
+
const segments = url.pathname.split('/').filter((segment) => segment !== '');
|
|
25
|
+
switch (provider) {
|
|
26
|
+
case 'youtube': {
|
|
27
|
+
// `youtube-nocookie.com` is the privacy-preserving host, and the only
|
|
28
|
+
// one this theme will point an iframe at.
|
|
29
|
+
const id = url.hostname.endsWith('youtu.be')
|
|
30
|
+
? segments[0]
|
|
31
|
+
: (url.searchParams.get('v') ?? segments[1]);
|
|
32
|
+
return id === undefined || id === null ? null : `https://www.youtube-nocookie.com/embed/${id}`;
|
|
33
|
+
}
|
|
34
|
+
case 'vimeo': {
|
|
35
|
+
const id = segments.find((segment) => /^\d+$/.test(segment));
|
|
36
|
+
return id === undefined ? null : `https://player.vimeo.com/video/${id}`;
|
|
37
|
+
}
|
|
38
|
+
case 'dailymotion': {
|
|
39
|
+
const id = url.hostname.endsWith('dai.ly') ? segments[0] : segments[segments.length - 1];
|
|
40
|
+
return id === undefined ? null : `https://geo.dailymotion.com/player.html?video=${id}`;
|
|
41
|
+
}
|
|
42
|
+
case 'spotify': {
|
|
43
|
+
const [kind, id] = segments;
|
|
44
|
+
return kind === undefined || id === undefined
|
|
45
|
+
? null
|
|
46
|
+
: `https://open.spotify.com/embed/${kind}/${id}`;
|
|
47
|
+
}
|
|
48
|
+
case 'soundcloud':
|
|
49
|
+
return `https://w.soundcloud.com/player/?url=${encodeURIComponent(rawUrl)}`;
|
|
50
|
+
default:
|
|
51
|
+
// bluesky, mastodon, other: a post embed is a script tag, which this
|
|
52
|
+
// theme does not load. The link card is the rendering.
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function consentCard(block, ctx, reason) {
|
|
57
|
+
return h('div', { class: 'cg-embed__placeholder' }, h('p', { class: 'cg-embed__provider', 'aria-hidden': 'true' }, block.provider), h('p', { class: 'cg-embed__notice' }, reason), h('a', {
|
|
58
|
+
class: 'cg-embed__link',
|
|
59
|
+
href: ctx.link(block.url),
|
|
60
|
+
rel: 'noopener noreferrer nofollow',
|
|
61
|
+
}, ctx.t('embed.open', { provider: block.provider })));
|
|
62
|
+
}
|
|
63
|
+
export function renderEmbed(block, ctx) {
|
|
64
|
+
const source = block.consentRequired ? null : frameSource(block.provider, block.url);
|
|
65
|
+
// Video providers are 16:9 unless the editor framed them otherwise;
|
|
66
|
+
// without a ratio the frame would collapse and shift the layout as it
|
|
67
|
+
// loads.
|
|
68
|
+
const ratio = aspectRatio(block.ratio) ?? '16 / 9';
|
|
69
|
+
return h('div', {
|
|
70
|
+
class: 'cg-embed',
|
|
71
|
+
'data-block': 'embed',
|
|
72
|
+
'data-provider': block.provider,
|
|
73
|
+
'data-consent': block.consentRequired ? 'required' : 'not-required',
|
|
74
|
+
style: `--cg-ratio:${ratio}`,
|
|
75
|
+
}, source === null
|
|
76
|
+
? consentCard(block, ctx, block.consentRequired
|
|
77
|
+
? ctx.t('embed.consentRequired', { provider: block.provider })
|
|
78
|
+
: ctx.t('embed.unsupported', { provider: block.provider }))
|
|
79
|
+
: h('iframe', {
|
|
80
|
+
class: 'cg-embed__frame',
|
|
81
|
+
src: source,
|
|
82
|
+
// An iframe with no accessible name is announced as "frame" and
|
|
83
|
+
// nothing else. WCAG 4.1.2, and the single most common embed
|
|
84
|
+
// defect.
|
|
85
|
+
title: ctx.t('embed.title', { provider: block.provider }),
|
|
86
|
+
loading: 'lazy',
|
|
87
|
+
referrerpolicy: 'strict-origin-when-cross-origin',
|
|
88
|
+
allow: 'accelerometer; clipboard-write; encrypted-media; picture-in-picture; fullscreen',
|
|
89
|
+
allowfullscreen: true,
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=embed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed.js","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAoB,CAAC,EAAsB,MAAM,oBAAoB,CAAA;AAEzF;;;;;;;;;;;;;;;;GAgBG;AAEH,qEAAqE;AACrE,SAAS,WAAW,CAAC,QAAgC,EAAE,MAAc;IACnE,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC7B,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC7B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAA;IAE5E,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,SAAS,EAAE,CAAC;YACf,sEAAsE;YACtE,0CAA0C;YAC1C,MAAM,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;g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AAK,IAAI;QACb,CAAC,CAAC,WAAW,CACT,KAAK,EACL,GAAG,EACH,KAAK,CAAC,eAAe;YACnB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC9D,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAC7D;QACH,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACV,KAAK,EAAE,iBAAiB;YACxB,GAAG,EAAE,MAAM;YACX,gEAAgE;YAChE,6DAA6D;YAC7D,UAAU;YACV,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzD,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,iCAAiC;YACjD,KAAK,EAAE,iFAAiF;YACxF,eAAe,EAAE,IAAI;SACtB,CAAC,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faq.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/faq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAW,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAmC3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB1E"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { blockHeadingTag, h, heading, renderRichText, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* `<details>`/`<summary>` rather than a scripted accordion: expanding,
|
|
4
|
+
* keyboard operation, and the expanded state announced to assistive
|
|
5
|
+
* technology all come from the browser, at zero bytes of JavaScript.
|
|
6
|
+
*
|
|
7
|
+
* Each row carries a numeral (`01`, `02`, …) ahead of the question — the
|
|
8
|
+
* same indexing language `featureGrid` uses — and the disclosure affordance
|
|
9
|
+
* is a plus/minus mark drawn from two CSS borders, not an icon font.
|
|
10
|
+
*
|
|
11
|
+
* The question is plain text inside `<summary>`, never a heading: a heading
|
|
12
|
+
* nested in a `<summary>` renders inconsistently across screen readers, and
|
|
13
|
+
* the questions are already reachable as a list under the block's own
|
|
14
|
+
* heading.
|
|
15
|
+
*/
|
|
16
|
+
function renderItem(item, ctx, index) {
|
|
17
|
+
const number = String(index + 1).padStart(2, '0');
|
|
18
|
+
return h('li', { class: 'cg-faq__item' }, h('details', { class: 'cg-faq__details' }, h('summary', { class: 'cg-faq__question' }, h('span', { class: 'cg-faq__index', 'aria-hidden': 'true' }, number), h('span', { class: 'cg-faq__question-text' }, item.question)), h('div', { class: 'cg-faq__answer' }, renderRichText(ctx, item.answer))));
|
|
19
|
+
}
|
|
20
|
+
export function renderFaq(block, ctx) {
|
|
21
|
+
return h('section', { class: 'cg-faq', 'data-block': 'faq' }, block.title === undefined
|
|
22
|
+
? null
|
|
23
|
+
: heading(blockHeadingTag('faq') ?? 'h2', { class: 'cg-faq__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-faq__items' }, block.items.map((item, index) => renderItem(item, ctx, index))));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=faq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faq.js","sourceRoot":"","sources":["../../../../src/render/blocks/faq.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,EAEP,cAAc,GACf,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;GAaG;AACH,SAAS,UAAU,CAAC,IAAa,EAAE,GAAkB,EAAE,KAAa;IAClE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,C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2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
export declare function renderFeatureGrid(block: FeatureGridBlock, ctx: RenderContext): HtmlElement;
|
|
4
|
+
//# sourceMappingURL=feature-grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-grid.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/feature-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAGL,KAAK,WAAW,EAKhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AA0C3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB1F"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { blockHeadingTag, h, heading, href, nestedHeadingTag, renderIcon, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* This theme's "our services" section — a card grid, each card led by a
|
|
4
|
+
* real inline glyph (`renderIcon`) inside a flat, accent-tinted square, the
|
|
5
|
+
* B2B "capability card" register a consultancy or software vendor's
|
|
6
|
+
* services page uses, replacing the numbered ledger rows this block used to
|
|
7
|
+
* render (a plain list read as a table of contents, not as a services
|
|
8
|
+
* pitch a visitor scans in one pass).
|
|
9
|
+
*
|
|
10
|
+
* Capped at three columns on a wide screen — a six-item grid staying 3×2
|
|
11
|
+
* rather than drifting to four columns plus two orphans, the same
|
|
12
|
+
* discipline `theme-saas`'s own `featureGrid` holds.
|
|
13
|
+
*
|
|
14
|
+
* As in every other theme, the item's title carries the link so the link's
|
|
15
|
+
* accessible name is the feature's own name (WCAG 2.4.4) — the block has no
|
|
16
|
+
* separate label field to write a "learn more" with anyway.
|
|
17
|
+
*/
|
|
18
|
+
function renderItem(item, ctx, tag) {
|
|
19
|
+
const title = item.link === undefined
|
|
20
|
+
? heading(tag, { class: 'cg-service__title' }, item.title)
|
|
21
|
+
: heading(tag, { class: 'cg-service__title' }, h('a', { class: 'cg-service__link', href: href(ctx, item.link) }, item.title));
|
|
22
|
+
return h('li', { class: 'cg-service' }, item.icon === undefined
|
|
23
|
+
? null
|
|
24
|
+
: h('span', { class: 'cg-service__icon', 'data-icon': item.icon, 'aria-hidden': 'true' }, renderIcon(item.icon)), title, item.text === undefined ? null : h('p', { class: 'cg-service__text' }, item.text));
|
|
25
|
+
}
|
|
26
|
+
export function renderFeatureGrid(block, ctx) {
|
|
27
|
+
const hasTitle = block.title !== undefined;
|
|
28
|
+
const itemTag = nestedHeadingTag('featureGrid', hasTitle);
|
|
29
|
+
return h('section', { class: 'cg-services', 'data-block': 'featureGrid' }, hasTitle
|
|
30
|
+
? heading(blockHeadingTag('featureGrid') ?? 'h2', { class: 'cg-services__title', 'data-field': 'title' }, block.title ?? '')
|
|
31
|
+
: null, h('ul', { class: 'cg-services__items' }, block.items.map((item) => renderItem(item, ctx, itemTag))));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=feature-grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-grid.js","sourceRoot":"","sources":["../../../../src/render/blocks/feature-grid.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAGf,CAAC,EACD,OAAO,EACP,IAAI,EACJ,gBAAgB,EAEhB,UAAU,GACX,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;;;GAeG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,KAAK,SAAS;QACrB,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC;QAC1D,CAAC,CAAC,OAAO,CACL,GAAG,EACH,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,CAAC,CAAC,GAAG,EA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C,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAC1D,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GalleryBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* Ships **no JavaScript**. A scroll-snapping list gives touch swiping,
|
|
5
|
+
* trackpad scrolling and — because the list is focusable and labelled —
|
|
6
|
+
* arrow-key scrolling, with none of the failure modes of a scripted
|
|
7
|
+
* carousel: no auto-advance to fight (WCAG 2.2.2), no focus stolen from an
|
|
8
|
+
* off-screen slide, and it still works before any styling loads.
|
|
9
|
+
*
|
|
10
|
+
* Each tile is a thin-bordered plate rather than a shadowed, fully-rounded
|
|
11
|
+
* card — consistent with the framed treatment `mediaFigure` and `embed`
|
|
12
|
+
* use, so a page mixing all three reads as one system.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderGallery(block: GalleryBlock, ctx: RenderContext): HtmlElement;
|
|
15
|
+
//# sourceMappingURL=gallery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/gallery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEnF;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiClF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* Ships **no JavaScript**. A scroll-snapping list gives touch swiping,
|
|
4
|
+
* trackpad scrolling and — because the list is focusable and labelled —
|
|
5
|
+
* arrow-key scrolling, with none of the failure modes of a scripted
|
|
6
|
+
* carousel: no auto-advance to fight (WCAG 2.2.2), no focus stolen from an
|
|
7
|
+
* off-screen slide, and it still works before any styling loads.
|
|
8
|
+
*
|
|
9
|
+
* Each tile is a thin-bordered plate rather than a shadowed, fully-rounded
|
|
10
|
+
* card — consistent with the framed treatment `mediaFigure` and `embed`
|
|
11
|
+
* use, so a page mixing all three reads as one system.
|
|
12
|
+
*/
|
|
13
|
+
export function renderGallery(block, ctx) {
|
|
14
|
+
const items = h('ul', { class: 'cg-gallery__items' }, block.items.map((item) => h('li', { class: 'cg-gallery__item' }, image(ctx, item.media, { sizes: '(min-width: 48rem) 22rem, 60vw' }))));
|
|
15
|
+
return h('section', {
|
|
16
|
+
class: 'cg-gallery',
|
|
17
|
+
'data-block': 'gallery',
|
|
18
|
+
'data-layout': block.layout,
|
|
19
|
+
}, block.layout === 'carousel'
|
|
20
|
+
? h('div', {
|
|
21
|
+
class: 'cg-gallery__viewport',
|
|
22
|
+
role: 'region',
|
|
23
|
+
'aria-label': ctx.t('gallery.carousel'),
|
|
24
|
+
tabindex: '0',
|
|
25
|
+
}, items)
|
|
26
|
+
: items);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../../src/render/blocks/gallery.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AAEnF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAC,KAAmB,EAAE,GAAkB;IACnE,MAAM,KAAK,GAAG,CAAC,CACb,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACvB,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC,CACpE,CACF,CACF,CAAA;IAED,OAAO,CAAC,CACN,SAAS,EACT;QACE,KAAK,EAAE,YAAY;QACnB,YAAY,EAAE,SAAS;QACvB,aAAa,EAAE,KAAK,CAAC,MAAM;KAC5B,EACD,KAAK,CAAC,MAAM,KAAK,UAAU;QACzB,CAAC,CAAC,CAAC,CACC,KAAK,EACL;YACE,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC;YACvC,QAAQ,EAAE,GAAG;SACd,EACD,KAAK,CACN;QACH,CAAC,CAAC,KAAK,CACV,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HeroBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* The hero carries the page's `h1` (contract B: `headingLevel: 'h1'`), so
|
|
5
|
+
* `renderPage` relies on it to avoid emitting a second one.
|
|
6
|
+
*
|
|
7
|
+
* Structurally distinct from a centred/split "marketing" hero: the eyebrow,
|
|
8
|
+
* title, subtitle and actions sit in a single left-aligned column with a
|
|
9
|
+
* vertical accent rule (`cg-hero__mark`) standing beside the copy — the
|
|
10
|
+
* "confident report cover" read the aesthetic direction asks for — while the
|
|
11
|
+
* media sits in its own bordered frame with corner marks, never behind a
|
|
12
|
+
* decorative gradient wash.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderHero(block: HeroBlock, ctx: RenderContext): HtmlElement;
|
|
15
|
+
//# sourceMappingURL=hero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAGL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAqC5E"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { actionList, blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* The hero carries the page's `h1` (contract B: `headingLevel: 'h1'`), so
|
|
4
|
+
* `renderPage` relies on it to avoid emitting a second one.
|
|
5
|
+
*
|
|
6
|
+
* Structurally distinct from a centred/split "marketing" hero: the eyebrow,
|
|
7
|
+
* title, subtitle and actions sit in a single left-aligned column with a
|
|
8
|
+
* vertical accent rule (`cg-hero__mark`) standing beside the copy — the
|
|
9
|
+
* "confident report cover" read the aesthetic direction asks for — while the
|
|
10
|
+
* media sits in its own bordered frame with corner marks, never behind a
|
|
11
|
+
* decorative gradient wash.
|
|
12
|
+
*/
|
|
13
|
+
export function renderHero(block, ctx) {
|
|
14
|
+
const tag = blockHeadingTag('hero') ?? 'h1';
|
|
15
|
+
return h('section', { class: 'cg-hero', 'data-block': 'hero' }, h('div', { class: 'cg-hero__intro' }, h('span', { class: 'cg-hero__mark', 'aria-hidden': 'true' }), h('div', { class: 'cg-hero__copy' }, block.eyebrow === undefined
|
|
16
|
+
? null
|
|
17
|
+
: h('p', { class: 'cg-hero__eyebrow', 'data-field': 'eyebrow' }, block.eyebrow), heading(tag, { class: 'cg-hero__title', 'data-field': 'title' }, block.title), block.subtitle === undefined
|
|
18
|
+
? null
|
|
19
|
+
: h('p', { class: 'cg-hero__subtitle', 'data-field': 'subtitle' }, block.subtitle), actionList(ctx, block.actions, ctx.t('hero.actions')))), block.media === undefined
|
|
20
|
+
? null
|
|
21
|
+
: h('div', { class: 'cg-hero__frame' },
|
|
22
|
+
// The only image above the fold by construction, so the only one
|
|
23
|
+
// that must not be lazy — a lazy-loaded LCP element is a measured
|
|
24
|
+
// Lighthouse regression, not a theoretical one.
|
|
25
|
+
image(ctx, block.media, {
|
|
26
|
+
className: 'cg-hero__media',
|
|
27
|
+
loading: 'eager',
|
|
28
|
+
sizes: '(min-width: 64rem) 46vw, 100vw',
|
|
29
|
+
})));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero.js","sourceRoot":"","sources":["../../../../src/render/blocks/hero.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EAEf,CAAC,EACD,OAAO,EACP,KAAK,GAEN,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU,CAAC,KAAgB,EAAE,GAAkB;IAC7D,MAAM,GAAG,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;IAC3C,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,EAC1C,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,EAC5D,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,KAAK,CAAC,OAAO,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EACjF,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,EAC7E,KAAK,CAAC,QAAQ,KAAK,SAAS;QAC1B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,EACpF,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CACtD,CACF,EACD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE;QAC3B,iEAAiE;QACjE,kEAAkE;QAClE,gDAAgD;QAChD,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;YACtB,SAAS,EAAE,gBAAgB;YAC3B,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,gCAAgC;SACxC,CAAC,CACH,CACN,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-strip.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logo-strip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAqBnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAatF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* `blocks@2.0` (RFC 0001). The lighter-weight "as seen in" / social-proof row
|
|
4
|
+
* next to `logos`: no per-logo name or link, so no accessible-name field to
|
|
5
|
+
* require — each image's own alt text (set once, in the media library)
|
|
6
|
+
* names it, exactly as `logos` already falls back to when a link is absent.
|
|
7
|
+
*
|
|
8
|
+
* Unlike `logos`'s held-back-until-hovered grayscale treatment, this strip
|
|
9
|
+
* renders every mark at full colour and even weight in a single row — the
|
|
10
|
+
* quieter, denser "as seen in" convention, distinct from the client-cards
|
|
11
|
+
* feel `logos` is built for.
|
|
12
|
+
*/
|
|
13
|
+
function renderItem(item, ctx) {
|
|
14
|
+
return h('li', { class: 'cg-logo-band__item' }, image(ctx, item.media, { className: 'cg-logo-band__image', variant: { fit: 'contain' } }));
|
|
15
|
+
}
|
|
16
|
+
export function renderLogoStrip(block, ctx) {
|
|
17
|
+
return h('figure', { class: 'cg-logo-band', 'data-block': 'logoStrip' }, h('ul', { class: 'cg-logo-band__items' }, block.logos.map((item) => renderItem(item, ctx))), block.caption === undefined
|
|
18
|
+
? null
|
|
19
|
+
: h('figcaption', { class: 'cg-logo-band__caption', 'data-field': 'caption' }, block.caption));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=logo-strip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-strip.js","sourceRoot":"","sources":["../../../../src/render/blocks/logo-strip.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AAEnF;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CAAC,IAAmB,EAAE,GAAkB;IACzD,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,CAC1F,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,GAAkB;IACvE,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,EACpD,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAChC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,EACD,KAAK,CAAC,OAAO,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAChG,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logos.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAEL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAkC3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB9E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* A "trusted by" client strip. Contract B says the organisation's name **is**
|
|
4
|
+
* the accessible name of the link, so the logo image carries it as `alt`
|
|
5
|
+
* text when the media entity has none, and no visually hidden duplicate is
|
|
6
|
+
* added: a link whose only content is an image with `alt` text is already
|
|
7
|
+
* named.
|
|
8
|
+
*
|
|
9
|
+
* The restrained, grayscale-leaning treatment (`filter: grayscale()` in the
|
|
10
|
+
* stylesheet) is the "held back until hovered" client-logo language the
|
|
11
|
+
* aesthetic direction calls for — a `filter`, never `grayscale` baked into
|
|
12
|
+
* the media itself, since the underlying asset still arrives as a real
|
|
13
|
+
* `<img>` from `image()`.
|
|
14
|
+
*/
|
|
15
|
+
function renderItem(item, ctx) {
|
|
16
|
+
const logo = image(ctx, item.media, {
|
|
17
|
+
className: 'cg-clients__logo',
|
|
18
|
+
altFrom: item.name,
|
|
19
|
+
variant: { fit: 'contain' },
|
|
20
|
+
});
|
|
21
|
+
return h('li', { class: 'cg-clients__item' }, item.url === undefined
|
|
22
|
+
? logo
|
|
23
|
+
: h('a', { class: 'cg-clients__link', href: ctx.link(item.url), rel: 'noopener noreferrer' }, logo));
|
|
24
|
+
}
|
|
25
|
+
export function renderLogos(block, ctx) {
|
|
26
|
+
return h('section', { class: 'cg-clients', 'data-block': 'logos' }, block.title === undefined
|
|
27
|
+
? null
|
|
28
|
+
: heading(blockHeadingTag('logos') ?? 'h2', { class: 'cg-clients__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-clients__items' }, block.items.map((item) => renderItem(item, ctx))));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=logos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logos.js","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,EACP,KAAK,GAEN,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;GAYG;AACH,SAAS,UAAU,CAAC,IAAc,EAAE,GAAkB;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;QAClC,SAAS,EAAE,kBAAkB;QAC7B,OAAO,EAAE,IAAI,CAAC,IAAI;QAClB,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE;KAC5B,CAAC,CAAA;IACF,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,IAAI,CAAC,GAAG,KAAK,SAAS;QACpB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,EACnF,IAAI,CACL,CACN,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,EAC9C,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAChC,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MediaFigureBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* `<figure>`/`<figcaption>`, matching the pattern the HTML spec prescribes for
|
|
5
|
+
* an image and its own caption — a `<figcaption>` outside the `<figure>` would
|
|
6
|
+
* lose that association for assistive technology.
|
|
7
|
+
*
|
|
8
|
+
* The frame reads as a bordered plate with a small caption rule underneath,
|
|
9
|
+
* distinct from a floated/rounded treatment: the "structured, edged"
|
|
10
|
+
* language this theme uses everywhere a picture appears.
|
|
11
|
+
*/
|
|
12
|
+
export declare function renderMediaFigure(block: MediaFigureBlock, ctx: RenderContext): HtmlElement;
|
|
13
|
+
//# sourceMappingURL=media-figure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-figure.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/media-figure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAe,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEhG;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA8B1F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { aspectRatio, h, image } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* `<figure>`/`<figcaption>`, matching the pattern the HTML spec prescribes for
|
|
4
|
+
* an image and its own caption — a `<figcaption>` outside the `<figure>` would
|
|
5
|
+
* lose that association for assistive technology.
|
|
6
|
+
*
|
|
7
|
+
* The frame reads as a bordered plate with a small caption rule underneath,
|
|
8
|
+
* distinct from a floated/rounded treatment: the "structured, edged"
|
|
9
|
+
* language this theme uses everywhere a picture appears.
|
|
10
|
+
*/
|
|
11
|
+
export function renderMediaFigure(block, ctx) {
|
|
12
|
+
const ratio = aspectRatio(block.ratio);
|
|
13
|
+
const hasCaption = block.caption !== undefined || block.credit !== undefined;
|
|
14
|
+
return h('figure', {
|
|
15
|
+
class: 'cg-figure',
|
|
16
|
+
'data-block': 'mediaFigure',
|
|
17
|
+
'data-align': block.align ?? 'center',
|
|
18
|
+
style: ratio === undefined ? undefined : `--cg-ratio:${ratio}`,
|
|
19
|
+
}, h('div', { class: 'cg-figure__frame' }, image(ctx, block.media, {
|
|
20
|
+
className: 'cg-figure__media',
|
|
21
|
+
sizes: '(min-width: 48rem) 42rem, 100vw',
|
|
22
|
+
})), hasCaption
|
|
23
|
+
? h('figcaption', { class: 'cg-figure__caption' }, block.caption, block.credit === undefined
|
|
24
|
+
? null
|
|
25
|
+
: h('span', { class: 'cg-figure__credit', 'data-field': 'credit' }, block.credit))
|
|
26
|
+
: null);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=media-figure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-figure.js","sourceRoot":"","sources":["../../../../src/render/blocks/media-figure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AAEhG;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,GAAkB;IAC3E,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACtC,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CAAA;IAC5E,OAAO,CAAC,CACN,QAAQ,EACR;QACE,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,aAAa;QAC3B,YAAY,EAAE,KAAK,CAAC,KAAK,IAAI,QAAQ;QACrC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,KAAK,EAAE;KAC/D,EACD,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;QACtB,SAAS,EAAE,kBAAkB;QAC7B,KAAK,EAAE,iCAAiC;KACzC,CAAC,CACH,EACD,UAAU;QACR,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CACpF;QACH,CAAC,CAAC,IAAI,CACT,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PricingTableBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
export declare function renderPricingTable(block: PricingTableBlock, ctx: RenderContext): HtmlElement;
|
|
4
|
+
//# sourceMappingURL=pricing-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing-table.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/pricing-table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAe,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAIL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AA+C3B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB5F"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { actionLink, blockHeadingTag, h, heading, nestedHeadingTag, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* `blocks@2.0` (RFC 0001). A side-by-side plan comparison — the ledger-row
|
|
4
|
+
* language this theme uses for `featureGrid` would flatten the very
|
|
5
|
+
* distinction a pricing table exists to show, so tiers instead sit as a row
|
|
6
|
+
* of bordered plates, one plate lifted (border + a small "recommended" rule)
|
|
7
|
+
* when `highlighted` is set.
|
|
8
|
+
*
|
|
9
|
+
* `highlighted` is an editorial signal, never a colour: it becomes
|
|
10
|
+
* `data-highlighted` for the stylesheet to key off, and `aria-current` so the
|
|
11
|
+
* emphasis is announced, not only shown.
|
|
12
|
+
*/
|
|
13
|
+
function renderTier(tier, ctx, tag) {
|
|
14
|
+
return h('li', {
|
|
15
|
+
class: 'cg-pricing__tier',
|
|
16
|
+
'data-highlighted': tier.highlighted === true ? 'true' : undefined,
|
|
17
|
+
'aria-current': tier.highlighted === true ? 'true' : undefined,
|
|
18
|
+
}, heading(tag, { class: 'cg-pricing__name' }, tier.name), h('p', { class: 'cg-pricing__price' }, h('span', { class: 'cg-pricing__amount' }, tier.price), tier.interval === undefined
|
|
19
|
+
? null
|
|
20
|
+
: h('span', { class: 'cg-pricing__interval' }, tier.interval)), tier.features.length === 0
|
|
21
|
+
? null
|
|
22
|
+
: h('ul', { class: 'cg-pricing__features' }, tier.features.map((feature) => h('li', { class: 'cg-pricing__feature' }, feature))), tier.action === undefined
|
|
23
|
+
? null
|
|
24
|
+
: h('div', { class: 'cg-pricing__action' }, actionLink(ctx, { ...tier.action, emphasis: tier.action.emphasis ?? 'primary' })));
|
|
25
|
+
}
|
|
26
|
+
export function renderPricingTable(block, ctx) {
|
|
27
|
+
const hasTitle = block.title !== undefined;
|
|
28
|
+
const tierTag = nestedHeadingTag('pricingTable', hasTitle);
|
|
29
|
+
return h('section', { class: 'cg-pricing', 'data-block': 'pricingTable' }, hasTitle
|
|
30
|
+
? heading(blockHeadingTag('pricingTable') ?? 'h2', { class: 'cg-pricing__title', 'data-field': 'title' }, block.title ?? '')
|
|
31
|
+
: null, h('ul', { class: 'cg-pricing__tiers' }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=pricing-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing-table.js","sourceRoot":"","sources":["../../../../src/render/blocks/pricing-table.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EAGf,CAAC,EACD,OAAO,EACP,gBAAgB,GAEjB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,OAAO,CAAC,CACN,IAAI,EACJ;QACE,KAAK,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AAED,MAAM,UAAU,kBAAkB,CAAC,KAAwB,EAAE,GAAkB;IAC7E,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;IAC1C,MAAM,OAAO,GAAG,gBAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAA;IAC1D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,EACrD,QAAQ;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,cAAc,CAAC,IAAI,IAAI,EACvC,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,KAAK,CAAC,KAAK,IAAI,EAAE,CAClB;QACH,CAAC,CAAC,IAAI,EACR,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAC1D,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ProseBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* `prose` declares `headingLevel: 'none'`: it contributes no heading of its
|
|
5
|
+
* own. Whatever headings appear come from the rich text document, whose
|
|
6
|
+
* vocabulary starts at `h2`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function renderProse(block: ProseBlock, ctx: RenderContext): HtmlElement;
|
|
9
|
+
//# sourceMappingURL=prose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AAE5F;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAE9E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { h, renderRichText } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* `prose` declares `headingLevel: 'none'`: it contributes no heading of its
|
|
4
|
+
* own. Whatever headings appear come from the rich text document, whose
|
|
5
|
+
* vocabulary starts at `h2`.
|
|
6
|
+
*/
|
|
7
|
+
export function renderProse(block, ctx) {
|
|
8
|
+
return h('div', { class: 'cg-prose', 'data-block': 'prose' }, renderRichText(ctx, block.body));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=prose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose.js","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAsB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAE5F;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;AAChG,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { QuoteBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* A testimonial card, not a centred pull-quote: a bordered panel with a
|
|
5
|
+
* vertical accent rule beside the quotation and the attribution set below a
|
|
6
|
+
* thin divider — the shape a case-study or client-testimonial section takes
|
|
7
|
+
* on a serious B2B site.
|
|
8
|
+
*
|
|
9
|
+
* `<figure><blockquote>…</blockquote><figcaption>` is the attribution
|
|
10
|
+
* pattern the HTML spec prescribes: putting the author inside the
|
|
11
|
+
* `<blockquote>` would claim the author's name was part of what was said.
|
|
12
|
+
*
|
|
13
|
+
* The avatar is decorative here — the name sits right beside it in text —
|
|
14
|
+
* so its media entity's alt text is expected to be empty; `image` still
|
|
15
|
+
* writes the attribute either way (WCAG 1.1.1).
|
|
16
|
+
*/
|
|
17
|
+
export declare function renderQuote(block: QuoteBlock, ctx: RenderContext): HtmlElement;
|
|
18
|
+
//# sourceMappingURL=quote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/quote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEnF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA8B9E"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* A testimonial card, not a centred pull-quote: a bordered panel with a
|
|
4
|
+
* vertical accent rule beside the quotation and the attribution set below a
|
|
5
|
+
* thin divider — the shape a case-study or client-testimonial section takes
|
|
6
|
+
* on a serious B2B site.
|
|
7
|
+
*
|
|
8
|
+
* `<figure><blockquote>…</blockquote><figcaption>` is the attribution
|
|
9
|
+
* pattern the HTML spec prescribes: putting the author inside the
|
|
10
|
+
* `<blockquote>` would claim the author's name was part of what was said.
|
|
11
|
+
*
|
|
12
|
+
* The avatar is decorative here — the name sits right beside it in text —
|
|
13
|
+
* so its media entity's alt text is expected to be empty; `image` still
|
|
14
|
+
* writes the attribute either way (WCAG 1.1.1).
|
|
15
|
+
*/
|
|
16
|
+
export function renderQuote(block, ctx) {
|
|
17
|
+
const hasAttribution = block.author !== undefined || block.role !== undefined || block.avatar !== undefined;
|
|
18
|
+
return h('figure', { class: 'cg-quote', 'data-block': 'quote' }, h('blockquote', { class: 'cg-quote__text' }, h('p', { 'data-field': 'text' }, block.text)), hasAttribution
|
|
19
|
+
? h('figcaption', { class: 'cg-quote__attribution' }, block.avatar === undefined
|
|
20
|
+
? null
|
|
21
|
+
: image(ctx, block.avatar, {
|
|
22
|
+
className: 'cg-quote__avatar',
|
|
23
|
+
variant: { width: 96, height: 96, fit: 'cover' },
|
|
24
|
+
}), h('span', { class: 'cg-quote__who' }, block.author === undefined
|
|
25
|
+
? null
|
|
26
|
+
: h('span', { class: 'cg-quote__author', 'data-field': 'author' }, block.author), block.role === undefined
|
|
27
|
+
? null
|
|
28
|
+
: h('span', { class: 'cg-quote__role', 'data-field': 'role' }, block.role)))
|
|
29
|
+
: null);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=quote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quote.js","sourceRoot":"","sources":["../../../../src/render/blocks/quote.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AAEnF;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,MAAM,cAAc,GAClB,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CAAA;IACtF,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,EAC5C,CAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,EAC1F,cAAc;QACZ,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE;gBACvB,SAAS,EAAE,kBAAkB;gBAC7B,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE;aACjD,CAAC,EACN,CAAC,CACC,MAAM,EACN,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,EAClF,KAAK,CAAC,IAAI,KAAK,SAAS;YACtB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAC7E,CACF;QACH,CAAC,CAAC,IAAI,CACT,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StatCounterBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
export declare function renderStatCounter(block: StatCounterBlock, _ctx: RenderContext): HtmlElement;
|
|
4
|
+
//# sourceMappingURL=stat-counter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-counter.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAwB3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAa3F"}
|