@cogenta/theme-association 0.3.2 → 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,27 +1,41 @@
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.
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.
5
6
  *
6
- * The media sits in a big rounded card (`cg-figure__media`, `--cg-radius-lg`)
7
- * with a soft shadow, matching the hero's own frame treatment rather than a
8
- * 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.
9
17
  */
10
18
  export function renderMediaFigure(block, ctx) {
19
+ const align = block.align ?? 'wide';
20
+ const split = align === 'start' || align === 'end';
11
21
  const ratio = aspectRatio(block.ratio);
12
- const hasCaption = block.caption !== undefined || block.credit !== undefined;
13
- return h('figure', {
14
- class: 'cg-block cg-figure',
15
- 'data-block': 'mediaFigure',
16
- 'data-align': block.align ?? 'center',
17
- style: ratio === undefined ? undefined : `--cg-ratio:${ratio}`,
18
- }, image(ctx, block.media, {
19
- className: 'cg-figure__media',
20
- sizes: '(min-width: 45rem) 40rem, 100vw',
21
- }), hasCaption
22
- ? h('figcaption', { class: 'cg-figure__caption' }, block.caption, block.credit === undefined
22
+ const caption = block.caption === undefined && block.credit === undefined
23
+ ? null
24
+ : h('figcaption', { class: 'ca-figure__caption' }, block.caption === undefined
23
25
  ? null
24
- : h('span', { class: 'cg-figure__credit', 'data-field': 'credit' }, block.credit))
25
- : null);
26
+ : h('span', { class: 'ca-figure__text', 'data-field': 'caption' }, block.caption), block.credit === undefined
27
+ ? null
28
+ : h('span', { class: 'ca-figure__credit', 'data-field': 'credit' }, block.credit));
29
+ return section('div', 'mediaFigure', 'ca-figure', { 'data-align': align, 'data-layout': split ? 'split' : 'single' }, 'figure', h('div', {
30
+ class: 'ca-figure__frame',
31
+ style: ratio === undefined ? undefined : `aspect-ratio:${ratio}`,
32
+ }, image(ctx, block.media, {
33
+ className: 'ca-figure__image',
34
+ sizes: align === 'full'
35
+ ? '100vw'
36
+ : split
37
+ ? '(min-width: 64rem) 55vw, 100vw'
38
+ : '(min-width: 82rem) 78rem, 100vw',
39
+ })), caption);
26
40
  }
27
41
  //# sourceMappingURL=media-figure.js.map
@@ -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;;;;;;;GAOG;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,SAAS,CAAC,CAAC,CAAC,cAAc,KAAK,EAAE;KAC/D,EACD,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;QACtB,SAAS,EAAE,kBAAkB;QAC7B,KAAK,EAAE,iCAAiC;KACzC,CAAC,EACF,UAAU;QACR,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAA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aAAa,EACb,WAAW,EACX,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,EAClE,QAAQ,EACR,CAAC,CACC,KAAK,EACL;QACE,KAAK,EAAE,kBAAkB;QACzB,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,KAAK,EAAE;KACjE,EACD,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;gBACL,CAAC,CAAC,gCAAgC;gBAClC,CAAC,CAAC,iCAAiC;KAC1C,CAAC,CACH,EACD,OAAO,CACR,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;AA2C3B,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,EAEL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAwC3B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAe5F"}
@@ -1,29 +1,27 @@
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
- * `blocks@2.0` (RFC 0001). Rarely a nonprofit's own price list, but not never
4
- * (a membership fee, a course fee) — kept in the shared, rounded-card
5
- * register the rest of this theme uses. `highlighted` becomes
6
- * `data-highlighted` for the skin to style, and `aria-current` so it is
7
- * announced, not only shown.
4
+ * Levels side by side: a membership, a regular gift, a sponsored place.
5
+ * Ruled columns rather than cards: the name of the level, the amount large in
6
+ * the display face with tabular figures and what it covers ("a month") beside
7
+ * it, then what it includes one line at a time between hairlines, and the
8
+ * action at the foot.
9
+ *
10
+ * `highlighted` is an editorial emphasis, drawn as the column's top rule in
11
+ * the organisation's green, thicker, and its name in the same green. No
12
+ * ribbon, no raised card, no fill.
8
13
  */
