@cogenta/theme-portfolio 1.1.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/src/index.d.ts +9 -0
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +10 -1
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/render/blocks/accordion.d.ts.map +1 -1
  6. package/dist/src/render/blocks/accordion.js +10 -18
  7. package/dist/src/render/blocks/accordion.js.map +1 -1
  8. package/dist/src/render/blocks/collection-list.d.ts +0 -20
  9. package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
  10. package/dist/src/render/blocks/collection-list.js +59 -66
  11. package/dist/src/render/blocks/collection-list.js.map +1 -1
  12. package/dist/src/render/blocks/cta.d.ts +4 -4
  13. package/dist/src/render/blocks/cta.d.ts.map +1 -1
  14. package/dist/src/render/blocks/cta.js +15 -10
  15. package/dist/src/render/blocks/cta.js.map +1 -1
  16. package/dist/src/render/blocks/embed.d.ts.map +1 -1
  17. package/dist/src/render/blocks/embed.js +16 -31
  18. package/dist/src/render/blocks/embed.js.map +1 -1
  19. package/dist/src/render/blocks/faq.d.ts.map +1 -1
  20. package/dist/src/render/blocks/faq.js +12 -17
  21. package/dist/src/render/blocks/faq.js.map +1 -1
  22. package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
  23. package/dist/src/render/blocks/feature-grid.js +26 -23
  24. package/dist/src/render/blocks/feature-grid.js.map +1 -1
  25. package/dist/src/render/blocks/gallery.d.ts +0 -14
  26. package/dist/src/render/blocks/gallery.d.ts.map +1 -1
  27. package/dist/src/render/blocks/gallery.js +29 -21
  28. package/dist/src/render/blocks/gallery.js.map +1 -1
  29. package/dist/src/render/blocks/hero.d.ts +8 -8
  30. package/dist/src/render/blocks/hero.d.ts.map +1 -1
  31. package/dist/src/render/blocks/hero.js +17 -18
  32. package/dist/src/render/blocks/hero.js.map +1 -1
  33. package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
  34. package/dist/src/render/blocks/logo-strip.js +9 -14
  35. package/dist/src/render/blocks/logo-strip.js.map +1 -1
  36. package/dist/src/render/blocks/logos.d.ts.map +1 -1
  37. package/dist/src/render/blocks/logos.js +14 -19
  38. package/dist/src/render/blocks/logos.js.map +1 -1
  39. package/dist/src/render/blocks/media-figure.d.ts +8 -12
  40. package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
  41. package/dist/src/render/blocks/media-figure.js +20 -20
  42. package/dist/src/render/blocks/media-figure.js.map +1 -1
  43. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
  44. package/dist/src/render/blocks/pricing-table.js +17 -20
  45. package/dist/src/render/blocks/pricing-table.js.map +1 -1
  46. package/dist/src/render/blocks/prose.d.ts +10 -9
  47. package/dist/src/render/blocks/prose.d.ts.map +1 -1
  48. package/dist/src/render/blocks/prose.js +29 -10
  49. package/dist/src/render/blocks/prose.js.map +1 -1
  50. package/dist/src/render/blocks/quote.d.ts +5 -12
  51. package/dist/src/render/blocks/quote.d.ts.map +1 -1
  52. package/dist/src/render/blocks/quote.js +9 -15
  53. package/dist/src/render/blocks/quote.js.map +1 -1
  54. package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
  55. package/dist/src/render/blocks/stat-counter.js +10 -12
  56. package/dist/src/render/blocks/stat-counter.js.map +1 -1
  57. package/dist/src/render/blocks/stats.d.ts.map +1 -1
  58. package/dist/src/render/blocks/stats.js +7 -15
  59. package/dist/src/render/blocks/stats.js.map +1 -1
  60. package/dist/src/render/blocks/testimonial.d.ts +4 -14
  61. package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
  62. package/dist/src/render/blocks/testimonial.js +9 -18
  63. package/dist/src/render/blocks/testimonial.js.map +1 -1
  64. package/dist/src/render/chrome.d.ts.map +1 -1
  65. package/dist/src/render/chrome.js +93 -90
  66. package/dist/src/render/chrome.js.map +1 -1
  67. package/dist/src/render/layout.d.ts +61 -0
  68. package/dist/src/render/layout.d.ts.map +1 -0
  69. package/dist/src/render/layout.js +134 -0
  70. package/dist/src/render/layout.js.map +1 -0
  71. package/dist/src/render/project.d.ts +27 -0
  72. package/dist/src/render/project.d.ts.map +1 -0
  73. package/dist/src/render/project.js +82 -0
  74. package/dist/src/render/project.js.map +1 -0
  75. package/dist/src/render/render-block.d.ts +17 -7
  76. package/dist/src/render/render-block.d.ts.map +1 -1
  77. package/dist/src/render/render-block.js +47 -34
  78. package/dist/src/render/render-block.js.map +1 -1
  79. package/dist/src/render/term-archive.d.ts +0 -11
  80. package/dist/src/render/term-archive.d.ts.map +1 -1
  81. package/dist/src/render/term-archive.js +36 -24
  82. package/dist/src/render/term-archive.js.map +1 -1
  83. package/dist/src/render/widget-areas.d.ts +14 -0
  84. package/dist/src/render/widget-areas.d.ts.map +1 -0
  85. package/dist/src/render/widget-areas.js +21 -0
  86. package/dist/src/render/widget-areas.js.map +1 -0
  87. package/dist/src/render/work.d.ts +37 -0
  88. package/dist/src/render/work.d.ts.map +1 -0
  89. package/dist/src/render/work.js +49 -0
  90. package/dist/src/render/work.js.map +1 -0
  91. package/dist/theme.config.d.ts +4 -7
  92. package/dist/theme.config.d.ts.map +1 -1
  93. package/dist/theme.config.js +6 -9
  94. package/dist/theme.config.js.map +1 -1
  95. package/package.json +4 -4
  96. package/src/index.ts +10 -1
  97. package/src/render/blocks/accordion.ts +22 -42
  98. package/src/render/blocks/collection-list.ts +83 -137
  99. package/src/render/blocks/cta.ts +24 -12
  100. package/src/render/blocks/embed.ts +39 -47
  101. package/src/render/blocks/faq.ts +24 -33
  102. package/src/render/blocks/feature-grid.ts +38 -41
  103. package/src/render/blocks/gallery.ts +34 -28
  104. package/src/render/blocks/hero.ts +31 -28
  105. package/src/render/blocks/logo-strip.ts +18 -20
  106. package/src/render/blocks/logos.ts +22 -43
  107. package/src/render/blocks/media-figure.ts +28 -20
  108. package/src/render/blocks/pricing-table.ts +31 -32
  109. package/src/render/blocks/prose.ts +38 -13
  110. package/src/render/blocks/quote.ts +18 -18
  111. package/src/render/blocks/stat-counter.ts +19 -37
  112. package/src/render/blocks/stats.ts +18 -33
  113. package/src/render/blocks/testimonial.ts +16 -22
  114. package/src/render/chrome.ts +99 -97
  115. package/src/render/layout.ts +177 -0
  116. package/src/render/project.ts +140 -0
  117. package/src/render/render-block.ts +49 -45
  118. package/src/render/term-archive.ts +92 -70
  119. package/src/render/widget-areas.ts +25 -0
  120. package/src/render/work.ts +124 -0
  121. package/src/styles/archive.css +61 -21
  122. package/src/styles/base.css +763 -648
  123. package/src/styles/blocks.css +697 -1093
  124. package/src/styles/theme.css +22 -10
  125. package/src/styles/tokens.css +174 -252
  126. package/src/styles/widgets.css +948 -0
  127. package/src/styles/work.css +405 -0
  128. package/tokens.json +19 -19
