@cogenta/theme-association 0.3.3 → 0.5.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 (148) hide show
  1. package/dist/src/index.d.ts +6 -0
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +9 -0
  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 +13 -10
  7. package/dist/src/render/blocks/accordion.js.map +1 -1
  8. package/dist/src/render/blocks/breakdown.d.ts +14 -0
  9. package/dist/src/render/blocks/breakdown.d.ts.map +1 -0
  10. package/dist/src/render/blocks/breakdown.js +17 -0
  11. package/dist/src/render/blocks/breakdown.js.map +1 -0
  12. package/dist/src/render/blocks/collection-list.d.ts +4 -10
  13. package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
  14. package/dist/src/render/blocks/collection-list.js +89 -58
  15. package/dist/src/render/blocks/collection-list.js.map +1 -1
  16. package/dist/src/render/blocks/cta.d.ts +0 -5
  17. package/dist/src/render/blocks/cta.d.ts.map +1 -1
  18. package/dist/src/render/blocks/cta.js +22 -10
  19. package/dist/src/render/blocks/cta.js.map +1 -1
  20. package/dist/src/render/blocks/embed.d.ts.map +1 -1
  21. package/dist/src/render/blocks/embed.js +30 -22
  22. package/dist/src/render/blocks/embed.js.map +1 -1
  23. package/dist/src/render/blocks/faq.d.ts.map +1 -1
  24. package/dist/src/render/blocks/faq.js +11 -15
  25. package/dist/src/render/blocks/faq.js.map +1 -1
  26. package/dist/src/render/blocks/feature-grid.d.ts +6 -0
  27. package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
  28. package/dist/src/render/blocks/feature-grid.js +42 -20
  29. package/dist/src/render/blocks/feature-grid.js.map +1 -1
  30. package/dist/src/render/blocks/gallery.d.ts +9 -7
  31. package/dist/src/render/blocks/gallery.d.ts.map +1 -1
  32. package/dist/src/render/blocks/gallery.js +22 -16
  33. package/dist/src/render/blocks/gallery.js.map +1 -1
  34. package/dist/src/render/blocks/hero.d.ts +23 -9
  35. package/dist/src/render/blocks/hero.d.ts.map +1 -1
  36. package/dist/src/render/blocks/hero.js +40 -23
  37. package/dist/src/render/blocks/hero.js.map +1 -1
  38. package/dist/src/render/blocks/logo-strip.d.ts +6 -0
  39. package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
  40. package/dist/src/render/blocks/logo-strip.js +7 -9
  41. package/dist/src/render/blocks/logo-strip.js.map +1 -1
  42. package/dist/src/render/blocks/logos.d.ts +14 -0
  43. package/dist/src/render/blocks/logos.d.ts.map +1 -1
  44. package/dist/src/render/blocks/logos.js +30 -16
  45. package/dist/src/render/blocks/logos.js.map +1 -1
  46. package/dist/src/render/blocks/media-figure.d.ts +12 -5
  47. package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
  48. package/dist/src/render/blocks/media-figure.js +32 -18
  49. package/dist/src/render/blocks/media-figure.js.map +1 -1
  50. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
  51. package/dist/src/render/blocks/pricing-table.js +18 -20
  52. package/dist/src/render/blocks/pricing-table.js.map +1 -1
  53. package/dist/src/render/blocks/prose.d.ts +9 -3
  54. package/dist/src/render/blocks/prose.d.ts.map +1 -1
  55. package/dist/src/render/blocks/prose.js +11 -4
  56. package/dist/src/render/blocks/prose.js.map +1 -1
  57. package/dist/src/render/blocks/quote.d.ts +4 -7
  58. package/dist/src/render/blocks/quote.d.ts.map +1 -1
  59. package/dist/src/render/blocks/quote.js +12 -17
  60. package/dist/src/render/blocks/quote.js.map +1 -1
  61. package/dist/src/render/blocks/stat-counter.d.ts +8 -1
  62. package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
  63. package/dist/src/render/blocks/stat-counter.js +18 -10
  64. package/dist/src/render/blocks/stat-counter.js.map +1 -1
  65. package/dist/src/render/blocks/stats.d.ts +12 -1
  66. package/dist/src/render/blocks/stats.d.ts.map +1 -1
  67. package/dist/src/render/blocks/stats.js +24 -14
  68. package/dist/src/render/blocks/stats.js.map +1 -1
  69. package/dist/src/render/blocks/testimonial.d.ts +6 -5
  70. package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
  71. package/dist/src/render/blocks/testimonial.js +13 -11
  72. package/dist/src/render/blocks/testimonial.js.map +1 -1
  73. package/dist/src/render/chrome.d.ts +38 -1
  74. package/dist/src/render/chrome.d.ts.map +1 -1
  75. package/dist/src/render/chrome.js +117 -91
  76. package/dist/src/render/chrome.js.map +1 -1
  77. package/dist/src/render/details.d.ts +79 -0
  78. package/dist/src/render/details.d.ts.map +1 -0
  79. package/dist/src/render/details.js +221 -0
  80. package/dist/src/render/details.js.map +1 -0
  81. package/dist/src/render/figures.d.ts +29 -0
  82. package/dist/src/render/figures.d.ts.map +1 -0
  83. package/dist/src/render/figures.js +59 -0
  84. package/dist/src/render/figures.js.map +1 -0
  85. package/dist/src/render/layout.d.ts +31 -0
  86. package/dist/src/render/layout.d.ts.map +1 -0
  87. package/dist/src/render/layout.js +46 -0
  88. package/dist/src/render/layout.js.map +1 -0
  89. package/dist/src/render/page-head.d.ts +7 -0
  90. package/dist/src/render/page-head.d.ts.map +1 -0
  91. package/dist/src/render/page-head.js +95 -0
  92. package/dist/src/render/page-head.js.map +1 -0
  93. package/dist/src/render/render-block.d.ts +8 -12
  94. package/dist/src/render/render-block.d.ts.map +1 -1
  95. package/dist/src/render/render-block.js +40 -29
  96. package/dist/src/render/render-block.js.map +1 -1
  97. package/dist/src/render/strings.d.ts +15 -0
  98. package/dist/src/render/strings.d.ts.map +1 -0
  99. package/dist/src/render/strings.js +39 -0
  100. package/dist/src/render/strings.js.map +1 -0
  101. package/dist/src/render/term-archive.d.ts.map +1 -1
  102. package/dist/src/render/term-archive.js +33 -25
  103. package/dist/src/render/term-archive.js.map +1 -1
  104. package/dist/src/render/widget-areas.d.ts +14 -0
  105. package/dist/src/render/widget-areas.d.ts.map +1 -0
  106. package/dist/src/render/widget-areas.js +21 -0
  107. package/dist/src/render/widget-areas.js.map +1 -0
  108. package/dist/theme.config.d.ts +1 -1
  109. package/dist/theme.config.js +3 -3
  110. package/dist/theme.config.js.map +1 -1
  111. package/package.json +5 -5
  112. package/src/index.ts +9 -0
  113. package/src/render/blocks/accordion.ts +28 -22
  114. package/src/render/blocks/breakdown.ts +42 -0
  115. package/src/render/blocks/collection-list.ts +234 -103
  116. package/src/render/blocks/cta.ts +48 -19
  117. package/src/render/blocks/embed.ts +47 -29
  118. package/src/render/blocks/faq.ts +22 -31
  119. package/src/render/blocks/feature-grid.ts +73 -41
  120. package/src/render/blocks/gallery.ts +32 -26
  121. package/src/render/blocks/hero.ts +56 -43
  122. package/src/render/blocks/logo-strip.ts +23 -21
  123. package/src/render/blocks/logos.ts +45 -40
  124. package/src/render/blocks/media-figure.ts +49 -24
  125. package/src/render/blocks/pricing-table.ts +31 -40
  126. package/src/render/blocks/prose.ts +16 -6
  127. package/src/render/blocks/quote.ts +34 -27
  128. package/src/render/blocks/stat-counter.ts +35 -29
  129. package/src/render/blocks/stats.ts +46 -38
  130. package/src/render/blocks/testimonial.ts +29 -20
  131. package/src/render/chrome.ts +165 -91
  132. package/src/render/details.ts +276 -0
  133. package/src/render/figures.ts +68 -0
  134. package/src/render/layout.ts +78 -0
  135. package/src/render/page-head.ts +193 -0
  136. package/src/render/render-block.ts +45 -32
  137. package/src/render/strings.ts +74 -0
  138. package/src/render/term-archive.ts +94 -58
  139. package/src/render/widget-areas.ts +24 -0
  140. package/src/styles/archive.css +38 -102
  141. package/src/styles/base.css +503 -554
  142. package/src/styles/blocks.css +913 -666
  143. package/src/styles/chrome.css +506 -0
  144. package/src/styles/listings.css +591 -0
  145. package/src/styles/theme.css +25 -19
  146. package/src/styles/tokens.css +284 -234
  147. package/src/styles/widgets.css +1059 -0
  148. package/tokens.json +18 -18