9
- 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' }, h('span', { class: 'cg-pricing__amount' }, tier.price), tier.interval === undefined
14
+ function tier(item, ctx, titled) {
15
+ return h('li', { class: 'ca-levels__tier', 'data-highlighted': item.highlighted === true ? 'true' : 'false' }, heading(nestedHeadingTag('pricingTable', titled), { class: 'ca-levels__name' }, item.name), h('p', { class: 'ca-levels__price' }, h('span', { class: 'ca-levels__amount' }, item.price), item.interval === undefined
15
16
  ? null
16
- : h('span', { class: 'cg-pricing__interval' }, tier.interval)), tier.features.length === 0
17
+ : h('span', { class: 'ca-levels__interval' }, item.interval)), item.features.length === 0
17
18
  ? null
18
- : h('ul', { class: 'cg-pricing__features' }, tier.features.map((feature) => h('li', {}, feature))), tier.action === undefined
19
+ : h('ul', { class: 'ca-levels__lines' }, item.features.map((feature) => h('li', { class: 'ca-levels__line' }, feature))), item.action === undefined
19
20
  ? null
20
- : h('div', { class: 'cg-pricing__action' }, actionLink(ctx, { ...tier.action, emphasis: tier.action.emphasis ?? 'primary' })));
21
+ : h('div', { class: 'ca-levels__action' }, actionLink(ctx, item.action)));
21
22
  }
22
23
  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))));
24
+ const titled = block.title !== undefined;
25
+ return section('section', 'pricingTable', 'ca-levels', { 'data-count': String(Math.min(block.tiers.length, 4)) }, 'div', sectionHead('pricingTable', block.title), h('ul', { class: 'ca-levels__tiers' }, block.tiers.map((item) => tier(item, ctx, titled))));
28
26
  }
29
27
  //# 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,EAGf,CAAC,EACD,OAAO,EACP,gBAAgB,GAEjB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,OAAO,CAAC,CACN,IAAI,EACJ;QACE,KAAK,EAAE,kBAAkB;QACzB,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,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,CAAC"}