@@ -1,4 +1,5 @@
1
1
  export * from '@cogenta/theme-kit';
2
+ export * from './render/blocks/accordion.js';
2
3
  export * from './render/blocks/collection-list.js';
3
4
  export * from './render/blocks/cta.js';
4
5
  export * from './render/blocks/embed.js';
@@ -6,12 +7,20 @@ export * from './render/blocks/faq.js';
6
7
  export * from './render/blocks/feature-grid.js';
7
8
  export * from './render/blocks/gallery.js';
8
9
  export * from './render/blocks/hero.js';
10
+ export * from './render/blocks/logo-strip.js';
9
11
  export * from './render/blocks/logos.js';
10
12
  export * from './render/blocks/media-figure.js';
13
+ export * from './render/blocks/pricing-table.js';
11
14
  export * from './render/blocks/prose.js';
12
15
  export * from './render/blocks/quote.js';
16
+ export * from './render/blocks/stat-counter.js';
13
17
  export * from './render/blocks/stats.js';
18
+ export * from './render/blocks/testimonial.js';
14
19
  export * from './render/chrome.js';
20
+ export * from './render/layout.js';
21
+ export * from './render/project.js';
15
22
  export * from './render/render-block.js';
16
23
  export * from './render/term-archive.js';
24
+ export * from './render/widget-areas.js';
25
+ export * from './render/work.js';
17
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAA;AAClC,cAAc,oCAAoC,CAAA;AAClD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAA;AAClC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oCAAoC,CAAA;AAClD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA"}
package/dist/src/index.js CHANGED
@@ -1,7 +1,8 @@
1
- // The shared contract D primitives every theme package implements against —
1
+ // The shared contract D primitives every theme package implements against,
2
2
  // re-exported so a consumer of this package never has to know they live in
3
3
  // `@cogenta/theme-kit` to use them alongside this theme's own blocks.
4
4
  export * from '@cogenta/theme-kit';
5
+ export * from './render/blocks/accordion.js';
5
6
  export * from './render/blocks/collection-list.js';
6
7
  export * from './render/blocks/cta.js';
