@cogenta/theme-magazine 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 (126) hide show
  1. package/dist/src/index.d.ts +3 -0
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +3 -0
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/render/article.d.ts +32 -0
  6. package/dist/src/render/article.d.ts.map +1 -0
  7. package/dist/src/render/article.js +137 -0
  8. package/dist/src/render/article.js.map +1 -0
  9. package/dist/src/render/blocks/accordion.d.ts.map +1 -1
  10. package/dist/src/render/blocks/accordion.js +9 -13
  11. package/dist/src/render/blocks/accordion.js.map +1 -1
  12. package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
  13. package/dist/src/render/blocks/collection-list.js +91 -118
  14. package/dist/src/render/blocks/collection-list.js.map +1 -1
  15. package/dist/src/render/blocks/cta.d.ts +4 -4
  16. package/dist/src/render/blocks/cta.d.ts.map +1 -1
  17. package/dist/src/render/blocks/cta.js +7 -9
  18. package/dist/src/render/blocks/cta.js.map +1 -1
  19. package/dist/src/render/blocks/embed.d.ts.map +1 -1
  20. package/dist/src/render/blocks/embed.js +17 -20
  21. package/dist/src/render/blocks/embed.js.map +1 -1
  22. package/dist/src/render/blocks/faq.d.ts.map +1 -1
  23. package/dist/src/render/blocks/faq.js +12 -11
  24. package/dist/src/render/blocks/faq.js.map +1 -1
  25. package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
  26. package/dist/src/render/blocks/feature-grid.js +13 -20
  27. package/dist/src/render/blocks/feature-grid.js.map +1 -1
  28. package/dist/src/render/blocks/gallery.d.ts +6 -6
  29. package/dist/src/render/blocks/gallery.d.ts.map +1 -1
  30. package/dist/src/render/blocks/gallery.js +15 -13
  31. package/dist/src/render/blocks/gallery.js.map +1 -1
  32. package/dist/src/render/blocks/hero.d.ts +6 -5
  33. package/dist/src/render/blocks/hero.d.ts.map +1 -1
  34. package/dist/src/render/blocks/hero.js +15 -14
  35. package/dist/src/render/blocks/hero.js.map +1 -1
  36. package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
  37. package/dist/src/render/blocks/logo-strip.js +8 -11
  38. package/dist/src/render/blocks/logo-strip.js.map +1 -1
  39. package/dist/src/render/blocks/logos.d.ts.map +1 -1
  40. package/dist/src/render/blocks/logos.js +16 -16
  41. package/dist/src/render/blocks/logos.js.map +1 -1
  42. package/dist/src/render/blocks/media-figure.d.ts +8 -8
  43. package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
  44. package/dist/src/render/blocks/media-figure.js +23 -19
  45. package/dist/src/render/blocks/media-figure.js.map +1 -1
  46. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
  47. package/dist/src/render/blocks/pricing-table.js +19 -22
  48. package/dist/src/render/blocks/pricing-table.js.map +1 -1
  49. package/dist/src/render/blocks/prose.d.ts +6 -10
  50. package/dist/src/render/blocks/prose.d.ts.map +1 -1
  51. package/dist/src/render/blocks/prose.js +8 -11
  52. package/dist/src/render/blocks/prose.js.map +1 -1
  53. package/dist/src/render/blocks/quote.d.ts +6 -9
  54. package/dist/src/render/blocks/quote.d.ts.map +1 -1
  55. package/dist/src/render/blocks/quote.js +11 -13
  56. package/dist/src/render/blocks/quote.js.map +1 -1
  57. package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
  58. package/dist/src/render/blocks/stat-counter.js +9 -10
  59. package/dist/src/render/blocks/stat-counter.js.map +1 -1
  60. package/dist/src/render/blocks/stats.d.ts.map +1 -1
  61. package/dist/src/render/blocks/stats.js +9 -12
  62. package/dist/src/render/blocks/stats.js.map +1 -1
  63. package/dist/src/render/blocks/testimonial.d.ts +4 -13
  64. package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
  65. package/dist/src/render/blocks/testimonial.js +7 -15
  66. package/dist/src/render/blocks/testimonial.js.map +1 -1
  67. package/dist/src/render/chrome.d.ts.map +1 -1
  68. package/dist/src/render/chrome.js +109 -97
  69. package/dist/src/render/chrome.js.map +1 -1
  70. package/dist/src/render/layout.d.ts +28 -0
  71. package/dist/src/render/layout.d.ts.map +1 -0
  72. package/dist/src/render/layout.js +72 -0
  73. package/dist/src/render/layout.js.map +1 -0
  74. package/dist/src/render/render-block.d.ts +15 -13
  75. package/dist/src/render/render-block.d.ts.map +1 -1
  76. package/dist/src/render/render-block.js +53 -29
  77. package/dist/src/render/render-block.js.map +1 -1
  78. package/dist/src/render/story.d.ts +41 -0
  79. package/dist/src/render/story.d.ts.map +1 -0
  80. package/dist/src/render/story.js +65 -0
  81. package/dist/src/render/story.js.map +1 -0
  82. package/dist/src/render/term-archive.d.ts +0 -10
  83. package/dist/src/render/term-archive.d.ts.map +1 -1
  84. package/dist/src/render/term-archive.js +42 -19
  85. package/dist/src/render/term-archive.js.map +1 -1
  86. package/dist/src/render/widget-areas.d.ts +12 -0
  87. package/dist/src/render/widget-areas.d.ts.map +1 -0
  88. package/dist/src/render/widget-areas.js +19 -0
  89. package/dist/src/render/widget-areas.js.map +1 -0
  90. package/dist/theme.config.js +2 -2
  91. package/dist/theme.config.js.map +1 -1
  92. package/package.json +5 -5
  93. package/src/index.ts +3 -0
  94. package/src/render/article.ts +239 -0
  95. package/src/render/blocks/accordion.ts +23 -30
  96. package/src/render/blocks/collection-list.ts +161 -225
  97. package/src/render/blocks/cta.ts +19 -13
  98. package/src/render/blocks/embed.ts +40 -36
  99. package/src/render/blocks/faq.ts +31 -36
  100. package/src/render/blocks/feature-grid.ts +26 -36
  101. package/src/render/blocks/gallery.ts +24 -18
  102. package/src/render/blocks/hero.ts +32 -32
  103. package/src/render/blocks/logo-strip.ts +17 -17
  104. package/src/render/blocks/logos.ts +23 -31
  105. package/src/render/blocks/media-figure.ts +36 -20
  106. package/src/render/blocks/pricing-table.ts +29 -34
  107. package/src/render/blocks/prose.ts +13 -13
  108. package/src/render/blocks/quote.ts +24 -24
  109. package/src/render/blocks/stat-counter.ts +16 -24
  110. package/src/render/blocks/stats.ts +14 -24
  111. package/src/render/blocks/testimonial.ts +12 -17
  112. package/src/render/chrome.ts +123 -104
  113. package/src/render/layout.ts +105 -0
  114. package/src/render/render-block.ts +61 -33
  115. package/src/render/story.ts +139 -0
  116. package/src/render/term-archive.ts +111 -58
  117. package/src/render/widget-areas.ts +22 -0
  118. package/src/styles/archive.css +114 -17
  119. package/src/styles/article.css +237 -0
  120. package/src/styles/base.css +848 -591
  121. package/src/styles/blocks.css +903 -921
  122. package/src/styles/stories.css +593 -0
  123. package/src/styles/theme.css +28 -9
  124. package/src/styles/tokens.css +200 -185
  125. package/src/styles/widgets.css +614 -0
  126. package/tokens.json +18 -18
