@cogenta/theme-portfolio 1.1.3 → 1.3.3

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.
Files changed (128) hide show
  1. package/dist/src/index.d.ts +9 -0
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +10 -1
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/render/blocks/accordion.d.ts.map +1 -1
  6. package/dist/src/render/blocks/accordion.js +10 -18
  7. package/dist/src/render/blocks/accordion.js.map +1 -1
  8. package/dist/src/render/blocks/collection-list.d.ts +0 -20
  9. package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
  10. package/dist/src/render/blocks/collection-list.js +59 -66
  11. package/dist/src/render/blocks/collection-list.js.map +1 -1
  12. package/dist/src/render/blocks/cta.d.ts +4 -4
  13. package/dist/src/render/blocks/cta.d.ts.map +1 -1
  14. package/dist/src/render/blocks/cta.js +15 -10
  15. package/dist/src/render/blocks/cta.js.map +1 -1
  16. package/dist/src/render/blocks/embed.d.ts.map +1 -1
  17. package/dist/src/render/blocks/embed.js +16 -31
  18. package/dist/src/render/blocks/embed.js.map +1 -1
  19. package/dist/src/render/blocks/faq.d.ts.map +1 -1
  20. package/dist/src/render/blocks/faq.js +12 -17
  21. package/dist/src/render/blocks/faq.js.map +1 -1
  22. package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
  23. package/dist/src/render/blocks/feature-grid.js +26 -23
  24. package/dist/src/render/blocks/feature-grid.js.map +1 -1
  25. package/dist/src/render/blocks/gallery.d.ts +0 -14
  26. package/dist/src/render/blocks/gallery.d.ts.map +1 -1
  27. package/dist/src/render/blocks/gallery.js +29 -21
  28. package/dist/src/render/blocks/gallery.js.map +1 -1
  29. package/dist/src/render/blocks/hero.d.ts +8 -8
  30. package/dist/src/render/blocks/hero.d.ts.map +1 -1
  31. package/dist/src/render/blocks/hero.js +17 -18
  32. package/dist/src/render/blocks/hero.js.map +1 -1
  33. package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
  34. package/dist/src/render/blocks/logo-strip.js +9 -14
  35. package/dist/src/render/blocks/logo-strip.js.map +1 -1
  36. package/dist/src/render/blocks/logos.d.ts.map +1 -1
  37. package/dist/src/render/blocks/logos.js +14 -19
  38. package/dist/src/render/blocks/logos.js.map +1 -1
  39. package/dist/src/render/blocks/media-figure.d.ts +8 -12
  40. package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
  41. package/dist/src/render/blocks/media-figure.js +20 -20
  42. package/dist/src/render/blocks/media-figure.js.map +1 -1
  43. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
  44. package/dist/src/render/blocks/pricing-table.js +17 -20
  45. package/dist/src/render/blocks/pricing-table.js.map +1 -1
  46. package/dist/src/render/blocks/prose.d.ts +10 -9
  47. package/dist/src/render/blocks/prose.d.ts.map +1 -1
  48. package/dist/src/render/blocks/prose.js +29 -10
  49. package/dist/src/render/blocks/prose.js.map +1 -1
  50. package/dist/src/render/blocks/quote.d.ts +5 -12
  51. package/dist/src/render/blocks/quote.d.ts.map +1 -1
  52. package/dist/src/render/blocks/quote.js +9 -15
  53. package/dist/src/render/blocks/quote.js.map +1 -1
  54. package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
  55. package/dist/src/render/blocks/stat-counter.js +10 -12
  56. package/dist/src/render/blocks/stat-counter.js.map +1 -1
  57. package/dist/src/render/blocks/stats.d.ts.map +1 -1
  58. package/dist/src/render/blocks/stats.js +7 -15
  59. package/dist/src/render/blocks/stats.js.map +1 -1
  60. package/dist/src/render/blocks/testimonial.d.ts +4 -14
  61. package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
  62. package/dist/src/render/blocks/testimonial.js +9 -18
  63. package/dist/src/render/blocks/testimonial.js.map +1 -1
  64. package/dist/src/render/chrome.d.ts.map +1 -1
  65. package/dist/src/render/chrome.js +93 -90
  66. package/dist/src/render/chrome.js.map +1 -1
  67. package/dist/src/render/layout.d.ts +61 -0
  68. package/dist/src/render/layout.d.ts.map +1 -0
  69. package/dist/src/render/layout.js +134 -0
  70. package/dist/src/render/layout.js.map +1 -0
  71. package/dist/src/render/project.d.ts +27 -0
  72. package/dist/src/render/project.d.ts.map +1 -0
  73. package/dist/src/render/project.js +82 -0
  74. package/dist/src/render/project.js.map +1 -0
  75. package/dist/src/render/render-block.d.ts +17 -7
  76. package/dist/src/render/render-block.d.ts.map +1 -1
  77. package/dist/src/render/render-block.js +47 -34
  78. package/dist/src/render/render-block.js.map +1 -1
  79. package/dist/src/render/term-archive.d.ts +0 -11
  80. package/dist/src/render/term-archive.d.ts.map +1 -1
  81. package/dist/src/render/term-archive.js +36 -24
  82. package/dist/src/render/term-archive.js.map +1 -1
  83. package/dist/src/render/widget-areas.d.ts +14 -0
  84. package/dist/src/render/widget-areas.d.ts.map +1 -0
  85. package/dist/src/render/widget-areas.js +21 -0
  86. package/dist/src/render/widget-areas.js.map +1 -0
  87. package/dist/src/render/work.d.ts +37 -0
  88. package/dist/src/render/work.d.ts.map +1 -0
  89. package/dist/src/render/work.js +49 -0
  90. package/dist/src/render/work.js.map +1 -0
  91. package/dist/theme.config.d.ts +4 -7
  92. package/dist/theme.config.d.ts.map +1 -1
  93. package/dist/theme.config.js +6 -9
  94. package/dist/theme.config.js.map +1 -1
  95. package/package.json +4 -4
  96. package/src/index.ts +10 -1
  97. package/src/render/blocks/accordion.ts +22 -42
  98. package/src/render/blocks/collection-list.ts +83 -137
  99. package/src/render/blocks/cta.ts +24 -12
  100. package/src/render/blocks/embed.ts +39 -47
  101. package/src/render/blocks/faq.ts +24 -33
  102. package/src/render/blocks/feature-grid.ts +38 -41
  103. package/src/render/blocks/gallery.ts +34 -28
  104. package/src/render/blocks/hero.ts +31 -28
  105. package/src/render/blocks/logo-strip.ts +18 -20
  106. package/src/render/blocks/logos.ts +22 -43
  107. package/src/render/blocks/media-figure.ts +28 -20
  108. package/src/render/blocks/pricing-table.ts +31 -32
  109. package/src/render/blocks/prose.ts +38 -13
  110. package/src/render/blocks/quote.ts +18 -18
  111. package/src/render/blocks/stat-counter.ts +19 -37
  112. package/src/render/blocks/stats.ts +18 -33
  113. package/src/render/blocks/testimonial.ts +16 -22
  114. package/src/render/chrome.ts +99 -97
  115. package/src/render/layout.ts +177 -0
  116. package/src/render/project.ts +140 -0
  117. package/src/render/render-block.ts +49 -45
  118. package/src/render/term-archive.ts +92 -70
  119. package/src/render/widget-areas.ts +25 -0
  120. package/src/render/work.ts +124 -0
  121. package/src/styles/archive.css +61 -21
  122. package/src/styles/base.css +763 -648
  123. package/src/styles/blocks.css +697 -1093
  124. package/src/styles/theme.css +22 -10
  125. package/src/styles/tokens.css +174 -252
  126. package/src/styles/widgets.css +948 -0
  127. package/src/styles/work.css +405 -0
  128. package/tokens.json +19 -19