7
8
  export * from './render/blocks/embed.js';
@@ -9,12 +10,20 @@ export * from './render/blocks/faq.js';
9
10
  export * from './render/blocks/feature-grid.js';
10
11
  export * from './render/blocks/gallery.js';
11
12
  export * from './render/blocks/hero.js';
13
+ export * from './render/blocks/logo-strip.js';
12
14
  export * from './render/blocks/logos.js';
13
15
  export * from './render/blocks/media-figure.js';
16
+ export * from './render/blocks/pricing-table.js';
14
17
  export * from './render/blocks/prose.js';
15
18
  export * from './render/blocks/quote.js';
19
+ export * from './render/blocks/stat-counter.js';
16
20
  export * from './render/blocks/stats.js';
21
+ export * from './render/blocks/testimonial.js';
17
22
  export * from './render/chrome.js';
23
+ export * from './render/layout.js';
24
+ export * from './render/project.js';
18
25
  export * from './render/render-block.js';
19
26
  export * from './render/term-archive.js';
27
+ export * from './render/widget-areas.js';
28
+ export * from './render/work.js';
20
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,sEAAsE;AACtE,cAAc,oBAAoB,CAAA;AAClC,cAAc,oCAAoC,CAAA;AAClD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,2EAA2E;AAC3E,sEAAsE;AACtE,cAAc,oBAAoB,CAAA;AAClC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oCAAoC,CAAA;AAClD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAsC3B,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiBtF"}
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AA4B5F,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CActF"}
@@ -1,24 +1,16 @@
1
- import { blockHeadingTag, h, heading, renderRichText, } from '@cogenta/theme-kit';
1
+ import { h, renderRichText } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
2
3
  /**
3
- * Same zero-JS mechanism as `faq.ts` — `<details>`/`<summary>` gives
4
- * expand/collapse, keyboard operation and the `[open]` state to assistive
5
- * technology for free — but with markup and class names of its own
6
- * (`cg-accordion__*`, never `cg-faq__*`) so the two blocks can diverge
7
- * visually later without one quietly dragging the other along. RFC 0001
8
- * treats them as two distinct editorial intents sharing one data shape; this
9
- * package keeps that distinction in its markup too.
10
- *
11
- * The marker here is a plain rotating caret rather than `faq.ts`'s plus/
12
- * cross, and questions sit in a numbered ledger the same way `logos.ts`'s
13
- * items do — an accordion reads as an indexed list of topics, not a wall of
14
- * frequently-asked questions.
4
+ * Collapsible notes on a ruled list, from the fourth column: each question on
5
+ * its own row in the display width, a plus drawn from two bars that loses its
6
+ * upright when the row is open, and the answer at the reading measure.
7
+ * Opening, keyboard behaviour and the announced state are all native
8
+ * `<details>`. No script.
15
9
  */