@@ -1,16 +1,14 @@
1
1
  import { actionList, blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * The subscription page a print magazine always carries: a panel framed by
4
- * a heavy top-and-bottom rule rather than a rounded, shadowed card — the
5
- * theme's one deliberately "loud" moment, reserved for the block whose whole
6
- * job is to ask for something.
4
+ * An appeal, set like the subscription panel a newspaper runs between two
5
+ * sections: a double rule above, the title large in the display face across
6
+ * the left seven columns, the text and the actions in the right five. No
7
+ * coloured box: the rules and the type carry it.
7
8
  */
8
9
  export function renderCta(block, ctx) {
9
- return h('section', { class: 'cg-block cg-subscribe', 'data-block': 'cta' }, heading(blockHeadingTag('cta') ?? 'h2', { class: 'cg-subscribe__title', 'data-field': 'title' }, block.title), block.text === undefined
10
+ return section('section', 'cta', 'cg-appeal', {}, 'div', heading(blockHeadingTag('cta') ?? 'h2', { class: 'cg-appeal__title', 'data-field': 'title' }, block.title), h('div', { class: 'cg-appeal__body' }, block.text === undefined
10
11
  ? null
11
- : h('p', { class: 'cg-subscribe__text', 'data-field': 'text' }, block.text),
12
- // `actions` is required and non-empty for a `cta`, so this always renders;
13
- // the null branch stays reachable only through invalid stored data.
14
- actionList(ctx, block.actions, block.title));
12
+ : h('p', { class: 'cg-appeal__text', 'data-field': 'text' }, block.text), actionList(ctx, block.actions, block.title)));
15
13
  }
16
14
  //# sourceMappingURL=cta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cta.js","sourceRoot":"","sources":["../../../../src/render/blocks/cta.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;AAE3B;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,KAAK,EAAE,EACvD,OAAO,CACL,eAAe,CAAC,KAAK,CAAC,IAAI,IAAI,EAC9B,EAAE,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,OAAO,EAAE,EACvD,KAAK,CAAC,KAAK,CACZ,EACD,KAAK,CAAC,IAAI,KAAK,SAAS;QACtB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC;IAC7E,2EAA2E;IAC3E,oEAAoE;IACpE,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAC5C,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"cta.js","sourceRoot":"","sources":["../../../../src/render/blocks/cta.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,OAAO,OAAO,CACZ,SAAS,EACT,KAAK,EACL,WAAW,EACX,EAAE,EACF,KAAK,EACL,OAAO,CACL,eAAe,CAAC,KAAK,CAAC,IAAI,IAAI,EAC9B,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,OAAO,EAAE,EACpD,KAAK,CAAC,KAAK,CACZ,EACD,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,KAAK,CAAC,IAAI,KAAK,SAAS;QACtB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,EAC1E,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAC5C,CACF,CAAA;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAe,KAAK,WAAW,EAAK,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAkEzF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA+B9E"}
1
+ {"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAe,KAAK,WAAW,EAAK,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAgEzF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAqC9E"}
@@ -1,12 +1,14 @@
1
1
  import { aspectRatio, h } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * Nothing here contacts a third party before the visitor has consented — the
4
- * same rule the reference theme enforces, reused verbatim: an iframe (or a
5
- * thumbnail fetch) already hands the provider an IP address and a cookie,
6
- * which is exactly the transfer consent is supposed to gate. No consent
7
- * *button* ships either, because this theme ships no JavaScript to wire one
8
- * to: granting consent is a site-wide decision for a future consent layer,
9
- * not a block's.
4
+ * Nothing here contacts a third party before the visitor consents: when
5
+ * `consentRequired` is set, or the provider has no cookie-free frame source,
6
+ * a notice and an outbound link render instead of an `<iframe>`. No
7
+ * preconnect, no thumbnail fetched from the provider.
8
+ *
9
+ * The frame and the notice both take the reading column at the block's
10
+ * ratio. The notice holds the place the player will take: a hairline frame,
11
+ * the provider named in small capitals, one sentence, one arrow link.
10
12
  */
11
13
  function frameSource(provider, rawUrl) {
12
14
  const url = URL.parse(rawUrl);
@@ -37,15 +39,12 @@ function frameSource(provider, rawUrl) {
37
39
  case 'soundcloud':
38
40
  return `https://w.soundcloud.com/player/?url=${encodeURIComponent(rawUrl)}`;
39
41
  default:
40
- // bluesky, mastodon, other: a post embed is a script tag this theme
41
- // does not load. The sidebar note card is the rendering.
42
42
  return null;
43
43
  }
44
44
  }
45
- /** A boxed sidebar note — dashed rule, small caps label — the editorial way of saying "not loaded here". */
46
- function noteCard(block, ctx, reason) {
47
- return h('div', { class: 'cg-sidenote__box' }, h('p', { class: 'cg-sidenote__label' }, ctx.t('embed.label')), h('p', { class: 'cg-sidenote__notice' }, reason), h('a', {
48
- class: 'cg-sidenote__link',
45
+ function notice(block, ctx, reason) {
46
+ return h('div', { class: 'cg-embed__notice' }, h('p', { class: 'cg-embed__label' }, ctx.t('embed.label')), h('p', { class: 'cg-embed__reason' }, reason), h('a', {
47
+ class: 'cg-arrow-link cg-embed__link',
49
48
  href: ctx.link(block.url),
50
49
  rel: 'noopener noreferrer nofollow',
51
50
  }, ctx.t('embed.open', { provider: block.provider })));
@@ -53,24 +52,22 @@ function noteCard(block, ctx, reason) {
53
52
  export function renderEmbed(block, ctx) {
54
53
  const source = block.consentRequired ? null : frameSource(block.provider, block.url);
55
54
  const ratio = aspectRatio(block.ratio) ?? '16 / 9';
56
- return h('div', {
57
- class: 'cg-block cg-sidenote',
58
- 'data-block': 'embed',
55
+ return section('div', 'embed', 'cg-embed', {
59
56
  'data-provider': block.provider,
60
57
  'data-consent': block.consentRequired ? 'required' : 'not-required',
61
58
  style: `--cg-ratio:${ratio}`,
62
- }, source === null
63
- ? noteCard(block, ctx, block.consentRequired
59
+ }, 'div', h('div', { class: 'cg-embed__frame' }, source === null
60
+ ? notice(block, ctx, block.consentRequired
64
61
  ? ctx.t('embed.consentRequired', { provider: block.provider })
65
62
  : ctx.t('embed.unsupported', { provider: block.provider }))
66
63
  : h('iframe', {
67
- class: 'cg-sidenote__frame',
64
+ class: 'cg-embed__player',
68
65
  src: source,
69
66
  title: ctx.t('embed.title', { provider: block.provider }),
70
67
  loading: 'lazy',
71
68
  referrerpolicy: 'strict-origin-when-cross-origin',
72
69
  allow: 'accelerometer; clipboard-write; encrypted-media; picture-in-picture; fullscreen',
73
70
  allowfullscreen: true,
74
- }));
71
+ })));
75
72
  }
76
73
  //# sourceMappingURL=embed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"embed.js","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAoB,CAAC,EAAsB,MAAM,oBAAoB,CAAA;AAEzF;;;;;;;;GAQG;AAEH,SAAS,WAAW,CAAC,QAAgC,EAAE,MAAc;IACnE,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC7B,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC7B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAA;IAE5E,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,SAAS,EAAE,CAAC;YACf,MAAM,EAAE,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L,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,MAAM,KAAK,IAAI;QACb,CAAC,CAAC,MAAM,CACJ,KAAK,EACL,GAAG,EACH,KAAK,CAAC,eAAe;YACnB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC9D,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAC7D;QACH,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzD,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,iCAAiC;YACjD,KAAK,EACH,iFAAiF;YACnF,eAAe,EAAE,IAAI;SACtB,CAAC,CACP,CACF,CAAA;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"faq.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/faq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAW,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAgC3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB1E"}
1
+ {"version":3,"file":"faq.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/faq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAW,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAmB3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAyB1E"}
@@ -1,18 +1,19 @@
1
1
  import { blockHeadingTag, h, heading, renderRichText, } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * A reader-mailbag column: numbered questions set in the display serif, the
4
- * answer running underneath once opened. `<details>`/`<summary>` still does
5
- * all the work — expand/collapse, keyboard operation and the announced
6
- * expanded state all come from the browser at zero bytes of JavaScript,
7
- * exactly as in the reference theme; only the typography and the numbering
8
- * are this theme's own.
4
+ * Questions and their answers, set open, the way a newspaper prints a
5
+ * reader's guide: the title in the left three columns, and down the right
6
+ * the questions in the display face with each answer under it, divided by
7
+ * hairlines. Nothing is hidden behind a disclosure: a short guide is read
8
+ * whole. (`accordion` is the collapsible form of the same content.)
9
9
  */
10
- function renderItem(item, ctx, index) {
11
- return h('li', { class: 'cg-mailbag__item' }, h('details', { class: 'cg-mailbag__details' }, h('summary', { class: 'cg-mailbag__question' }, h('span', { class: 'cg-mailbag__number', 'aria-hidden': 'true' }, String(index + 1).padStart(2, '0')), h('span', { class: 'cg-mailbag__question-text' }, item.question)), h('div', { class: 'cg-mailbag__answer' }, renderRichText(ctx, item.answer))));
10
+ function renderItem(item, ctx, tag) {
11
+ return h('div', { class: 'cg-guide__item' }, heading(tag, { class: 'cg-guide__question' }, item.question), h('div', { class: 'cg-guide__answer' }, renderRichText(ctx, item.answer)));
12
12
  }
13
13
  export function renderFaq(block, ctx) {
14
- return h('section', { class: 'cg-block cg-mailbag', 'data-block': 'faq' }, block.title === undefined
15
- ? null
16
- : heading(blockHeadingTag('faq') ?? 'h2', { class: 'cg-mailbag__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-mailbag__items' }, block.items.map((item, index) => renderItem(item, ctx, index))));
14
+ const titled = block.title !== undefined;
15
+ return section('section', 'faq', 'cg-guide', { 'data-titled': titled ? 'true' : 'false' }, 'div', titled
16
+ ? h('div', { class: 'cg-guide__head' }, heading(blockHeadingTag('faq') ?? 'h2', { class: 'cg-guide__title', 'data-field': 'title' }, block.title ?? ''))
17
+ : null, h('div', { class: 'cg-guide__items' }, block.items.map((item) => renderItem(item, ctx, titled ? 'h3' : 'h2'))));
17
18
  }
18
19
  //# sourceMappingURL=faq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"faq.js","sourceRoot":"","sources":["../../../../src/render/blocks/faq.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,EAEP,cAAc,GACf,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,IAAa,EAAE,GAAkB,EAAE,KAAa;IAClE,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAChC,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,sBAAsB,EAAE,EACjC,CAAC,CACC,MAAM,EACN,EAAE,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,EAAE,EACtD,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CACnC,EACD,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,2BAA2B,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CACjE,EACD,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAC5E,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,KAAK,EAAE,EACrD,KAAK,C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,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,EAC5C,KAAK,EACL,MAAM;QACJ,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,OAAO,CACL,eAAe,CAAC,KAAK,CAAC,IAAI,IAAI,EAC9B,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,EACnD,KAAK,CAAC,KAAK,IAAI,EAAE,CAClB,CACF;QACH,CAAC,CAAC,IAAI,EACR,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CACvE,CACF,CAAA;AACH,CAAC"}
@@ -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,EACnB,MAAM,oBAAoB,CAAA;AA+B3B,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,EAEL,KAAK,WAAW,EAKhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AA0B3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAe1F"}
@@ -1,27 +1,20 @@
1
- import { blockHeadingTag, h, heading, href, nestedHeadingTag, } from '@cogenta/theme-kit';
1
+ import { h, heading, href, nestedHeadingTag, } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
2
3
  /**
3
- * A contents index, not a card grid: a bordered panel, a real newspaper
4
- * `column-rule` between the columns it falls into at width, and each entry
5
- * numbered by a CSS counter rather than an icon chip — this vocabulary's
6
- * `icon` names a symbol no icon set this theme ships can resolve into
7
- * markup, so a numeral the browser generates for free reads as considered
8
- * rather than as a placeholder.
9
- *
10
- * The item's own title carries the link, exactly as in the reference theme:
11
- * a bare "read more" repeated across a grid fails WCAG 2.4.4, and the block
12
- * has no separate label field to fix that with.
4
+ * A set of short items, set as a contents panel: up to four columns divided
5
+ * by vertical hairlines, each item a title in the display face and a line of
6
+ * text. An item with a link makes its title the link, with an arrow set
7
+ * inline after the last word so the underline runs under the words and never
8
+ * under a lone arrow. No icon tiles: `icon` names are ignored on purpose, a
9
+ * newspaper sets a contents panel in type.
13
10
  */
14
11
  function renderItem(item, ctx, tag) {
15
- const title = item.link === undefined
16
- ? heading(tag, { class: 'cg-index__title' }, item.title)
17
- : heading(tag, { class: 'cg-index__title' }, h('a', { class: 'cg-index__link', href: href(ctx, item.link) }, item.title));
18
- return h('li', { class: 'cg-index__item', 'data-icon': item.icon }, title, item.text === undefined ? null : h('p', { class: 'cg-index__text' }, item.text));
12
+ return h('li', { class: 'cg-contents__item' }, heading(tag, { class: 'cg-contents__title' }, item.link === undefined
13
+ ? item.title
14
+ : h('a', { class: 'cg-arrow-link', href: href(ctx, item.link) }, item.title)), item.text === undefined ? null : h('p', { class: 'cg-contents__text' }, item.text));
19
15
  }
20
16
  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-index', 'data-block': 'featureGrid' }, hasTitle
24
- ? heading(blockHeadingTag('featureGrid') ?? 'h2', { class: 'cg-index__heading', 'data-field': 'title' }, block.title ?? '')
25
- : null, h('ol', { class: 'cg-index__items' }, block.items.map((item) => renderItem(item, ctx, itemTag))));
17
+ const tag = nestedHeadingTag('featureGrid', block.title !== undefined);
18
+ return section('section', 'featureGrid', 'cg-contents', { 'data-count': String(Math.min(block.items.length, 4)) }, 'div', sectionHead('featureGrid', block.title), h('ul', { class: 'cg-contents__items' }, block.items.map((item) => renderItem(item, ctx, tag))));
26
19
  }
27
20
  //# 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,GAEjB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;GAWG;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,iBAAiB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC;QACxD,CAAC,CAAC,OAAO,CACL,GAAG,EACH,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAC5E,CAAA;IACP,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,EACnD,KAAK,EACL,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,K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IAAI,KAAK,SAAS;QACrB,CAAC,CAAC,IAAI,CAAC,KAAK;QACZ,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAC/E,EACD,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CACnF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,GAAkB;IAC3E,MAAM,GAAG,GAAG,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAA;IACtE,OAAO,OAAO,CACZ,SAAS,EACT,aAAa,EACb,aAAa,EACb,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EACzD,KAAK,EACL,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,EACvC,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CACtD,CACF,CAAA;AACH,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import type { GalleryBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * A contact sheet: numbered frames (a CSS counter, drawn in the negative
5
- * space of the print corner) in a tight grid with hairline gutters, rather
6
- * than the reference theme's rounded, shadowed tiles.
4
+ * A picture page, square-cornered, with a constant gutter:
7
5
  *
8
- * The carousel layout ships **no JavaScript** — a scroll-snapping, focusable,
9
- * labelled region gives keyboard, touch and trackpad scrolling for free
10
- * (WCAG 2.4.3/4.1.2), with none of a scripted carousel's failure modes.
6
+ * - `grid`: the first photograph across eight columns, the next two stacked
7
+ * beside it, then rows of three at 3:2, the rhythm of a picture spread.
8
+ * - `masonry`: three columns at each picture's own ratio.
9
+ * - `carousel`: one row that scrolls and snaps, focusable and labelled; touch,
10
+ * trackpad and arrow keys are all native. No script.
11
11
  */
12
12
  export declare function renderGallery(block: GalleryBlock, ctx: RenderContext): HtmlElement;
13
13
  //# 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;;;;;;;;GAQG;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;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAsClF"}
@@ -1,22 +1,24 @@
1
1
  import { h, image } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * A contact sheet: numbered frames (a CSS counter, drawn in the negative
4
- * space of the print corner) in a tight grid with hairline gutters, rather
5
- * than the reference theme's rounded, shadowed tiles.
4
+ * A picture page, square-cornered, with a constant gutter:
6
5
  *
7
- * The carousel layout ships **no JavaScript** — a scroll-snapping, focusable,
8
- * labelled region gives keyboard, touch and trackpad scrolling for free
9
- * (WCAG 2.4.3/4.1.2), with none of a scripted carousel's failure modes.
6
+ * - `grid`: the first photograph across eight columns, the next two stacked
7
+ * beside it, then rows of three at 3:2, the rhythm of a picture spread.
8
+ * - `masonry`: three columns at each picture's own ratio.
9
+ * - `carousel`: one row that scrolls and snaps, focusable and labelled; touch,
10
+ * trackpad and arrow keys are all native. No script.
10
11
  */
11
12
  export function renderGallery(block, ctx) {
12
- const items = h('ul', { class: 'cg-contactsheet__items' }, block.items.map((item) => h('li', { class: 'cg-contactsheet__item' }, image(ctx, item.media, { sizes: '(min-width: 45rem) 18rem, 50vw' }))));
13
- return h('section', {
14
- class: 'cg-block cg-contactsheet',
15
- 'data-block': 'gallery',
16
- 'data-layout': block.layout,
17
- }, block.layout === 'carousel'
13
+ const items = h('ul', { class: 'cg-pictures__items', 'data-count': String(block.items.length) }, block.items.map((item, index) => h('li', { class: 'cg-pictures__item' }, image(ctx, item.media, {
14
+ className: 'cg-pictures__image',
15
+ sizes: block.layout === 'grid' && index === 0
16
+ ? '(min-width: 64rem) 52rem, 100vw'
17
+ : '(min-width: 64rem) 26rem, (min-width: 40rem) 45vw, 90vw',
18
+ }))));
19
+ return section('div', 'gallery', 'cg-pictures', { 'data-layout': block.layout }, 'div', block.layout === 'carousel'
18
20
  ? h('div', {
19
- class: 'cg-contactsheet__viewport',
21
+ class: 'cg-pictures__viewport',
20
22
  role: 'region',
21
23
  'aria-label': ctx.t('gallery.carousel'),
22
24
  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;;;;;;;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AI,EAAE,KAAK,EAAE,EAAE,CAC9B,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;QACrB,SAAS,EAAE,oBAAoB;QAC/B,KAAK,EACH,KAAK,CAAC,MAAM,KAAK,MAAM,IAAI,KAAK,KAAK,CAAC;YACpC,CAAC,CAAC,iCAAiC;YACnC,CAAC,CAAC,yDAAyD;KAChE,CAAC,CACH,CACF,CACF,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,11 +1,12 @@
1
1
  import type { HeroBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * The cover story. `hero` carries the page's own `h1` (contract B's
5
- * `headingLevel: 'h1'`), so this is the one place the masthead's front page
6
- * lives: an eyebrow set as a kicker, a big serif headline, a dek, and the
7
- * lead image on the other side of a hairline column rule — the two-column
8
- * "story well" a print front page opens on, rather than a centred banner.
4
+ * A cover story. `hero` carries the page's own `h1` (contract B), so it is
5
+ * set as the opening of a special issue: the eyebrow as a red kicker, the
6
+ * headline in the display face at its largest, the subtitle as an italic
7
+ * standfirst, and the photograph beside the words across seven columns,
8
+ * its bottom edge on the same line as the last action. Without a photograph
9
+ * the headline takes ten columns over a double rule.
9
10
  */
10
11
  export declare function renderHero(block: HeroBlock, ctx: RenderContext): HtmlElement;
11
12
  //# 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;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmC5E"}
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;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiC5E"}
@@ -1,26 +1,27 @@
1
1
  import { actionList, blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * The cover story. `hero` carries the page's own `h1` (contract B's
4
- * `headingLevel: 'h1'`), so this is the one place the masthead's front page
5
- * lives: an eyebrow set as a kicker, a big serif headline, a dek, and the
6
- * lead image on the other side of a hairline column rule — the two-column
7
- * "story well" a print front page opens on, rather than a centred banner.
4
+ * A cover story. `hero` carries the page's own `h1` (contract B), so it is
5
+ * set as the opening of a special issue: the eyebrow as a red kicker, the
6
+ * headline in the display face at its largest, the subtitle as an italic
7
+ * standfirst, and the photograph beside the words across seven columns,
8
+ * its bottom edge on the same line as the last action. Without a photograph
9
+ * the headline takes ten columns over a double rule.
8
10
  */
9
11
  export function renderHero(block, ctx) {
10
12
  const tag = blockHeadingTag('hero') ?? 'h1';
11
- return h('section', { class: 'cg-block cg-hero', 'data-block': 'hero' }, h('div', { class: 'cg-hero__grid' }, h('div', { class: 'cg-hero__copy' }, block.eyebrow === undefined
13
+ return section('section', 'hero', 'cg-cover', { 'data-media': block.media === undefined ? 'none' : 'image' }, 'div', h('div', { class: 'cg-cover__copy' }, block.eyebrow === undefined
12
14
  ? null
13
- : 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
15
+ : h('p', { class: 'cg-cover__kicker', 'data-field': 'eyebrow' }, block.eyebrow), heading(tag, { class: 'cg-cover__title', 'data-field': 'title' }, block.title), block.subtitle === undefined
14
16
  ? null
15
- : h('p', { class: 'cg-hero__subtitle', 'data-field': 'subtitle' }, block.subtitle), actionList(ctx, block.actions, ctx.t('hero.actions'))), block.media === undefined
17
+ : h('p', { class: 'cg-cover__standfirst', 'data-field': 'subtitle' }, block.subtitle), actionList(ctx, block.actions, ctx.t('hero.actions'))), block.media === undefined
16
18
  ? null
17
- : h('div', { class: 'cg-hero__media' },
18
- // The only image above the fold, so the only one loaded eagerly —
19
- // lazy-loading it is a measured LCP regression, not a theory.
19
+ : h('div', { class: 'cg-cover__media' },
20
+ // The one image above the fold, so the one loaded eagerly.
20
21
  image(ctx, block.media, {
21
- className: 'cg-hero__image',
22
+ className: 'cg-cover__image',
22
23
  loading: 'eager',
23
- sizes: '(min-width: 64rem) 56vw, 100vw',
24
- }))));
24
+ sizes: '(min-width: 64rem) 46rem, 100vw',
25
+ })));
25
26
  }
26
27
  //# 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;;;;;;GAMG;A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C,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,iBAAiB,EAAE;QAC5B,2DAA2D;QAC3D,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;YACtB,SAAS,EAAE,iBAAiB;YAC5B,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,iCAAiC;SACzC,CAAC,CACH,CACN,CAAA;AACH,CAAC"}
@@ -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;AAoBnF,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;AAiBnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAgBtF"}
@@ -1,20 +1,17 @@
1
1
  import { h, image } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * `blocks@2.0` (RFC 0001). The lighter-weight "as used by" strip next to
4
- * `logos`'s own press row (`cg-press`, which titles itself and links each
5
- * mark to its organisation): `logoStrip` has no per-logo name or url, so it
6
- * carries no title and no links — a plain band of marks with an optional
7
- * caption set underneath, the way a colophon credits its supporters along
8
- * the bottom of a masthead page. Each image's own alt text (set once, in
9
- * the media library) is what names it, exactly as `logos` already falls
10
- * back to when a link is absent.
4
+ * A line of credits: the caption in small capitals on the left three
5
+ * columns, the marks in one tone along the rest of the row, between two
6
+ * hairlines. `logoStrip` has no per-mark name or link, so each image's own
7
+ * alt text (set once, in the media library) is what names it.
11
8
  */
12
9
  function renderItem(item, ctx) {
13
- return h('li', { class: 'cg-imprint__item' }, image(ctx, item.media, { className: 'cg-imprint__image', variant: { fit: 'contain' } }));
10
+ return h('li', { class: 'cg-credits__item' }, image(ctx, item.media, { className: 'cg-credits__image', variant: { fit: 'contain' } }));
14
11
  }
15
12
  export function renderLogoStrip(block, ctx) {
16
- return h('figure', { class: 'cg-block cg-imprint', 'data-block': 'logoStrip' }, h('ul', { class: 'cg-imprint__items' }, block.logos.map((item) => renderItem(item, ctx))), block.caption === undefined
13
+ return section('div', 'logoStrip', 'cg-credits', {}, 'div', block.caption === undefined
17
14
  ? null
18
- : h('figcaption', { class: 'cg-imprint__caption', 'data-field': 'caption' }, block.caption));
15
+ : h('p', { class: 'cg-credits__caption', 'data-field': 'caption' }, block.caption), h('ul', { class: 'cg-credits__items' }, block.logos.map((item) => renderItem(item, ctx))));
19
16
  }
20
17
  //# 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,kBAAkB,EAAE,EAC7B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,CACxF,CAAA;AACH,CAAC;AAED,MAAM,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EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EACpF,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
@@ -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;AA+B3B,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;AAiCnF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAc9E"}
@@ -1,27 +1,27 @@
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
- * A press strip — "As seen in" — a single row divided by hairline rules
4
- * rather than a card grid, the way a masthead credits its syndication
5
- * partners along one line.
4
+ * Organisations credited by name, set as a ruled grid of marks in ink: up to
5
+ * six to a row on a wide screen (`data-count`, never fewer than three columns,
6
+ * so two marks do not stretch across the page), a hairline between each, the
7
+ * marks reduced to
8
+ * one tone so no brand colour competes with the page's single red.
6
9
  *
7
- * The organisation's name is contract B's own accessible name for the link:
8
- * the logo image carries it as `alt` when the media entity has none, so no
9
- * visually hidden duplicate text is needed — a link whose only content is an
10
- * image with `alt` text is already named.
10
+ * The organisation's name is contract B's own accessible name: the image
11
+ * carries it as `alt` when the media entity has none, so a linked mark is
12
+ * named without a hidden duplicate.
11
13
  */
12
14
  function renderItem(item, ctx) {
13
- const logo = image(ctx, item.media, {
14
- className: 'cg-press__image',
15
+ const mark = image(ctx, item.media, {
16
+ className: 'cg-marks__image',
15
17
  altFrom: item.name,
16
18
  variant: { fit: 'contain' },
17
19
  });
18
- return h('li', { class: 'cg-press__item' }, item.url === undefined
19
- ? logo
20
- : h('a', { class: 'cg-press__link', href: ctx.link(item.url), rel: 'noopener noreferrer' }, logo));
20
+ return h('li', { class: 'cg-marks__item' }, item.url === undefined
21
+ ? mark
22
+ : h('a', { class: 'cg-marks__link', href: ctx.link(item.url), rel: 'noopener noreferrer' }, mark));
21
23
  }
22
24
  export function renderLogos(block, ctx) {
23
- return h('section', { class: 'cg-block cg-press', 'data-block': 'logos' }, block.title === undefined
24
- ? null
25
- : heading(blockHeadingTag('logos') ?? 'h2', { class: 'cg-press__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-press__items' }, block.items.map((item) => renderItem(item, ctx))));
25
+ return section('section', 'logos', 'cg-marks', { 'data-count': String(Math.min(Math.max(block.items.length, 3), 6)) }, 'div', sectionHead('logos', block.title), h('ul', { class: 'cg-marks__items' }, block.items.map((item) => renderItem(item, ctx))));
26
26
  }
27
27
  //# 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;;;;;;;;;GASG;AACH,SAAS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 -1,15 +1,15 @@
1
1
  import type { MediaFigureBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * A plate, in the print sense: the picture runs large, and the caption sits
5
- * under a hairline rule set in small caps with the credit line trailing it —
6
- * the way a photo essay is captioned, rather than a card with a paragraph
7
- * under it.
4
+ * A photograph placed on the grid by its alignment, captioned the way a
5
+ * newspaper captions one: the caption in the interface face under the
6
+ * picture and the credit after it in small capitals, both starting on the
7
+ * picture's own left edge.
8
8
  *
9
- * `<figure>`/`<figcaption>` keep the caption announced as belonging to the
10
- * image; `align` stays a data attribute (contract B's intent, not a class),
11
- * so the skin — here, this theme — decides what `start`/`end`/`wide`/`full`
12
- * mean.
9
+ * - `center` (the default): the reading column.
10
+ * - `start` / `end`: half the page, from the left or to the right.
11
+ * - `wide`: ten columns, the width an article's lead photograph takes.
12
+ * - `full`: edge to edge, the caption returning to the grid.
13
13
  */
14
14
  export declare function renderMediaFigure(block: MediaFigureBlock, ctx: RenderContext): HtmlElement;
15
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;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA4B1F"}
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"}