@@ -1,21 +1,17 @@
1
- import { blockHeadingTag, h, heading, renderRichText, } from '@cogenta/theme-kit';
1
+ import { h, heading, nestedHeadingTag, renderRichText, } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
2
3
  /**
3
- * `<details>`/`<summary>` rather than a scripted accordion: expanding,
4
- * keyboard operation, the expanded state announced to assistive technology
5
- * and in-page search all come from the browser, at zero bytes of
6
- * JavaScript — the same mechanism this theme's own mobile nav toggle uses.
7
- *
8
- * The question is plain text inside `<summary>`, not a heading: a heading
9
- * nested in a summary is rendered inconsistently across screen readers, and
10
- * the questions are already reachable as a list under the block's own
11
- * heading.
4
+ * The questions people ask before they give an hour or a pound, answered in
5
+ * the open: every answer is printed under its question, two columns of them
6
+ * on a wide screen, each pair under a hairline. A charity's answers are short
7
+ * and they are the point; hiding them behind a click makes a visitor work for
8
+ * reassurance. (The `accordion` block is the collapsible one.)
12
9
  */
13
- function renderItem(item, ctx) {
14
- return h('li', { class: 'cg-faq__item' }, h('details', { class: 'cg-faq__details' }, h('summary', { class: 'cg-faq__question' }, item.question), h('div', { class: 'cg-faq__answer' }, renderRichText(ctx, item.answer))));
10
+ function pair(item, ctx, titled) {
11
+ return h('div', { class: 'ca-faq__item' }, heading(nestedHeadingTag('faq', titled), { class: 'ca-faq__question' }, item.question), h('div', { class: 'ca-faq__answer' }, renderRichText(ctx, item.answer)));
15
12
  }
16
13
  export function renderFaq(block, ctx) {
17
- return h('section', { class: 'cg-block cg-faq', 'data-block': 'faq' }, block.title === undefined
18
- ? null
19
- : heading(blockHeadingTag('faq') ?? 'h2', { class: 'cg-faq__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-faq__items' }, block.items.map((item) => renderItem(item, ctx))));
14
+ const titled = block.title !== undefined;
15
+ return section('section', 'faq', 'ca-faq', { 'data-titled': String(titled) }, 'div', sectionHead('faq', block.title), h('div', { class: 'ca-faq__items' }, block.items.map((item) => pair(item, ctx, titled))));
20
16
  }
21
17
  //# sourceMappingURL=faq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"faq.js","sourceRoot":"","sources":["../../../../src/render/blocks/faq.ts"],"names":[],"mappings":"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CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEnD;;;;;;GAMG;AACH,SAAS,IAAI,CAAC,IAAa,EAAE,GAAkB,EAAE,MAAe;IAC9D,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,cAAc,EAAE,EACzB,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EACtF,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CACxE,CAAA;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;IACxC,OAAO,OAAO,CACZ,SAAS,EACT,KAAK,EACL,QAAQ,EACR,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EACjC,KAAK,EACL,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,EAC/B,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CACnD,CACF,CAAA;AACH,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import type { FeatureGridBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * How many columns a wide screen gets: as many as there are items up to
5
+ * four, then three when the count divides by three, so six items make two
6
+ * full rows of three rather than a row of four and a row of two.
7
+ */
8
+ export declare function columnsFor(count: number): number;
3
9
  export declare function renderFeatureGrid(block: FeatureGridBlock, ctx: RenderContext): HtmlElement;
4
10
  //# sourceMappingURL=feature-grid.d.ts.map
@@ -1 +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;AAoC3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB1F"}
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,EACL,KAAK,WAAW,EAKhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAoB3B;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AA8BD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA+B1F"}
@@ -1,27 +1,49 @@
1
- import { blockHeadingTag, h, heading, href, nestedHeadingTag, renderIcon, } from '@cogenta/theme-kit';
1
+ import { h, heading, href, nestedHeadingTag, renderIcon, } from '@cogenta/theme-kit';
2
+ import { arrowWords, section, sectionHead } from '../layout.js';
2
3
  /**
3
- * "What we do" — three (or more) programme cards, each a rounded, softly
4
- * shadowed tile with its icon in a round chip. The item's title carries the
5
- * link, so the link's accessible name is the programme's own name (WCAG
6
- * 2.4.4) — the block has no separate "learn more" field to write.
4
+ * Two readings of the same block, chosen by its content rather than by a
5
+ * setting:
7
6
  *
8
- * `icon` names a symbol, never markup: it is exposed as a data attribute for
9
- * the skin and, when the name is one `renderIcon` recognises, a real inline
10
- * glyph — `aria-hidden`, since the title already names the programme.
7
+ * - **Ways in**, when an item names an icon this theme can draw: ruled
8
+ * columns, each with a small line icon in the organisation's green, the
9
+ * name, its sentence, and the name as an arrow link when it leads somewhere.
10
+ * Never a tinted tile behind an icon, never a card.
11
+ * - **Steps**, when no item names an icon: an ordered list, each step under a
12
+ * rule with its number set large in the display face, because a list of
13
+ * things without pictures on a charity's site is almost always "how it
14
+ * works": how to sign up, what happens after you give, the first evening.
11
15
  */
12
- function renderItem(item, ctx, tag) {
13
- const title = item.link === undefined
14
- ? heading(tag, { class: 'cg-feature__title' }, item.title)
15
- : heading(tag, { class: 'cg-feature__title' }, h('a', { class: 'cg-feature__link', href: href(ctx, item.link) }, item.title));
16
- return h('li', { class: 'cg-feature' }, item.icon === undefined
17
- ? null
18
- : h('span', { class: 'cg-feature__icon', 'data-icon': item.icon, 'aria-hidden': 'true' }, renderIcon(item.icon)), title, item.text === undefined ? null : h('p', { class: 'cg-feature__text' }, item.text));
16
+ function hasIcons(block) {
17
+ return block.items.some((item) => item.icon !== undefined);
18
+ }
19
+ /**
20
+ * How many columns a wide screen gets: as many as there are items up to
21
+ * four, then three when the count divides by three, so six items make two
22
+ * full rows of three rather than a row of four and a row of two.
23
+ */
24
+ export function columnsFor(count) {
25
+ if (count <= 4)
26
+ return count;
27
+ return count % 3 === 0 ? 3 : 4;
28
+ }
29
+ function name(item, ctx) {
30
+ return item.link === undefined
31
+ ? item.title
32
+ : h('a', { class: 'ca-arrow-link', href: href(ctx, item.link) }, arrowWords(item.title));
33
+ }
34
+ function column(item, ctx, titled) {
35
+ const icon = item.icon === undefined ? null : renderIcon(item.icon, { className: 'ca-ways__icon', size: 28 });
36
+ return h('li', { class: 'ca-ways__item' }, icon, heading(nestedHeadingTag('featureGrid', titled), { class: 'ca-ways__name' }, name(item, ctx)), item.text === undefined ? null : h('p', { class: 'ca-ways__text' }, item.text));
37
+ }
38
+ function step(item, ctx, titled, index) {
39
+ return h('li', { class: 'ca-steps__item' }, h('span', { class: 'ca-steps__number', 'aria-hidden': 'true' }, String(index + 1)), heading(nestedHeadingTag('featureGrid', titled), { class: 'ca-steps__name' }, name(item, ctx)), item.text === undefined ? null : h('p', { class: 'ca-steps__text' }, item.text));
19
40
  }
20
41
  export function renderFeatureGrid(block, ctx) {
21
- const hasTitle = block.title !== undefined;
22
- const itemTag = nestedHeadingTag('featureGrid', hasTitle);
23
- return h('section', { class: 'cg-block cg-features', 'data-block': 'featureGrid' }, hasTitle
24
- ? heading(blockHeadingTag('featureGrid') ?? 'h2', { class: 'cg-features__title', 'data-field': 'title' }, block.title ?? '')
25
- : null, h('ul', { class: 'cg-features__items' }, block.items.map((item) => renderItem(item, ctx, itemTag))));
42
+ const titled = block.title !== undefined;
43
+ const count = String(columnsFor(block.items.length));
44
+ if (!hasIcons(block)) {
45
+ return section('section', 'featureGrid', 'ca-steps', { 'data-titled': String(titled), 'data-count': count }, 'div', sectionHead('featureGrid', block.title), h('ol', { class: 'ca-steps__items' }, block.items.map((item, index) => step(item, ctx, titled, index))));
46
+ }
47
+ return section('section', 'featureGrid', 'ca-ways', { 'data-titled': String(titled), 'data-count': count }, 'div', sectionHead('featureGrid', block.title), h('ul', { class: 'ca-ways__items' }, block.items.map((item) => column(item, ctx, titled))));
26
48
  }
27
49
  //# 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;;;;;;;;;GASG;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,mBAA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'@cogenta/theme-kit';
3
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 (WCAG 2.2.2).
4
+ * Photographs of a year at the hall, in the three layouts contract B names:
8
5
  *
9
- * `grid` (the layout the association home page's photo gallery uses) shows
10
- * six rounded, evenly sized tiles — a warm contact sheet rather than a rigid
11
- * masonry wall.
6
+ * - `grid`: one picture takes the row at 16:9; two share it at 3:2; three
7
+ * make one large picture on the first eight columns with the other two
8
+ * stacked beside it; four make two rows of two at 3:2; five and more make
9
+ * rows of three at 4:3. No row is ever left with a gap in it.
10
+ * - `masonry`: three columns of pictures at their own proportions.
11
+ * - `carousel`: a row of 4:3 crops that scrolls sideways, with native scroll
12
+ * snapping. It is a focusable, labelled region so the row can be scrolled
13
+ * from the keyboard; no script drives it.
12
14
  */
13
15
  export declare function renderGallery(block: GalleryBlock, ctx: RenderContext): HtmlElement;
14
16
  //# 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;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiClF"}
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;AAGnF;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAoClF"}
@@ -1,27 +1,33 @@
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 (WCAG 2.2.2).
4
+ * Photographs of a year at the hall, in the three layouts contract B names:
7
5
  *
8
- * `grid` (the layout the association home page's photo gallery uses) shows
9
- * six rounded, evenly sized tiles — a warm contact sheet rather than a rigid
10
- * masonry wall.
6
+ * - `grid`: one picture takes the row at 16:9; two share it at 3:2; three
7
+ * make one large picture on the first eight columns with the other two
8
+ * stacked beside it; four make two rows of two at 3:2; five and more make
9
+ * rows of three at 4:3. No row is ever left with a gap in it.
10
+ * - `masonry`: three columns of pictures at their own proportions.
11
+ * - `carousel`: a row of 4:3 crops that scrolls sideways, with native scroll
12
+ * snapping. It is a focusable, labelled region so the row can be scrolled
13
+ * from the keyboard; no script drives it.
11
14
  */
12
15
  export function renderGallery(block, ctx) {
13
- 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: 45rem) 20rem, 60vw' }))));
14
- return h('section', {
15
- class: 'cg-block cg-gallery',
16
- 'data-block': 'gallery',
17
- 'data-layout': block.layout,
18
- }, block.layout === 'carousel'
16
+ const count = block.items.length;
17
+ const items = block.items.map((item, index) => h('li', { class: 'ca-gallery__item' }, image(ctx, item.media, {
18
+ className: 'ca-gallery__image',
19
+ sizes: block.layout === 'grid' && index === 0
20
+ ? '(min-width: 64rem) 52vw, 100vw'
21
+ : '(min-width: 64rem) 30vw, 80vw',
22
+ })));
23
+ const list = h('ul', { class: 'ca-gallery__items' }, items);
24
+ return section('div', 'gallery', 'ca-gallery', { 'data-layout': block.layout, 'data-count': count >= 5 ? 'many' : String(count) }, 'div', block.layout === 'carousel'
19
25
  ? h('div', {
20
- class: 'cg-gallery__viewport',
26
+ class: 'ca-gallery__viewport',
21
27
  role: 'region',
22
28
  'aria-label': ctx.t('gallery.carousel'),
23
29
  tabindex: '0',
24
- }, items)
25
- : items);
30
+ }, list)
31
+ : list);
26
32
  }
27
33
  //# sourceMappingURL=gallery.js.map
@@ -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;;;;;;;;;GASG;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,qBAAqB;QAC5B,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"}
1
+ {"version":3,"file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,EACD,IAAI,CACL;QACH,CAAC,CAAC,IAAI,CACT,CAAA;AACH,CAAC"}
@@ -1,15 +1,29 @@
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: `headingLevel: 'h1'`), so
5
- * `renderPage` relies on it to avoid emitting a second one.
6
- *
7
- * The warm, community read this theme opens with: a rounded "eyebrow" pill
8
- * (the cause, not a generic label), a big friendly title in the display
9
- * face, and — when there is one — the media sitting in its own big rounded
10
- * card with a soft halo glow behind it (`cg-hero__halo`, purely decorative,
11
- * `aria-hidden`), rather than a hard-edged frame. Centred copy on mobile,
12
- * two columns from `md` up.
4
+ * The opening of a page: a photograph of the people the organisation works
5
+ * with, across the whole width of the window, and the statement of the cause
6
+ * set large on a sheet of the page's own paper that starts at the window's
7
+ * left edge and rises into the bottom of the photograph.
8
+ *
9
+ * On a wide screen the sheet holds the eyebrow and the statement on the first
10
+ * seven columns; the subtitle and the actions sit under the photograph on
11
+ * the last four, starting where the photograph ends, so the two halves of the
12
+ * opening read as one composition rather than a box with a hole beside it.
13
+ *
14
+ * The words are never laid over the picture. A headline floated in the middle
15
+ * of a dimmed photograph needs a veil to stay legible on every picture an
16
+ * editor may choose, and that veil is the look of every generated charity
17
+ * template; on the paper the statement is legible in both schemes whatever
18
+ * the photograph, and the faces keep their own light.
19
+ *
20
+ * The first action is the donation ask, drawn in the signal yellow; the
21
+ * others are underlined words. An eyebrow, when there is one, is a short line
22
+ * in the organisation's green, never a badge. Without media the block is the
23
+ * sheet alone.
24
+ *
25
+ * The image is the only one on a page loaded eagerly: it is above the fold
26
+ * by construction.
13
27
  */
