@cogenta/theme-association 0.3.3 → 0.5.4
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.
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/render/blocks/accordion.d.ts.map +1 -1
- package/dist/src/render/blocks/accordion.js +13 -10
- package/dist/src/render/blocks/accordion.js.map +1 -1
- package/dist/src/render/blocks/breakdown.d.ts +14 -0
- package/dist/src/render/blocks/breakdown.d.ts.map +1 -0
- package/dist/src/render/blocks/breakdown.js +17 -0
- package/dist/src/render/blocks/breakdown.js.map +1 -0
- package/dist/src/render/blocks/collection-list.d.ts +4 -10
- package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
- package/dist/src/render/blocks/collection-list.js +89 -58
- package/dist/src/render/blocks/collection-list.js.map +1 -1
- package/dist/src/render/blocks/cta.d.ts +0 -5
- package/dist/src/render/blocks/cta.d.ts.map +1 -1
- package/dist/src/render/blocks/cta.js +22 -10
- package/dist/src/render/blocks/cta.js.map +1 -1
- package/dist/src/render/blocks/embed.d.ts.map +1 -1
- package/dist/src/render/blocks/embed.js +30 -22
- package/dist/src/render/blocks/embed.js.map +1 -1
- package/dist/src/render/blocks/faq.d.ts.map +1 -1
- package/dist/src/render/blocks/faq.js +11 -15
- package/dist/src/render/blocks/faq.js.map +1 -1
- package/dist/src/render/blocks/feature-grid.d.ts +6 -0
- package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
- package/dist/src/render/blocks/feature-grid.js +42 -20
- package/dist/src/render/blocks/feature-grid.js.map +1 -1
- package/dist/src/render/blocks/gallery.d.ts +9 -7
- package/dist/src/render/blocks/gallery.d.ts.map +1 -1
- package/dist/src/render/blocks/gallery.js +22 -16
- package/dist/src/render/blocks/gallery.js.map +1 -1
- package/dist/src/render/blocks/hero.d.ts +23 -9
- package/dist/src/render/blocks/hero.d.ts.map +1 -1
- package/dist/src/render/blocks/hero.js +40 -23
- package/dist/src/render/blocks/hero.js.map +1 -1
- package/dist/src/render/blocks/logo-strip.d.ts +6 -0
- package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
- package/dist/src/render/blocks/logo-strip.js +7 -9
- package/dist/src/render/blocks/logo-strip.js.map +1 -1
- package/dist/src/render/blocks/logos.d.ts +14 -0
- package/dist/src/render/blocks/logos.d.ts.map +1 -1
- package/dist/src/render/blocks/logos.js +30 -16
- package/dist/src/render/blocks/logos.js.map +1 -1
- package/dist/src/render/blocks/media-figure.d.ts +12 -5
- package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
- package/dist/src/render/blocks/media-figure.js +32 -18
- package/dist/src/render/blocks/media-figure.js.map +1 -1
- package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
- package/dist/src/render/blocks/pricing-table.js +18 -20
- package/dist/src/render/blocks/pricing-table.js.map +1 -1
- package/dist/src/render/blocks/prose.d.ts +9 -3
- package/dist/src/render/blocks/prose.d.ts.map +1 -1
- package/dist/src/render/blocks/prose.js +11 -4
- package/dist/src/render/blocks/prose.js.map +1 -1
- package/dist/src/render/blocks/quote.d.ts +4 -7
- package/dist/src/render/blocks/quote.d.ts.map +1 -1
- package/dist/src/render/blocks/quote.js +12 -17
- package/dist/src/render/blocks/quote.js.map +1 -1
- package/dist/src/render/blocks/stat-counter.d.ts +8 -1
- package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
- package/dist/src/render/blocks/stat-counter.js +18 -10
- package/dist/src/render/blocks/stat-counter.js.map +1 -1
- package/dist/src/render/blocks/stats.d.ts +12 -1
- package/dist/src/render/blocks/stats.d.ts.map +1 -1
- package/dist/src/render/blocks/stats.js +24 -14
- package/dist/src/render/blocks/stats.js.map +1 -1
- package/dist/src/render/blocks/testimonial.d.ts +6 -5
- package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
- package/dist/src/render/blocks/testimonial.js +13 -11
- package/dist/src/render/blocks/testimonial.js.map +1 -1
- package/dist/src/render/chrome.d.ts +38 -1
- package/dist/src/render/chrome.d.ts.map +1 -1
- package/dist/src/render/chrome.js +117 -91
- package/dist/src/render/chrome.js.map +1 -1
- package/dist/src/render/details.d.ts +79 -0
- package/dist/src/render/details.d.ts.map +1 -0
- package/dist/src/render/details.js +221 -0
- package/dist/src/render/details.js.map +1 -0
- package/dist/src/render/figures.d.ts +29 -0
- package/dist/src/render/figures.d.ts.map +1 -0
- package/dist/src/render/figures.js +59 -0
- package/dist/src/render/figures.js.map +1 -0
- package/dist/src/render/layout.d.ts +31 -0
- package/dist/src/render/layout.d.ts.map +1 -0
- package/dist/src/render/layout.js +46 -0
- package/dist/src/render/layout.js.map +1 -0
- package/dist/src/render/page-head.d.ts +7 -0
- package/dist/src/render/page-head.d.ts.map +1 -0
- package/dist/src/render/page-head.js +95 -0
- package/dist/src/render/page-head.js.map +1 -0
- package/dist/src/render/render-block.d.ts +8 -12
- package/dist/src/render/render-block.d.ts.map +1 -1
- package/dist/src/render/render-block.js +40 -29
- package/dist/src/render/render-block.js.map +1 -1
- package/dist/src/render/strings.d.ts +15 -0
- package/dist/src/render/strings.d.ts.map +1 -0
- package/dist/src/render/strings.js +39 -0
- package/dist/src/render/strings.js.map +1 -0
- package/dist/src/render/term-archive.d.ts.map +1 -1
- package/dist/src/render/term-archive.js +33 -25
- package/dist/src/render/term-archive.js.map +1 -1
- package/dist/src/render/widget-areas.d.ts +14 -0
- package/dist/src/render/widget-areas.d.ts.map +1 -0
- package/dist/src/render/widget-areas.js +21 -0
- package/dist/src/render/widget-areas.js.map +1 -0
- package/dist/theme.config.d.ts +1 -1
- package/dist/theme.config.js +3 -3
- package/dist/theme.config.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +9 -0
- package/src/render/blocks/accordion.ts +28 -22
- package/src/render/blocks/breakdown.ts +42 -0
- package/src/render/blocks/collection-list.ts +234 -103
- package/src/render/blocks/cta.ts +48 -19
- package/src/render/blocks/embed.ts +47 -29
- package/src/render/blocks/faq.ts +22 -31
- package/src/render/blocks/feature-grid.ts +73 -41
- package/src/render/blocks/gallery.ts +32 -26
- package/src/render/blocks/hero.ts +56 -43
- package/src/render/blocks/logo-strip.ts +23 -21
- package/src/render/blocks/logos.ts +45 -40
- package/src/render/blocks/media-figure.ts +49 -24
- package/src/render/blocks/pricing-table.ts +31 -40
- package/src/render/blocks/prose.ts +16 -6
- package/src/render/blocks/quote.ts +34 -27
- package/src/render/blocks/stat-counter.ts +35 -29
- package/src/render/blocks/stats.ts +46 -38
- package/src/render/blocks/testimonial.ts +29 -20
- package/src/render/chrome.ts +165 -91
- package/src/render/details.ts +276 -0
- package/src/render/figures.ts +68 -0
- package/src/render/layout.ts +78 -0
- package/src/render/page-head.ts +193 -0
- package/src/render/render-block.ts +45 -32
- package/src/render/strings.ts +74 -0
- package/src/render/term-archive.ts +94 -58
- package/src/render/widget-areas.ts +24 -0
- package/src/styles/archive.css +38 -102
- package/src/styles/base.css +503 -554
- package/src/styles/blocks.css +913 -666
- package/src/styles/chrome.css +506 -0
- package/src/styles/listings.css +591 -0
- package/src/styles/theme.css +25 -19
- package/src/styles/tokens.css +284 -234
- package/src/styles/widgets.css +1059 -0
- package/tokens.json +18 -18
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from '@cogenta/theme-kit';
|
|
1
2
|
export * from './render/blocks/accordion.js';
|
|
3
|
+
export * from './render/blocks/breakdown.js';
|
|
2
4
|
export * from './render/blocks/collection-list.js';
|
|
3
5
|
export * from './render/blocks/cta.js';
|
|
4
6
|
export * from './render/blocks/embed.js';
|
|
@@ -16,6 +18,10 @@ export * from './render/blocks/stat-counter.js';
|
|
|
16
18
|
export * from './render/blocks/stats.js';
|
|
17
19
|
export * from './render/blocks/testimonial.js';
|
|
18
20
|
export * from './render/chrome.js';
|
|
21
|
+
export * from './render/details.js';
|
|
22
|
+
export * from './render/figures.js';
|
|
23
|
+
export * from './render/page-head.js';
|
|
19
24
|
export * from './render/render-block.js';
|
|
20
25
|
export * from './render/term-archive.js';
|
|
26
|
+
export * from './render/widget-areas.js';
|
|
21
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAA;AAClC,cAAc,8BAA8B,CAAA;AAC5C,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,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
// The shared contract D primitives every theme package implements against —
|
|
2
|
+
// re-exported so a consumer of this package never has to know they live in
|
|
3
|
+
// `@cogenta/theme-kit` to use them alongside this theme's own blocks.
|
|
4
|
+
export * from '@cogenta/theme-kit';
|
|
1
5
|
export * from './render/blocks/accordion.js';
|
|
6
|
+
export * from './render/blocks/breakdown.js';
|
|
2
7
|
export * from './render/blocks/collection-list.js';
|
|
3
8
|
export * from './render/blocks/cta.js';
|
|
4
9
|
export * from './render/blocks/embed.js';
|
|
@@ -16,6 +21,10 @@ export * from './render/blocks/stat-counter.js';
|
|
|
16
21
|
export * from './render/blocks/stats.js';
|
|
17
22
|
export * from './render/blocks/testimonial.js';
|
|
18
23
|
export * from './render/chrome.js';
|
|
24
|
+
export * from './render/details.js';
|
|
25
|
+
export * from './render/figures.js';
|
|
26
|
+
export * from './render/page-head.js';
|
|
19
27
|
export * from './render/render-block.js';
|
|
20
28
|
export * from './render/term-archive.js';
|
|
29
|
+
export * from './render/widget-areas.js';
|
|
21
30
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,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,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA"}
|
|
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,8BAA8B,CAAA;AAC5C,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,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,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,
|
|
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,EACL,KAAK,WAAW,EAGhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AA8B3B,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAetF"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, nestedHeadingTag, renderRichText, } from '@cogenta/theme-kit';
|
|
2
|
+
import { section, sectionHead } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Notes a visitor opens when they need them: what to bring, parking, the
|
|
5
|
+
* safeguarding check. The title on the first four columns and the rows on the
|
|
6
|
+
* last eight, each row a `<details>` under a hairline. It opens without a
|
|
7
|
+
* script and is found by the browser's own search. The question sits in a
|
|
8
|
+
* real heading inside the summary, so a screen reader's heading list still
|
|
9
|
+
* reaches every one. The plus that becomes a minus is two bars drawn by the
|
|
10
|
+
* stylesheet, not a glyph.
|
|
7
11
|
*/
|
|
8
|
-
function
|
|
9
|
-
return h('li', { class: '
|
|
12
|
+
function row(item, ctx, titled) {
|
|
13
|
+
return h('li', { class: 'ca-notes__item' }, h('details', { class: 'ca-notes__details' }, h('summary', { class: 'ca-notes__summary' }, h(nestedHeadingTag('accordion', titled), { class: 'ca-notes__question' }, item.question), h('span', { class: 'ca-notes__mark', 'aria-hidden': 'true' })), h('div', { class: 'ca-notes__answer' }, renderRichText(ctx, item.answer))));
|
|
10
14
|
}
|
|
11
15
|
export function renderAccordion(block, ctx) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
: heading(blockHeadingTag('accordion') ?? 'h2', { class: 'cg-accordion__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-accordion__items' }, block.items.map((item) => renderItem(item, ctx))));
|
|
16
|
+
const titled = block.title !== undefined;
|
|
17
|
+
return section('section', 'accordion', 'ca-notes', { 'data-titled': String(titled) }, 'div', sectionHead('accordion', block.title), h('ul', { class: 'ca-notes__items' }, block.items.map((item) => row(item, ctx, titled))));
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=accordion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../../src/render/blocks/accordion.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../../src/render/blocks/accordion.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,CAAC,EACD,gBAAgB,EAEhB,cAAc,GACf,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEnD;;;;;;;;GAQG;AACH,SAAS,GAAG,CAAC,IAAmB,EAAE,GAAkB,EAAE,MAAe;IACnE,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,CAAC,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxF,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,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;IACxC,OAAO,OAAO,CACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EACjC,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,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAClD,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* Where the money goes, as shares of one total: one row per share, the
|
|
4
|
+
* percentage in tabular figures, what it pays for, and a bar under it as long
|
|
5
|
+
* as the share. The bar is a presentational `<span>` whose length is the
|
|
6
|
+
* number beside it, so nothing is said twice to a screen reader; the figure
|
|
7
|
+
* itself is a `<data>` element carrying the exact value.
|
|
8
|
+
*/
|
|
9
|
+
export declare function renderBreakdown(items: readonly {
|
|
10
|
+
readonly value: string;
|
|
11
|
+
readonly unit?: string | undefined;
|
|
12
|
+
readonly label: string;
|
|
13
|
+
}[], ctx: RenderContext): HtmlElement;
|
|
14
|
+
//# sourceMappingURL=breakdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakdown.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/breakdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAI5E;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS;IACd,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,EAAE,EACH,GAAG,EAAE,aAAa,GACjB,WAAW,CAuBb"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { h } from '@cogenta/theme-kit';
|
|
2
|
+
import { shareOf } from '../figures.js';
|
|
3
|
+
import { associationString } from '../strings.js';
|
|
4
|
+
/**
|
|
5
|
+
* Where the money goes, as shares of one total: one row per share, the
|
|
6
|
+
* percentage in tabular figures, what it pays for, and a bar under it as long
|
|
7
|
+
* as the share. The bar is a presentational `<span>` whose length is the
|
|
8
|
+
* number beside it, so nothing is said twice to a screen reader; the figure
|
|
9
|
+
* itself is a `<data>` element carrying the exact value.
|
|
10
|
+
*/
|
|
11
|
+
export function renderBreakdown(items, ctx) {
|
|
12
|
+
return h('dl', { class: 'ca-shares', 'aria-label': associationString(ctx.locale, 'share') }, items.map((item) => {
|
|
13
|
+
const share = shareOf(item.value, item.unit) ?? 0;
|
|
14
|
+
return h('div', { class: 'ca-shares__item' }, h('dt', { class: 'ca-shares__label' }, item.label), h('dd', { class: 'ca-shares__value' }, h('data', { value: String(share) }, `${item.value}${item.unit ?? ''}`)), h('dd', { class: 'ca-shares__track', 'aria-hidden': 'true' }, h('span', { class: 'ca-shares__bar', style: `inline-size:${share}%` })));
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=breakdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakdown.js","sourceRoot":"","sources":["../../../../src/render/blocks/breakdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,CAAC,EAAsB,MAAM,oBAAoB,CAAA;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,KAIG,EACH,GAAkB;IAElB,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC5E,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACjD,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAClD,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CACvE,EACD,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,EAAE,EACpD,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,eAAe,KAAK,GAAG,EAAE,CAAC,CACvE,CACF,CAAA;IACH,CAAC,CAAC,CACH,CAAA;AACH,CAAC"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import type { CollectionListBlock } from '@cogenta/blocks';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* here: `query` builds the request from the block's own fields, the caller
|
|
7
|
-
* awaits `ctx.content.list(...)` before rendering starts, and this function
|
|
8
|
-
* stays a pure function of the entries handed to it.
|
|
9
|
-
*/
|
|
10
|
-
export { buildCollectionListQuery as query };
|
|
11
|
-
export declare function renderCollectionList(block: CollectionListBlock, ctx: RenderContext, entries: readonly ContentEntry[]): HtmlElement;
|
|
2
|
+
import { type ContentEntry, type HtmlElement, type QueryRequest, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
+
export declare function renderCollectionList(block: CollectionListBlock, ctx: RenderContext, fetched: readonly ContentEntry[]): HtmlElement;
|
|
4
|
+
/** The query this block needs, fetched by the host before any markup is built. */
|
|
5
|
+
export declare function query(block: CollectionListBlock): QueryRequest;
|
|
12
6
|
//# 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,
|
|
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,KAAK,YAAY,EAMjB,KAAK,WAAW,EAIhB,KAAK,YAAY,EACjB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AA8N3B,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,SAAS,YAAY,EAAE,GAC/B,WAAW,CA2Bb;AAED,kFAAkF;AAClF,wBAAgB,KAAK,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAE9D"}
|
|
@@ -1,64 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function stringField(entry, field) {
|
|
12
|
-
const value = entry[field];
|
|
13
|
-
return typeof value === 'string' && value.trim() !== '' ? value : undefined;
|
|
1
|
+
import { buildCollectionListQuery, entryExcerpt, entryHref, entryImage, entryTitle, h, heading, nestedHeadingTag, renderImageSource, } from '@cogenta/theme-kit';
|
|
2
|
+
import { eventTimeOf, factsOf, hoursOf, placeOf, renderDateBlock, renderFacts, textOf, } from '../details.js';
|
|
3
|
+
import { section, sectionHead } from '../layout.js';
|
|
4
|
+
function shapeOf(entries, ctx, layout) {
|
|
5
|
+
if (entries.every((entry) => eventTimeOf(entry) !== undefined))
|
|
6
|
+
return 'events';
|
|
7
|
+
if (entries.every((entry) => entryImage(entry, ctx) !== undefined)) {
|
|
8
|
+
return layout === 'list' ? 'rows' : 'photos';
|
|
9
|
+
}
|
|
10
|
+
return 'index';
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const hasDate = parsed !== null && !Number.isNaN(parsed.getTime());
|
|
33
|
-
const location = stringField(entry, 'location');
|
|
12
|
+
function mediaLink(entry, ctx, className, sizes) {
|
|
13
|
+
const source = entryImage(entry, ctx);
|
|
14
|
+
if (source === undefined)
|
|
15
|
+
return null;
|
|
16
|
+
return h('a', {
|
|
17
|
+
class: `${className}__media`,
|
|
18
|
+
href: entryHref(entry, ctx),
|
|
19
|
+
tabindex: '-1',
|
|
20
|
+
'aria-hidden': 'true',
|
|
21
|
+
}, renderImageSource(source, { className: `${className}__image`, sizes }));
|
|
22
|
+
}
|
|
23
|
+
function titleLink(entry, ctx, tag, className) {
|
|
24
|
+
return heading(tag, { class: `${className}__title` }, h('a', { class: `${className}__link`, href: entryHref(entry, ctx) }, entryTitle(entry, ctx)));
|
|
25
|
+
}
|
|
26
|
+
function event(entry, time, ctx, tag) {
|
|
27
|
+
const hours = hoursOf(time, ctx.locale);
|
|
28
|
+
const place = placeOf(entry);
|
|
34
29
|
const excerpt = entryExcerpt(entry);
|
|
35
|
-
const
|
|
36
|
-
|
|
30
|
+
const cost = textOf(entry.cost);
|
|
31
|
+
return h('li', { class: 'ca-events__item' }, renderDateBlock(time, ctx.locale, 'ca-date'), h('div', { class: 'ca-events__body' }, titleLink(entry, ctx, tag, 'ca-events'), hours === undefined && place === undefined
|
|
37
32
|
? null
|
|
38
|
-
: h('
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
: h('p', { class: 'ca-events__meta' }, hours === undefined ? null : h('span', { class: 'ca-events__hours' }, hours), place === undefined ? null : h('span', { class: 'ca-events__place' }, place)), excerpt === undefined ? null : h('p', { class: 'ca-events__text' }, excerpt)), cost === undefined ? null : h('p', { class: 'ca-events__cost' }, cost));
|
|
34
|
+
}
|
|
35
|
+
function row(entry, ctx, tag) {
|
|
36
|
+
const excerpt = entryExcerpt(entry);
|
|
37
|
+
const facts = factsOf(entry, ctx.locale);
|
|
38
|
+
const when = facts.find((fact) => fact.key === 'when');
|
|
39
|
+
const rest = facts.filter((fact) => fact.key === 'where' || fact.key === 'audience');
|
|
40
|
+
return h('li', { class: 'ca-rows__item' }, mediaLink(entry, ctx, 'ca-rows', '(min-width: 64rem) 30vw, 100vw'), h('div', { class: 'ca-rows__body' }, when === undefined ? null : h('p', { class: 'ca-kicker ca-rows__when' }, when.value), titleLink(entry, ctx, tag, 'ca-rows'), excerpt === undefined ? null : h('p', { class: 'ca-rows__text' }, excerpt), renderFacts(rest, 'ca-rows__facts')));
|
|
41
|
+
}
|
|
42
|
+
function photo(entry, ctx, tag) {
|
|
43
|
+
const excerpt = entryExcerpt(entry);
|
|
44
|
+
return h('li', { class: 'ca-photos__item' }, mediaLink(entry, ctx, 'ca-photos', '(min-width: 64rem) 26vw, 80vw'), titleLink(entry, ctx, tag, 'ca-photos'), excerpt === undefined ? null : h('p', { class: 'ca-photos__text' }, excerpt));
|
|
45
|
+
}
|
|
46
|
+
function indexItem(entry, ctx, tag) {
|
|
47
|
+
const excerpt = entryExcerpt(entry);
|
|
48
|
+
return h('li', { class: 'ca-index__item' }, titleLink(entry, ctx, tag, 'ca-index'), excerpt === undefined ? null : h('p', { class: 'ca-index__text' }, excerpt));
|
|
49
|
+
}
|
|
50
|
+
/** The entries that are not the page being rendered. */
|
|
51
|
+
function othersThanThisPage(entries, ctx) {
|
|
52
|
+
return entries.filter((entry) => entryHref(entry, ctx) !== ctx.url.pathname);
|
|
53
|
+
}
|
|
54
|
+
function scroller(block, ctx, list) {
|
|
55
|
+
return h('div', {
|
|
56
|
+
class: 'ca-list__viewport',
|
|
57
|
+
role: 'region',
|
|
58
|
+
'aria-label': block.title ?? ctx.t('collection.carousel'),
|
|
59
|
+
tabindex: '0',
|
|
60
|
+
}, list);
|
|
61
|
+
}
|
|
62
|
+
function body(shape, shown, block, ctx, tag) {
|
|
63
|
+
switch (shape) {
|
|
64
|
+
case 'events': {
|
|
65
|
+
const dated = shown
|
|
66
|
+
.map((entry) => ({ entry, time: eventTimeOf(entry) }))
|
|
67
|
+
.sort((a, b) => a.time.start.date.getTime() - b.time.start.date.getTime());
|
|
68
|
+
const list = h('ul', { class: 'ca-list__items ca-events' }, dated.map(({ entry, time }) => event(entry, time, ctx, tag)));
|
|
69
|
+
return block.layout === 'carousel' ? scroller(block, ctx, list) : list;
|
|
70
|
+
}
|
|
71
|
+
case 'rows':
|
|
72
|
+
return h('ul', { class: 'ca-list__items ca-rows' }, shown.map((entry) => row(entry, ctx, tag)));
|
|
73
|
+
case 'photos': {
|
|
74
|
+
const list = h('ul', { class: 'ca-list__items ca-photos' }, shown.map((entry) => photo(entry, ctx, tag)));
|
|
75
|
+
return block.layout === 'carousel' ? scroller(block, ctx, list) : list;
|
|
76
|
+
}
|
|
77
|
+
case 'index':
|
|
78
|
+
return h('ul', { class: 'ca-list__items ca-index' }, shown.map((entry) => indexItem(entry, ctx, tag)));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
export function renderCollectionList(block, ctx, fetched) {
|
|
82
|
+
const titled = block.title !== undefined;
|
|
83
|
+
const shown = othersThanThisPage(fetched, ctx);
|
|
84
|
+
const tag = nestedHeadingTag('collectionList', titled);
|
|
85
|
+
if (shown.length === 0) {
|
|
86
|
+
return section('section', 'collectionList', 'ca-list', { 'data-layout': block.layout, 'data-shape': 'empty' }, 'div', sectionHead('collectionList', block.title), h('p', { class: 'ca-empty' }, ctx.t('collection.empty')));
|
|
87
|
+
}
|
|
88
|
+
const shape = shapeOf(shown, ctx, block.layout);
|
|
89
|
+
return section('section', 'collectionList', 'ca-list', { 'data-layout': block.layout, 'data-shape': shape }, 'div', sectionHead('collectionList', block.title), body(shape, shown, block, ctx, tag));
|
|
42
90
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const items = entries.length === 0
|
|
47
|
-
? h('p', { class: 'cg-list__empty' }, ctx.t('collection.empty'))
|
|
48
|
-
: h('ul', { class: 'cg-list__items cg-event-cards' }, entries.map((entry) => renderEntry(entry, ctx, entryTag)));
|
|
49
|
-
return h('section', {
|
|
50
|
-
class: 'cg-block cg-list',
|
|
51
|
-
'data-block': 'collectionList',
|
|
52
|
-
'data-layout': block.layout,
|
|
53
|
-
}, hasTitle
|
|
54
|
-
? heading(blockHeadingTag('collectionList') ?? 'h2', { class: 'cg-list__title-heading', 'data-field': 'title' }, block.title ?? '')
|
|
55
|
-
: null, block.layout === 'carousel'
|
|
56
|
-
? h('div', {
|
|
57
|
-
class: 'cg-list__viewport',
|
|
58
|
-
role: 'region',
|
|
59
|
-
'aria-label': block.title ?? ctx.t('collection.carousel'),
|
|
60
|
-
tabindex: '0',
|
|
61
|
-
}, items)
|
|
62
|
-
: items);
|
|
91
|
+
/** The query this block needs, fetched by the host before any markup is built. */
|
|
92
|
+
export function query(block) {
|
|
93
|
+
return buildCollectionListQuery(block);
|
|
63
94
|
}
|
|
64
95
|
//# 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,
|
|
1
|
+
{"version":3,"file":"collection-list.js","sourceRoot":"","sources":["../../../../src/render/blocks/collection-list.ts"],"names":[],"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AgB,EAAE,MAAM,CAAC,CAAA;IAEtD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,OAAO,CACZ,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,EAAE,aAAa,EAAE,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,EACtD,KAAK,EACL,WAAW,CAAC,gBAAgB,EAAE,KAAK,CAAC,KAAK,CAAC,EAC1C,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CACzD,CAAA;IACH,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/C,OAAO,OAAO,CACZ,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,EAAE,aAAa,EAAE,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,EACpD,KAAK,EACL,WAAW,CAAC,gBAAgB,EAAE,KAAK,CAAC,KAAK,CAAC,EAC1C,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CACpC,CAAA;AACH,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,KAAK,CAAC,KAA0B;IAC9C,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAA;AACxC,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { CtaBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
-
/**
|
|
4
|
-
* The "Every gift counts" donate band — a full-width, tinted panel (the
|
|
5
|
-
* skin's own accent, softened) rather than a plain section, so the one block
|
|
6
|
-
* whose entire job is a call to act reads as the loudest thing on the page.
|
|
7
|
-
*/
|
|
8
3
|
export declare function renderCta(block: CtaBlock, ctx: RenderContext): HtmlElement;
|
|
9
4
|
//# 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;
|
|
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;AA2C3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAc1E"}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { actionList, blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
|
|
2
|
+
import { giftsOf } from '../figures.js';
|
|
3
|
+
import { optionalText, section } from '../layout.js';
|
|
2
4
|
/**
|
|
3
|
-
* The
|
|
4
|
-
*
|
|
5
|
-
*
|
|
5
|
+
* The ask. On a charity's site the band that asks is the donation ask, so
|
|
6
|
+
* this theme gives it the signal yellow, across the whole width of the
|
|
7
|
+
* window: the title large on the first six columns, and on the other six the
|
|
8
|
+
* sentence and the actions, the first one a filled ink button.
|
|
9
|
+
*
|
|
10
|
+
* When the text says what a gift pays for, sentence by sentence, each
|
|
11
|
+
* sentence starting with an amount, the amounts are set large beside what
|
|
12
|
+
* they buy (`giftsOf`); any other text stays one paragraph.
|
|
13
|
+
*
|
|
14
|
+
* An invitation that is not a donation ask (a volunteer evening, a
|
|
15
|
+
* newsletter) asks for the quieter band with the `background` variant, which
|
|
16
|
+
* lays the same layout on the paper's darker stock.
|
|
6
17
|
*/
|
|
18
|
+
function body(block) {
|
|
19
|
+
const gifts = giftsOf(block.text);
|
|
20
|
+
if (gifts === undefined) {
|
|
21
|
+
return optionalText('p', 'ca-cta__text', block.text, { 'data-field': 'text' });
|
|
22
|
+
}
|
|
23
|
+
return h('div', { class: 'ca-cta__gifts' }, gifts.lead === undefined ? null : h('p', { class: 'ca-cta__text' }, gifts.lead), h('dl', { class: 'ca-cta__ladder' }, gifts.gifts.map((gift) => h('div', { class: 'ca-cta__gift' }, h('dt', { class: 'ca-cta__amount' }, gift.amount), h('dd', { class: 'ca-cta__buys' }, gift.text)))), gifts.tail === undefined ? null : h('p', { class: 'ca-cta__text' }, gifts.tail));
|
|
24
|
+
}
|
|
7
25
|
export function renderCta(block, ctx) {
|
|
8
|
-
return
|
|
9
|
-
? null
|
|
10
|
-
: h('p', { class: 'cg-cta__text', 'data-field': 'text' }, block.text),
|
|
11
|
-
// `actions` is required and non-empty for a `cta`, so the list is
|
|
12
|
-
// always rendered; the null branch stays reachable only through
|
|
13
|
-
// invalid data.
|
|
14
|
-
actionList(ctx, block.actions, block.title)));
|
|
26
|
+
return section('section', 'cta', 'ca-cta', { 'data-band': 'signal' }, 'div', heading(blockHeadingTag('cta') ?? 'h2', { class: 'ca-cta__title', 'data-field': 'title' }, block.title), h('div', { class: 'ca-cta__body' }, body(block), actionList(ctx, block.actions, block.title)));
|
|
15
27
|
}
|
|
16
28
|
//# 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;
|
|
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,M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AU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,OAAO,OAAO,CACZ,SAAS,EACT,KAAK,EACL,QAAQ,EACR,EAAE,WAAW,EAAE,QAAQ,EAAE,EACzB,KAAK,EACL,OAAO,CACL,eAAe,CAAC,KAAK,CAAC,IAAI,IAAI,EAC9B,EAAE,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EACjD,KAAK,CAAC,KAAK,CACZ,EACD,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAC9F,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;
|
|
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,CAwC9E"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { aspectRatio, h } from '@cogenta/theme-kit';
|
|
2
|
+
import { arrowWords, section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
+
* A film about the food bank, a recording of the annual meeting, a post from
|
|
5
|
+
* a partner: eight columns of the reading width.
|
|
4
6
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* a
|
|
7
|
+
* Nothing here contacts a third party before the visitor consents: when
|
|
8
|
+
* `consentRequired` is set, or the provider has no cookie-free frame (a map,
|
|
9
|
+
* a post), a notice takes the frame's place. The notice is a short card
|
|
10
|
+
* inside a hairline, not an empty frame kept at the video's ratio: without a
|
|
11
|
+
* script there is nothing to load into that frame later, and a large blank
|
|
12
|
+
* rectangle on a page is a hole. A label, one sentence, and one arrow link to
|
|
13
|
+
* the original. No preconnect, no poster fetched from the provider, no
|
|
14
|
+
* consent button (this theme ships no script).
|
|
10
15
|
*/
|
|
11
|
-
/** `null` means "this provider has no embeddable frame we trust". */
|
|
12
16
|
function frameSource(provider, rawUrl) {
|
|
13
17
|
const url = URL.parse(rawUrl);
|
|
14
18
|
if (url === null)
|
|
@@ -38,39 +42,43 @@ function frameSource(provider, rawUrl) {
|
|
|
38
42
|
case 'soundcloud':
|
|
39
43
|
return `https://w.soundcloud.com/player/?url=${encodeURIComponent(rawUrl)}`;
|
|
40
44
|
default:
|
|
41
|
-
// bluesky, mastodon, other: a post embed is a script tag
|
|
42
|
-
//
|
|
45
|
+
// bluesky, mastodon, other: a post embed is a script tag and a map is
|
|
46
|
+
// a third-party page, neither of which this theme loads. The notice is
|
|
47
|
+
// the rendering.
|
|
43
48
|
return null;
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
|
-
function
|
|
47
|
-
return h('div', { class: '
|
|
48
|
-
class: '
|
|
51
|
+
function notice(block, ctx, reason) {
|
|
52
|
+
return h('div', { class: 'ca-embed__notice' }, h('p', { class: 'ca-embed__label' }, ctx.t('embed.label')), h('p', { class: 'ca-embed__reason' }, reason), h('a', {
|
|
53
|
+
class: 'ca-arrow-link ca-embed__link',
|
|
49
54
|
href: ctx.link(block.url),
|
|
50
55
|
rel: 'noopener noreferrer nofollow',
|
|
51
|
-
},
|
|
56
|
+
}, arrowWords(block.provider === 'other'
|
|
57
|
+
? ctx.t('embed.openOther')
|
|
58
|
+
: ctx.t('embed.open', { provider: block.provider }))));
|
|
52
59
|
}
|
|
53
60
|
export function renderEmbed(block, ctx) {
|
|
54
61
|
const source = block.consentRequired ? null : frameSource(block.provider, block.url);
|
|
62
|
+
// Without a ratio the frame would collapse and shift the layout as it loads.
|
|
55
63
|
const ratio = aspectRatio(block.ratio) ?? '16 / 9';
|
|
56
|
-
return
|
|
57
|
-
class: 'cg-block cg-embed',
|
|
58
|
-
'data-block': 'embed',
|
|
64
|
+
return section('div', 'embed', 'ca-embed', {
|
|
59
65
|
'data-provider': block.provider,
|
|
60
66
|
'data-consent': block.consentRequired ? 'required' : 'not-required',
|
|
61
|
-
|
|
62
|
-
}, source === null
|
|
63
|
-
?
|
|
67
|
+
'data-frame': source === null ? 'notice' : 'player',
|
|
68
|
+
}, 'div', source === null
|
|
69
|
+
? notice(block, ctx, block.consentRequired
|
|
64
70
|
? ctx.t('embed.consentRequired', { provider: block.provider })
|
|
65
71
|
: ctx.t('embed.unsupported', { provider: block.provider }))
|
|
66
|
-
: h('iframe', {
|
|
67
|
-
class: '
|
|
72
|
+
: h('div', { class: 'ca-embed__frame', style: `aspect-ratio:${ratio}` }, h('iframe', {
|
|
73
|
+
class: 'ca-embed__player',
|
|
68
74
|
src: source,
|
|
75
|
+
// A frame with no accessible name is announced as "frame" and
|
|
76
|
+
// nothing else (WCAG 4.1.2).
|
|
69
77
|
title: ctx.t('embed.title', { provider: block.provider }),
|
|
70
78
|
loading: 'lazy',
|
|
71
79
|
referrerpolicy: 'strict-origin-when-cross-origin',
|
|
72
80
|
allow: 'accelerometer; clipboard-write; encrypted-media; picture-in-picture; fullscreen',
|
|
73
81
|
allowfullscreen: true,
|
|
74
|
-
}));
|
|
82
|
+
})));
|
|
75
83
|
}
|
|
76
84
|
//# 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;
|
|
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;AACzF,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAElD;;;;;;;;;;;;GAYG;AACH,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,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAC1C,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACb,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YAC9C,OAAO,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,0CAA0C,EAAE,EAAE,CAAA;QAChG,CAAC;QACD,KAAK,OAAO,EAAE,CAAC;YACb,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC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AC7D;QACH,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,KAAK,EAAE,EAAE,EAC5D,CAAC,CAAC,QAAQ,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,GAAG,EAAE,MAAM;YACX,8DAA8D;YAC9D,6BAA6B;YAC7B,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,CACH,CACN,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,
|
|
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,EACL,KAAK,WAAW,EAIhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAmB3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAe1E"}
|