@@ -1,30 +1,33 @@
1
- import { blockHeadingTag, h, heading, href, nestedHeadingTag, renderIcon, } from '@cogenta/theme-kit';
1
+ import { h, heading, href, nestedHeadingTag, } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
2
3
  /**
3
- * The item's title is the link, so the link's accessible name is the
4
- * feature's name — a bare "learn more" repeated across a grid is the
5
- * classic failure of WCAG 2.4.4, and the block carries no label field to
6
- * write one anyway.
4
+ * Services, disciplines, principles or clients, set as a typographic list
5
+ * rather than as cards with icons. Two forms, chosen from the data itself:
7
6
  *
8
- * `icon` names a symbol (`renderIcon`, `theme@1.4`) — drawn small and
9
- * accent-coloured, decorative (`aria-hidden`, the title already carries the
10
- * accessible name) — sitting *above* the running index numeral this theme
11
- * has always drawn from a CSS counter, never replacing it: the numeral is
12
- * this theme's own editorial device, the icon is the shared vocabulary's.
13
- * An item with no icon, or one whose name this theme does not recognise,
14
- * keeps exactly the pre-1.4 numeral-only card.
7
+ * - **rows**, when any item carries a sentence: each item a ruled row, its
8
+ * name in the display width on the left and the sentence beside it. A
9
+ * linked item links its name, drawn as an arrow link.
10
+ * - **names**, when no item does: a list of names in columns, the way a
11
+ * studio lists its clients.
12
+ *
13
+ * An item's `icon` is not drawn: a studio's list of services is words, and a
14
+ * pictogram beside each would be decoration. The value stays in the content
15
+ * for a theme that wants it.
15
16
  */