14
28
  export declare function renderHero(block: HeroBlock, ctx: RenderContext): HtmlElement;
15
29
  //# 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,CAqC5E"}
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,EAAc,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAG/F;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA2C5E"}
@@ -1,31 +1,48 @@
1
- import { actionList, blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
1
+ import { actionList, h, image } from '@cogenta/theme-kit';
2
+ import { optionalText } from '../layout.js';
2
3
  /**
3
- * The hero carries the page's `h1` (contract B: `headingLevel: 'h1'`), so
4
- * `renderPage` relies on it to avoid emitting a second one.
4
+ * The opening of a page: a photograph of the people the organisation works
5
+ * with, across the whole width of the window, and the statement of the cause
6
+ * set large on a sheet of the page's own paper that starts at the window's
7
+ * left edge and rises into the bottom of the photograph.
5
8
  *
6
- * The warm, community read this theme opens with: a rounded "eyebrow" pill
7
- * (the cause, not a generic label), a big friendly title in the display
8
- * face, and — when there is one — the media sitting in its own big rounded
9
- * card with a soft halo glow behind it (`cg-hero__halo`, purely decorative,
10
- * `aria-hidden`), rather than a hard-edged frame. Centred copy on mobile,
11
- * two columns from `md` up.
9
+ * On a wide screen the sheet holds the eyebrow and the statement on the first
10
+ * seven columns; the subtitle and the actions sit under the photograph on
11
+ * the last four, starting where the photograph ends, so the two halves of the
12
+ * opening read as one composition rather than a box with a hole beside it.
13
+ *
14
+ * The words are never laid over the picture. A headline floated in the middle
15
+ * of a dimmed photograph needs a veil to stay legible on every picture an
16
+ * editor may choose, and that veil is the look of every generated charity
17
+ * template; on the paper the statement is legible in both schemes whatever
18
+ * the photograph, and the faces keep their own light.
19
+ *
20
+ * The first action is the donation ask, drawn in the signal yellow; the
21
+ * others are underlined words. An eyebrow, when there is one, is a short line
22
+ * in the organisation's green, never a badge. Without media the block is the
23
+ * sheet alone.
24
+ *
25
+ * The image is the only one on a page loaded eagerly: it is above the fold
26
+ * by construction.
12
27
  */
13
28
  export function renderHero(block, ctx) {
14
- const tag = blockHeadingTag('hero') ?? 'h1';
15
- return h('section', { class: 'cg-block cg-hero', 'data-block': 'hero' }, h('div', { class: 'cg-hero__copy' }, block.eyebrow === undefined
16
- ? null
17
- : h('p', { class: 'cg-hero__eyebrow', 'data-field': 'eyebrow' }, h('span', { class: 'cg-pill' }, 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
29
+ const hasMedia = block.media !== undefined;
30
+ const actions = actionList(ctx, block.actions, ctx.t('hero.actions'));
31
+ const hasAside = block.subtitle !== undefined || actions !== null;
32
+ return h('section', {
33
+ class: 'ca-section ca-hero ca-ask',
34
+ 'data-block': 'hero',
35
+ 'data-media': String(hasMedia),
36
+ }, block.media === undefined
20
37
  ? null
21
- : h('div', { class: 'cg-hero__frame' }, h('span', { class: 'cg-hero__halo', 'aria-hidden': 'true' }),
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',
38
+ : h('figure', { class: 'ca-hero__media' }, image(ctx, block.media, {
39
+ className: 'ca-hero__image',
27
40
  loading: 'eager',
28
- sizes: '(min-width: 60rem) 44vw, 100vw',
29
- })));
41
+ sizes: '100vw',
42
+ })), h('div', { class: 'ca-container ca-hero__inner' }, h('div', { class: 'ca-hero__panel' }, optionalText('p', 'ca-kicker ca-hero__eyebrow', block.eyebrow, {
43
+ 'data-field': 'eyebrow',
44
+ }), h('h1', { class: 'ca-hero__title', 'data-field': 'title' }, block.title)), hasAside
45
+ ? h('div', { class: 'ca-hero__aside' }, optionalText('p', 'ca-hero__subtitle', block.subtitle, { 'data-field': 'subtitle' }), actions)
46
+ : null));
30
47
  }
31
48
  //# 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,eAAe,EAAE,EAC1B,KAAK,CAAC,OAAO,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,SAAS,EAAE,EACtD,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAC/C,EACL,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,KA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AAQ,GAAG,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI,CAAA;IACjE,OAAO,CAAC,CACN,SAAS,EACT;QACE,KAAK,EAAE,2BAA2B;QAClC,YAAY,EAAE,MAAM;QACpB,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC;KAC/B,EACD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,QAAQ,EACR,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,CACH,EACL,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,6BAA6B,EAAE,EACxC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,YAAY,CAAC,GAAG,EAAE,4BAA4B,EAAE,KAAK,CAAC,OAAO,EAAE;QAC7D,YAAY,EAAE,SAAS;KACxB,CAAC,EACF,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CACzE,EACD,QAAQ;QACN,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,YAAY,CAAC,GAAG,EAAE,mBAAmB,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,EACpF,OAAO,CACR;QACH,CAAC,CAAC,IAAI,CACT,CACF,CAAA;AACH,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import type { LogoStripBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * The lighter row of marks: the caption at the caption size above a rule,
5
+ * and the marks spread along one line under it, small and evenly spaced, in
6
+ * one ink. No links, by contract B; each mark is named by its own alt text
7
+ * from the media library.
8
+ */
3
9
  export declare function renderLogoStrip(block: LogoStripBlock, ctx: RenderContext): HtmlElement;
4
10
  //# sourceMappingURL=logo-strip.d.ts.map
@@ -1 +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,CAatF"}
1
+ {"version":3,"file":"logo-strip.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logo-strip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGnF;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAsBtF"}
@@ -1,16 +1,14 @@
1
1
  import { h, image } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * `blocks@2.0` (RFC 0001). "Our partners" — the lighter-weight social-proof
4
- * row next to `logos`: no per-logo name or link, so no accessible-name field
5
- * to require — each image's own alt text (set once, in the media library)
6
- * names it.
4
+ * The lighter row of marks: the caption at the caption size above a rule,
5
+ * and the marks spread along one line under it, small and evenly spaced, in
6
+ * one ink. No links, by contract B; each mark is named by its own alt text
7
+ * from the media library.
7
8
  */
8
- function renderItem(item, ctx) {
9
- return h('li', { class: 'cg-logo-band__item' }, image(ctx, item.media, { className: 'cg-logo-band__image', variant: { fit: 'contain' } }));
10
- }
11
9
  export function renderLogoStrip(block, ctx) {
12
- return h('figure', { class: 'cg-block cg-logo-band', 'data-block': 'logoStrip' }, h('ul', { class: 'cg-logo-band__items' }, block.logos.map((item) => renderItem(item, ctx))), block.caption === undefined
10
+ return section('div', 'logoStrip', 'ca-strip', { 'data-captioned': String(block.caption !== undefined) }, 'div', block.caption === undefined
13
11
  ? null
14
- : h('figcaption', { class: 'cg-logo-band__caption', 'data-field': 'caption' }, block.caption));
12
+ : h('p', { class: 'ca-strip__caption', 'data-field': 'caption' }, block.caption), h('ul', { class: 'ca-strip__items' }, block.logos.map((logo) => h('li', { class: 'ca-strip__item' }, image(ctx, logo.media, { className: 'ca-mark', sizes: '12rem' })))));
15
13
  }
16
14
  //# 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;;;;;GAKG;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,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,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"}
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;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,GAAkB;IACvE,OAAO,OAAO,CACZ,KAAK,EACL,WAAW,EACX,UAAU,EACV,EAAE,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,EAAE,EACzD,KAAK,EACL,KAAK,CAAC,OAAO,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EAClF,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACvB,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CACjE,CACF,CACF,CACF,CAAA;AACH,CAAC"}
@@ -1,4 +1,18 @@
1
1
  import type { LogosBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * The organisations that work alongside this one: the title on the first
5
+ * four columns, and their marks on the last eight in a grid of cells divided
6
+ * by hairlines, each mark set small and in one ink so no partner shouts
7
+ * louder than another. A mark drawn in ink is inverted in the dark scheme.
8
+ *
9
+ * The organisation's name is the mark's accessible name when the media
10
+ * library has no alt text for it, and the link's own name when it links out.
11
+ */
12
+ /**
13
+ * Columns on a wide screen that leave no empty cell in the grid: three when
14
+ * the count divides by three, two when it divides by two, otherwise three.
15
+ */
16
+ export declare function logoColumnsFor(count: number): number;
3
17
  export declare function renderLogos(block: LogosBlock, ctx: RenderContext): HtmlElement;
4
18
  //# sourceMappingURL=logos.d.ts.map
@@ -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;AA0B3B,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,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGnF;;;;;;;;GAQG;AACH;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAkC9E"}
@@ -1,22 +1,36 @@
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.
4
+ * The organisations that work alongside this one: the title on the first
5
+ * four columns, and their marks on the last eight in a grid of cells divided
6
+ * by hairlines, each mark set small and in one ink so no partner shouts
7
+ * louder than another. A mark drawn in ink is inverted in the dark scheme.
8
+ *
9
+ * The organisation's name is the mark's accessible name when the media
10
+ * library has no alt text for it, and the link's own name when it links out.
6
11
  */
7
- function renderItem(item, ctx) {
8
- const logo = image(ctx, item.media, {
9
- className: 'cg-logo__image',
10
- altFrom: item.name,
11
- variant: { fit: 'contain' },
12
- });
13
- return h('li', { class: 'cg-logo' }, item.url === undefined
14
- ? logo
15
- : h('a', { class: 'cg-logo__link', href: ctx.link(item.url), rel: 'noopener noreferrer' }, logo));
12
+ /**
13
+ * Columns on a wide screen that leave no empty cell in the grid: three when
14
+ * the count divides by three, two when it divides by two, otherwise three.
15
+ */
16
+ export function logoColumnsFor(count) {
17
+ if (count % 3 === 0)
18
+ return 3;
19
+ return count % 2 === 0 ? 2 : 3;
16
20
  }
17
21
  export function renderLogos(block, ctx) {
18
- return h('section', { class: 'cg-block cg-logos', 'data-block': 'logos' }, block.title === undefined
19
- ? null
20
- : heading(blockHeadingTag('logos') ?? 'h2', { class: 'cg-logos__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-logos__items' }, block.items.map((item) => renderItem(item, ctx))));
22
+ return section('section', 'logos', 'ca-partners', {
23
+ 'data-titled': String(block.title !== undefined),
24
+ 'data-columns': String(logoColumnsFor(block.items.length)),
25
+ }, 'div', sectionHead('logos', block.title), h('ul', { class: 'ca-partners__items' }, block.items.map((item) => {
26
+ const mark = image(ctx, item.media, {
27
+ className: 'ca-mark',
28
+ altFrom: item.name,
29
+ sizes: '12rem',
30
+ });
31
+ return h('li', { class: 'ca-partners__item' }, item.url === undefined
32
+ ? h('span', { class: 'ca-partners__cell' }, mark)
33
+ : h('a', { class: 'ca-partners__cell', href: item.url, rel: 'noopener noreferrer' }, mark));
34
+ })));
21
35
  }
22
36
  //# 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;;;;GAIG;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,SAAS,EAAE,EACpB,IAAI,CAAC,GAAG,KAAK,SAAS;QACpB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,EAChF,IAAI,CACL,CACN,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,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,E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SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,IAAI,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO;SACf,CAAC,CAAA;QACF,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,IAAI,CAAC,GAAG,KAAK,SAAS;YACpB,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC;YACjD,CAAC,CAAC,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,qBAAqB,EAAE,EAC1E,IAAI,CACL,CACN,CAAA;IACH,CAAC,CAAC,CACH,CACF,CAAA;AACH,CAAC"}
@@ -1,12 +1,19 @@
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.
4
+ * A photograph and its caption, the caption always under the picture's own
5
+ * left edge, in the text face, with the credit after it.
6
6
  *
7
- * The media sits in a big rounded card (`cg-figure__media`, `--cg-radius-lg`)
8
- * with a soft shadow, matching the hero's own frame treatment rather than a
9
- * hard-edged photo.
7
+ * `align` is an editorial intent, read as a layout:
8
+ *
9
+ * - `start` / `end`: seven columns on that side, the caption beside it on the
10
+ * other four, set against the bottom of the picture.
11
+ * - `center`: eight columns, set in from the second.
12
+ * - `wide` (and no value): the whole container.
13
+ * - `full`: the whole window, edge to edge.
14
+ *
15
+ * The ratio crops from the middle, or from the media's own focal point; the
16
+ * corners stay square and the picture casts no shadow.
10
17
  */
11
18
  export declare function renderMediaFigure(block: MediaFigureBlock, ctx: RenderContext): HtmlElement;
12
19
  //# 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;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA0B1F"}
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;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA2C1F"}