@cogenta/theme-association 0.3.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -1,27 +1,41 @@
|
|
|
1
1
|
import { aspectRatio, h, image } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
4
|
+
* A photograph and its caption, the caption always under the picture's own
|
|
5
|
+
* left edge, in the text face, with the credit after it.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* `align` is an editorial intent, read as a layout:
|
|
8
|
+
*
|
|
9
|
+
* - `start` / `end`: seven columns on that side, the caption beside it on the
|
|
10
|
+
* other four, set against the bottom of the picture.
|
|
11
|
+
* - `center`: eight columns, set in from the second.
|
|
12
|
+
* - `wide` (and no value): the whole container.
|
|
13
|
+
* - `full`: the whole window, edge to edge.
|
|
14
|
+
*
|
|
15
|
+
* The ratio crops from the middle, or from the media's own focal point; the
|
|
16
|
+
* corners stay square and the picture casts no shadow.
|
|
9
17
|
*/
|
|
10
18
|
export function renderMediaFigure(block, ctx) {
|
|
19
|
+
const align = block.align ?? 'wide';
|
|
20
|
+
const split = align === 'start' || align === 'end';
|
|
11
21
|
const ratio = aspectRatio(block.ratio);
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
class: '
|
|
15
|
-
'data-block': 'mediaFigure',
|
|
16
|
-
'data-align': block.align ?? 'center',
|
|
17
|
-
style: ratio === undefined ? undefined : `--cg-ratio:${ratio}`,
|
|
18
|
-
}, image(ctx, block.media, {
|
|
19
|
-
className: 'cg-figure__media',
|
|
20
|
-
sizes: '(min-width: 45rem) 40rem, 100vw',
|
|
21
|
-
}), hasCaption
|
|
22
|
-
? h('figcaption', { class: 'cg-figure__caption' }, block.caption, block.credit === undefined
|
|
22
|
+
const caption = block.caption === undefined && block.credit === undefined
|
|
23
|
+
? null
|
|
24
|
+
: h('figcaption', { class: 'ca-figure__caption' }, block.caption === undefined
|
|
23
25
|
? null
|
|
24
|
-
: h('span', { class: '
|
|
25
|
-
|
|
26
|
+
: h('span', { class: 'ca-figure__text', 'data-field': 'caption' }, block.caption), block.credit === undefined
|
|
27
|
+
? null
|
|
28
|
+
: h('span', { class: 'ca-figure__credit', 'data-field': 'credit' }, block.credit));
|
|
29
|
+
return section('div', 'mediaFigure', 'ca-figure', { 'data-align': align, 'data-layout': split ? 'split' : 'single' }, 'figure', h('div', {
|
|
30
|
+
class: 'ca-figure__frame',
|
|
31
|
+
style: ratio === undefined ? undefined : `aspect-ratio:${ratio}`,
|
|
32
|
+
}, image(ctx, block.media, {
|
|
33
|
+
className: 'ca-figure__image',
|
|
34
|
+
sizes: align === 'full'
|
|
35
|
+
? '100vw'
|
|
36
|
+
: split
|
|
37
|
+
? '(min-width: 64rem) 55vw, 100vw'
|
|
38
|
+
: '(min-width: 82rem) 78rem, 100vw',
|
|
39
|
+
})), caption);
|
|
26
40
|
}
|
|
27
41
|
//# sourceMappingURL=media-figure.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-figure.js","sourceRoot":"","sources":["../../../../src/render/blocks/media-figure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"media-figure.js","sourceRoot":"","sources":["../../../../src/render/blocks/media-figure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,GAAkB;IAC3E,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,MAAM,CAAA;IACnC,MAAM,KAAK,GAAG,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,KAAK,CAAA;IAClD,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAEtC,MAAM,OAAO,GACX,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;QACvD,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,OAAO,KAAK,SAAS;YACzB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EACnF,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CACpF,CAAA;IAEP,OAAO,OAAO,CACZ,KAAK,EACL,aAAa,EACb,WAAW,EACX,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,EAClE,QAAQ,EACR,CAAC,CACC,KAAK,EACL;QACE,KAAK,EAAE,kBAAkB;QACzB,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,KAAK,EAAE;KACjE,EACD,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;QACtB,SAAS,EAAE,kBAAkB;QAC7B,KAAK,EACH,KAAK,KAAK,MAAM;YACd,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK;gBACL,CAAC,CAAC,gCAAgC;gBAClC,CAAC,CAAC,iCAAiC;KAC1C,CAAC,CACH,EACD,OAAO,CACR,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-table.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/pricing-table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAe,MAAM,iBAAiB,CAAA;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"pricing-table.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/pricing-table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAe,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAEL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAwC3B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAe5F"}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import { actionLink,
|
|
1
|
+
import { actionLink, h, heading, nestedHeadingTag, } from '@cogenta/theme-kit';
|
|
2
|
+
import { section, sectionHead } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Levels side by side: a membership, a regular gift, a sponsored place.
|
|
5
|
+
* Ruled columns rather than cards: the name of the level, the amount large in
|
|
6
|
+
* the display face with tabular figures and what it covers ("a month") beside
|
|
7
|
+
* it, then what it includes one line at a time between hairlines, and the
|
|
8
|
+
* action at the foot.
|
|
9
|
+
*
|
|
10
|
+
* `highlighted` is an editorial emphasis, drawn as the column's top rule in
|
|
11
|
+
* the organisation's green, thicker, and its name in the same green. No
|
|
12
|
+
* ribbon, no raised card, no fill.
|
|
8
13
|
*/
|
|
9
|
-
function
|
|
10
|
-
return h('li', {
|
|
11
|
-
class: 'cg-pricing__tier',
|
|
12
|
-
'data-highlighted': tier.highlighted === true ? 'true' : undefined,
|
|
13
|
-
'aria-current': tier.highlighted === true ? 'true' : undefined,
|
|
14
|
-
}, heading(tag, { class: 'cg-pricing__name' }, tier.name), h('p', { class: 'cg-pricing__price' }, h('span', { class: 'cg-pricing__amount' }, tier.price), tier.interval === undefined
|
|
14
|
+
function tier(item, ctx, titled) {
|
|
15
|
+
return h('li', { class: 'ca-levels__tier', 'data-highlighted': item.highlighted === true ? 'true' : 'false' }, heading(nestedHeadingTag('pricingTable', titled), { class: 'ca-levels__name' }, item.name), h('p', { class: 'ca-levels__price' }, h('span', { class: 'ca-levels__amount' }, item.price), item.interval === undefined
|
|
15
16
|
? null
|
|
16
|
-
: h('span', { class: '
|
|
17
|
+
: h('span', { class: 'ca-levels__interval' }, item.interval)), item.features.length === 0
|
|
17
18
|
? null
|
|
18
|
-
: h('ul', { class: '
|
|
19
|
+
: h('ul', { class: 'ca-levels__lines' }, item.features.map((feature) => h('li', { class: 'ca-levels__line' }, feature))), item.action === undefined
|
|
19
20
|
? null
|
|
20
|
-
: h('div', { class: '
|
|
21
|
+
: h('div', { class: 'ca-levels__action' }, actionLink(ctx, item.action)));
|
|
21
22
|
}
|
|
22
23
|
export function renderPricingTable(block, ctx) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
return h('section', { class: 'cg-block cg-pricing', 'data-block': 'pricingTable' }, hasTitle
|
|
26
|
-
? heading(blockHeadingTag('pricingTable') ?? 'h2', { class: 'cg-pricing__title', 'data-field': 'title' }, block.title ?? '')
|
|
27
|
-
: null, h('ul', { class: 'cg-pricing__tiers' }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
|
|
24
|
+
const titled = block.title !== undefined;
|
|
25
|
+
return section('section', 'pricingTable', 'ca-levels', { 'data-count': String(Math.min(block.tiers.length, 4)) }, 'div', sectionHead('pricingTable', block.title), h('ul', { class: 'ca-levels__tiers' }, block.tiers.map((item) => tier(item, ctx, titled))));
|
|
28
26
|
}
|
|
29
27
|
//# sourceMappingURL=pricing-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-table.js","sourceRoot":"","sources":["../../../../src/render/blocks/pricing-table.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,
|
|
1
|
+
{"version":3,"file":"pricing-table.js","sourceRoot":"","sources":["../../../../src/render/blocks/pricing-table.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EAEV,CAAC,EACD,OAAO,EACP,gBAAgB,GAEjB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEnD;;;;;;;;;;GAUG;AACH,SAAS,IAAI,CAAC,IAAiB,EAAE,GAAkB,EAAE,MAAe;IAClE,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,EAC9F,OAAO,CAAC,gBAAgB,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,EAC1F,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACrD,IAAI,CAAC,QAAQ,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAC/D,EACD,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QACxB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,OAAO,CAAC,CAAC,CAC/E,EACL,IAAI,CAAC,MAAM,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAC3E,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,WAAW,EACX,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,kBAAkB,EAAE,EAC7B,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,9 +1,15 @@
|
|
|
1
1
|
import type { ProseBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Running text: the organisation's history, how to give, how volunteering
|
|
5
|
+
* works, a privacy notice.
|
|
6
|
+
*
|
|
7
|
+
* `prose` declares `headingLevel: 'none'`, so it adds no heading of its own;
|
|
8
|
+
* the rich text's own headings start at `h2`. The column starts on the first
|
|
9
|
+
* of twelve columns, on the same edge as the page title above it, and holds a
|
|
10
|
+
* reading measure of about sixty-six characters. The first paragraph of the
|
|
11
|
+
* first text under a page title is set a step larger, the way a report opens
|
|
12
|
+
* with its summary.
|
|
7
13
|
*/
|
|
8
14
|
export declare function renderProse(block: ProseBlock, ctx: RenderContext): HtmlElement;
|
|
9
15
|
//# sourceMappingURL=prose.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prose.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"prose.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AAG5F;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAS9E"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { h, renderRichText } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Running text: the organisation's history, how to give, how volunteering
|
|
5
|
+
* works, a privacy notice.
|
|
6
|
+
*
|
|
7
|
+
* `prose` declares `headingLevel: 'none'`, so it adds no heading of its own;
|
|
8
|
+
* the rich text's own headings start at `h2`. The column starts on the first
|
|
9
|
+
* of twelve columns, on the same edge as the page title above it, and holds a
|
|
10
|
+
* reading measure of about sixty-six characters. The first paragraph of the
|
|
11
|
+
* first text under a page title is set a step larger, the way a report opens
|
|
12
|
+
* with its summary.
|
|
6
13
|
*/
|
|
7
14
|
export function renderProse(block, ctx) {
|
|
8
|
-
return
|
|
15
|
+
return section('div', 'prose', 'ca-prose', {}, 'div', h('div', { class: 'ca-prose__body' }, renderRichText(ctx, block.body)));
|
|
9
16
|
}
|
|
10
17
|
//# sourceMappingURL=prose.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prose.js","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAsB,cAAc,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"prose.js","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAsB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,OAAO,CACZ,KAAK,EACL,OAAO,EACP,UAAU,EACV,EAAE,EACF,KAAK,EACL,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CACvE,CAAA;AACH,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import type { QuoteBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The avatar is decorative here — the name is right beside it in text — so
|
|
9
|
-
* its media entity's alt text is expected to be empty. `image` still writes
|
|
10
|
-
* the attribute either way.
|
|
4
|
+
* A few words someone said, set large: the text in the display face across
|
|
5
|
+
* nine columns, with a real opening quotation mark hung in the margin by the
|
|
6
|
+
* stylesheet, and the speaker's name and role small beneath it. A portrait,
|
|
7
|
+
* when there is one, is a small square crop beside the name.
|
|
11
8
|
*/
|
|
12
9
|
export declare function renderQuote(block: QuoteBlock, ctx: RenderContext): HtmlElement;
|
|
13
10
|
//# sourceMappingURL=quote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/quote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/quote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGnF;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmC9E"}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The avatar is decorative here — the name is right beside it in text — so
|
|
8
|
-
* its media entity's alt text is expected to be empty. `image` still writes
|
|
9
|
-
* the attribute either way.
|
|
4
|
+
* A few words someone said, set large: the text in the display face across
|
|
5
|
+
* nine columns, with a real opening quotation mark hung in the margin by the
|
|
6
|
+
* stylesheet, and the speaker's name and role small beneath it. A portrait,
|
|
7
|
+
* when there is one, is a small square crop beside the name.
|
|
10
8
|
*/
|
|
11
9
|
export function renderQuote(block, ctx) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const who = block.author === undefined && block.role === undefined
|
|
11
|
+
? null
|
|
12
|
+
: h('figcaption', { class: 'ca-quote__attribution' }, block.avatar === undefined
|
|
15
13
|
? null
|
|
16
|
-
: image(ctx, block.avatar, {
|
|
17
|
-
className: 'cg-quote__avatar',
|
|
18
|
-
variant: { width: 96, height: 96, fit: 'cover' },
|
|
19
|
-
}), block.author === undefined
|
|
14
|
+
: image(ctx, block.avatar, { className: 'ca-quote__avatar', sizes: '3.5rem' }), h('span', { class: 'ca-quote__who' }, block.author === undefined
|
|
20
15
|
? null
|
|
21
|
-
: h('span', { class: '
|
|
16
|
+
: h('span', { class: 'ca-quote__author', 'data-field': 'author' }, block.author), block.role === undefined
|
|
22
17
|
? null
|
|
23
|
-
: h('span', { class: '
|
|
24
|
-
|
|
18
|
+
: h('span', { class: 'ca-quote__role', 'data-field': 'role' }, block.role)));
|
|
19
|
+
return section('div', 'quote', 'ca-quote', {}, 'figure', h('blockquote', { class: 'ca-quote__quote' }, h('p', { class: 'ca-quote__text', 'data-field': 'text' }, block.text)), who);
|
|
25
20
|
}
|
|
26
21
|
//# sourceMappingURL=quote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.js","sourceRoot":"","sources":["../../../../src/render/blocks/quote.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;
|
|
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;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,MAAM,GAAG,GACP,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;QACpD,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAChF,CAAC,CACC,MAAM,EACN,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,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,11 @@
|
|
|
1
1
|
import type { StatCounterBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The narrower sibling of `stats` (a value and a short label, no unit): a
|
|
5
|
+
* single row of figures across the container, divided by vertical hairlines,
|
|
6
|
+
* each number in the display face over its label. Percentages of one whole
|
|
7
|
+
* are drawn as a breakdown, the same as `stats`. Nothing counts up; a number
|
|
8
|
+
* that animates into place is a number a visitor has to wait for.
|
|
9
|
+
*/
|
|
10
|
+
export declare function renderStatCounter(block: StatCounterBlock, ctx: RenderContext): HtmlElement;
|
|
4
11
|
//# sourceMappingURL=stat-counter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-counter.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"stat-counter.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAK5E;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA4B1F"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from '@cogenta/theme-kit';
|
|
2
|
+
import { isBreakdown } from '../figures.js';
|
|
3
|
+
import { section, sectionHead } from '../layout.js';
|
|
4
|
+
import { renderBreakdown } from './breakdown.js';
|
|
2
5
|
/**
|
|
3
|
-
* `
|
|
4
|
-
*
|
|
6
|
+
* The narrower sibling of `stats` (a value and a short label, no unit): a
|
|
7
|
+
* single row of figures across the container, divided by vertical hairlines,
|
|
8
|
+
* each number in the display face over its label. Percentages of one whole
|
|
9
|
+
* are drawn as a breakdown, the same as `stats`. Nothing counts up; a number
|
|
10
|
+
* that animates into place is a number a visitor has to wait for.
|
|
5
11
|
*/
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
export function renderStatCounter(block, ctx) {
|
|
13
|
+
const breakdown = isBreakdown(block.stats);
|
|
14
|
+
return section('section', 'statCounter', 'ca-counter', {
|
|
15
|
+
'data-shape': breakdown ? 'breakdown' : 'row',
|
|
16
|
+
'data-count': String(Math.min(block.stats.length, 4)),
|
|
17
|
+
'data-titled': String(block.title !== undefined),
|
|
18
|
+
}, 'div', sectionHead('statCounter', block.title), breakdown
|
|
19
|
+
? renderBreakdown(block.stats, ctx)
|
|
20
|
+
: h('dl', { class: 'ca-counter__items' }, block.stats.map((stat) => h('div', { class: 'ca-counter__item' }, h('dt', { class: 'ca-counter__label' }, stat.label), h('dd', { class: 'ca-counter__value' }, stat.value)))));
|
|
13
21
|
}
|
|
14
22
|
//# sourceMappingURL=stat-counter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-counter.js","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
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,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,GAAkB;IAC3E,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAC1C,OAAO,OAAO,CACZ,SAAS,EACT,aAAa,EACb,YAAY,EACZ;QACE,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK;QAC7C,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACrD,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC;KACjD,EACD,KAAK,EACL,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,EACvC,SAAS;QACP,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC;QACnC,CAAC,CAAC,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,CACN,CAAA;AACH,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { StatsBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* What a year of work added up to, with the sentence that makes each number
|
|
5
|
+
* mean something: the title on the first four columns, and the figures on the
|
|
6
|
+
* last eight in two columns, each under a rule. The number in the display
|
|
7
|
+
* face, narrow and large, in the organisation's green with lining tabular
|
|
8
|
+
* figures and its unit a step smaller; under it the sentence of context in
|
|
9
|
+
* the text face. No box, no tint, nothing counts up.
|
|
10
|
+
*
|
|
11
|
+
* Figures that are all percentages of one whole are drawn as a breakdown
|
|
12
|
+
* instead (`renderBreakdown`).
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderStats(block: StatsBlock, ctx: RenderContext): HtmlElement;
|
|
4
15
|
//# sourceMappingURL=stats.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAK5E;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmC9E"}
|
|
@@ -1,18 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from '@cogenta/theme-kit';
|
|
2
|
+
import { isBreakdown } from '../figures.js';
|
|
3
|
+
import { section, sectionHead } from '../layout.js';
|
|
4
|
+
import { renderBreakdown } from './breakdown.js';
|
|
2
5
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* the
|
|
6
|
+
* What a year of work added up to, with the sentence that makes each number
|
|
7
|
+
* mean something: the title on the first four columns, and the figures on the
|
|
8
|
+
* last eight in two columns, each under a rule. The number in the display
|
|
9
|
+
* face, narrow and large, in the organisation's green with lining tabular
|
|
10
|
+
* figures and its unit a step smaller; under it the sentence of context in
|
|
11
|
+
* the text face. No box, no tint, nothing counts up.
|
|
12
|
+
*
|
|
13
|
+
* Figures that are all percentages of one whole are drawn as a breakdown
|
|
14
|
+
* instead (`renderBreakdown`).
|
|
9
15
|
*/
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
export function renderStats(block, ctx) {
|
|
17
|
+
const breakdown = isBreakdown(block.items);
|
|
18
|
+
return section('section', 'stats', 'ca-figures', {
|
|
19
|
+
'data-shape': breakdown ? 'breakdown' : 'figures',
|
|
20
|
+
'data-count': String(Math.min(block.items.length, 4)),
|
|
21
|
+
'data-titled': String(block.title !== undefined),
|
|
22
|
+
}, 'div', sectionHead('stats', block.title), breakdown
|
|
23
|
+
? renderBreakdown(block.items, ctx)
|
|
24
|
+
: h('dl', { class: 'ca-figures__items' }, block.items.map((item) => h('div', { class: 'ca-figures__item' }, h('dt', { class: 'ca-figures__label' }, item.label), h('dd', { class: 'ca-figures__value' }, item.value, item.unit === undefined
|
|
25
|
+
? null
|
|
26
|
+
: h('span', { class: 'ca-figures__unit' }, item.unit))))));
|
|
17
27
|
}
|
|
18
28
|
//# sourceMappingURL=stats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAsB,MAAM,oBAAoB,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAC1C,OAAO,OAAO,CACZ,SAAS,EACT,OAAO,EACP,YAAY,EACZ;QACE,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;QACjD,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACrD,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC;KACjD,EACD,KAAK,EACL,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,EACjC,SAAS;QACP,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC;QACnC,CAAC,CAAC,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,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,KAAK,SAAS;YACrB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CACxD,CACF,CACF,CACF,CACN,CAAA;AACH,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { TestimonialBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* the
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* One person's own account of what the organisation meant to them, told
|
|
5
|
+
* with their photograph: the portrait cropped to 4:5 on the first four
|
|
6
|
+
* columns, the words in the display face on the last seven, starting on a
|
|
7
|
+
* hung quotation mark, and the name and what they do here beneath them.
|
|
8
|
+
* Without a portrait the words take the reading column alone; nothing stands
|
|
9
|
+
* in for the missing face.
|
|
9
10
|
*/
|
|
10
11
|
export declare function renderTestimonial(block: TestimonialBlock, ctx: RenderContext): HtmlElement;
|
|
11
12
|
//# sourceMappingURL=testimonial.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testimonial.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"testimonial.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AAGnG;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAgC1F"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { h, image, renderRichText } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* One person's own account of what the organisation meant to them, told
|
|
5
|
+
* with their photograph: the portrait cropped to 4:5 on the first four
|
|
6
|
+
* columns, the words in the display face on the last seven, starting on a
|
|
7
|
+
* hung quotation mark, and the name and what they do here beneath them.
|
|
8
|
+
* Without a portrait the words take the reading column alone; nothing stands
|
|
9
|
+
* in for the missing face.
|
|
8
10
|
*/
|
|
9
11
|
export function renderTestimonial(block, ctx) {
|
|
10
12
|
const { attribution } = block;
|
|
11
|
-
return
|
|
13
|
+
return section('div', 'testimonial', 'ca-story', { 'data-portrait': String(attribution.avatar !== undefined) }, 'figure', attribution.avatar === undefined
|
|
12
14
|
? null
|
|
13
|
-
: image(ctx, attribution.avatar, {
|
|
14
|
-
className: '
|
|
15
|
-
|
|
16
|
-
}), h('
|
|
15
|
+
: h('div', { class: 'ca-story__portrait' }, image(ctx, attribution.avatar, {
|
|
16
|
+
className: 'ca-story__image',
|
|
17
|
+
sizes: '(min-width: 64rem) 26rem, 70vw',
|
|
18
|
+
})), h('div', { class: 'ca-story__words' }, h('blockquote', { class: 'ca-story__quote' }, renderRichText(ctx, block.quote)), h('figcaption', { class: 'ca-story__attribution' }, h('span', { class: 'ca-story__name' }, attribution.name), attribution.role === undefined
|
|
17
19
|
? null
|
|
18
|
-
: h('span', { class: '
|
|
20
|
+
: h('span', { class: 'ca-story__role' }, attribution.role))));
|
|
19
21
|
}
|
|
20
22
|
//# sourceMappingURL=testimonial.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testimonial.js","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,cAAc,EAAE,MAAM,oBAAoB,CAAA;
|
|
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;AACnG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,GAAkB;IAC3E,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IAC7B,OAAO,OAAO,CACZ,KAAK,EACL,aAAa,EACb,UAAU,EACV,EAAE,eAAe,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,KAAK,SAAS,CAAC,EAAE,EAC7D,QAAQ,EACR,WAAW,CAAC,MAAM,KAAK,SAAS;QAC9B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,EAAE;YAC7B,SAAS,EAAE,iBAAiB;YAC5B,KAAK,EAAE,gCAAgC;SACxC,CAAC,CACH,EACL,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,CAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAC/E,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,EACxD,WAAW,CAAC,IAAI,KAAK,SAAS;QAC5B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,CAC7D,CACF,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,3 +1,40 @@
|
|
|
1
|
-
import { type ChromeInput, type ChromeResult } from '@cogenta/theme-kit';
|
|
1
|
+
import { type ChromeInput, type ChromeNavLink, type ChromeResult } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* The header and footer of a charity's site (`theme@1.4`).
|
|
4
|
+
*
|
|
5
|
+
* Header: one row on the paper under a hairline. The organisation's name in
|
|
6
|
+
* the display face (or its uploaded logo), the pages in plain words, then the
|
|
7
|
+
* `headerAction` as the yellow button, the one standing ask of a charity's
|
|
8
|
+
* site, and the light/dark control. The action sits outside the navigation
|
|
9
|
+
* list on purpose: on a phone it stays in the header row beside the menu
|
|
10
|
+
* button.
|
|
11
|
+
*
|
|
12
|
+
* Below the wide breakpoint the pages become a panel of large links under the
|
|
13
|
+
* header, opened by a CSS-only toggle: a visually hidden checkbox paired with
|
|
14
|
+
* a `<label>` that says "Menu" (and "Close" once open), placed before the
|
|
15
|
+
* `<nav>` so the sibling combinator reaches it. One `<nav>` in the markup,
|
|
16
|
+
* retiled by CSS. The panel repeats the `tagline` under the links.
|
|
17
|
+
*
|
|
18
|
+
* Footer: the green band. The name, the `tagline`, the `footerNote` (a blank
|
|
19
|
+
* line starts a new paragraph, a line break stays a line break, so the
|
|
20
|
+
* registered charity number, the address and the contact lines keep their
|
|
21
|
+
* shape), the social profiles with their names; then the footer navigation in
|
|
22
|
+
* columns: a `submenu-placeholder` (an unlinked item such as "Get involved")
|
|
23
|
+
* starts a column and names it, the links after it fill it. Under a hairline,
|
|
24
|
+
* the legal line: the copyright year and the name, beside the host's
|
|
25
|
+
* `brandingHtml`, placed once, as received. Every `theme@1.4` field renders
|
|
26
|
+
* only when present.
|
|
27
|
+
*
|
|
28
|
+
* Footer widget columns (`theme@1.6`) are one row under the name and the
|
|
29
|
+
* menu, above the legal line, in the band's own small type; with none, the
|
|
30
|
+
* footer is exactly what it was before widgets existed.
|
|
31
|
+
*/
|
|
32
|
+
interface FooterGroup {
|
|
33
|
+
readonly heading: string | null;
|
|
34
|
+
readonly links: readonly ChromeNavLink[];
|
|
35
|
+
}
|
|
36
|
+
/** The footer menu, split into columns at each unlinked heading. */
|
|
37
|
+
export declare function footerGroups(links: readonly ChromeNavLink[]): readonly FooterGroup[];
|
|
2
38
|
export declare function renderChrome(input: ChromeInput): ChromeResult;
|
|
39
|
+
export {};
|
|
3
40
|
//# sourceMappingURL=chrome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,EAQlB,MAAM,oBAAoB,CAAA;AAG3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,UAAU,WAAW;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAA;CACzC;AAcD,oEAAoE;AACpE,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,GAAG,SAAS,WAAW,EAAE,CAYpF;AAmCD,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAiG7D"}
|