16
- function renderItem(item, ctx, tag) {
17
- const title = item.link === undefined
18
- ? heading(tag, { class: 'cg-feature__title' }, item.title)
19
- : heading(tag, { class: 'cg-feature__title' }, h('a', { class: 'cg-feature__link', href: href(ctx, item.link) }, item.title));
20
- const icon = item.icon === undefined ? null : renderIcon(item.icon, { className: 'cg-feature__icon' });
21
- return h('li', { class: 'cg-feature', 'data-icon': item.icon }, icon, h('span', { class: 'cg-feature__index', 'aria-hidden': 'true' }), title, item.text === undefined ? null : h('p', { class: 'cg-feature__text' }, item.text));
17
+ function renderItem(item, ctx, tag, form) {
18
+ const name = item.link === undefined
19
+ ? item.title
20
+ : h('a', { class: 'cg-arrow-link cg-list__link', href: href(ctx, item.link) }, item.title);
21
+ // A name in a list of names is an item, not a section of the page: only a
22
+ // row with its own sentence earns a heading in the outline.
23
+ if (form === 'names')
24
+ return h('li', { class: 'cg-list__item cg-list__name' }, name);
25
+ return h('li', { class: 'cg-list__item' }, heading(tag, { class: 'cg-list__name' }, name), item.text === undefined ? null : h('p', { class: 'cg-list__text' }, item.text));
22
26
  }
23
27
  export function renderFeatureGrid(block, ctx) {
24
- const hasTitle = block.title !== undefined;
25
- const itemTag = nestedHeadingTag('featureGrid', hasTitle);
26
- return h('section', { class: 'cg-block cg-features', 'data-block': 'featureGrid' }, hasTitle
27
- ? heading(blockHeadingTag('featureGrid') ?? 'h2', { class: 'cg-features__title', 'data-field': 'title' }, block.title ?? '')
28
- : null, h('ul', { class: 'cg-features__items' }, block.items.map((item) => renderItem(item, ctx, itemTag))));
28
+ const titled = block.title !== undefined;
29
+ const tag = nestedHeadingTag('featureGrid', titled);
30
+ const form = block.items.some((item) => item.text !== undefined) ? 'rows' : 'names';
31
+ return section('section', 'featureGrid', 'cg-list cg-split', { 'data-form': form, 'data-titled': titled ? 'true' : 'false' }, 'div', sectionHead('featureGrid', block.title), h('ul', { class: 'cg-list__items', 'data-count': String(block.items.length) }, block.items.map((item) => renderItem(item, ctx, tag, form))));
29
32
  }
30
33
  //# sourceMappingURL=feature-grid.js.map
@@ -1 +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;;;;;;;;;;;;;GAaG;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,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAC9E,CAAA;IACP,MAAM,IAAI,GACR,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAA;IAC3F,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,EAC/C,IAAI,EACJ,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,EAChE,KAAK,EACL,IAAI,CAAC,IAAI,KAAK,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C/D,KAAK,EACL,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,EACvC,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EACrE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAC5D,CACF,CAAA;AACH,CAAC"}
@@ -1,18 +1,4 @@
1
1
  import type { GalleryBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
- /**
4
- * The carousel ships **no JavaScript**. It is a scroll-snapping list, which
5
- * gives touch swiping, trackpad scrolling and — because the list is focusable
6
- * and labelled — arrow-key scrolling, with none of the failure modes of a
7
- * scripted carousel: no auto-advance to fight (WCAG 2.2.2), no focus stolen
8
- * from an off-screen slide, and it still works before hydration.
9
- *
10
- * Every tile carries a decorative index badge (`aria-hidden`, a CSS counter)
11
- * — a numbered contact sheet rather than a plain image wall, and never a
12
- * second name for the picture a screen reader would announce.
13
- *
14
- * A focusable scrollable region needs an accessible name, or a screen reader
15
- * announces an unlabelled tab stop; that is WCAG 2.4.3 and 4.1.2 both.
16
- */
17
3
  export declare function renderGallery(block: GalleryBlock, ctx: RenderContext): HtmlElement;
18
4
  //# sourceMappingURL=gallery.d.ts.map
@@ -1 +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;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAqClF"}
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;AAuBnF,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAoClF"}
@@ -1,30 +1,38 @@
1
1
  import { h, image } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * The carousel ships **no JavaScript**. It is a scroll-snapping list, which
4
- * gives touch swiping, trackpad scrolling and — because the list is focusable
5
- * and labelled — arrow-key scrolling, with none of the failure modes of a
6
- * scripted carousel: no auto-advance to fight (WCAG 2.2.2), no focus stolen
7
- * from an off-screen slide, and it still works before hydration.
4
+ * The sequence of pictures a case study is made of. Every picture keeps its
5
+ * own shape: a poster stays a poster, a spread stays a spread. The layout the
6
+ * editor chose decides the rhythm:
8
7
  *
9
- * Every tile carries a decorative index badge (`aria-hidden`, a CSS counter)
10
- * — a numbered contact sheet rather than a plain image wall, and never a
11
- * second name for the picture a screen reader would announce.
12
- *
13
- * A focusable scrollable region needs an accessible name, or a screen reader
14
- * announces an unlabelled tab stop; that is WCAG 2.4.3 and 4.1.2 both.
8
+ * - `grid`: a sequence of three places on twelve columns, a large picture
9
+ * across seven columns beside a smaller one across five set to the same
10
+ * bottom line, then one across the whole container.
11
+ * - `masonry`: two columns (three on a wide screen) at each picture's own
12
+ * shape.
13
+ * - `carousel`: one row at a single height that scrolls and snaps, focusable
14
+ * and labelled; touch, trackpad and arrow keys are all native. No script.
15
15
  */
16
+ function sizesFor(layout, place) {
17
+ if (layout === 'carousel')
18
+ return '(min-width: 64rem) 40rem, 80vw';
19
+ if (layout === 'masonry')
20
+ return '(min-width: 64rem) 30rem, 50vw';
21
+ if (place === 3)
22
+ return '(min-width: 96rem) 92rem, 100vw';
23
+ return place === 1 ? '(min-width: 64rem) 54rem, 100vw' : '(min-width: 64rem) 38rem, 100vw';
24
+ }
16
25
  export function renderGallery(block, ctx) {
17
- const items = h('ul', { class: 'cg-gallery__items' }, block.items.map((item) => h('li', { class: 'cg-gallery__item' }, h('span', { class: 'cg-gallery__index', 'aria-hidden': 'true' }), image(ctx, item.media, {
18
- className: 'cg-gallery__image',
19
- sizes: '(min-width: 48rem) 22rem, 60vw',
20
- }))));
21
- return h('section', {
22
- class: 'cg-block cg-gallery',
23
- 'data-block': 'gallery',
24
- 'data-layout': block.layout,
25
- }, block.layout === 'carousel'
26
+ const items = h('ul', { class: 'cg-pictures__items', 'data-count': String(block.items.length) }, block.items.map((item, index) => {
27
+ const place = (index % 3) + 1;
28
+ return h('li', { class: 'cg-pictures__item', 'data-place': String(place) }, image(ctx, item.media, {
29
+ className: 'cg-pictures__image',
30
+ sizes: sizesFor(block.layout, place),
31
+ }));
32
+ }));
33
+ return section('div', 'gallery', 'cg-pictures', { 'data-layout': block.layout }, 'div', block.layout === 'carousel'
26
34
  ? h('div', {
27
- class: 'cg-gallery__viewport',
35
+ class: 'cg-pictures__viewport',
28
36
  role: 'region',
29
37
  'aria-label': ctx.t('gallery.carousel'),
30
38
  tabindex: '0',
@@ -1 +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;;;;;;;;;;;;;GAaG;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,CAC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AAM,UAAU,aAAa,CAAC,KAAmB,EAAE,GAAkB;IACnE,MAAM,KAAK,GAAG,CAAC,CACb,IAAI,EACJ,EAAE,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EACzE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAC9B,MAAM,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;QAC7B,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,EAC3D,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;YACrB,SAAS,EAAE,oBAAoB;YAC/B,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC;SACrC,CAAC,CACH,CAAA;IACH,CAAC,CAAC,CACH,CAAA;IAED,OAAO,OAAO,CACZ,KAAK,EACL,SAAS,EACT,aAAa,EACb,EAAE,aAAa,EAAE,KAAK,CAAC,MAAM,EAAE,EAC/B,KAAK,EACL,KAAK,CAAC,MAAM,KAAK,UAAU;QACzB,CAAC,CAAC,CAAC,CACC,KAAK,EACL;YACE,KAAK,EAAE,uBAAuB;YAC9B,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"}
@@ -1,15 +1,15 @@
1
1
  import type { HeroBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * The hero carries the page's `h1` — contract B declares `headingLevel: 'h1'`
5
- * for it, and `renderPage` relies on that to avoid emitting a second one.
4
+ * The statement. `hero` carries the page's own `h1` (contract B), and on a
5
+ * studio's home page that heading is what the studio says it does, set very
6
+ * large in the display width across eleven columns. The eyebrow is a small
7
+ * line above it in the text face, never a badge. The subtitle drops to the
8
+ * right half of the grid, so the opening is asymmetric by construction; the
9
+ * actions follow it as underlined words.
6
10
  *
7
- * Structurally distinct from a centred banner: the eyebrow becomes a running
8
- * index mark set in the mono register (`— eyebrow`), the title is a display
9
- * headline that overflows its own column on wide screens (`blocks.css` gives
10
- * it a fluid `clamp()`), and the media is offset into the title's own
11
- * negative margin rather than sitting in a tidy second column — the overlap
12
- * is what makes this a poster, not a slide.
11
+ * A photograph or a film, when there is one, runs under the words across the
12
+ * whole container at 16:9: the one image above the fold, loaded eagerly.
13
13
  */
14
14
  export declare function renderHero(block: HeroBlock, ctx: RenderContext): HtmlElement;
15
15
  //# sourceMappingURL=hero.d.ts.map
@@ -1 +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,CAgC5E"}
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;AAG3B;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAkC5E"}
@@ -1,31 +1,30 @@
1
1
  import { actionList, blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * The hero carries the page's `h1` — contract B declares `headingLevel: 'h1'`
4
- * for it, and `renderPage` relies on that to avoid emitting a second one.
4
+ * The statement. `hero` carries the page's own `h1` (contract B), and on a
5
+ * studio's home page that heading is what the studio says it does, set very
6
+ * large in the display width across eleven columns. The eyebrow is a small
7
+ * line above it in the text face, never a badge. The subtitle drops to the
8
+ * right half of the grid, so the opening is asymmetric by construction; the
9
+ * actions follow it as underlined words.
5
10
  *
6
- * Structurally distinct from a centred banner: the eyebrow becomes a running
7
- * index mark set in the mono register (`— eyebrow`), the title is a display
8
- * headline that overflows its own column on wide screens (`blocks.css` gives
9
- * it a fluid `clamp()`), and the media is offset into the title's own
10
- * negative margin rather than sitting in a tidy second column — the overlap
11
- * is what makes this a poster, not a slide.
11
+ * A photograph or a film, when there is one, runs under the words across the
12
+ * whole container at 16:9: the one image above the fold, loaded eagerly.
12
13
  */
13
14
  export function renderHero(block, ctx) {
14
15
  const tag = blockHeadingTag('hero') ?? 'h1';
15
- return h('section', { class: 'cg-block cg-hero', 'data-block': 'hero' }, h('div', { class: 'cg-hero__frame' }, block.eyebrow === undefined
16
+ return section('section', 'hero', 'cg-statement', { 'data-media': block.media === undefined ? 'none' : 'image' }, 'div', block.eyebrow === undefined
16
17
  ? 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
+ : h('p', { class: 'cg-statement__eyebrow', 'data-field': 'eyebrow' }, block.eyebrow), heading(tag, { class: 'cg-statement__title', 'data-field': 'title' }, block.title), block.subtitle === undefined && (block.actions === undefined || block.actions.length === 0)
18
19
  ? 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
+ : h('div', { class: 'cg-statement__aside' }, block.subtitle === undefined
21
+ ? null
22
+ : h('p', { class: 'cg-statement__subtitle', 'data-field': 'subtitle' }, block.subtitle), actionList(ctx, block.actions, ctx.t('hero.actions'))), block.media === undefined
20
23
  ? null
21
- : h('div', { class: 'cg-hero__media' },
22
- // The only image on the page that is above the fold by construction,
23
- // so the only one that must not be lazy: lazy-loading the LCP element
24
- // is a measured Lighthouse regression, not a theoretical one.
25
- image(ctx, block.media, {
26
- className: 'cg-hero__image',
24
+ : h('div', { class: 'cg-statement__media' }, image(ctx, block.media, {
25
+ className: 'cg-statement__image',
27
26
  loading: 'eager',
28
- sizes: '(min-width: 64rem) 46vw, 100vw',
27
+ sizes: '(min-width: 96rem) 92rem, 100vw',
29
28
  })));
30
29
  }
31
30
  //# sourceMappingURL=hero.js.map
@@ -1 +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,kBAAkB,EAAE,YAAY,EAAE,MAAM,EAAE,EACnD,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,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,EA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EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAuBnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAatF"}
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;AAkBnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAgBtF"}
@@ -1,23 +1,18 @@
1
1
  import { h, image } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * Lighter-weight than `logos` on purpose (RFC 0001): no per-mark `name`/
4
- * `url`, so no link, no accessible-name field to write, and no numbered
5
- * ledger row — this is the quieter "as seen in" strip, marks set edge to
6
- * edge with no dividers, desaturated exactly like `logos.ts`'s own marks
7
- * (the theme's one visual language for "a logo not currently in focus").
8
- * The image's own alt text (set once, in the media library) is what names
9
- * each mark, same as `logos.ts` falls back to when a link is absent — never
10
- * invented here, which is why `image` is called with no `altFrom`.
4
+ * A line of marks between two hairlines: the caption in the first three
5
+ * columns, the marks along the rest of the row at one height. `logoStrip`
6
+ * carries no name per mark, so each image's own alt text (set once, in the
7
+ * media library) names it. In the dark scheme the row sits on a light plate
8
+ * for the same reason `logos` does.
11
9
  */
12
10
  function renderItem(item, ctx) {
13
- return h('li', { class: 'cg-logostrip__item' }, image(ctx, item.media, {
14
- className: 'cg-logostrip__image',
15
- variant: { fit: 'contain' },
16
- }));
11
+ return h('li', { class: 'cg-credits__item' }, image(ctx, item.media, { className: 'cg-credits__image', variant: { fit: 'contain' } }));
17
12
  }
18
13
  export function renderLogoStrip(block, ctx) {
19
- return h('figure', { class: 'cg-block cg-logostrip', 'data-block': 'logoStrip' }, h('ul', { class: 'cg-logostrip__items' }, block.logos.map((item) => renderItem(item, ctx))), block.caption === undefined
14
+ return section('div', 'logoStrip', 'cg-credits', { 'data-captioned': block.caption === undefined ? 'false' : 'true' }, 'div', block.caption === undefined
20
15
  ? null
21
- : h('figcaption', { class: 'cg-logostrip__caption', 'data-field': 'caption' }, block.caption));
16
+ : h('p', { class: 'cg-credits__caption', 'data-field': 'caption' }, block.caption), h('ul', { class: 'cg-credits__items' }, block.logos.map((item) => renderItem(item, ctx))));
22
17
  }
23
18
  //# sourceMappingURL=logo-strip.js.map
@@ -1 +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;;;;;;;;;GASG;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;QACrB,SAAS,EAAE,qBAAqB;QAChC,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE;KAC5B,CAAC,CACH,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,GAAkB;IACvE,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,WAAW,EAAE,EAC7D,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,KA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CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
@@ -1 +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;AAqC3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB9E"}
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,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AA0BnF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAc9E"}
@@ -1,28 +1,23 @@
1
- import { blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
1
+ import { h, image } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
2
3
  /**
3
- * Contract B says the organisation's name **is** the accessible name of the
4
- * link. So the logo image carries it as alt text when the media entity has
5
- * none, and no visually hidden duplicate is added: a link whose only content
6
- * is an image with alt text is already named.
7
- *
8
- * Rendered as a single-row ledger rather than a grid of tiles — a running
9
- * mono index beside each mark, in a desaturated register that resolves to
10
- * full ink only on hover or focus (`blocks.css`), which is the theme's own
11
- * take on the "selected clients" strip.
4
+ * Marks of clients or partners, each on its own plate in a ruled grid, the
5
+ * name under the plate in the caption size. The plate stays light in the dark
6
+ * scheme, so a dark wordmark drawn for white paper is never lost on black.
7
+ * The organisation's name is the image's accessible name when the media
8
+ * entity has none, and a mark with a URL links it.
12
9
  */
13
- function renderItem(item, ctx, index) {
14
- const logo = image(ctx, item.media, {
15
- className: 'cg-logo__image',
10
+ function renderItem(item, ctx) {
11
+ const mark = image(ctx, item.media, {
12
+ className: 'cg-marks__image',
16
13
  altFrom: item.name,
17
14
  variant: { fit: 'contain' },
18
15
  });
19
- return h('li', { class: 'cg-logo' }, h('span', { class: 'cg-logo__index', 'aria-hidden': 'true' }, String(index + 1).padStart(2, '0')), item.url === undefined
20
- ? logo
21
- : h('a', { class: 'cg-logo__link', href: ctx.link(item.url), rel: 'noopener noreferrer' }, logo));
16
+ return h('li', { class: 'cg-marks__item' }, item.url === undefined
17
+ ? h('div', { class: 'cg-marks__plate' }, mark)
18
+ : h('a', { class: 'cg-marks__plate', href: item.url, rel: 'noopener noreferrer' }, mark), h('p', { class: 'cg-marks__name' }, item.name));
22
19
  }
23
20
  export function renderLogos(block, ctx) {
24
- return h('section', { class: 'cg-block cg-logos', 'data-block': 'logos' }, block.title === undefined
25
- ? null
26
- : heading(blockHeadingTag('logos') ?? 'h2', { class: 'cg-logos__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-logos__items' }, block.items.map((item, index) => renderItem(item, ctx, index))));
21
+ return section('section', 'logos', 'cg-marks', { 'data-count': String(block.items.length) }, 'div', sectionHead('logos', block.title), h('ul', { class: 'cg-marks__items' }, block.items.map((item) => renderItem(item, ctx))));
27
22
  }
28
23
  //# sourceMappingURL=logos.js.map
@@ -1 +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;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CAAC,IAAc,EAAE,GAAkB,EAAE,KAAa;IACnE,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;QAClC,SAAS,EAAE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K,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
@@ -1,19 +1,15 @@
1
1
  import type { MediaFigureBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * `<figure>`/`<figcaption>` rather than a div and a paragraph: the
5
- * association between the picture and its caption is then in the markup,
6
- * and a screen reader announces the caption as belonging to the image
7
- * instead of as loose text after it.
4
+ * An image placed on the grid by its alignment, square-cornered, with a
5
+ * small caption under it on the image's own left edge and the credit after
6
+ * the caption. Alignment is how a case study gets its rhythm of large and
7
+ * small pictures:
8
8
  *
9
- * The "Fig. 01" plate number that precedes the caption is drawn entirely
10
- * from a CSS counter (`counter-increment: cg-figure` in `blocks.css`) — it
11
- * is not stored data, so it renumbers itself as figures are added or
12
- * removed and never needs updating here.
13
- *
14
- * `align` is written as a data attribute, never as a class: contract B's
15
- * values are `start`/`end`, an intent that mirrors in right-to-left
16
- * locales, and the skin decides what it means.
9
+ * - `center` (the default): columns 3 to 10.
10
+ * - `start`: the first seven columns. `end`: the last seven.
11
+ * - `wide`: the whole container.
12
+ * - `full`: edge to edge, the caption returning to the grid.
17
13
  */
18
14
  export declare function renderMediaFigure(block: MediaFigureBlock, ctx: RenderContext): HtmlElement;
19
15
  //# sourceMappingURL=media-figure.d.ts.map
@@ -1 +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;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAgC1F"}
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;AAGhG;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA2C1F"}
@@ -1,34 +1,34 @@
1
1
  import { aspectRatio, h, image } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * `<figure>`/`<figcaption>` rather than a div and a paragraph: the
4
- * association between the picture and its caption is then in the markup,
5
- * and a screen reader announces the caption as belonging to the image
6
- * instead of as loose text after it.
4
+ * An image placed on the grid by its alignment, square-cornered, with a
5
+ * small caption under it on the image's own left edge and the credit after
6
+ * the caption. Alignment is how a case study gets its rhythm of large and
7
+ * small pictures:
7
8
  *
8
- * The "Fig. 01" plate number that precedes the caption is drawn entirely
9
- * from a CSS counter (`counter-increment: cg-figure` in `blocks.css`) — it
10
- * is not stored data, so it renumbers itself as figures are added or
11
- * removed and never needs updating here.
12
- *
13
- * `align` is written as a data attribute, never as a class: contract B's
14
- * values are `start`/`end`, an intent that mirrors in right-to-left
15
- * locales, and the skin decides what it means.
9
+ * - `center` (the default): columns 3 to 10.
10
+ * - `start`: the first seven columns. `end`: the last seven.
11
+ * - `wide`: the whole container.
12
+ * - `full`: edge to edge, the caption returning to the grid.
16
13
  */
17
14
  export function renderMediaFigure(block, ctx) {
18
15
  const ratio = aspectRatio(block.ratio);
16
+ const align = block.align ?? 'center';
19
17
  const hasCaption = block.caption !== undefined || block.credit !== undefined;
20
- return h('figure', {
21
- class: 'cg-block cg-figure',
22
- 'data-block': 'mediaFigure',
23
- 'data-align': block.align ?? 'center',
18
+ return section('div', 'mediaFigure', 'cg-figure', {
19
+ 'data-align': align,
24
20
  style: ratio === undefined ? undefined : `--cg-ratio:${ratio}`,
25
- }, h('div', { class: 'cg-figure__frame' }, image(ctx, block.media, {
26
- className: 'cg-figure__media',
27
- sizes: '(min-width: 48rem) 42rem, 100vw',
21
+ }, 'figure', h('div', { class: 'cg-figure__frame' }, image(ctx, block.media, {
22
+ className: 'cg-figure__image',
23
+ sizes: align === 'full'
24
+ ? '100vw'
25
+ : align === 'wide'
26
+ ? '(min-width: 96rem) 92rem, 100vw'
27
+ : '(min-width: 64rem) 56rem, 100vw',
28
28
  })), hasCaption
29
29
  ? h('figcaption', { class: 'cg-figure__caption' }, block.caption === undefined
30
30
  ? null
31
- : h('span', { class: 'cg-figure__plate' }, block.caption), block.credit === undefined
31
+ : h('span', { class: 'cg-figure__caption-text', 'data-field': 'caption' }, block.caption), block.credit === undefined
32
32
  ? null
33
33
  : h('span', { class: 'cg-figure__credit', 'data-field': 'credit' }, block.credit))
34
34
  : null);
@@ -1 +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;;;;;;;;;;;;;;GAcG;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,oBAAoB;QAC3B,YAAY,EAAE,aAAa;QAC3B,YAAY,EAAE,KAAK,CAAC,KAAK,IAAI,QAAQ;QACrC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAA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,OAAO,OAAO,CACZ,KAAK,EACL,aAAa,EACb,WAAW,EACX;QACE,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,KAAK,EAAE;KAC/D,EACD,QAAQ,EACR,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;QACtB,SAAS,EAAE,kBAAkB;QAC7B,KAAK,EACH,KAAK,KAAK,MAAM;YACd,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,KAAK,MAAM;gBAChB,CAAC,CAAC,iCAAiC;gBACnC,CAAC,CAAC,iCAAiC;KAC1C,CAAC,CACH,EACD,UAAU;QACR,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,OAAO,KAAK,SAAS;YACzB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CACC,MAAM,EACN,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,SAAS,EAAE,EAC7D,KAAK,CAAC,OAAO,CACd,EACL,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"}
@@ -1 +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;AAuC3B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB5F"}
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,EAGL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AA2C3B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAe5F"}
@@ -1,29 +1,26 @@
1
- import { actionLink, blockHeadingTag, h, heading, nestedHeadingTag, } from '@cogenta/theme-kit';
1
+ import { actionLink, h, heading, nestedHeadingTag, } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
2
3
  /**
3
- * `highlighted` is an editorial signal, never a colour (RFC 0001's own
4
- * comment on the field): it is written as `data-highlighted="true"` for the
5
- * skin to key off, and the tier additionally carries `aria-current="true"`
6
- * — the closest native semantic for "the one the author means you to pick"
7
- * among a set of siblings.
4
+ * Fees or engagements, set as the columns of a ruled table rather than as
5
+ * cards: each tier opens on a hairline, its name in the text face, the price
6
+ * in the display width with tabular numerals and the interval after it, what
7
+ * it includes as a list divided by hairlines, and its action at the foot. The
8
+ * tier the editor highlighted opens on a heavy rule in ink instead, and its
9
+ * action is the filled one; the others keep their words underlined.
8
10
  */
9
11
  function renderTier(tier, ctx, tag) {
10
- return h('li', {
11
- class: 'cg-pricing__tier',
12
- 'data-highlighted': tier.highlighted === true ? 'true' : undefined,
13
- 'aria-current': tier.highlighted === true ? 'true' : undefined,
14
- }, heading(tag, { class: 'cg-pricing__name' }, tier.name), h('p', { class: 'cg-pricing__price' }, tier.price, tier.interval === undefined
12
+ const highlighted = tier.highlighted === true;
13
+ return h('li', { class: 'cg-fees__tier', 'data-highlighted': highlighted ? 'true' : undefined }, heading(tag, { class: 'cg-fees__name' }, tier.name), h('p', { class: 'cg-fees__price' }, h('span', { class: 'cg-fees__amount' }, tier.price), tier.interval === undefined ? null : h('span', { class: 'cg-fees__interval' }, tier.interval)), tier.features.length === 0
15
14
  ? null
16
- : h('span', { class: 'cg-pricing__interval' }, tier.interval)), tier.features.length === 0
15
+ : h('ul', { class: 'cg-fees__features' }, tier.features.map((feature) => h('li', { class: 'cg-fees__feature' }, feature))), tier.action === undefined
17
16
  ? null
18
- : h('ul', { class: 'cg-pricing__features' }, tier.features.map((feature) => h('li', {}, feature))), tier.action === undefined
19
- ? null
20
- : h('div', { class: 'cg-pricing__action' }, actionLink(ctx, tier.action)));
17
+ : h('div', { class: 'cg-fees__action' }, actionLink(ctx, {
18
+ ...tier.action,
19
+ emphasis: tier.action.emphasis ?? (highlighted ? 'primary' : 'secondary'),
20
+ })));
21
21
  }
22
22
  export function renderPricingTable(block, ctx) {
23
- const hasTitle = block.title !== undefined;
24
- const tierTag = nestedHeadingTag('pricingTable', hasTitle);
25
- return h('section', { class: 'cg-block cg-pricing', 'data-block': 'pricingTable' }, hasTitle
26
- ? heading(blockHeadingTag('pricingTable') ?? 'h2', { class: 'cg-pricing__title', 'data-field': 'title' }, block.title ?? '')
27
- : null, h('ul', { class: 'cg-pricing__tiers' }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
23
+ const tierTag = nestedHeadingTag('pricingTable', block.title !== undefined);
24
+ return section('section', 'pricingTable', 'cg-fees', { 'data-count': String(Math.min(block.tiers.length, 4)) }, 'div', sectionHead('pricingTable', block.title), h('ul', { class: 'cg-fees__tiers' }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
28
25
  }
29
26
  //# sourceMappingURL=pricing-table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pricing-table.js","sourceRoot":"","sources":["../../../../src/render/blocks/pricing-table.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,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