@cogenta/theme-restaurant 0.3.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 +22 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +25 -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 +21 -0
- package/dist/src/render/blocks/accordion.js.map +1 -0
- package/dist/src/render/blocks/collection-list.d.ts +13 -0
- package/dist/src/render/blocks/collection-list.d.ts.map +1 -0
- package/dist/src/render/blocks/collection-list.js +109 -0
- package/dist/src/render/blocks/collection-list.js.map +1 -0
- package/dist/src/render/blocks/cta.d.ts +10 -0
- package/dist/src/render/blocks/cta.d.ts.map +1 -0
- package/dist/src/render/blocks/cta.js +13 -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 +82 -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 +17 -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 +24 -0
- package/dist/src/render/blocks/feature-grid.js.map +1 -0
- package/dist/src/render/blocks/gallery.d.ts +11 -0
- package/dist/src/render/blocks/gallery.d.ts.map +1 -0
- package/dist/src/render/blocks/gallery.js +20 -0
- package/dist/src/render/blocks/gallery.js.map +1 -0
- package/dist/src/render/blocks/hero.d.ts +16 -0
- package/dist/src/render/blocks/hero.d.ts.map +1 -0
- package/dist/src/render/blocks/hero.js +32 -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 +16 -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 +23 -0
- package/dist/src/render/blocks/logos.js.map +1 -0
- package/dist/src/render/blocks/media-figure.d.ts +9 -0
- package/dist/src/render/blocks/media-figure.d.ts.map +1 -0
- package/dist/src/render/blocks/media-figure.js +24 -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 +30 -0
- package/dist/src/render/blocks/pricing-table.js.map +1 -0
- package/dist/src/render/blocks/prose.d.ts +13 -0
- package/dist/src/render/blocks/prose.d.ts.map +1 -0
- package/dist/src/render/blocks/prose.js +14 -0
- package/dist/src/render/blocks/prose.js.map +1 -0
- package/dist/src/render/blocks/quote.d.ts +8 -0
- package/dist/src/render/blocks/quote.d.ts.map +1 -0
- package/dist/src/render/blocks/quote.js +21 -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 +15 -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 +21 -0
- package/dist/src/render/blocks/stats.js.map +1 -0
- package/dist/src/render/blocks/testimonial.d.ts +17 -0
- package/dist/src/render/blocks/testimonial.d.ts.map +1 -0
- package/dist/src/render/blocks/testimonial.js +26 -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 +108 -0
- package/dist/src/render/chrome.js.map +1 -0
- package/dist/src/render/render-block.d.ts +6 -0
- package/dist/src/render/render-block.d.ts.map +1 -0
- package/dist/src/render/render-block.js +118 -0
- package/dist/src/render/render-block.js.map +1 -0
- package/dist/src/render/term-archive.d.ts +10 -0
- package/dist/src/render/term-archive.d.ts.map +1 -0
- package/dist/src/render/term-archive.js +32 -0
- package/dist/src/render/term-archive.js.map +1 -0
- package/dist/theme.config.d.ts +11 -0
- package/dist/theme.config.d.ts.map +1 -0
- package/dist/theme.config.js +41 -0
- package/dist/theme.config.js.map +1 -0
- package/package.json +57 -0
- package/src/index.ts +24 -0
- package/src/render/blocks/accordion.ts +57 -0
- package/src/render/blocks/collection-list.ts +189 -0
- package/src/render/blocks/cta.ts +31 -0
- package/src/render/blocks/embed.ts +105 -0
- package/src/render/blocks/faq.ts +53 -0
- package/src/render/blocks/feature-grid.ts +61 -0
- package/src/render/blocks/gallery.ts +40 -0
- package/src/render/blocks/hero.ts +58 -0
- package/src/render/blocks/logo-strip.ts +35 -0
- package/src/render/blocks/logos.ts +53 -0
- package/src/render/blocks/media-figure.ts +39 -0
- package/src/render/blocks/pricing-table.ts +74 -0
- package/src/render/blocks/prose.ts +19 -0
- package/src/render/blocks/quote.ts +38 -0
- package/src/render/blocks/stat-counter.ts +37 -0
- package/src/render/blocks/stats.ts +48 -0
- package/src/render/blocks/testimonial.ts +42 -0
- package/src/render/chrome.ts +141 -0
- package/src/render/render-block.ts +156 -0
- package/src/render/term-archive.ts +78 -0
- package/src/styles/archive.css +84 -0
- package/src/styles/base.css +923 -0
- package/src/styles/blocks.css +975 -0
- package/src/styles/theme.css +36 -0
- package/src/styles/tokens.css +320 -0
- package/tokens.json +36 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { aspectRatio, h } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* Nothing here contacts a third party before the visitor has consented —
|
|
4
|
+
* this theme's own blueprint uses `provider: 'other'` for a map embed
|
|
5
|
+
* (`consentRequired: true`), which this renderer never has a trusted frame
|
|
6
|
+
* source for anyway, so it always renders the honest placeholder card below.
|
|
7
|
+
*
|
|
8
|
+
* When `consentRequired` is true (or the provider/URL cannot be turned into
|
|
9
|
+
* a trusted frame source) the block renders a self-contained card and an
|
|
10
|
+
* outbound link — no `<iframe>`, no `<script>`, no preconnect. An embed
|
|
11
|
+
* that "only" loads a thumbnail has already handed the visitor's IP address
|
|
12
|
+
* and a cookie to the provider, which is the exact transfer consent was
|
|
13
|
+
* supposed to gate. The theme ships no consent *button*, because it ships
|
|
14
|
+
* no JavaScript: granting consent is a site-wide decision that belongs to
|
|
15
|
+
* the consent layer, not to a block.
|
|
16
|
+
*/
|
|
17
|
+
/** `null` means "this provider has no embeddable frame we trust". */
|
|
18
|
+
function frameSource(provider, rawUrl) {
|
|
19
|
+
const url = URL.parse(rawUrl);
|
|
20
|
+
if (url === null)
|
|
21
|
+
return null;
|
|
22
|
+
const segments = url.pathname.split('/').filter((segment) => segment !== '');
|
|
23
|
+
switch (provider) {
|
|
24
|
+
case 'youtube': {
|
|
25
|
+
const id = url.hostname.endsWith('youtu.be')
|
|
26
|
+
? segments[0]
|
|
27
|
+
: (url.searchParams.get('v') ?? segments[1]);
|
|
28
|
+
return id === undefined || id === null ? null : `https://www.youtube-nocookie.com/embed/${id}`;
|
|
29
|
+
}
|
|
30
|
+
case 'vimeo': {
|
|
31
|
+
const id = segments.find((segment) => /^\d+$/.test(segment));
|
|
32
|
+
return id === undefined ? null : `https://player.vimeo.com/video/${id}`;
|
|
33
|
+
}
|
|
34
|
+
case 'dailymotion': {
|
|
35
|
+
const id = url.hostname.endsWith('dai.ly') ? segments[0] : segments[segments.length - 1];
|
|
36
|
+
return id === undefined ? null : `https://geo.dailymotion.com/player.html?video=${id}`;
|
|
37
|
+
}
|
|
38
|
+
case 'spotify': {
|
|
39
|
+
const [kind, id] = segments;
|
|
40
|
+
return kind === undefined || id === undefined
|
|
41
|
+
? null
|
|
42
|
+
: `https://open.spotify.com/embed/${kind}/${id}`;
|
|
43
|
+
}
|
|
44
|
+
case 'soundcloud':
|
|
45
|
+
return `https://w.soundcloud.com/player/?url=${encodeURIComponent(rawUrl)}`;
|
|
46
|
+
default:
|
|
47
|
+
// bluesky, mastodon, other (a map link, in this theme's own
|
|
48
|
+
// blueprint): the link card is the rendering.
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function consentCard(block, ctx, reason) {
|
|
53
|
+
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', {
|
|
54
|
+
class: 'cg-embed__link',
|
|
55
|
+
href: ctx.link(block.url),
|
|
56
|
+
rel: 'noopener noreferrer nofollow',
|
|
57
|
+
}, ctx.t('embed.open', { provider: block.provider })));
|
|
58
|
+
}
|
|
59
|
+
export function renderEmbed(block, ctx) {
|
|
60
|
+
const source = block.consentRequired ? null : frameSource(block.provider, block.url);
|
|
61
|
+
const ratio = aspectRatio(block.ratio) ?? '16 / 9';
|
|
62
|
+
return h('div', {
|
|
63
|
+
class: 'cg-embed',
|
|
64
|
+
'data-block': 'embed',
|
|
65
|
+
'data-provider': block.provider,
|
|
66
|
+
'data-consent': block.consentRequired ? 'required' : 'not-required',
|
|
67
|
+
style: `--cg-ratio:${ratio}`,
|
|
68
|
+
}, source === null
|
|
69
|
+
? consentCard(block, ctx, block.consentRequired
|
|
70
|
+
? ctx.t('embed.consentRequired', { provider: block.provider })
|
|
71
|
+
: ctx.t('embed.unsupported', { provider: block.provider }))
|
|
72
|
+
: h('iframe', {
|
|
73
|
+
class: 'cg-embed__frame',
|
|
74
|
+
src: source,
|
|
75
|
+
title: ctx.t('embed.title', { provider: block.provider }),
|
|
76
|
+
loading: 'lazy',
|
|
77
|
+
referrerpolicy: 'strict-origin-when-cross-origin',
|
|
78
|
+
allow: 'accelerometer; clipboard-write; encrypted-media; picture-in-picture; fullscreen',
|
|
79
|
+
allowfullscreen: true,
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
//# 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;;;;;;;;;;;;;;GAcG;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,MAAM,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAC1C,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACb,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YAC9C,OAAO,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,0CAA0C,EAAE,EAAE,CAAA;QAChG,CAAC;QACD,KAAK,OAAO,EAAE,CAAC;YACb,MAAM,EAAE,GAAG,QAAQ,CAAC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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;AA2B3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB1E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { blockHeadingTag, h, heading, renderRichText, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* `<details>`/`<summary>` — zero bytes of JavaScript. Kept visually distinct
|
|
4
|
+
* from `accordion` (this theme's own "Hours & location"): each question
|
|
5
|
+
* carries a small serif numeral rather than the plus/minus mark, the
|
|
6
|
+
* "questions before you book" register of a restaurant's own FAQ.
|
|
7
|
+
*/
|
|
8
|
+
function renderItem(item, ctx, index) {
|
|
9
|
+
const number = String(index + 1).padStart(2, '0');
|
|
10
|
+
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))));
|
|
11
|
+
}
|
|
12
|
+
export function renderFaq(block, ctx) {
|
|
13
|
+
return h('section', { class: 'cg-faq', 'data-block': 'faq' }, block.title === undefined
|
|
14
|
+
? null
|
|
15
|
+
: 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))));
|
|
16
|
+
}
|
|
17
|
+
//# 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;;;;;GAKG;AACH,SAAS,UAAU,CAAC,IAAa,EAAE,GAAkB,EAAE,KAAa;IAClE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IACjD,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,cAAc,EAAE,EACzB,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EACpE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAC7D,EACD,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CACxE,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,EACxC,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,KAAK,CAAC,IAAI,IAAI,EAC9B,EAAE,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EACjD,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,CAC/D,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FeatureGridBlock } from '@cogenta/blocks';
|
|
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;AA8B3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB1F"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { blockHeadingTag, h, heading, href, nestedHeadingTag, renderIcon, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* A row of three centred columns, each topped by a thin circular icon mark —
|
|
4
|
+
* the "how we cook" / "what makes this kitchen" convention, never a boxed
|
|
5
|
+
* feature card.
|
|
6
|
+
*/
|
|
7
|
+
function renderItem(item, ctx, tag) {
|
|
8
|
+
const title = item.link === undefined
|
|
9
|
+
? heading(tag, { class: 'cg-craft__title' }, item.title)
|
|
10
|
+
: heading(tag, { class: 'cg-craft__title' }, h('a', { class: 'cg-craft__link', href: href(ctx, item.link) }, item.title));
|
|
11
|
+
const icon = item.icon === undefined
|
|
12
|
+
? null
|
|
13
|
+
: (renderIcon(item.icon, { className: 'cg-craft__glyph' }) ??
|
|
14
|
+
h('span', { class: 'cg-craft__mark-fallback', 'data-icon': item.icon }));
|
|
15
|
+
return h('li', { class: 'cg-craft__item' }, icon === null ? null : h('span', { class: 'cg-craft__mark', 'aria-hidden': 'true' }, icon), title, item.text === undefined ? null : h('p', { class: 'cg-craft__text' }, item.text));
|
|
16
|
+
}
|
|
17
|
+
export function renderFeatureGrid(block, ctx) {
|
|
18
|
+
const hasTitle = block.title !== undefined;
|
|
19
|
+
const itemTag = nestedHeadingTag('featureGrid', hasTitle);
|
|
20
|
+
return h('section', { class: 'cg-craft', 'data-block': 'featureGrid' }, hasTitle
|
|
21
|
+
? heading(blockHeadingTag('featureGrid') ?? 'h2', { class: 'cg-craft__title-heading', 'data-field': 'title' }, block.title ?? '')
|
|
22
|
+
: null, h('ul', { class: 'cg-craft__items' }, block.items.map((item) => renderItem(item, ctx, itemTag))));
|
|
23
|
+
}
|
|
24
|
+
//# 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;;;;GAIG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,MAAM,KAAK,GACT,IAAI,C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AAG,gBAAgB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;IACzD,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,EAClD,QAAQ;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,aAAa,CAAC,IAAI,IAAI,EACtC,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,OAAO,EAAE,EAC3D,KAAK,CAAC,KAAK,IAAI,EAAE,CAClB;QACH,CAAC,CAAC,IAAI,EACR,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,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,11 @@
|
|
|
1
|
+
import type { GalleryBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* Ships **no JavaScript**. `layout: 'masonry'` (the dining-room gallery this
|
|
5
|
+
* theme's own blueprint seeds) is a CSS multi-column flow — `column-count`
|
|
6
|
+
* with `break-inside: avoid` on each tile — which needs no measurement pass
|
|
7
|
+
* a script would otherwise have to do; `grid`/`carousel` keep the same
|
|
8
|
+
* zero-JS scroll-snapping list every other layout in this theme uses.
|
|
9
|
+
*/
|
|
10
|
+
export declare function renderGallery(block: GalleryBlock, ctx: RenderContext): HtmlElement;
|
|
11
|
+
//# 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;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA6BlF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* Ships **no JavaScript**. `layout: 'masonry'` (the dining-room gallery this
|
|
4
|
+
* theme's own blueprint seeds) is a CSS multi-column flow — `column-count`
|
|
5
|
+
* with `break-inside: avoid` on each tile — which needs no measurement pass
|
|
6
|
+
* a script would otherwise have to do; `grid`/`carousel` keep the same
|
|
7
|
+
* zero-JS scroll-snapping list every other layout in this theme uses.
|
|
8
|
+
*/
|
|
9
|
+
export function renderGallery(block, ctx) {
|
|
10
|
+
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' }))));
|
|
11
|
+
return h('section', { class: 'cg-gallery', 'data-block': 'gallery', 'data-layout': block.layout }, block.layout === 'carousel'
|
|
12
|
+
? h('div', {
|
|
13
|
+
class: 'cg-gallery__viewport',
|
|
14
|
+
role: 'region',
|
|
15
|
+
'aria-label': ctx.t('gallery.carousel'),
|
|
16
|
+
tabindex: '0',
|
|
17
|
+
}, items)
|
|
18
|
+
: items);
|
|
19
|
+
}
|
|
20
|
+
//# 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;;;;;;GAMG;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,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,CAAC,MAAM,EAAE,EAC7E,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,16 @@
|
|
|
1
|
+
import type { HeroBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* The full-bleed dining-room hero: the media (when present) fills the whole
|
|
5
|
+
* band, a gradient scrim sits between it and the copy so the centred text
|
|
6
|
+
* stays legible over a photo of any tone, and the eyebrow/title/subtitle are
|
|
7
|
+
* centred — the "elegant restaurant homepage" convention (Divi/Astra
|
|
8
|
+
* "Restaurant") rather than the left-aligned marketing hero the other
|
|
9
|
+
* built-in themes use.
|
|
10
|
+
*
|
|
11
|
+
* The scrim is a CSS gradient composed from `--cg-scrim` (itself derived
|
|
12
|
+
* from the skin's own ink, see `tokens.css`), never a literal colour: a
|
|
13
|
+
* skin with a lighter ink still gets a scrim tuned to it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function renderHero(block: HeroBlock, ctx: RenderContext): HtmlElement;
|
|
16
|
+
//# 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;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAkC5E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { actionList, blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* The full-bleed dining-room hero: the media (when present) fills the whole
|
|
4
|
+
* band, a gradient scrim sits between it and the copy so the centred text
|
|
5
|
+
* stays legible over a photo of any tone, and the eyebrow/title/subtitle are
|
|
6
|
+
* centred — the "elegant restaurant homepage" convention (Divi/Astra
|
|
7
|
+
* "Restaurant") rather than the left-aligned marketing hero the other
|
|
8
|
+
* built-in themes use.
|
|
9
|
+
*
|
|
10
|
+
* The scrim is a CSS gradient composed from `--cg-scrim` (itself derived
|
|
11
|
+
* from the skin's own ink, see `tokens.css`), never a literal colour: a
|
|
12
|
+
* skin with a lighter ink still gets a scrim tuned to it.
|
|
13
|
+
*/
|
|
14
|
+
export function renderHero(block, ctx) {
|
|
15
|
+
const tag = blockHeadingTag('hero') ?? 'h1';
|
|
16
|
+
return h('section', {
|
|
17
|
+
class: 'cg-hero',
|
|
18
|
+
'data-block': 'hero',
|
|
19
|
+
'data-has-media': block.media === undefined ? 'false' : 'true',
|
|
20
|
+
}, block.media === undefined
|
|
21
|
+
? null
|
|
22
|
+
: h('div', { class: 'cg-hero__media' }, image(ctx, block.media, {
|
|
23
|
+
className: 'cg-hero__image',
|
|
24
|
+
loading: 'eager',
|
|
25
|
+
sizes: '100vw',
|
|
26
|
+
}), h('div', { class: 'cg-hero__scrim', 'aria-hidden': 'true' })), h('div', { class: 'cg-hero__body' }, block.eyebrow === undefined
|
|
27
|
+
? null
|
|
28
|
+
: 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
|
|
29
|
+
? null
|
|
30
|
+
: h('p', { class: 'cg-hero__subtitle', 'data-field': 'subtitle' }, block.subtitle), actionList(ctx, block.actions, ctx.t('hero.actions'))));
|
|
31
|
+
}
|
|
32
|
+
//# 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;;;;;;;;;;;GAWG;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;QACE,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,MAAM;QACpB,gBAAgB,EAAE,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;KAC/D,EACD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;YACtB,SAAS,EAAE,gBAAgB;YAC3B,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,OAAO;SACf,CAAC,EACF,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAC7D,EACL,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,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;AAgBnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiBtF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* `blocks@2.0` (RFC 0001). The lighter-weight "as seen in" row next to
|
|
4
|
+
* `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` falls back to when a link is absent.
|
|
7
|
+
*/
|
|
8
|
+
function renderItem(item, ctx) {
|
|
9
|
+
return h('li', { class: 'cg-press-strip__item' }, image(ctx, item.media, { className: 'cg-press-strip__image', variant: { fit: 'contain' } }));
|
|
10
|
+
}
|
|
11
|
+
export function renderLogoStrip(block, ctx) {
|
|
12
|
+
return h('figure', { class: 'cg-press-strip', 'data-block': 'logoStrip' }, h('ul', { class: 'cg-press-strip__items' }, block.logos.map((item) => renderItem(item, ctx))), block.caption === undefined
|
|
13
|
+
? null
|
|
14
|
+
: h('figcaption', { class: 'cg-press-strip__caption', 'data-field': 'caption' }, block.caption));
|
|
15
|
+
}
|
|
16
|
+
//# 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;;;;;GAKG;AACH,SAAS,UAAU,CAAC,IAAmB,EAAE,GAAkB;IACzD,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,sBAAsB,EAAE,EACjC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,uBAAuB,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,CAC5F,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,GAAkB;IACvE,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,EACtD,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,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,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,SAAS,EAAE,EAC7D,KAAK,CAAC,OAAO,CACd,CACN,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;AA2B3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB9E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* "Featured in" / press mentions, held back to a quiet grayscale until
|
|
4
|
+
* hovered — contract B says the organisation's name **is** the accessible
|
|
5
|
+
* name of the link, so the logo image carries it as `alt` text when the
|
|
6
|
+
* media entity has none, and no visually hidden duplicate is added.
|
|
7
|
+
*/
|
|
8
|
+
function renderItem(item, ctx) {
|
|
9
|
+
const logo = image(ctx, item.media, {
|
|
10
|
+
className: 'cg-press__logo',
|
|
11
|
+
altFrom: item.name,
|
|
12
|
+
variant: { fit: 'contain' },
|
|
13
|
+
});
|
|
14
|
+
return h('li', { class: 'cg-press__item' }, item.url === undefined
|
|
15
|
+
? logo
|
|
16
|
+
: h('a', { class: 'cg-press__link', href: ctx.link(item.url), rel: 'noopener noreferrer' }, logo));
|
|
17
|
+
}
|
|
18
|
+
export function renderLogos(block, ctx) {
|
|
19
|
+
return h('section', { class: 'cg-press', 'data-block': 'logos' }, block.title === undefined
|
|
20
|
+
? null
|
|
21
|
+
: heading(blockHeadingTag('logos') ?? 'h2', { class: 'cg-press__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-press__items' }, block.items.map((item) => renderItem(item, ctx))));
|
|
22
|
+
}
|
|
23
|
+
//# 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;;;;;GAKG;AACH,SAAS,UAAU,CAAC,IAAc,EAAE,GAAkB;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;QAClC,SAAS,EAAE,gBAAgB;QAC3B,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,gBAAgB,EAAE,EAC3B,IAAI,CAAC,GAAG,KAAK,SAAS;QACpB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,EACjF,IAAI,CACL,CACN,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,EAC5C,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAChC,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,EACnD,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,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,9 @@
|
|
|
1
|
+
import type { MediaFigureBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* A thin hairline frame around the image, a small italic caption beneath —
|
|
5
|
+
* the restrained, "printed menu insert" treatment consistent with this
|
|
6
|
+
* theme's gallery and embed placeholder.
|
|
7
|
+
*/
|
|
8
|
+
export declare function renderMediaFigure(block: MediaFigureBlock, ctx: RenderContext): HtmlElement;
|
|
9
|
+
//# 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;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA8B1F"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { aspectRatio, h, image } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* A thin hairline frame around the image, a small italic caption beneath —
|
|
4
|
+
* the restrained, "printed menu insert" treatment consistent with this
|
|
5
|
+
* theme's gallery and embed placeholder.
|
|
6
|
+
*/
|
|
7
|
+
export function renderMediaFigure(block, ctx) {
|
|
8
|
+
const ratio = aspectRatio(block.ratio);
|
|
9
|
+
const hasCaption = block.caption !== undefined || block.credit !== undefined;
|
|
10
|
+
return h('figure', {
|
|
11
|
+
class: 'cg-plate',
|
|
12
|
+
'data-block': 'mediaFigure',
|
|
13
|
+
'data-align': block.align ?? 'center',
|
|
14
|
+
style: ratio === undefined ? undefined : `--cg-ratio:${ratio}`,
|
|
15
|
+
}, h('div', { class: 'cg-plate__frame' }, image(ctx, block.media, {
|
|
16
|
+
className: 'cg-plate__media',
|
|
17
|
+
sizes: '(min-width: 48rem) 42rem, 100vw',
|
|
18
|
+
})), hasCaption
|
|
19
|
+
? h('figcaption', { class: 'cg-plate__caption' }, block.caption, block.credit === undefined
|
|
20
|
+
? null
|
|
21
|
+
: h('span', { class: 'cg-plate__credit', 'data-field': 'credit' }, block.credit))
|
|
22
|
+
: null);
|
|
23
|
+
}
|
|
24
|
+
//# 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;;;;GAIG;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,UAAU;QACjB,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,iBAAiB,EAAE,EAC5B,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;QACtB,SAAS,EAAE,iBAAiB;QAC5B,KAAK,EAAE,iCAAiC;KACzC,CAAC,CACH,EACD,UAAU;QACR,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,CAAC,OAAO,EACb,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,CACnF;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;AA4C3B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB5F"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { actionLink, blockHeadingTag, h, heading, nestedHeadingTag, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* `blocks@2.0` (RFC 0001). Rendered as a set-menu comparison — a "tasting
|
|
4
|
+
* menu" / "prix fixe" tier is the shape this block already has (a name, a
|
|
5
|
+
* price, a feature list), so this theme reuses the same restrained bordered
|
|
6
|
+
* plates the rest of the vocabulary uses rather than a distinct pricing
|
|
7
|
+
* skin. `highlighted` becomes a small "chef's pick" rule rather than a
|
|
8
|
+
* colour.
|
|
9
|
+
*/
|
|
10
|
+
function renderTier(tier, ctx, tag) {
|
|
11
|
+
return h('li', {
|
|
12
|
+
class: 'cg-set-menu__tier',
|
|
13
|
+
'data-highlighted': tier.highlighted === true ? 'true' : undefined,
|
|
14
|
+
'aria-current': tier.highlighted === true ? 'true' : undefined,
|
|
15
|
+
}, heading(tag, { class: 'cg-set-menu__name' }, tier.name), h('p', { class: 'cg-set-menu__price' }, h('span', { class: 'cg-set-menu__amount' }, tier.price), tier.interval === undefined
|
|
16
|
+
? null
|
|
17
|
+
: h('span', { class: 'cg-set-menu__interval' }, tier.interval)), tier.features.length === 0
|
|
18
|
+
? null
|
|
19
|
+
: h('ul', { class: 'cg-set-menu__features' }, tier.features.map((feature) => h('li', { class: 'cg-set-menu__feature' }, feature))), tier.action === undefined
|
|
20
|
+
? null
|
|
21
|
+
: h('div', { class: 'cg-set-menu__action' }, actionLink(ctx, { ...tier.action, emphasis: tier.action.emphasis ?? 'primary' })));
|
|
22
|
+
}
|
|
23
|
+
export function renderPricingTable(block, ctx) {
|
|
24
|
+
const hasTitle = block.title !== undefined;
|
|
25
|
+
const tierTag = nestedHeadingTag('pricingTable', hasTitle);
|
|
26
|
+
return h('section', { class: 'cg-set-menu', 'data-block': 'pricingTable' }, hasTitle
|
|
27
|
+
? heading(blockHeadingTag('pricingTable') ?? 'h2', { class: 'cg-set-menu__title', 'data-field': 'title' }, block.title ?? '')
|
|
28
|
+
: null, h('ul', { class: 'cg-set-menu__tiers' }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
|
|
29
|
+
}
|
|
30
|
+
//# 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;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,OAAO,CAAC,CACN,IAAI,EACJ;QACE,KAAK,EAAE,mBAAmB;QAC1B,kBAAkB,EAAE,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QAClE,cAAc,EAAE,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;KAC/D,EACD,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,EACvD,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACvD,IAAI,CAAC,QAAQ,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CACjE,EACD,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QACxB,CAAC,CAAC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|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ProseBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* "Our story" — a short, centred, narrow column (`--cg-measure-narrow` in
|
|
5
|
+
* `tokens.css`), the quiet editorial interlude every one of the reference
|
|
6
|
+
* templates (Divi/Astra "Restaurant") places between the hero and the menu.
|
|
7
|
+
*
|
|
8
|
+
* `prose` declares `headingLevel: 'none'`: it contributes no heading of its
|
|
9
|
+
* own. Whatever headings appear come from the rich text document, whose
|
|
10
|
+
* vocabulary starts at `h2`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function renderProse(block: ProseBlock, ctx: RenderContext): HtmlElement;
|
|
13
|
+
//# 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;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAM9E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { h, renderRichText } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* "Our story" — a short, centred, narrow column (`--cg-measure-narrow` in
|
|
4
|
+
* `tokens.css`), the quiet editorial interlude every one of the reference
|
|
5
|
+
* templates (Divi/Astra "Restaurant") places between the hero and the menu.
|
|
6
|
+
*
|
|
7
|
+
* `prose` declares `headingLevel: 'none'`: it contributes no heading of its
|
|
8
|
+
* own. Whatever headings appear come from the rich text document, whose
|
|
9
|
+
* vocabulary starts at `h2`.
|
|
10
|
+
*/
|
|
11
|
+
export function renderProse(block, ctx) {
|
|
12
|
+
return h('div', { class: 'cg-story', 'data-block': 'prose' }, h('div', { class: 'cg-story__body' }, renderRichText(ctx, block.body)));
|
|
13
|
+
}
|
|
14
|
+
//# 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;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,EAC5C,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CACvE,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { QuoteBlock } from '@cogenta/blocks';
|
|
2
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
/**
|
|
4
|
+
* A single centred line, set in the display serif — the "menu insert"
|
|
5
|
+
* pull-quote, distinct from `testimonial`'s guestbook card.
|
|
6
|
+
*/
|
|
7
|
+
export declare function renderQuote(block: QuoteBlock, ctx: RenderContext): HtmlElement;
|
|
8
|
+
//# 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;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA8B9E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* A single centred line, set in the display serif — the "menu insert"
|
|
4
|
+
* pull-quote, distinct from `testimonial`'s guestbook card.
|
|
5
|
+
*/
|
|
6
|
+
export function renderQuote(block, ctx) {
|
|
7
|
+
const hasAttribution = block.author !== undefined || block.role !== undefined || block.avatar !== undefined;
|
|
8
|
+
return h('figure', { class: 'cg-line', 'data-block': 'quote' }, h('blockquote', { class: 'cg-line__text' }, h('p', { 'data-field': 'text' }, block.text)), hasAttribution
|
|
9
|
+
? h('figcaption', { class: 'cg-line__attribution' }, block.avatar === undefined
|
|
10
|
+
? null
|
|
11
|
+
: image(ctx, block.avatar, {
|
|
12
|
+
className: 'cg-line__avatar',
|
|
13
|
+
variant: { width: 72, height: 72, fit: 'cover' },
|
|
14
|
+
}), h('span', { class: 'cg-line__who' }, block.author === undefined
|
|
15
|
+
? null
|
|
16
|
+
: h('span', { class: 'cg-line__author', 'data-field': 'author' }, block.author), block.role === undefined
|
|
17
|
+
? null
|
|
18
|
+
: h('span', { class: 'cg-line__role', 'data-field': 'role' }, block.role)))
|
|
19
|
+
: null);
|
|
20
|
+
}
|
|
21
|
+
//# 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;;;GAGG;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,MA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
|
+
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;AAgB3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAa3F"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* `blocks@2.0` (RFC 0001). Narrower than `stats` (no `unit`) — rendered the
|
|
4
|
+
* same restrained "figures row" way as `stats`, one accent hairline apart:
|
|
5
|
+
* this theme has no boastful, boxed "impact numbers" register to reach for.
|
|
6
|
+
*/
|
|
7
|
+
function renderItem(item) {
|
|
8
|
+
return h('div', { class: 'cg-tally' }, h('dd', { class: 'cg-tally__value' }, item.value), h('dt', { class: 'cg-tally__label' }, item.label));
|
|
9
|
+
}
|
|
10
|
+
export function renderStatCounter(block, _ctx) {
|
|
11
|
+
return h('section', { class: 'cg-tallies', 'data-block': 'statCounter' }, block.title === undefined
|
|
12
|
+
? null
|
|
13
|
+
: heading(blockHeadingTag('statCounter') ?? 'h2', { class: 'cg-tallies__title', 'data-field': 'title' }, block.title), h('dl', { class: 'cg-tallies__items' }, block.stats.map(renderItem)));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=stat-counter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-counter.js","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":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|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* "Since 1994 · 3 chefs · 120 seats" — a quiet row of figures set in the
|
|
4
|
+
* display serif, separated by hairline rules rather than boxed into cards:
|
|
5
|
+
* the restrained, editorial register this theme uses everywhere a fact is
|
|
6
|
+
* stated rather than sold.
|
|
7
|
+
*
|
|
8
|
+
* A description list, as every built-in theme uses for `stats`: each figure
|
|
9
|
+
* is the description of its label, which is what `<dt>`/`<dd>` mean, and it
|
|
10
|
+
* survives being read linearly (WCAG 1.3.2 — reading order and visual order
|
|
11
|
+
* stay independent regardless of how the skin repaints them).
|
|
12
|
+
*/
|
|
13
|
+
function renderItem(item) {
|
|
14
|
+
return h('div', { class: 'cg-figures__item' }, h('dd', { class: 'cg-figures__value' }, item.value, item.unit === undefined ? null : h('span', { class: 'cg-figures__unit' }, item.unit)), h('dt', { class: 'cg-figures__label' }, item.label));
|
|
15
|
+
}
|
|
16
|
+
export function renderStats(block, _ctx) {
|
|
17
|
+
return h('section', { class: 'cg-figures', 'data-block': 'stats' }, block.title === undefined
|
|
18
|
+
? null
|
|
19
|
+
: heading(blockHeadingTag('stats') ?? 'h2', { class: 'cg-figures__title', 'data-field': 'title' }, block.title), h('dl', { class: 'cg-figures__items' }, block.items.map(renderItem)));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CAAC,IAAc;IAChC,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CACrF,EACD,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CACpD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,IAAmB;IAChE,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,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CACrE,CAAA;AACH,CAAC"}
|