@cogenta/theme-restaurant 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 (138) 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/blocks/accordion.d.ts +7 -0
  6. package/dist/src/render/blocks/accordion.d.ts.map +1 -1
  7. package/dist/src/render/blocks/accordion.js +10 -16
  8. package/dist/src/render/blocks/accordion.js.map +1 -1
  9. package/dist/src/render/blocks/collection-list.d.ts +4 -11
  10. package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
  11. package/dist/src/render/blocks/collection-list.js +96 -96
  12. package/dist/src/render/blocks/collection-list.js.map +1 -1
  13. package/dist/src/render/blocks/cta.d.ts +7 -4
  14. package/dist/src/render/blocks/cta.d.ts.map +1 -1
  15. package/dist/src/render/blocks/cta.js +9 -7
  16. package/dist/src/render/blocks/cta.js.map +1 -1
  17. package/dist/src/render/blocks/embed.d.ts.map +1 -1
  18. package/dist/src/render/blocks/embed.js +30 -28
  19. package/dist/src/render/blocks/embed.js.map +1 -1
  20. package/dist/src/render/blocks/faq.d.ts +13 -1
  21. package/dist/src/render/blocks/faq.d.ts.map +1 -1
  22. package/dist/src/render/blocks/faq.js +15 -11
  23. package/dist/src/render/blocks/faq.js.map +1 -1
  24. package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
  25. package/dist/src/render/blocks/feature-grid.js +43 -16
  26. package/dist/src/render/blocks/feature-grid.js.map +1 -1
  27. package/dist/src/render/blocks/gallery.d.ts +0 -7
  28. package/dist/src/render/blocks/gallery.d.ts.map +1 -1
  29. package/dist/src/render/blocks/gallery.js +28 -10
  30. package/dist/src/render/blocks/gallery.js.map +1 -1
  31. package/dist/src/render/blocks/hero.d.ts +16 -9
  32. package/dist/src/render/blocks/hero.d.ts.map +1 -1
  33. package/dist/src/render/blocks/hero.js +27 -20
  34. package/dist/src/render/blocks/hero.js.map +1 -1
  35. package/dist/src/render/blocks/logo-strip.d.ts +6 -0
  36. package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
  37. package/dist/src/render/blocks/logo-strip.js +7 -9
  38. package/dist/src/render/blocks/logo-strip.js.map +1 -1
  39. package/dist/src/render/blocks/logos.d.ts +8 -0
  40. package/dist/src/render/blocks/logos.d.ts.map +1 -1
  41. package/dist/src/render/blocks/logos.js +18 -18
  42. package/dist/src/render/blocks/logos.js.map +1 -1
  43. package/dist/src/render/blocks/media-figure.d.ts +14 -3
  44. package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
  45. package/dist/src/render/blocks/media-figure.js +34 -16
  46. package/dist/src/render/blocks/media-figure.js.map +1 -1
  47. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
  48. package/dist/src/render/blocks/pricing-table.js +17 -22
  49. package/dist/src/render/blocks/pricing-table.js.map +1 -1
  50. package/dist/src/render/blocks/prose.d.ts +11 -6
  51. package/dist/src/render/blocks/prose.d.ts.map +1 -1
  52. package/dist/src/render/blocks/prose.js +13 -7
  53. package/dist/src/render/blocks/prose.js.map +1 -1
  54. package/dist/src/render/blocks/quote.d.ts +6 -2
  55. package/dist/src/render/blocks/quote.d.ts.map +1 -1
  56. package/dist/src/render/blocks/quote.js +14 -12
  57. package/dist/src/render/blocks/quote.js.map +1 -1
  58. package/dist/src/render/blocks/stat-counter.d.ts +6 -0
  59. package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
  60. package/dist/src/render/blocks/stat-counter.js +7 -10
  61. package/dist/src/render/blocks/stat-counter.js.map +1 -1
  62. package/dist/src/render/blocks/stats.d.ts +7 -0
  63. package/dist/src/render/blocks/stats.d.ts.map +1 -1
  64. package/dist/src/render/blocks/stats.js +8 -16
  65. package/dist/src/render/blocks/stats.js.map +1 -1
  66. package/dist/src/render/blocks/testimonial.d.ts +5 -11
  67. package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
  68. package/dist/src/render/blocks/testimonial.js +9 -17
  69. package/dist/src/render/blocks/testimonial.js.map +1 -1
  70. package/dist/src/render/chrome.d.ts.map +1 -1
  71. package/dist/src/render/chrome.js +101 -84
  72. package/dist/src/render/chrome.js.map +1 -1
  73. package/dist/src/render/dish.d.ts +13 -0
  74. package/dist/src/render/dish.d.ts.map +1 -0
  75. package/dist/src/render/dish.js +84 -0
  76. package/dist/src/render/dish.js.map +1 -0
  77. package/dist/src/render/layout.d.ts +23 -0
  78. package/dist/src/render/layout.d.ts.map +1 -0
  79. package/dist/src/render/layout.js +33 -0
  80. package/dist/src/render/layout.js.map +1 -0
  81. package/dist/src/render/menu.d.ts +53 -0
  82. package/dist/src/render/menu.d.ts.map +1 -0
  83. package/dist/src/render/menu.js +99 -0
  84. package/dist/src/render/menu.js.map +1 -0
  85. package/dist/src/render/render-block.d.ts +19 -0
  86. package/dist/src/render/render-block.d.ts.map +1 -1
  87. package/dist/src/render/render-block.js +50 -39
  88. package/dist/src/render/render-block.js.map +1 -1
  89. package/dist/src/render/strings.d.ts +15 -0
  90. package/dist/src/render/strings.d.ts.map +1 -0
  91. package/dist/src/render/strings.js +23 -0
  92. package/dist/src/render/strings.js.map +1 -0
  93. package/dist/src/render/term-archive.d.ts +10 -4
  94. package/dist/src/render/term-archive.d.ts.map +1 -1
  95. package/dist/src/render/term-archive.js +25 -16
  96. package/dist/src/render/term-archive.js.map +1 -1
  97. package/dist/src/render/widget-areas.d.ts +13 -0
  98. package/dist/src/render/widget-areas.d.ts.map +1 -0
  99. package/dist/src/render/widget-areas.js +20 -0
  100. package/dist/src/render/widget-areas.js.map +1 -0
  101. package/dist/theme.config.d.ts +1 -1
  102. package/dist/theme.config.js +2 -2
  103. package/dist/theme.config.js.map +1 -1
  104. package/package.json +5 -5
  105. package/src/index.ts +3 -0
  106. package/src/render/blocks/accordion.ts +18 -47
  107. package/src/render/blocks/collection-list.ts +245 -133
  108. package/src/render/blocks/cta.ts +20 -11
  109. package/src/render/blocks/embed.ts +45 -36
  110. package/src/render/blocks/faq.ts +32 -25
  111. package/src/render/blocks/feature-grid.ts +83 -33
  112. package/src/render/blocks/gallery.ts +39 -21
  113. package/src/render/blocks/hero.ts +41 -34
  114. package/src/render/blocks/logo-strip.ts +27 -25
  115. package/src/render/blocks/logos.ts +34 -43
  116. package/src/render/blocks/media-figure.ts +49 -24
  117. package/src/render/blocks/pricing-table.ts +30 -42
  118. package/src/render/blocks/prose.ts +18 -9
  119. package/src/render/blocks/quote.ts +29 -19
  120. package/src/render/blocks/stat-counter.ts +24 -29
  121. package/src/render/blocks/stats.ts +30 -40
  122. package/src/render/blocks/testimonial.ts +17 -22
  123. package/src/render/chrome.ts +113 -95
  124. package/src/render/dish.ts +195 -0
  125. package/src/render/layout.ts +64 -0
  126. package/src/render/menu.ts +117 -0
  127. package/src/render/render-block.ts +51 -40
  128. package/src/render/strings.ts +44 -0
  129. package/src/render/term-archive.ts +78 -44
  130. package/src/render/widget-areas.ts +23 -0
  131. package/src/styles/archive.css +46 -56
  132. package/src/styles/base.css +807 -554
  133. package/src/styles/blocks.css +723 -641
  134. package/src/styles/menu.css +482 -0
  135. package/src/styles/theme.css +24 -25
  136. package/src/styles/tokens.css +239 -225
  137. package/src/styles/widgets.css +853 -0
  138. package/tokens.json +16 -16