16
- function renderItem(item, ctx, index) {
17
- return h('li', { class: 'cg-accordion__item' }, h('details', { class: 'cg-accordion__details' }, h('summary', { class: 'cg-accordion__question' }, h('span', { class: 'cg-accordion__index', 'aria-hidden': 'true' }, String(index + 1).padStart(2, '0')), h('span', { class: 'cg-accordion__label' }, item.question)), h('div', { class: 'cg-accordion__answer' }, renderRichText(ctx, item.answer))));
10
+ function renderItem(item, ctx) {
11
+ return h('li', { class: 'cg-notes__item' }, h('details', { class: 'cg-notes__details' }, h('summary', { class: 'cg-notes__question' }, h('span', { class: 'cg-notes__question-text' }, item.question), h('span', { class: 'cg-notes__mark', 'aria-hidden': 'true' })), h('div', { class: 'cg-notes__answer' }, renderRichText(ctx, item.answer))));
18
12
  }
19
13
  export function renderAccordion(block, ctx) {
20
- return h('section', { class: 'cg-block cg-accordion', 'data-block': 'accordion' }, block.title === undefined
21
- ? null
22
- : heading(blockHeadingTag('accordion') ?? 'h2', { class: 'cg-accordion__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-accordion__items' }, block.items.map((item, index) => renderItem(item, ctx, index))));
14
+ return section('section', 'accordion', 'cg-notes cg-split', { 'data-titled': block.title === undefined ? 'false' : 'true' }, 'div', sectionHead('accordion', block.title), h('ul', { class: 'cg-notes__items' }, block.items.map((item) => renderItem(item, ctx))));
23
15
  }
24
16
  //# sourceMappingURL=accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../../src/render/blocks/accordion.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,EAEP,cAAc,GACf,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;GAaG;AACH,SAAS,UAAU,CAAC,IAAmB,EAAE,GAAkB,EAAE,KAAa;IACxE,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,wBAAwB,EAAE,EACnC,CAAC,CACC,MAAM,EACN,EAAE,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,EAAE,EACvD,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CACnC,EACD,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EA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E,EAC/B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EAC9D,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAC9D,EACD,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAC1E,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,GAAkB;IACvE,OAAO,OAAO,CACZ,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,EAAE,aAAa,EAAE,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,EAC/D,KAAK,EACL,WAAW,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,EACrC,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
@@ -1,25 +1,5 @@
1
1
  import type { CollectionListBlock } from '@cogenta/blocks';
2
2
  import { buildCollectionListQuery, type ContentEntry, type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
- /**
4
- * The only block of the seventeen that reads data at render time — contract
5
- * B marks it `runtime: 'server'` for that reason.
6
- *
7
- * The read is *not* done here. `query` builds the request
8
- * (`@cogenta/theme-kit`'s `buildCollectionListQuery`, shared across every
9
- * theme since it derives purely from the block's own fields), the caller
10
- * awaits `ctx.content.list(...)` before rendering starts, and this function
11
- * stays a pure function of the entries it is handed.
12
- *
13
- * `list` keeps this theme's original register — a numbered mono index, the
14
- * title set at feature-headline scale, the date pushed to the far edge —
15
- * unchanged since L23. `grid`/`carousel` (`theme@1.4`) retile the same
16
- * entries into full-bleed project cards instead: a cover (`entryImage`,
17
- * 4:3), the title in display type, and — read straight off the raw
18
- * `ContentEntry` this block's entries already are, never invented — the
19
- * entry's own `role`/`year` fields as a meta line when a collection happens
20
- * to declare them (the `portfolio` blueprint's `project` does; any other
21
- * collection simply shows no meta line).
22
- */
23
3
  export { buildCollectionListQuery as query };
24
4
  export declare function renderCollectionList(block: CollectionListBlock, ctx: RenderContext, entries: readonly ContentEntry[]): HtmlElement;
25
5
  //# sourceMappingURL=collection-list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection-list.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/collection-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAEL,wBAAwB,EACxB,KAAK,YAAY,EAOjB,KAAK,WAAW,EAIhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,wBAAwB,IAAI,KAAK,EAAE,CAAA;AAgG5C,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,SAAS,YAAY,EAAE,GAC/B,WAAW,CAyCb"}
1
+ {"version":3,"file":"collection-list.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/collection-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EACL,wBAAwB,EACxB,KAAK,YAAY,EACjB,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAI3B,OAAO,EAAE,wBAAwB,IAAI,KAAK,EAAE,CAAA;AAyF5C,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,SAAS,YAAY,EAAE,GAC/B,WAAW,CAqBb"}
@@ -1,77 +1,70 @@
1
- import { blockHeadingTag, buildCollectionListQuery, entryDate, entryExcerpt, entryHref, entryImage, entryTitle, h, heading, nestedHeadingTag, renderImageSource, } from '@cogenta/theme-kit';
1
+ import { buildCollectionListQuery, h, nestedHeadingTag, } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
3
+ import { renderIndexRow, renderWorkCard, workFromEntry } from '../work.js';
4
+ export { buildCollectionListQuery as query };
2
5
  /**
3
- * The only block of the seventeen that reads data at render time — contract
4
- * B marks it `runtime: 'server'` for that reason.
6
+ * A listing of work, in one of three forms taken from the layout the editor
7
+ * chose in contract B, never from a setting this theme invents:
5
8
  *
6
- * The read is *not* done here. `query` builds the request
7
- * (`@cogenta/theme-kit`'s `buildCollectionListQuery`, shared across every
8
- * theme since it derives purely from the block's own fields), the caller
9
- * awaits `ctx.content.list(...)` before rendering starts, and this function
10
- * stays a pure function of the entries it is handed.
9
+ * - `grid` is **the work grid**: an asymmetric sequence on twelve columns,
10
+ * six places long. A large image across seven columns with a smaller one
11
+ * across four, dropped lower, beside it; a full-width image; the pair again
12
+ * mirrored; a full-width image. Every cover keeps the same 3:2 shape, so
13
+ * the asymmetry comes from the columns and the drop, never from cropping
14
+ * one project differently from the next. The pattern lives in `work.css`,
15
+ * keyed on each item's `data-place`.
16
+ * - `list` is **the index**: one ruled row per project, title, client,
17
+ * discipline and year in columns.
18
+ * - `carousel` is **a strip**: cards side by side at one width, scrolling on
19
+ * any screen, a focusable and labelled region. No script.
11
20
  *
12
- * `list` keeps this theme's original register — a numbered mono index, the
13
- * title set at feature-headline scale, the date pushed to the far edge —
14
- * unchanged since L23. `grid`/`carousel` (`theme@1.4`) retile the same
15
- * entries into full-bleed project cards instead: a cover (`entryImage`,
16
- * 4:3), the title in display type, and — read straight off the raw
17
- * `ContentEntry` this block's entries already are, never invented — the
18
- * entry's own `role`/`year` fields as a meta line when a collection happens
19
- * to declare them (the `portfolio` blueprint's `project` does; any other
20
- * collection simply shows no meta line).
21
+ * An empty list keeps its label and says so in one line.
21
22
  */
22
- export { buildCollectionListQuery as query };
23
- function rawText(entry, field) {
24
- const value = entry[field];
25
- return typeof value === 'string' && value.trim() !== '' ? value : undefined;
23
+ const PLACES = 6;
24
+ function sizesFor(place) {
25
+ if (place === 3 || place === 0)
26
+ return '(min-width: 64rem) 92rem, 100vw';
27
+ if (place === 1 || place === 5)
28
+ return '(min-width: 64rem) 54rem, 100vw';
29
+ return '(min-width: 64rem) 30rem, 100vw';
26
30
  }
27
- /** `role`/`year`, read straight off the entry — the "raw field" meta line a grid card shows when the collection behind it has them. */
28
- function renderCardMeta(entry) {
29
- const role = rawText(entry, 'role');
30
- const year = rawText(entry, 'year');
31
- if (role === undefined && year === undefined)
32
- return null;
33
- return h('p', { class: 'cg-collection__meta' }, role === undefined ? null : h('span', { class: 'cg-collection__meta-role' }, role), year === undefined ? null : h('span', { class: 'cg-collection__meta-year' }, year));
31
+ function grid(entries, ctx, titled) {
32
+ const tag = nestedHeadingTag('collectionList', titled);
33
+ return h('ul', { class: 'cg-grid', 'data-count': String(entries.length) }, entries.map((entry, index) => {
34
+ const place = (index + 1) % PLACES;
35
+ return h('li', { class: 'cg-grid__item', 'data-place': String(place === 0 ? PLACES : place) }, renderWorkCard(workFromEntry(entry, ctx), {
36
+ tag,
37
+ sizes: sizesFor(place),
38
+ loading: index < 2 ? 'eager' : 'lazy',
39
+ }));
40
+ }));
34
41
  }
35
- function renderCard(entry, ctx, tag, index) {
36
- const cover = entryImage(entry, ctx, { width: 900, height: 675, fit: 'cover' });
37
- return h('li', { class: 'cg-entry cg-entry--card' }, h('article', { class: 'cg-entry__body' }, h('a', { class: 'cg-entry__cover-link', href: entryHref(entry, ctx), tabindex: -1 }, cover === undefined
38
- ? h('span', { class: 'cg-entry__cover-empty', 'aria-hidden': 'true' })
39
- : renderImageSource(cover, {
40
- className: 'cg-entry__cover',
41
- sizes: '(min-width: 80rem) 50vw, 100vw',
42
- })), h('span', { class: 'cg-entry__index', 'aria-hidden': 'true' }, String(index + 1).padStart(2, '0')), heading(tag, { class: 'cg-entry__title' }, h('a', { class: 'cg-entry__link', href: entryHref(entry, ctx) }, entryTitle(entry, ctx))), renderCardMeta(entry)));
42
+ function index(entries, ctx, titled) {
43
+ const tag = nestedHeadingTag('collectionList', titled);
44
+ return h('ol', { class: 'cg-index', 'data-count': String(entries.length) }, entries.map((entry) => renderIndexRow(workFromEntry(entry, ctx), tag)));
43
45
  }
44
- function renderRow(entry, ctx, tag, index) {
45
- const date = entryDate(entry);
46
- const excerpt = entryExcerpt(entry);
47
- return h('li', { class: 'cg-entry' }, h('article', { class: 'cg-entry__body' }, h('span', { class: 'cg-entry__index', 'aria-hidden': 'true' }, String(index + 1).padStart(2, '0')), heading(tag, { class: 'cg-entry__title' }, h('a', { class: 'cg-entry__link', href: entryHref(entry, ctx) }, entryTitle(entry, ctx))), date === undefined
48
- ? null
49
- : h('time', { class: 'cg-entry__date', datetime: date },
50
- // Formatted in the rendered locale rather than left as an ISO
51
- // string: the machine-readable form is already in `datetime`.
52
- new Intl.DateTimeFormat(ctx.locale, { dateStyle: 'long' }).format(new Date(date))), excerpt === undefined ? null : h('p', { class: 'cg-entry__excerpt' }, excerpt)));
46
+ function strip(entries, ctx, block) {
47
+ const tag = nestedHeadingTag('collectionList', block.title !== undefined);
48
+ return h('div', {
49
+ class: 'cg-strip',
50
+ role: 'region',
51
+ 'aria-label': block.title ?? ctx.t('collection.carousel'),
52
+ tabindex: '0',
53
+ }, h('ul', { class: 'cg-strip__items', 'data-count': String(entries.length) }, entries.map((entry) => h('li', { class: 'cg-strip__item' }, renderWorkCard(workFromEntry(entry, ctx), {
54
+ tag,
55
+ sizes: '(min-width: 64rem) 34rem, 80vw',
56
+ })))));
53
57
  }
54
58
  export function renderCollectionList(block, ctx, entries) {
55
- const hasTitle = block.title !== undefined;
56
- const entryTag = nestedHeadingTag('collectionList', hasTitle);
57
- const isTiled = block.layout === 'grid' || block.layout === 'carousel';
58
- const renderItem = isTiled ? renderCard : renderRow;
59
- const items = entries.length === 0
60
- ? h('p', { class: 'cg-collection__empty' }, ctx.t('collection.empty'))
61
- : h('ol', { class: 'cg-collection__items' }, entries.map((entry, index) => renderItem(entry, ctx, entryTag, index)));
62
- return h('section', {
63
- class: 'cg-block cg-collection',
64
- 'data-block': 'collectionList',
65
- 'data-layout': block.layout,
66
- }, hasTitle
67
- ? heading(blockHeadingTag('collectionList') ?? 'h2', { class: 'cg-collection__title', 'data-field': 'title' }, block.title ?? '')
68
- : null, block.layout === 'carousel'
69
- ? h('div', {
70
- class: 'cg-collection__viewport',
71
- role: 'region',
72
- 'aria-label': block.title ?? ctx.t('collection.carousel'),
73
- tabindex: '0',
74
- }, items)
75
- : items);
59
+ const titled = block.title !== undefined;
60
+ const form = block.layout === 'list' ? 'index' : block.layout === 'carousel' ? 'strip' : 'grid';
61
+ const body = entries.length === 0
62
+ ? h('p', { class: 'cg-empty' }, ctx.t('collection.empty'))
63
+ : form === 'index'
64
+ ? index(entries, ctx, titled)
65
+ : form === 'strip'
66
+ ? strip(entries, ctx, block)
67
+ : grid(entries, ctx, titled);
68
+ return section('section', 'collectionList', 'cg-collection', { 'data-form': form, 'data-collection': block.collection }, 'div', sectionHead('collectionList', block.title), body);
76
69
  }
77
70
  //# sourceMappingURL=collection-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection-list.js","sourceRoot":"","sources":["../../../../src/render/blocks/collection-list.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,wBAAwB,EAExB,SAAS,EACT,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,EAGV,CAAC,EACD,OAAO,EACP,gBAAgB,EAEhB,iBAAiB,GAClB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,wBAAwB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,MAAM,KAAK,GACT,OAAO,CAAC,MAAM,KAAK,CAAC;QAClB,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,sBAAsB,EAAE,EACjC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CACvE,CAAA;IAEP,OAAO,CAAC,CACN,SAAS,EACT;QACE,KAAK,EAAE,wBAAwB;QAC/B,YAAY,EAAE,gBAAgB;QAC9B,aAAa,EAAE,KAAK,CAAC,MAAM;KAC5B,EACD,QAAQ;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,gBAAgB,CAAC,IAAI,IAAI,EACzC,EAAE,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,OAAO,EAAE,EACxD,KAAK,CAAC,KAAK,IAAI,EAAE,CAClB;QACH,CAAC,CAAC,IAAI,EACR,KAAK,CAAC,MAAM,KAAK,UAAU;QACzB,CAAC,CAAC,CAAC,CACC,KAAK,EACL;YACE,KAAK,EAAE,yBAAyB;YAChC,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,KAAK,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,qBAAqB,CAAC;YACzD,QAAQ,EAAE,GAAG;SACd,EACD,KAAK,CACN;QACH,CAAC,CAAC,KAAK,CACV,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"collection-list.js","sourceRoot":"","sources":["../../../../src/render/blocks/collection-list.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EAGxB,CAAC,EACD,gBAAgB,GAEjB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE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MAAM,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAA;IAC/F,MAAM,IAAI,GACR,OAAO,CAAC,MAAM,KAAK,CAAC;QAClB,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;QAC1D,CAAC,CAAC,IAAI,KAAK,OAAO;YAChB,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC;YAC7B,CAAC,CAAC,IAAI,KAAK,OAAO;gBAChB,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC;gBAC5B,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;IAEpC,OAAO,OAAO,CACZ,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,EAAE,WAAW,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,CAAC,UAAU,EAAE,EAC1D,KAAK,EACL,WAAW,CAAC,gBAAgB,EAAE,KAAK,CAAC,KAAK,CAAC,EAC1C,IAAI,CACL,CAAA;AACH,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import type { CtaBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * The one panel on the page that inverts the palette — ink background, paper
5
- * text — so it reads as a full stop rather than another section. The title
6
- * is set at the same display scale as the hero: a call to action on a
7
- * portfolio site is a second headline, not a footnote.
4
+ * The invitation to get in touch, set the way a studio sets its contact
5
+ * line: a short title and a sentence, then the first action as a very large
6
+ * link in the display width, underlined in the one signal colour. Any further
7
+ * action follows as ordinary underlined words. No box, no band, no button.
8
8
  */
9
9
  export declare function renderCta(block: CtaBlock, ctx: RenderContext): HtmlElement;
10
10
  //# sourceMappingURL=cta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cta.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/cta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAGL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAE3B;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAoB1E"}
1
+ {"version":3,"file":"cta.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/cta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAIL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAG3B;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA8B1E"}
@@ -1,16 +1,21 @@
1
- import { actionList, blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
1
+ import { actionLink, actionList, blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * The one panel on the page that inverts the palette — ink background, paper
4
- * text — so it reads as a full stop rather than another section. The title
5
- * is set at the same display scale as the hero: a call to action on a
6
- * portfolio site is a second headline, not a footnote.
4
+ * The invitation to get in touch, set the way a studio sets its contact
5
+ * line: a short title and a sentence, then the first action as a very large
6
+ * link in the display width, underlined in the one signal colour. Any further
7
+ * action follows as ordinary underlined words. No box, no band, no button.
7
8
  */
8
9
  export function renderCta(block, ctx) {
9
- return h('section', { class: 'cg-block cg-cta', 'data-block': 'cta' }, h('div', { class: 'cg-cta__frame' }, heading(blockHeadingTag('cta') ?? 'h2', { class: 'cg-cta__title', 'data-field': 'title' }, block.title), block.text === undefined
10
+ const [first, ...rest] = block.actions;
11
+ const lead = first === undefined
10
12
  ? null
11
- : h('p', { class: 'cg-cta__text', 'data-field': 'text' }, block.text),
12
- // `actions` is required and non-empty for a `cta`, so the list is always
13
- // rendered; the null branch stays reachable only through invalid data.
14
- actionList(ctx, block.actions, block.title)));
13
+ : (() => {
14
+ const link = actionLink(ctx, first);
15
+ return { ...link, attrs: { ...link.attrs, class: 'cg-action cg-contact__link' } };
16
+ })();
17
+ return section('section', 'cta', 'cg-contact', {}, 'div', h('div', { class: 'cg-contact__copy' }, heading(blockHeadingTag('cta') ?? 'h2', { class: 'cg-contact__title', 'data-field': 'title' }, block.title), block.text === undefined
18
+ ? null
19
+ : h('p', { class: 'cg-contact__text', 'data-field': 'text' }, block.text)), lead === null ? null : h('p', { class: 'cg-contact__lead' }, lead), actionList(ctx, rest, block.title));
15
20
  }
16
21
  //# 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,iBAAiB,EAAE,YAAY,EAAE,KAAK,EAAE,EACjD,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,OAAO,CACL,eAAe,CAAC,KAAK,CAAC,IAAI,IAAI,EAC9B,EAAE,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EACjD,KAAK,CAAC,KAAK,CACZ,EACD,KAAK,CAAC,I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E,EACrD,KAAK,CAAC,KAAK,CACZ,EACD,KAAK,CAAC,IAAI,KAAK,SAAS;QACtB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAC5E,EACD,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,EAClE,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CACnC,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;AA0EzF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmC9E"}
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,20 +1,15 @@
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.
4
+ * A film or a recording from a third party, the size a project image would
5
+ * be: columns 3 to 10 at the block's ratio.
4
6
  *
5
- * When `consentRequired` is true the block renders a self-contained card and
6
- * an outbound link — no `<iframe>`, no script tag, no preconnect, no poster
7
- * image fetched from the provider. An embed that "only" loads a thumbnail has
8
- * already handed the visitor's IP address and a cookie to the provider,
9
- * which is the exact transfer consent was supposed to gate.
10
- *
11
- * The theme ships no consent *button*, because it ships no JavaScript:
12
- * granting consent is a site-wide decision that belongs to the consent
13
- * layer, not to a block. The card carries a bracketed provider tag in the
14
- * mono register — `[ youtube ]` — the theme's own visual shorthand for
15
- * "something external belongs here".
7
+ * Nothing here contacts a third party before the visitor consents: when
8
+ * `consentRequired` is set, or the provider has no cookie-free frame source,
9
+ * a notice renders in the frame's place instead of an `<iframe>`, holding the
10
+ * same shape: a hairline frame, a small label, one sentence and one arrow
11
+ * link. No preconnect, no thumbnail fetched from the provider.
16
12
  */
17
- /** `null` means "this provider has no embeddable frame we trust". */
18
13
  function frameSource(provider, rawUrl) {
19
14
  const url = URL.parse(rawUrl);
20
15
  if (url === null)
@@ -22,8 +17,6 @@ function frameSource(provider, rawUrl) {
22
17
  const segments = url.pathname.split('/').filter((segment) => segment !== '');
23
18
  switch (provider) {
24
19
  case 'youtube': {
25
- // `youtube-nocookie.com` is the privacy-preserving host, and the only one
26
- // this theme will point an iframe at.
27
20
  const id = url.hostname.endsWith('youtu.be')
28
21
  ? segments[0]
29
22
  : (url.searchParams.get('v') ?? segments[1]);
@@ -46,43 +39,35 @@ function frameSource(provider, rawUrl) {
46
39
  case 'soundcloud':
47
40
  return `https://w.soundcloud.com/player/?url=${encodeURIComponent(rawUrl)}`;
48
41
  default:
49
- // bluesky, mastodon, other: a post embed is a script tag, which this
50
- // theme does not load. The link card is the rendering.
51
42
  return null;
52
43
  }
53
44
  }
54
- function consentCard(block, ctx, reason) {
55
- return h('div', { class: 'cg-embed__placeholder' }, h('span', { class: 'cg-embed__tag' }, `[ ${block.provider} ]`), h('p', { class: 'cg-embed__notice' }, reason), h('a', {
56
- class: 'cg-embed__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',
57
48
  href: ctx.link(block.url),
58
49
  rel: 'noopener noreferrer nofollow',
59
50
  }, ctx.t('embed.open', { provider: block.provider })));
60
51
  }
61
52
  export function renderEmbed(block, ctx) {
62
53
  const source = block.consentRequired ? null : frameSource(block.provider, block.url);
63
- // Video providers are 16:9 unless the editor framed them otherwise; without a
64
- // ratio the frame would collapse and shift the layout as it loads.
65
54
  const ratio = aspectRatio(block.ratio) ?? '16 / 9';
66
- return h('div', {
67
- class: 'cg-block cg-embed',
68
- 'data-block': 'embed',
55
+ return section('div', 'embed', 'cg-embed', {
69
56
  'data-provider': block.provider,
70
57
  'data-consent': block.consentRequired ? 'required' : 'not-required',
71
58
  style: `--cg-ratio:${ratio}`,
72
- }, source === null
73
- ? consentCard(block, ctx, block.consentRequired
59
+ }, 'div', h('div', { class: 'cg-embed__frame' }, source === null
60
+ ? notice(block, ctx, block.consentRequired
74
61
  ? ctx.t('embed.consentRequired', { provider: block.provider })
75
62
  : ctx.t('embed.unsupported', { provider: block.provider }))
76
63
  : h('iframe', {
77
- class: 'cg-embed__frame',
64
+ class: 'cg-embed__player',
78
65
  src: source,
79
- // An iframe with no accessible name is announced as "frame" and
80
- // nothing else. WCAG 4.1.2, and the single most common embed defect.
81
66
  title: ctx.t('embed.title', { provider: block.provider }),
82
67
  loading: 'lazy',
83
68
  referrerpolicy: 'strict-origin-when-cross-origin',
84
69
  allow: 'accelerometer; clipboard-write; encrypted-media; picture-in-picture; fullscreen',
85
70
  allowfullscreen: true,
86
- }));
71
+ })));
87
72
  }
88
73
  //# sourceMappingURL=embed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"embed.js","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AACA,O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B,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;AA4B3B,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,EAIhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAmB3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAgB1E"}
@@ -1,23 +1,18 @@
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.
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. A CSS-drawn plus mark (rotated to a cross on `[open]`) replaces
12
- * the native marker rather than a chevron — the theme's own vocabulary of
13
- * shapes, kept purely visual.
4
+ * Questions a client asks before a project starts, set open: the label in
5
+ * the first three columns, and from the fourth each question in the display
6
+ * width with its answer beside it on a wide screen, divided by hairlines.
7
+ * Nothing is hidden behind a disclosure: a short set of answers is read
8
+ * whole. (`accordion` is the collapsible form of the same content.)
14
9
  */
15
- function renderItem(item, ctx) {
16
- return h('li', { class: 'cg-faq__item' }, h('details', { class: 'cg-faq__details' }, h('summary', { class: 'cg-faq__question' }, h('span', {}, item.question)), h('div', { class: 'cg-faq__answer' }, renderRichText(ctx, item.answer))));
10
+ function renderItem(item, ctx, tag) {
11
+ return h('div', { class: 'cg-answers__item' }, heading(tag, { class: 'cg-answers__question' }, item.question), h('div', { class: 'cg-answers__answer' }, renderRichText(ctx, item.answer)));
17
12
  }
18
13
  export function renderFaq(block, ctx) {
19
- return h('section', { class: 'cg-block cg-faq', 'data-block': 'faq' }, block.title === undefined
20
- ? null
21
- : 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
+ const tag = nestedHeadingTag('faq', titled);
16
+ return section('section', 'faq', 'cg-answers cg-split', { 'data-titled': titled ? 'true' : 'false' }, 'div', sectionHead('faq', block.title), h('div', { class: 'cg-answers__items' }, block.items.map((item) => renderItem(item, ctx, tag))));
22
17
  }
23
18
  //# 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;;;;;;;;;;;;GAYG;AACH,SAAS,UAAU,CAAC,IAAa,EAAE,GAAkB;IACnD,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,cAAc,EAAE,EACzB,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,CAAC,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC,M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CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAC5E,CAAA;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;IACxC,MAAM,GAAG,GAAG,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAC3C,OAAO,OAAO,CACZ,SAAS,EACT,KAAK,EACL,qBAAqB,EACrB,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,EAC5C,KAAK,EACL,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,EAC/B,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,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 +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;AAqC3B,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;AAsC3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB1F"}