@@ -1,9 +1,15 @@
1
1
  import type { ProseBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * `prose` declares `headingLevel: 'none'`: it contributes no heading of its
5
- * own. Whatever headings appear come from the rich text document, whose
6
- * vocabulary starts at `h2`.
4
+ * Running text: the organisation's history, how to give, how volunteering
5
+ * works, a privacy notice.
6
+ *
7
+ * `prose` declares `headingLevel: 'none'`, so it adds no heading of its own;
8
+ * the rich text's own headings start at `h2`. The column starts on the first
9
+ * of twelve columns, on the same edge as the page title above it, and holds a
10
+ * reading measure of about sixty-six characters. The first paragraph of the
11
+ * first text under a page title is set a step larger, the way a report opens
12
+ * with its summary.
7
13
  */
8
14
  export declare function renderProse(block: ProseBlock, ctx: RenderContext): HtmlElement;
9
15
  //# sourceMappingURL=prose.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prose.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AAE5F;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAM9E"}
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;AAG5F;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAS9E"}
@@ -1,10 +1,17 @@
1
1
  import { h, renderRichText } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * `prose` declares `headingLevel: 'none'`: it contributes no heading of its
4
- * own. Whatever headings appear come from the rich text document, whose
5
- * vocabulary starts at `h2`.
4
+ * Running text: the organisation's history, how to give, how volunteering
5
+ * works, a privacy notice.
6
+ *
7
+ * `prose` declares `headingLevel: 'none'`, so it adds no heading of its own;
8
+ * the rich text's own headings start at `h2`. The column starts on the first
9
+ * of twelve columns, on the same edge as the page title above it, and holds a
10
+ * reading measure of about sixty-six characters. The first paragraph of the
11
+ * first text under a page title is set a step larger, the way a report opens
12
+ * with its summary.
6
13
  */
7
14
  export function renderProse(block, ctx) {
8
- return h('div', { class: 'cg-block cg-prose', 'data-block': 'prose' }, renderRichText(ctx, block.body));
15
+ return section('div', 'prose', 'ca-prose', {}, 'div', h('div', { class: 'ca-prose__body' }, renderRichText(ctx, block.body)));
9
16
  }
10
17
  //# sourceMappingURL=prose.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prose.js","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAsB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAE5F;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAChC,CAAA;AACH,CAAC"}
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;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,OAAO,CACZ,KAAK,EACL,OAAO,EACP,UAAU,EACV,EAAE,EACF,KAAK,EACL,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CACvE,CAAA;AACH,CAAC"}
@@ -1,13 +1,10 @@
1
1
  import type { QuoteBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * `<figure><blockquote>…</blockquote><figcaption>` is the attribution
5
- * pattern the HTML spec prescribes: putting the author inside the
6
- * `<blockquote>` would claim the author's name is part of what was said.
7
- *
8
- * The avatar is decorative here — the name is right beside it in text — so
9
- * its media entity's alt text is expected to be empty. `image` still writes
10
- * the attribute either way.
4
+ * A few words someone said, set large: the text in the display face across
5
+ * nine columns, with a real opening quotation mark hung in the margin by the
6
+ * stylesheet, and the speaker's name and role small beneath it. A portrait,
7
+ * when there is one, is a small square crop beside the name.
11
8
  */
12
9
  export declare function renderQuote(block: QuoteBlock, ctx: RenderContext): HtmlElement;
13
10
  //# sourceMappingURL=quote.d.ts.map
@@ -1 +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;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA0B9E"}
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;AAGnF;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmC9E"}
@@ -1,26 +1,21 @@
1
1
  import { h, image } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * `<figure><blockquote>…</blockquote><figcaption>` is the attribution
4
- * pattern the HTML spec prescribes: putting the author inside the
5
- * `<blockquote>` would claim the author's name is part of what was said.
6
- *
7
- * The avatar is decorative here — the name is right beside it in text — so
8
- * its media entity's alt text is expected to be empty. `image` still writes
9
- * the attribute either way.
4
+ * A few words someone said, set large: the text in the display face across
5
+ * nine columns, with a real opening quotation mark hung in the margin by the
6
+ * stylesheet, and the speaker's name and role small beneath it. A portrait,
7
+ * when there is one, is a small square crop beside the name.
10
8
  */
11
9
  export function renderQuote(block, ctx) {
12
- const hasAttribution = block.author !== undefined || block.role !== undefined || block.avatar !== undefined;
13
- return h('figure', { class: 'cg-block cg-quote', 'data-block': 'quote' }, h('blockquote', { class: 'cg-quote__text' }, h('p', { 'data-field': 'text' }, block.text)), hasAttribution
14
- ? h('figcaption', { class: 'cg-quote__attribution' }, block.avatar === undefined
10
+ const who = block.author === undefined && block.role === undefined
11
+ ? null
12
+ : h('figcaption', { class: 'ca-quote__attribution' }, block.avatar === undefined
15
13
  ? null
16
- : image(ctx, block.avatar, {
17
- className: 'cg-quote__avatar',
18
- variant: { width: 96, height: 96, fit: 'cover' },
19
- }), block.author === undefined
14
+ : image(ctx, block.avatar, { className: 'ca-quote__avatar', sizes: '3.5rem' }), h('span', { class: 'ca-quote__who' }, block.author === undefined
20
15
  ? null
21
- : h('span', { class: 'cg-quote__author', 'data-field': 'author' }, block.author), block.role === undefined
16
+ : h('span', { class: 'ca-quote__author', 'data-field': 'author' }, block.author), block.role === undefined
22
17
  ? null
23
- : h('span', { class: 'cg-quote__role', 'data-field': 'role' }, block.role))
24
- : null);
18
+ : h('span', { class: 'ca-quote__role', 'data-field': 'role' }, block.role)));
19
+ return section('div', 'quote', 'ca-quote', {}, 'figure', h('blockquote', { class: 'ca-quote__quote' }, h('p', { class: 'ca-quote__text', 'data-field': 'text' }, block.text)), who);
25
20
  }
26
21
  //# sourceMappingURL=quote.js.map
@@ -1 +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;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,MAAM,cAAc,GAClB,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CAAA;IACtF,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,CAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,EAC1F,cAAc;QACZ,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE;gBACvB,SAAS,EAAE,kBAAkB;gBAC7B,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE;aACjD,CAAC,EACN,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI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AAC,MAAM,CAAC,EAClF,KAAK,CAAC,IAAI,KAAK,SAAS;YACtB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAC7E,CACF,CAAA;IAEP,OAAO,OAAO,CACZ,KAAK,EACL,OAAO,EACP,UAAU,EACV,EAAE,EACF,QAAQ,EACR,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CACtE,EACD,GAAG,CACJ,CAAA;AACH,CAAC"}
@@ -1,4 +1,11 @@
1
1
  import type { StatCounterBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
- export declare function renderStatCounter(block: StatCounterBlock, _ctx: RenderContext): HtmlElement;
3
+ /**
4
+ * The narrower sibling of `stats` (a value and a short label, no unit): a
5
+ * single row of figures across the container, divided by vertical hairlines,
6
+ * each number in the display face over its label. Percentages of one whole
7
+ * are drawn as a breakdown, the same as `stats`. Nothing counts up; a number
8
+ * that animates into place is a number a visitor has to wait for.
9
+ */
10
+ export declare function renderStatCounter(block: StatCounterBlock, ctx: RenderContext): HtmlElement;
4
11
  //# sourceMappingURL=stat-counter.d.ts.map
@@ -1 +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;AAe3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAa3F"}
1
+ {"version":3,"file":"stat-counter.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAK5E;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA4B1F"}
@@ -1,14 +1,22 @@
1
- import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
1
+ import { h } from '@cogenta/theme-kit';
2
+ import { isBreakdown } from '../figures.js';
3
+ import { section, sectionHead } from '../layout.js';
4
+ import { renderBreakdown } from './breakdown.js';
2
5
  /**
3
- * `blocks@2.0` (RFC 0001). A `<dl>`, exactly like `stats` — narrower on
4
- * purpose (no `unit`), for one big figure and its label.
6
+ * The narrower sibling of `stats` (a value and a short label, no unit): a
7
+ * single row of figures across the container, divided by vertical hairlines,
8
+ * each number in the display face over its label. Percentages of one whole
9
+ * are drawn as a breakdown, the same as `stats`. Nothing counts up; a number
10
+ * that animates into place is a number a visitor has to wait for.
5
11
  */
6
- function renderItem(item) {
7
- return h('div', { class: 'cg-stat-counter' }, h('dt', { class: 'cg-stat-counter__label' }, item.label), h('dd', { class: 'cg-stat-counter__value' }, item.value));
8
- }
9
- export function renderStatCounter(block, _ctx) {
10
- return h('section', { class: 'cg-block cg-stat-counters', 'data-block': 'statCounter' }, block.title === undefined
11
- ? null
12
- : heading(blockHeadingTag('statCounter') ?? 'h2', { class: 'cg-stat-counters__title', 'data-field': 'title' }, block.title), h('dl', { class: 'cg-stat-counters__items' }, block.stats.map(renderItem)));
12
+ export function renderStatCounter(block, ctx) {
13
+ const breakdown = isBreakdown(block.stats);
14
+ return section('section', 'statCounter', 'ca-counter', {
15
+ 'data-shape': breakdown ? 'breakdown' : 'row',
16
+ 'data-count': String(Math.min(block.stats.length, 4)),
17
+ 'data-titled': String(block.title !== undefined),
18
+ }, 'div', sectionHead('statCounter', block.title), breakdown
19
+ ? renderBreakdown(block.stats, ctx)
20
+ : h('dl', { class: 'ca-counter__items' }, block.stats.map((stat) => h('div', { class: 'ca-counter__item' }, h('dt', { class: 'ca-counter__label' }, stat.label), h('dd', { class: 'ca-counter__value' }, stat.value)))));
13
21
  }
14
22
  //# sourceMappingURL=stat-counter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stat-counter.js","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;AAE3B;;;GAGG;AACH,SAAS,UAAU,CAAC,IAAqB;IACvC,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACxD,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CACzD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,IAAmB;IAC5E,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,2BAA2B,EAAE,YAAY,EAAE,aAAa,EAAE,EACnE,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;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,CACZ,EACL,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,yBAAyB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AAmB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACnD,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CACpD,CACF,CACF,CACN,CAAA;AACH,CAAC"}
@@ -1,4 +1,15 @@
1
1
  import type { StatsBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
- export declare function renderStats(block: StatsBlock, _ctx: RenderContext): HtmlElement;
3
+ /**
4
+ * What a year of work added up to, with the sentence that makes each number
5
+ * mean something: the title on the first four columns, and the figures on the
6
+ * last eight in two columns, each under a rule. The number in the display
7
+ * face, narrow and large, in the organisation's green with lining tabular
8
+ * figures and its unit a step smaller; under it the sentence of context in
9
+ * the text face. No box, no tint, nothing counts up.
10
+ *
11
+ * Figures that are all percentages of one whole are drawn as a breakdown
12
+ * instead (`renderBreakdown`).
13
+ */
14
+ export declare function renderStats(block: StatsBlock, ctx: RenderContext): HtmlElement;
4
15
  //# sourceMappingURL=stats.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAwB3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAa/E"}
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAK5E;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmC9E"}
@@ -1,18 +1,28 @@
1
- import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
1
+ import { h } from '@cogenta/theme-kit';
2
+ import { isBreakdown } from '../figures.js';
3
+ import { section, sectionHead } from '../layout.js';
4
+ import { renderBreakdown } from './breakdown.js';
2
5
  /**
3
- * The impact band — "12,400 meals served", "380 volunteers" — rendered as a
4
- * description list so each big figure stays the description of its label
5
- * (WCAG 1.3.2). Reading order is label then figure, exactly as the markup
6
- * says; the stylesheet paints the figure first with `column-reverse` (see
7
- * `blocks.css`'s own comment on `.cg-impact-stat`) — the paint order changes,
8
- * the DOM order a screen reader follows does not.
6
+ * What a year of work added up to, with the sentence that makes each number
7
+ * mean something: the title on the first four columns, and the figures on the
8
+ * last eight in two columns, each under a rule. The number in the display
9
+ * face, narrow and large, in the organisation's green with lining tabular
10
+ * figures and its unit a step smaller; under it the sentence of context in
11
+ * the text face. No box, no tint, nothing counts up.
12
+ *
13
+ * Figures that are all percentages of one whole are drawn as a breakdown
14
+ * instead (`renderBreakdown`).
9
15
  */
10
- function renderItem(item) {
11
- return h('div', { class: 'cg-impact-stat' }, h('dt', { class: 'cg-impact-stat__label' }, item.label), h('dd', { class: 'cg-impact-stat__value' }, item.value, item.unit === undefined ? null : h('span', { class: 'cg-impact-stat__unit' }, item.unit)));
12
- }
13
- export function renderStats(block, _ctx) {
14
- return h('section', { class: 'cg-block cg-impact', 'data-block': 'stats' }, block.title === undefined
15
- ? null
16
- : heading(blockHeadingTag('stats') ?? 'h2', { class: 'cg-impact__title', 'data-field': 'title' }, block.title), h('dl', { class: 'cg-impact__items' }, block.items.map(renderItem)));
16
+ export function renderStats(block, ctx) {
17
+ const breakdown = isBreakdown(block.items);
18
+ return section('section', 'stats', 'ca-figures', {
19
+ 'data-shape': breakdown ? 'breakdown' : 'figures',
20
+ 'data-count': String(Math.min(block.items.length, 4)),
21
+ 'data-titled': String(block.title !== undefined),
22
+ }, 'div', sectionHead('stats', block.title), breakdown
23
+ ? renderBreakdown(block.items, ctx)
24
+ : h('dl', { class: 'ca-figures__items' }, block.items.map((item) => h('div', { class: 'ca-figures__item' }, h('dt', { class: 'ca-figures__label' }, item.label), h('dd', { class: 'ca-figures__value' }, item.value, item.unit === undefined
25
+ ? null
26
+ : h('span', { class: 'ca-figures__unit' }, item.unit))))));
17
27
  }
18
28
  //# sourceMappingURL=stats.js.map
@@ -1 +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;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,IAAc;IAChC,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACvD,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CACzF,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,IAAmB;IAChE,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,OAAO,EAAE,EACtD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAChC,EAAE,KAAK,EAAE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AAE,CACvB,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACnD,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,KAAK,SAAS;YACrB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CACxD,CACF,CACF,CACF,CACN,CAAA;AACH,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import type { TestimonialBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * `blocks@2.0` (RFC 0001). A volunteer's own words — the same
5
- * `<figure><blockquote>…</blockquote><figcaption>` pattern `quote` uses, but
6
- * the quote itself is rich text and the attribution is the block's single
7
- * grouped `attribution` field. The avatar sits in a round frame, echoing the
8
- * hero's own rounded, friendly treatment.
4
+ * One person's own account of what the organisation meant to them, told
5
+ * with their photograph: the portrait cropped to 4:5 on the first four
6
+ * columns, the words in the display face on the last seven, starting on a
7
+ * hung quotation mark, and the name and what they do here beneath them.
8
+ * Without a portrait the words take the reading column alone; nothing stands
9
+ * in for the missing face.
9
10
  */
10
11
  export declare function renderTestimonial(block: TestimonialBlock, ctx: RenderContext): HtmlElement;
11
12
  //# sourceMappingURL=testimonial.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testimonial.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AAEnG;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAyB1F"}
1
+ {"version":3,"file":"testimonial.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AAGnG;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAgC1F"}
@@ -1,20 +1,22 @@
1
1
  import { h, image, renderRichText } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * `blocks@2.0` (RFC 0001). A volunteer's own words — the same
4
- * `<figure><blockquote>…</blockquote><figcaption>` pattern `quote` uses, but
5
- * the quote itself is rich text and the attribution is the block's single
6
- * grouped `attribution` field. The avatar sits in a round frame, echoing the
7
- * hero's own rounded, friendly treatment.
4
+ * One person's own account of what the organisation meant to them, told
5
+ * with their photograph: the portrait cropped to 4:5 on the first four
6
+ * columns, the words in the display face on the last seven, starting on a
7
+ * hung quotation mark, and the name and what they do here beneath them.
8
+ * Without a portrait the words take the reading column alone; nothing stands
9
+ * in for the missing face.
8
10
  */
9
11
  export function renderTestimonial(block, ctx) {
10
12
  const { attribution } = block;
11
- return h('figure', { class: 'cg-block cg-testimonial', 'data-block': 'testimonial' }, h('blockquote', { class: 'cg-testimonial__quote' }, renderRichText(ctx, block.quote)), h('figcaption', { class: 'cg-testimonial__attribution' }, attribution.avatar === undefined
13
+ return section('div', 'testimonial', 'ca-story', { 'data-portrait': String(attribution.avatar !== undefined) }, 'figure', attribution.avatar === undefined
12
14
  ? null
13
- : image(ctx, attribution.avatar, {
14
- className: 'cg-testimonial__avatar',
15
- variant: { width: 96, height: 96, fit: 'cover' },
16
- }), h('span', { class: 'cg-testimonial__who' }, h('span', { class: 'cg-testimonial__name' }, attribution.name), attribution.role === undefined
15
+ : h('div', { class: 'ca-story__portrait' }, image(ctx, attribution.avatar, {
16
+ className: 'ca-story__image',
17
+ sizes: '(min-width: 64rem) 26rem, 70vw',
18
+ })), h('div', { class: 'ca-story__words' }, h('blockquote', { class: 'ca-story__quote' }, renderRichText(ctx, block.quote)), h('figcaption', { class: 'ca-story__attribution' }, h('span', { class: 'ca-story__name' }, attribution.name), attribution.role === undefined
17
19
  ? null
18
- : h('span', { class: 'cg-testimonial__role' }, attribution.role))));
20
+ : h('span', { class: 'ca-story__role' }, attribution.role))));
19
21
  }
20
22
  //# sourceMappingURL=testimonial.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"testimonial.js","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnG;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,GAAkB;IAC3E,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IAC7B,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,aAAa,EAAE,EACjE,CAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EACrF,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,6BAA6B,EAAE,EACxC,WAAW,CAAC,MAAM,KAAK,SAAS;QAC9B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,EAAE;YAC7B,SAAS,EAAE,wBAAwB;YACnC,OAAO,EAAE,EAAE,KAAK,E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AC,YAAY,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAC/E,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,EACxD,WAAW,CAAC,IAAI,KAAK,SAAS;QAC5B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,CAC7D,CACF,CACF,CAAA;AACH,CAAC"}
@@ -1,3 +1,40 @@
1
- import { type ChromeInput, type ChromeResult } from '@cogenta/theme-kit';
1
+ import { type ChromeInput, type ChromeNavLink, type ChromeResult } from '@cogenta/theme-kit';
2
+ /**
3
+ * The header and footer of a charity's site (`theme@1.4`).
4
+ *
5
+ * Header: one row on the paper under a hairline. The organisation's name in
6
+ * the display face (or its uploaded logo), the pages in plain words, then the
7
+ * `headerAction` as the yellow button, the one standing ask of a charity's
8
+ * site, and the light/dark control. The action sits outside the navigation
9
+ * list on purpose: on a phone it stays in the header row beside the menu
10
+ * button.
11
+ *
12
+ * Below the wide breakpoint the pages become a panel of large links under the
13
+ * header, opened by a CSS-only toggle: a visually hidden checkbox paired with
14
+ * a `<label>` that says "Menu" (and "Close" once open), placed before the
15
+ * `<nav>` so the sibling combinator reaches it. One `<nav>` in the markup,
16
+ * retiled by CSS. The panel repeats the `tagline` under the links.
17
+ *
18
+ * Footer: the green band. The name, the `tagline`, the `footerNote` (a blank
19
+ * line starts a new paragraph, a line break stays a line break, so the
20
+ * registered charity number, the address and the contact lines keep their
21
+ * shape), the social profiles with their names; then the footer navigation in
22
+ * columns: a `submenu-placeholder` (an unlinked item such as "Get involved")
23
+ * starts a column and names it, the links after it fill it. Under a hairline,
24
+ * the legal line: the copyright year and the name, beside the host's
25
+ * `brandingHtml`, placed once, as received. Every `theme@1.4` field renders
26
+ * only when present.
27
+ *
28
+ * Footer widget columns (`theme@1.6`) are one row under the name and the
29
+ * menu, above the legal line, in the band's own small type; with none, the
30
+ * footer is exactly what it was before widgets existed.
31
+ */
32
+ interface FooterGroup {
33
+ readonly heading: string | null;
34
+ readonly links: readonly ChromeNavLink[];
35
+ }
36
+ /** The footer menu, split into columns at each unlinked heading. */
37
+ export declare function footerGroups(links: readonly ChromeNavLink[]): readonly FooterGroup[];
2
38
  export declare function renderChrome(input: ChromeInput): ChromeResult;
39
+ export {};
3
40
  //# sourceMappingURL=chrome.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,YAAY,EAOlB,MAAM,oBAAoB,CAAA;AAgE3B,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CA2D7D"}
1
+ {"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,EAQlB,MAAM,oBAAoB,CAAA;AAG3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,UAAU,WAAW;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAA;CACzC;AAcD,oEAAoE;AACpE,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,GAAG,SAAS,WAAW,EAAE,CAYpF;AAmCD,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAiG7D"}