@@ -1,30 +1,25 @@
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). Rendered as a set-menu comparison — a "tasting
4
- * menu" / "prix fixe" tier is the shape this block already has (a name, a
5
- * price, a feature list), so this theme reuses the same restrained bordered
6
- * plates the rest of the vocabulary uses rather than a distinct pricing
7
- * skin. `highlighted` becomes a small "chef's pick" rule rather than a
8
- * colour.
4
+ * Set menus side by side (lunch, the evening menu, a menu for a private
5
+ * party), set the way a menu card prints them: ruled columns rather than
6
+ * cards, the name of the menu in small capitals, the price light and large in
7
+ * the display serif with tabular figures and what it covers ("per guest")
8
+ * under it, then the courses one per line between hairlines, and the action
9
+ * at the foot.
10
+ *
11
+ * `highlighted` is an editorial emphasis, drawn as the column's top rule in
12
+ * ink instead of a hairline. No ribbon, no raised card, no accent fill.
9
13
  */
10
- function renderTier(tier, ctx, tag) {
11
- return h('li', {
12
- class: 'cg-set-menu__tier',
13
- 'data-highlighted': tier.highlighted === true ? 'true' : undefined,
14
- 'aria-current': tier.highlighted === true ? 'true' : undefined,
15
- }, heading(tag, { class: 'cg-set-menu__name' }, tier.name), h('p', { class: 'cg-set-menu__price' }, h('span', { class: 'cg-set-menu__amount' }, tier.price), tier.interval === undefined
14
+ function tier(item, ctx, titled) {
15
+ return h('li', { class: 'cr-set__tier', 'data-highlighted': item.highlighted === true ? 'true' : 'false' }, heading(nestedHeadingTag('pricingTable', titled), { class: 'cr-set__name' }, item.name), h('p', { class: 'cr-set__price' }, h('span', { class: 'cr-set__amount' }, item.price), item.interval === undefined ? null : h('span', { class: 'cr-set__interval' }, item.interval)), item.features.length === 0
16
16
  ? null
17
- : h('span', { class: 'cg-set-menu__interval' }, tier.interval)), tier.features.length === 0
17
+ : h('ul', { class: 'cr-set__courses' }, item.features.map((feature) => h('li', { class: 'cr-set__course' }, feature))), item.action === undefined
18
18
  ? null
19
- : h('ul', { class: 'cg-set-menu__features' }, tier.features.map((feature) => h('li', { class: 'cg-set-menu__feature' }, feature))), tier.action === undefined
20
- ? null
21
- : h('div', { class: 'cg-set-menu__action' }, actionLink(ctx, { ...tier.action, emphasis: tier.action.emphasis ?? 'primary' })));
19
+ : h('div', { class: 'cr-set__action' }, actionLink(ctx, item.action)));
22
20
  }
23
21
  export function renderPricingTable(block, ctx) {
24
- const hasTitle = block.title !== undefined;
25
- const tierTag = nestedHeadingTag('pricingTable', hasTitle);
26
- return h('section', { class: 'cg-set-menu', 'data-block': 'pricingTable' }, hasTitle
27
- ? heading(blockHeadingTag('pricingTable') ?? 'h2', { class: 'cg-set-menu__title', 'data-field': 'title' }, block.title ?? '')
28
- : null, h('ul', { class: 'cg-set-menu__tiers' }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
22
+ const titled = block.title !== undefined;
23
+ return section('section', 'pricingTable', 'cr-set', { 'data-count': String(Math.min(block.tiers.length, 4)) }, 'div', sectionHead('pricingTable', block.title), h('ul', { class: 'cr-set__tiers' }, block.tiers.map((item) => tier(item, ctx, titled))));
29
24
  }
30
25
  //# 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;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,OAAO,CAAC,CACN,IAAI,EACJ;QACE,KAAK,EAAE,mBAAmB;QAC1B,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,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,EACvD,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACvD,IAAI,CAAC,QAAQ,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,MA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,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,OAAO,CAAC,CAAC,CAC9E,EACL,IAAI,CAAC,MAAM,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CACxE,CAAA;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAwB,EAAE,GAAkB;IAC7E,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;IACxC,OAAO,OAAO,CACZ,SAAS,EACT,cAAc,EACd,QAAQ,EACR,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EACzD,KAAK,EACL,WAAW,CAAC,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,EACxC,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CACnD,CACF,CAAA;AACH,CAAC"}
@@ -1,13 +1,18 @@
1
1
  import type { ProseBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * "Our story" — a short, centred, narrow column (`--cg-measure-narrow` in
5
- * `tokens.css`), the quiet editorial interlude every one of the reference
6
- * templates (Divi/Astra "Restaurant") places between the hero and the menu.
4
+ * Running text: the kitchen's story, how to book, a legal notice.
7
5
  *
8
- * `prose` declares `headingLevel: 'none'`: it contributes no heading of its
9
- * own. Whatever headings appear come from the rich text document, whose
10
- * vocabulary starts at `h2`.
6
+ * `prose` declares `headingLevel: 'none'`, so it adds no heading of its own;
7
+ * the rich text's own headings start at `h2`. The column starts at the third
8
+ * of twelve and holds a reading measure of about sixty-four characters, so a
9
+ * page title set at the first column and the text under it make one
10
+ * asymmetric line rather than a centred column.
11
+ *
12
+ * One exception, asked for by the editor rather than guessed: a prose block
13
+ * whose `align` variant is `center` is a welcome, a few sentences set large
14
+ * in the display serif and centred under the opening photograph, the way a
15
+ * menu card opens with a line from the house.
11
16
  */
12
17
  export declare function renderProse(block: ProseBlock, ctx: RenderContext): HtmlElement;
13
18
  //# 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;;;;;;;;GAQG;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;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAS9E"}
@@ -1,14 +1,20 @@
1
1
  import { h, renderRichText } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * "Our story" — a short, centred, narrow column (`--cg-measure-narrow` in
4
- * `tokens.css`), the quiet editorial interlude every one of the reference
5
- * templates (Divi/Astra "Restaurant") places between the hero and the menu.
4
+ * Running text: the kitchen's story, how to book, a legal notice.
6
5
  *
7
- * `prose` declares `headingLevel: 'none'`: it contributes no heading of its
8
- * own. Whatever headings appear come from the rich text document, whose
9
- * vocabulary starts at `h2`.
6
+ * `prose` declares `headingLevel: 'none'`, so it adds no heading of its own;
7
+ * the rich text's own headings start at `h2`. The column starts at the third
8
+ * of twelve and holds a reading measure of about sixty-four characters, so a
9
+ * page title set at the first column and the text under it make one
10
+ * asymmetric line rather than a centred column.
11
+ *
12
+ * One exception, asked for by the editor rather than guessed: a prose block
13
+ * whose `align` variant is `center` is a welcome, a few sentences set large
14
+ * in the display serif and centred under the opening photograph, the way a
15
+ * menu card opens with a line from the house.
10
16
  */
11
17
  export function renderProse(block, ctx) {
12
- return h('div', { class: 'cg-story', 'data-block': 'prose' }, h('div', { class: 'cg-story__body' }, renderRichText(ctx, block.body)));
18
+ return section('div', 'prose', 'cr-prose', {}, 'div', h('div', { class: 'cr-prose__body' }, renderRichText(ctx, block.body)));
13
19
  }
14
20
  //# 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;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,EAC5C,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CACvE,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;;;;;;;;;;;;;GAaG;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,8 +1,12 @@
1
1
  import type { QuoteBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * A single centred line, set in the display serif — the "menu insert"
5
- * pull-quote, distinct from `testimonial`'s guestbook card.
4
+ * A line from the press, set the way a newspaper sets a pull quote rather
5
+ * than the way a template sets a review card: the words large and light in
6
+ * the display serif across nine columns from the second, with real quotation
7
+ * marks hung in the margin by the stylesheet; the writer's name and the
8
+ * publication small beneath, after a short hairline. A portrait, when there
9
+ * is one, is a small square beside the name, never a circle above the words.
6
10
  */
7
11
  export declare function renderQuote(block: QuoteBlock, ctx: RenderContext): HtmlElement;
8
12
  //# 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;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA8B9E"}
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;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmC9E"}
@@ -1,21 +1,23 @@
1
1
  import { h, image } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * A single centred line, set in the display serif — the "menu insert"
4
- * pull-quote, distinct from `testimonial`'s guestbook card.
4
+ * A line from the press, set the way a newspaper sets a pull quote rather
5
+ * than the way a template sets a review card: the words large and light in
6
+ * the display serif across nine columns from the second, with real quotation
7
+ * marks hung in the margin by the stylesheet; the writer's name and the
8
+ * publication small beneath, after a short hairline. A portrait, when there
9
+ * is one, is a small square beside the name, never a circle above the words.
5
10
  */
6
11
  export function renderQuote(block, ctx) {
7
- const hasAttribution = block.author !== undefined || block.role !== undefined || block.avatar !== undefined;
8
- return h('figure', { class: 'cg-line', 'data-block': 'quote' }, h('blockquote', { class: 'cg-line__text' }, h('p', { 'data-field': 'text' }, block.text)), hasAttribution
9
- ? h('figcaption', { class: 'cg-line__attribution' }, block.avatar === undefined
12
+ const who = block.author === undefined && block.role === undefined
13
+ ? null
14
+ : h('figcaption', { class: 'cr-quote__attribution' }, block.avatar === undefined
10
15
  ? null
11
- : image(ctx, block.avatar, {
12
- className: 'cg-line__avatar',
13
- variant: { width: 72, height: 72, fit: 'cover' },
14
- }), h('span', { class: 'cg-line__who' }, block.author === undefined
16
+ : image(ctx, block.avatar, { className: 'cr-quote__avatar', sizes: '3rem' }), h('span', { class: 'cr-quote__who' }, block.author === undefined
15
17
  ? null
16
- : h('span', { class: 'cg-line__author', 'data-field': 'author' }, block.author), block.role === undefined
18
+ : h('span', { class: 'cr-quote__author', 'data-field': 'author' }, block.author), block.role === undefined
17
19
  ? null
18
- : h('span', { class: 'cg-line__role', 'data-field': 'role' }, block.role)))
19
- : null);
20
+ : h('span', { class: 'cr-quote__role', 'data-field': 'role' }, block.role)));
21
+ return section('div', 'quote', 'cr-quote', {}, 'figure', h('blockquote', { class: 'cr-quote__quote' }, h('p', { class: 'cr-quote__text', 'data-field': 'text' }, block.text)), who);
20
22
  }
21
23
  //# 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;;;GAGG;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,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,EAC3C,CAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,EACzF,cAAc;QACZ,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,sBAAsB,EAAE,EACjC,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE;gBACvB,SAAS,EAAE,iBAAiB;gBAC5B,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE;aACjD,CAAC,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C,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,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,10 @@
1
1
  import type { StatCounterBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * The narrower sibling of `stats` (a value and a label, no unit), drawn in
5
+ * the same register: figures in the display serif under one hairline.
6
+ * Nothing counts up; a number that animates into place is a number a guest
7
+ * has to wait for.
8
+ */
3
9
  export declare function renderStatCounter(block: StatCounterBlock, _ctx: RenderContext): HtmlElement;
4
10
  //# 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;AAgB3B,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;AAG5E;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAqB3F"}
@@ -1,15 +1,12 @@
1
- import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
1
+ import { h } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
2
3
  /**
3
- * `blocks@2.0` (RFC 0001). Narrower than `stats` (no `unit`) — rendered the
4
- * same restrained "figures row" way as `stats`, one accent hairline apart:
5
- * this theme has no boastful, boxed "impact numbers" register to reach for.
4
+ * The narrower sibling of `stats` (a value and a label, no unit), drawn in
5
+ * the same register: figures in the display serif under one hairline.
6
+ * Nothing counts up; a number that animates into place is a number a guest
7
+ * has to wait for.
6
8
  */
7
- function renderItem(item) {
8
- return h('div', { class: 'cg-tally' }, h('dd', { class: 'cg-tally__value' }, item.value), h('dt', { class: 'cg-tally__label' }, item.label));
9
- }
10
9
  export function renderStatCounter(block, _ctx) {
11
- return h('section', { class: 'cg-tallies', 'data-block': 'statCounter' }, block.title === undefined
12
- ? null
13
- : heading(blockHeadingTag('statCounter') ?? 'h2', { class: 'cg-tallies__title', 'data-field': 'title' }, block.title), h('dl', { class: 'cg-tallies__items' }, block.stats.map(renderItem)));
10
+ return section('section', 'statCounter', 'cr-figures', { 'data-count': String(Math.min(block.stats.length, 4)) }, 'div', sectionHead('statCounter', block.title), h('dl', { class: 'cr-figures__items' }, block.stats.map((stat) => h('div', { class: 'cr-figures__item' }, h('dt', { class: 'cr-figures__label' }, stat.label), h('dd', { class: 'cr-figures__value' }, stat.value)))));
14
11
  }
15
12
  //# 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;;;;GAIG;AACH,SAAS,UAAU,CAAC,IAAqB;IACvC,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,UAAU,EAAE,EACrB,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACjD,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAClD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,IAAmB;IAC5E,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,EACpD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,aAAa,CAAC,IAAI,IAAI,EACtC,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CACrE,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"stat-counter.js","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAsB,MAAM,oBAAoB,CAAA;AAC5E,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,IAAmB;IAC5E,OAAO,OAAO,CACZ,SAAS,EACT,aAAa,EACb,YAAY,EACZ,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,mBAAmB,EAAE,EAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,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,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CACpD,CACF,CACF,CACF,CAAA;AACH,CAAC"}
@@ -1,4 +1,11 @@
1
1
  import type { StatsBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * Figures a kitchen can stand behind (covers a night, farms it buys from, the
5
+ * year it opened), set as a row of columns under one hairline: the number
6
+ * (the `dd`, drawn above its label) light and large in the display serif with
7
+ * lining tabular figures, its unit a step smaller, and a sentence of context
8
+ * under it. No box, no tint, no counter animation.
9
+ */
3
10
  export declare function renderStats(block: StatsBlock, _ctx: RenderContext): HtmlElement;
4
11
  //# 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;AA2B3B,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;AAG5E;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CA0B/E"}
@@ -1,21 +1,13 @@
1
- import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
1
+ import { h } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
2
3
  /**
3
- * "Since 1994 · 3 chefs · 120 seats" — a quiet row of figures set in the
4
- * display serif, separated by hairline rules rather than boxed into cards:
5
- * the restrained, editorial register this theme uses everywhere a fact is
6
- * stated rather than sold.
7
- *
8
- * A description list, as every built-in theme uses for `stats`: each figure
9
- * is the description of its label, which is what `<dt>`/`<dd>` mean, and it
10
- * survives being read linearly (WCAG 1.3.2 — reading order and visual order
11
- * stay independent regardless of how the skin repaints them).
4
+ * Figures a kitchen can stand behind (covers a night, farms it buys from, the
5
+ * year it opened), set as a row of columns under one hairline: the number
6
+ * (the `dd`, drawn above its label) light and large in the display serif with
7
+ * lining tabular figures, its unit a step smaller, and a sentence of context
8
+ * under it. No box, no tint, no counter animation.
12
9
  */
13
- function renderItem(item) {
14
- return h('div', { class: 'cg-figures__item' }, h('dd', { class: 'cg-figures__value' }, item.value, item.unit === undefined ? null : h('span', { class: 'cg-figures__unit' }, item.unit)), h('dt', { class: 'cg-figures__label' }, item.label));
15
- }
16
10
  export function renderStats(block, _ctx) {
17
- return h('section', { class: 'cg-figures', 'data-block': 'stats' }, block.title === undefined
18
- ? null
19
- : heading(blockHeadingTag('stats') ?? 'h2', { class: 'cg-figures__title', 'data-field': 'title' }, block.title), h('dl', { class: 'cg-figures__items' }, block.items.map(renderItem)));
11
+ return section('section', 'stats', 'cr-figures', { 'data-count': String(Math.min(block.items.length, 4)) }, 'div', sectionHead('stats', block.title), h('dl', { class: 'cr-figures__items' }, block.items.map((item) => h('div', { class: 'cr-figures__item' }, h('dt', { class: 'cr-figures__label' }, item.label), h('dd', { class: 'cr-figures__value' }, item.value, item.unit === undefined ? null : h('span', { class: 'cr-figures__unit' }, item.unit))))));
20
12
  }
21
13
  //# 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;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CAAC,IAAc;IAChC,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CACrF,EACD,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CACpD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,IAAmB;IAChE,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAA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mBAAmB,EAAE,EAC9B,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CACrF,CACF,CACF,CACF,CACF,CAAA;AACH,CAAC"}
@@ -1,17 +1,11 @@
1
1
  import type { TestimonialBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * A centred, oversized quotation mark stands above the quote (a CSS
5
- * pseudo-glyph, not markup) — the guestbook-page treatment this theme's
6
- * elegance calls for, rather than a bordered "client success" card.
7
- *
8
- * `<figure><blockquote>…</blockquote><figcaption>` is the attribution
9
- * pattern the HTML spec prescribes: putting the author inside the
10
- * `<blockquote>` would claim the author's name was part of what was said.
11
- *
12
- * The avatar is decorative — the name sits right beside it in text — so its
13
- * media entity's alt text is expected to be empty; `image` still writes the
14
- * attribute either way (WCAG 1.1.1).
4
+ * A guest's own words, set like a note left in the book by the door: the text
5
+ * in the serif italic at the lead size on seven columns from the fourth, the
6
+ * name and the occasion beneath it at the caption size. Smaller and quieter
7
+ * than a press quote, on purpose. The layout does not depend on a portrait;
8
+ * when one is there it is a small square beside the name.
15
9
  */
16
10
  export declare function renderTestimonial(block: TestimonialBlock, ctx: RenderContext): HtmlElement;
17
11
  //# 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;;;;;;;;;;;;GAYG;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;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAyB1F"}
@@ -1,26 +1,18 @@
1
1
  import { h, image, renderRichText } from '@cogenta/theme-kit';
2
+ import { section } from '../layout.js';
2
3
  /**
3
- * A centred, oversized quotation mark stands above the quote (a CSS
4
- * pseudo-glyph, not markup) — the guestbook-page treatment this theme's
5
- * elegance calls for, rather than a bordered "client success" card.
6
- *
7
- * `<figure><blockquote>…</blockquote><figcaption>` is the attribution
8
- * pattern the HTML spec prescribes: putting the author inside the
9
- * `<blockquote>` would claim the author's name was part of what was said.
10
- *
11
- * The avatar is decorative — the name sits right beside it in text — so its
12
- * media entity's alt text is expected to be empty; `image` still writes the
13
- * attribute either way (WCAG 1.1.1).
4
+ * A guest's own words, set like a note left in the book by the door: the text
5
+ * in the serif italic at the lead size on seven columns from the fourth, the
6
+ * name and the occasion beneath it at the caption size. Smaller and quieter
7
+ * than a press quote, on purpose. The layout does not depend on a portrait;
8
+ * when one is there it is a small square beside the name.
14
9
  */
15
10
  export function renderTestimonial(block, ctx) {
16
11
  const { attribution } = block;
17
- return h('figure', { class: 'cg-testimonial', 'data-block': 'testimonial' }, h('blockquote', { class: 'cg-testimonial__quote' }, renderRichText(ctx, block.quote)), h('figcaption', { class: 'cg-testimonial__attribution' }, attribution.avatar === undefined
12
+ return section('div', 'testimonial', 'cr-note', {}, 'figure', h('blockquote', { class: 'cr-note__quote' }, renderRichText(ctx, block.quote)), h('figcaption', { class: 'cr-note__attribution' }, attribution.avatar === undefined
18
13
  ? null
19
- : image(ctx, attribution.avatar, {
20
- className: 'cg-testimonial__avatar',
21
- variant: { width: 88, height: 88, fit: 'cover' },
22
- }), h('span', { class: 'cg-testimonial__who' }, h('span', { class: 'cg-testimonial__name' }, attribution.name), attribution.role === undefined
14
+ : image(ctx, attribution.avatar, { className: 'cr-note__avatar', sizes: '3.5rem' }), h('span', { class: 'cr-note__who' }, h('span', { class: 'cr-note__name' }, attribution.name), attribution.role === undefined
23
15
  ? null
24
- : h('span', { class: 'cg-testimonial__role' }, attribution.role))));
16
+ : h('span', { class: 'cr-note__role' }, attribution.role))));
25
17
  }
26
18
  //# 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;;;;;;;;;;;;GAYG;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,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,EACxD,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,EAAE,EAAE,EAAE,MAAM,EAAE,EAA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B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,EACvD,WAAW,CAAC,IAAI,KAAK,SAAS;QAC5B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,CAC5D,CACF,CACF,CAAA;AACH,CAAC"}
@@ -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;AAsE3B,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CA4D7D"}
1
+ {"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,YAAY,EAQlB,MAAM,oBAAoB,CAAA;AA+D3B,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAoF7D"}