@cogenta/theme-entreprise 1.1.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -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 +12 -15
- package/dist/src/render/blocks/accordion.js.map +1 -1
- package/dist/src/render/blocks/collection-list.d.ts +5 -7
- package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
- package/dist/src/render/blocks/collection-list.js +48 -32
- package/dist/src/render/blocks/collection-list.js.map +1 -1
- package/dist/src/render/blocks/cta.d.ts +6 -6
- package/dist/src/render/blocks/cta.d.ts.map +1 -1
- package/dist/src/render/blocks/cta.js +12 -12
- 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 +22 -27
- 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 +13 -16
- package/dist/src/render/blocks/faq.js.map +1 -1
- package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
- package/dist/src/render/blocks/feature-grid.js +22 -22
- package/dist/src/render/blocks/feature-grid.js.map +1 -1
- package/dist/src/render/blocks/gallery.d.ts +7 -8
- package/dist/src/render/blocks/gallery.d.ts.map +1 -1
- package/dist/src/render/blocks/gallery.js +16 -14
- package/dist/src/render/blocks/gallery.js.map +1 -1
- package/dist/src/render/blocks/hero.d.ts +13 -8
- package/dist/src/render/blocks/hero.d.ts.map +1 -1
- package/dist/src/render/blocks/hero.js +27 -17
- package/dist/src/render/blocks/hero.js.map +1 -1
- package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
- package/dist/src/render/blocks/logo-strip.js +14 -11
- package/dist/src/render/blocks/logo-strip.js.map +1 -1
- package/dist/src/render/blocks/logos.d.ts.map +1 -1
- package/dist/src/render/blocks/logos.js +21 -12
- package/dist/src/render/blocks/logos.js.map +1 -1
- package/dist/src/render/blocks/media-figure.d.ts +10 -6
- package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
- package/dist/src/render/blocks/media-figure.js +18 -13
- 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 +15 -11
- 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 +10 -10
- package/dist/src/render/blocks/quote.d.ts.map +1 -1
- package/dist/src/render/blocks/quote.js +14 -13
- package/dist/src/render/blocks/quote.js.map +1 -1
- package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
- package/dist/src/render/blocks/stat-counter.js +11 -13
- package/dist/src/render/blocks/stat-counter.js.map +1 -1
- package/dist/src/render/blocks/stats.d.ts.map +1 -1
- package/dist/src/render/blocks/stats.js +12 -13
- package/dist/src/render/blocks/stats.js.map +1 -1
- package/dist/src/render/blocks/testimonial.d.ts +9 -9
- package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
- package/dist/src/render/blocks/testimonial.js +15 -14
- package/dist/src/render/blocks/testimonial.js.map +1 -1
- package/dist/src/render/chrome.d.ts +3 -1
- package/dist/src/render/chrome.d.ts.map +1 -1
- package/dist/src/render/chrome.js +71 -46
- package/dist/src/render/chrome.js.map +1 -1
- package/dist/src/render/layout.d.ts +26 -0
- package/dist/src/render/layout.d.ts.map +1 -0
- package/dist/src/render/layout.js +51 -0
- package/dist/src/render/layout.js.map +1 -0
- package/dist/src/render/render-block.d.ts.map +1 -1
- package/dist/src/render/render-block.js +23 -2
- package/dist/src/render/render-block.js.map +1 -1
- package/dist/src/render/term-archive.d.ts +8 -6
- package/dist/src/render/term-archive.d.ts.map +1 -1
- package/dist/src/render/term-archive.js +22 -16
- package/dist/src/render/term-archive.js.map +1 -1
- package/dist/src/render/widget-areas.d.ts +13 -0
- package/dist/src/render/widget-areas.d.ts.map +1 -0
- package/dist/src/render/widget-areas.js +20 -0
- package/dist/src/render/widget-areas.js.map +1 -0
- package/dist/theme.config.js +2 -2
- package/dist/theme.config.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +1 -0
- package/src/render/blocks/accordion.ts +32 -27
- package/src/render/blocks/collection-list.ts +84 -53
- package/src/render/blocks/cta.ts +27 -28
- package/src/render/blocks/embed.ts +46 -43
- package/src/render/blocks/faq.ts +25 -21
- package/src/render/blocks/feature-grid.ts +42 -35
- package/src/render/blocks/gallery.ts +21 -16
- package/src/render/blocks/hero.ts +40 -28
- package/src/render/blocks/logo-strip.ts +26 -16
- package/src/render/blocks/logos.ts +33 -17
- package/src/render/blocks/media-figure.ts +22 -14
- package/src/render/blocks/pricing-table.ts +26 -15
- package/src/render/blocks/prose.ts +18 -4
- package/src/render/blocks/quote.ts +18 -14
- package/src/render/blocks/stat-counter.ts +25 -20
- package/src/render/blocks/stats.ts +31 -21
- package/src/render/blocks/testimonial.ts +22 -18
- package/src/render/chrome.ts +84 -49
- package/src/render/layout.ts +67 -0
- package/src/render/render-block.ts +24 -1
- package/src/render/term-archive.ts +54 -50
- package/src/render/widget-areas.ts +23 -0
- package/src/styles/archive.css +135 -38
- package/src/styles/base.css +557 -430
- package/src/styles/blocks.css +1192 -1000
- package/src/styles/theme.css +18 -24
- package/src/styles/tokens.css +162 -192
- package/src/styles/widgets.css +913 -0
- package/tokens.json +17 -17
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import type { GalleryBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* trackpad scrolling and — because the list is focusable and labelled —
|
|
6
|
-
* arrow-key scrolling, with none of the failure modes of a scripted
|
|
7
|
-
* carousel: no auto-advance to fight (WCAG 2.2.2), no focus stolen from an
|
|
8
|
-
* off-screen slide, and it still works before any styling loads.
|
|
4
|
+
* Photographs on the grid, with no frames and no rounded plates.
|
|
9
5
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* `grid` crops every picture to the same 4:3 ratio in rows of three (two for
|
|
7
|
+
* a pair), so a set reads as a considered series. `masonry` keeps each
|
|
8
|
+
* picture's own proportions in three flowing columns. `carousel` is a
|
|
9
|
+
* scroll-snapping row: touch, trackpad and arrow keys all work because the
|
|
10
|
+
* list is focusable and labelled, with no JavaScript, no auto-advance
|
|
11
|
+
* (WCAG 2.2.2) and no focus stolen from an off-screen slide.
|
|
13
12
|
*/
|
|
14
13
|
export declare function renderGallery(block: GalleryBlock, ctx: RenderContext): HtmlElement;
|
|
15
14
|
//# sourceMappingURL=gallery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/gallery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/gallery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGnF;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAsClF"}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* trackpad scrolling and — because the list is focusable and labelled —
|
|
5
|
-
* arrow-key scrolling, with none of the failure modes of a scripted
|
|
6
|
-
* carousel: no auto-advance to fight (WCAG 2.2.2), no focus stolen from an
|
|
7
|
-
* off-screen slide, and it still works before any styling loads.
|
|
4
|
+
* Photographs on the grid, with no frames and no rounded plates.
|
|
8
5
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
6
|
+
* `grid` crops every picture to the same 4:3 ratio in rows of three (two for
|
|
7
|
+
* a pair), so a set reads as a considered series. `masonry` keeps each
|
|
8
|
+
* picture's own proportions in three flowing columns. `carousel` is a
|
|
9
|
+
* scroll-snapping row: touch, trackpad and arrow keys all work because the
|
|
10
|
+
* list is focusable and labelled, with no JavaScript, no auto-advance
|
|
11
|
+
* (WCAG 2.2.2) and no focus stolen from an off-screen slide.
|
|
12
12
|
*/
|
|
13
13
|
export function renderGallery(block, ctx) {
|
|
14
|
-
const items = h('ul', {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
'
|
|
19
|
-
|
|
14
|
+
const items = h('ul', {
|
|
15
|
+
class: 'cg-gallery__items',
|
|
16
|
+
'data-count': String(Math.min(block.items.length, 6)),
|
|
17
|
+
}, block.items.map((item) => h('li', { class: 'cg-gallery__item' }, image(ctx, item.media, {
|
|
18
|
+
className: 'cg-gallery__image',
|
|
19
|
+
sizes: '(min-width: 64rem) 30vw, (min-width: 40rem) 45vw, 85vw',
|
|
20
|
+
}))));
|
|
21
|
+
return section('section', 'gallery', 'cg-gallery', { 'data-layout': block.layout }, 'div', block.layout === 'carousel'
|
|
20
22
|
? h('div', {
|
|
21
23
|
class: 'cg-gallery__viewport',
|
|
22
24
|
role: 'region',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../../src/render/blocks/gallery.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../../src/render/blocks/gallery.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,KAAmB,EAAE,GAAkB;IACnE,MAAM,KAAK,GAAG,CAAC,CACb,IAAI,EACJ;QACE,KAAK,EAAE,mBAAmB;QAC1B,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;KACtD,EACD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACvB,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;QACrB,SAAS,EAAE,mBAAmB;QAC9B,KAAK,EAAE,wDAAwD;KAChE,CAAC,CACH,CACF,CACF,CAAA;IAED,OAAO,OAAO,CACZ,SAAS,EACT,SAAS,EACT,YAAY,EACZ,EAAE,aAAa,EAAE,KAAK,CAAC,MAAM,EAAE,EAC/B,KAAK,EACL,KAAK,CAAC,MAAM,KAAK,UAAU;QACzB,CAAC,CAAC,CAAC,CACC,KAAK,EACL;YACE,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC;YACvC,QAAQ,EAAE,GAAG;SACd,EACD,KAAK,CACN;QACH,CAAC,CAAC,KAAK,CACV,CAAA;AACH,CAAC"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import type { HeroBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* `renderPage` relies on it to avoid emitting a second one.
|
|
4
|
+
* A typographic hero on the twelve-column grid.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* The title leads, set large in the display serif across ten columns. Below
|
|
7
|
+
* it the page splits: the subtitle and the actions hold a narrow column on
|
|
8
|
+
* the left, and the photograph takes the right-hand seven columns, cropped
|
|
9
|
+
* frankly, with no frame, no shadow and no shape behind it. The eyebrow is
|
|
10
|
+
* a line of small capitals after a short rule, never a pill.
|
|
11
|
+
*
|
|
12
|
+
* With no media the subtitle moves to the right half of the grid instead, so
|
|
13
|
+
* a hero without a picture is still an asymmetric composition rather than a
|
|
14
|
+
* column of centred text.
|
|
15
|
+
*
|
|
16
|
+
* The hero carries the page's `h1` (contract B: `headingLevel: 'h1'`), which
|
|
17
|
+
* is why `renderPage` never adds a second one.
|
|
13
18
|
*/
|
|
14
19
|
export declare function renderHero(block: HeroBlock, ctx: RenderContext): HtmlElement;
|
|
15
20
|
//# sourceMappingURL=hero.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAGL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAGL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAG3B;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA2C5E"}
|
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
import { actionList, blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* `renderPage` relies on it to avoid emitting a second one.
|
|
4
|
+
* A typographic hero on the twelve-column grid.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
6
|
+
* The title leads, set large in the display serif across ten columns. Below
|
|
7
|
+
* it the page splits: the subtitle and the actions hold a narrow column on
|
|
8
|
+
* the left, and the photograph takes the right-hand seven columns, cropped
|
|
9
|
+
* frankly, with no frame, no shadow and no shape behind it. The eyebrow is
|
|
10
|
+
* a line of small capitals after a short rule, never a pill.
|
|
11
|
+
*
|
|
12
|
+
* With no media the subtitle moves to the right half of the grid instead, so
|
|
13
|
+
* a hero without a picture is still an asymmetric composition rather than a
|
|
14
|
+
* column of centred text.
|
|
15
|
+
*
|
|
16
|
+
* The hero carries the page's `h1` (contract B: `headingLevel: 'h1'`), which
|
|
17
|
+
* is why `renderPage` never adds a second one.
|
|
12
18
|
*/
|
|
13
19
|
export function renderHero(block, ctx) {
|
|
14
20
|
const tag = blockHeadingTag('hero') ?? 'h1';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
const actions = actionList(ctx, block.actions, ctx.t('hero.actions'));
|
|
22
|
+
const hasAside = block.subtitle !== undefined || actions !== null;
|
|
23
|
+
return section('section', 'hero', 'cg-hero', { 'data-media': block.media === undefined ? 'none' : 'present' }, 'div', h('div', { class: 'cg-hero__intro' }, block.eyebrow === undefined
|
|
18
24
|
? null
|
|
19
|
-
: h('p', { class: 'cg-
|
|
25
|
+
: h('p', { class: 'cg-hero__eyebrow', 'data-field': 'eyebrow' }, block.eyebrow), heading(tag, { class: 'cg-hero__title', 'data-field': 'title' }, block.title)), hasAside
|
|
26
|
+
? h('div', { class: 'cg-hero__aside' }, block.subtitle === undefined
|
|
27
|
+
? null
|
|
28
|
+
: h('p', { class: 'cg-hero__subtitle', 'data-field': 'subtitle' }, block.subtitle), actions)
|
|
29
|
+
: null, block.media === undefined
|
|
20
30
|
? null
|
|
21
|
-
: h('div', { class: 'cg-
|
|
31
|
+
: h('div', { class: 'cg-hero__media' },
|
|
22
32
|
// The only image above the fold by construction, so the only one
|
|
23
|
-
// that must not be lazy
|
|
24
|
-
// Lighthouse regression
|
|
33
|
+
// that must not be lazy: a lazy-loaded LCP element is a measured
|
|
34
|
+
// Lighthouse regression.
|
|
25
35
|
image(ctx, block.media, {
|
|
26
|
-
className: 'cg-
|
|
36
|
+
className: 'cg-hero__image',
|
|
27
37
|
loading: 'eager',
|
|
28
|
-
sizes: '(min-width: 64rem)
|
|
38
|
+
sizes: '(min-width: 64rem) 56vw, 100vw',
|
|
29
39
|
})));
|
|
30
40
|
}
|
|
31
41
|
//# sourceMappingURL=hero.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.js","sourceRoot":"","sources":["../../../../src/render/blocks/hero.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EAEf,CAAC,EACD,OAAO,EACP,KAAK,GAEN,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"hero.js","sourceRoot":"","sources":["../../../../src/render/blocks/hero.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EAEf,CAAC,EACD,OAAO,EACP,KAAK,GAEN,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAA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KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE;QAC3B,iEAAiE;QACjE,iEAAiE;QACjE,yBAAyB;QACzB,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;YACtB,SAAS,EAAE,gBAAgB;YAC3B,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,gCAAgC;SACxC,CAAC,CACH,CACN,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo-strip.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logo-strip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"logo-strip.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logo-strip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAwBnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAoBtF"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
* `blocks@2.0` (RFC 0001). The lighter
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* names it, exactly as `logos` already falls back to when a link is absent.
|
|
4
|
+
* `blocks@2.0` (RFC 0001). The lighter "selected clients" line under a hero:
|
|
5
|
+
* the caption as a small-capital label in the left columns, then the marks
|
|
6
|
+
* in one even row across the rest, in greyscale, between two hairlines.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* feel `logos` is built for.
|
|
8
|
+
* The `<figcaption>` comes first in the figure so the label reads before the
|
|
9
|
+
* marks it introduces. No per-logo name or link: each image's own alt text
|
|
10
|
+
* (set once, in the media library) names it.
|
|
12
11
|
*/
|
|
13
12
|
function renderItem(item, ctx) {
|
|
14
|
-
return h('li', { class: 'cg-logo-
|
|
13
|
+
return h('li', { class: 'cg-logo-strip__item' }, image(ctx, item.media, {
|
|
14
|
+
className: 'cg-logo-strip__logo',
|
|
15
|
+
variant: { fit: 'contain' },
|
|
16
|
+
sizes: '12rem',
|
|
17
|
+
}));
|
|
15
18
|
}
|
|
16
19
|
export function renderLogoStrip(block, ctx) {
|
|
17
|
-
return
|
|
20
|
+
return section('div', 'logoStrip', 'cg-logo-strip', { 'data-count': String(Math.min(block.logos.length, 8)) }, 'figure', block.caption === undefined
|
|
18
21
|
? null
|
|
19
|
-
: h('figcaption', { class: 'cg-logo-
|
|
22
|
+
: h('figcaption', { class: 'cg-logo-strip__caption', 'data-field': 'caption' }, block.caption), h('ul', { class: 'cg-logo-strip__items' }, block.logos.map((item) => renderItem(item, ctx))));
|
|
20
23
|
}
|
|
21
24
|
//# sourceMappingURL=logo-strip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo-strip.js","sourceRoot":"","sources":["../../../../src/render/blocks/logo-strip.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"logo-strip.js","sourceRoot":"","sources":["../../../../src/render/blocks/logo-strip.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;;GAQG;AACH,SAAS,UAAU,CAAC,IAAmB,EAAE,GAAkB;IACzD,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAChC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;QACrB,SAAS,EAAE,qBAAqB;QAChC,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE,OAAO;KACf,CAAC,CACH,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,GAAkB;IACvE,OAAO,OAAO,CACZ,KAAK,EACL,WAAW,EACX,eAAe,EACf,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EACzD,QAAQ,EACR,KAAK,CAAC,OAAO,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,SAAS,EAAE,EAC5D,KAAK,CAAC,OAAO,CACd,EACL,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,sBAAsB,EAAE,EACjC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logos.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAEL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"logos.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAEL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAiC3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAwB9E"}
|
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
import { blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
* A
|
|
4
|
-
*
|
|
5
|
-
* text when the media entity has none, and no visually hidden duplicate is
|
|
6
|
-
* added: a link whose only content is an image with `alt` text is already
|
|
7
|
-
* named.
|
|
4
|
+
* A client register: wordmarks in greyscale, each in its own cell of a ruled
|
|
5
|
+
* table, so a dozen marks of different shapes and weights still line up.
|
|
8
6
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
7
|
+
* Contract B says the organisation's name is the accessible name of the
|
|
8
|
+
* link, so the image carries it as `alt` when the media entity has none, and
|
|
9
|
+
* no visually hidden duplicate is added. Greyscale is a `filter` in the
|
|
10
|
+
* stylesheet, never baked into the media: the same asset still renders in
|
|
11
|
+
* colour wherever a site owner uses it elsewhere.
|
|
14
12
|
*/
|
|
15
13
|
function renderItem(item, ctx) {
|
|
16
14
|
const logo = image(ctx, item.media, {
|
|
17
15
|
className: 'cg-clients__logo',
|
|
18
16
|
altFrom: item.name,
|
|
19
17
|
variant: { fit: 'contain' },
|
|
18
|
+
sizes: '12rem',
|
|
20
19
|
});
|
|
21
20
|
return h('li', { class: 'cg-clients__item' }, item.url === undefined
|
|
22
21
|
? logo
|
|
23
22
|
: h('a', { class: 'cg-clients__link', href: ctx.link(item.url), rel: 'noopener noreferrer' }, logo));
|
|
24
23
|
}
|
|
25
24
|
export function renderLogos(block, ctx) {
|
|
26
|
-
return
|
|
25
|
+
return section('section', 'logos', 'cg-clients', {}, 'div', block.title === undefined
|
|
27
26
|
? null
|
|
28
|
-
: heading(blockHeadingTag('logos') ?? 'h2', { class: 'cg-
|
|
27
|
+
: h('div', { class: 'cg-head' }, heading(blockHeadingTag('logos') ?? 'h2', { class: 'cg-head__title', 'data-field': 'title' }, block.title)), h('ul', { class: 'cg-clients__items', 'data-columns': String(columnsFor(block.items.length)) }, block.items.map((item) => renderItem(item, ctx))));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* How many columns the register uses on a wide screen: four when the marks
|
|
31
|
+
* fill whole rows of four, otherwise three, so a register never ends on a
|
|
32
|
+
* row of empty ruled cells when a whole-row layout exists.
|
|
33
|
+
*/
|
|
34
|
+
function columnsFor(count) {
|
|
35
|
+
if (count <= 3)
|
|
36
|
+
return Math.max(count, 1);
|
|
37
|
+
return count % 4 === 0 ? 4 : 3;
|
|
29
38
|
}
|
|
30
39
|
//# sourceMappingURL=logos.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logos.js","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,EACP,KAAK,GAEN,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"logos.js","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,EACP,KAAK,GAEN,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;;;GASG;AACH,SAAS,UAAU,CAAC,IAAc,EAAE,GAAkB;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;QAClC,SAAS,EAAE,kBAAkB;QAC7B,OAAO,EAAE,IAAI,CAAC,IAAI;QAClB,OA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AC,CAAA;IACzC,OAAO,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAChC,CAAC"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { MediaFigureBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* an image and its own caption — a `<figcaption>` outside the `<figure>` would
|
|
6
|
-
* lose that association for assistive technology.
|
|
4
|
+
* An image and its caption, placed on the grid by `align`.
|
|
7
5
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* `wide` gives the image nine columns and sets the caption in the three to
|
|
7
|
+
* its right, under a hairline, aligned to the image's foot, the way an
|
|
8
|
+
* annual report places an exhibit and its note. `start` and `end` do the
|
|
9
|
+
* same on a narrower image; `center` keeps the caption under the image;
|
|
10
|
+
* `full` lets the image run the full width of the page. No frame, no shadow,
|
|
11
|
+
* no rounded corner: the picture is the object.
|
|
12
|
+
*
|
|
13
|
+
* `<figure>`/`<figcaption>` keep the caption associated with the image for
|
|
14
|
+
* assistive technology, which is why the figure is the grid container itself.
|
|
11
15
|
*/
|
|
12
16
|
export declare function renderMediaFigure(block: MediaFigureBlock, ctx: RenderContext): HtmlElement;
|
|
13
17
|
//# sourceMappingURL=media-figure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-figure.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/media-figure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAe,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"media-figure.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/media-figure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAe,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGhG;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiC1F"}
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import { aspectRatio, h, image } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* an image and its own caption — a `<figcaption>` outside the `<figure>` would
|
|
5
|
-
* lose that association for assistive technology.
|
|
4
|
+
* An image and its caption, placed on the grid by `align`.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* `wide` gives the image nine columns and sets the caption in the three to
|
|
7
|
+
* its right, under a hairline, aligned to the image's foot, the way an
|
|
8
|
+
* annual report places an exhibit and its note. `start` and `end` do the
|
|
9
|
+
* same on a narrower image; `center` keeps the caption under the image;
|
|
10
|
+
* `full` lets the image run the full width of the page. No frame, no shadow,
|
|
11
|
+
* no rounded corner: the picture is the object.
|
|
12
|
+
*
|
|
13
|
+
* `<figure>`/`<figcaption>` keep the caption associated with the image for
|
|
14
|
+
* assistive technology, which is why the figure is the grid container itself.
|
|
10
15
|
*/
|
|
11
16
|
export function renderMediaFigure(block, ctx) {
|
|
12
17
|
const ratio = aspectRatio(block.ratio);
|
|
13
18
|
const hasCaption = block.caption !== undefined || block.credit !== undefined;
|
|
14
|
-
return
|
|
15
|
-
class: 'cg-figure',
|
|
16
|
-
'data-block': 'mediaFigure',
|
|
19
|
+
return section('div', 'mediaFigure', 'cg-figure', {
|
|
17
20
|
'data-align': block.align ?? 'center',
|
|
18
21
|
style: ratio === undefined ? undefined : `--cg-ratio:${ratio}`,
|
|
19
|
-
}, h('div', { class: 'cg-
|
|
20
|
-
className: 'cg-
|
|
21
|
-
sizes: '(min-width:
|
|
22
|
+
}, 'figure', h('div', { class: 'cg-figure__media' }, image(ctx, block.media, {
|
|
23
|
+
className: 'cg-figure__image',
|
|
24
|
+
sizes: block.align === 'full' ? '100vw' : '(min-width: 64rem) 75vw, 100vw',
|
|
22
25
|
})), hasCaption
|
|
23
|
-
? h('figcaption', { class: 'cg-figure__caption' }, block.caption
|
|
26
|
+
? h('figcaption', { class: 'cg-figure__caption' }, block.caption === undefined
|
|
27
|
+
? null
|
|
28
|
+
: h('span', { class: 'cg-figure__text', 'data-field': 'caption' }, block.caption), block.credit === undefined
|
|
24
29
|
? null
|
|
25
30
|
: h('span', { class: 'cg-figure__credit', 'data-field': 'credit' }, block.credit))
|
|
26
31
|
: null);
|
|
@@ -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;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,GAAkB;IAC3E,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACtC,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CAAA;IAC5E,OAAO,OAAO,CACZ,KAAK,EACL,aAAa,EACb,WAAW,EACX;QACE,YAAY,EAAE,KAAK,CAAC,KAAK,IAAI,QAAQ;QACrC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,KAAK,EAAE;KAC/D,EACD,QAAQ,EACR,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;QACtB,SAAS,EAAE,kBAAkB;QAC7B,KAAK,EAAE,KAAK,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,gCAAgC;KAC3E,CAAC,CACH,EACD,UAAU;QACR,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;QACH,CAAC,CAAC,IAAI,CACT,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,EAIL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;
|
|
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,EAIL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAmD3B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA0B5F"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { actionLink, blockHeadingTag, h, heading, nestedHeadingTag, } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
* `blocks@2.0` (RFC 0001). A
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* `blocks@2.0` (RFC 0001). A comparison set as a ruled table rather than a
|
|
5
|
+
* row of cards: tiers stand side by side between vertical hairlines, each
|
|
6
|
+
* with its name in small capitals, the price in the display serif with
|
|
7
|
+
* tabular numerals, the inclusions as a ruled list and the action at the
|
|
8
|
+
* foot, aligned across tiers.
|
|
8
9
|
*
|
|
9
10
|
* `highlighted` is an editorial signal, never a colour: it becomes
|
|
10
|
-
* `data-highlighted`
|
|
11
|
-
* emphasis is announced
|
|
11
|
+
* `data-highlighted` (a heavier rule above that tier, in ink) and
|
|
12
|
+
* `aria-current`, so the emphasis is announced as well as shown.
|
|
12
13
|
*/
|
|
13
14
|
function renderTier(tier, ctx, tag) {
|
|
14
15
|
return h('li', {
|
|
@@ -21,13 +22,16 @@ function renderTier(tier, ctx, tag) {
|
|
|
21
22
|
? null
|
|
22
23
|
: h('ul', { class: 'cg-pricing__features' }, tier.features.map((feature) => h('li', { class: 'cg-pricing__feature' }, feature))), tier.action === undefined
|
|
23
24
|
? null
|
|
24
|
-
: h('div', { class: 'cg-pricing__action' }, actionLink(ctx, {
|
|
25
|
+
: h('div', { class: 'cg-pricing__action' }, actionLink(ctx, {
|
|
26
|
+
...tier.action,
|
|
27
|
+
emphasis: tier.action.emphasis ?? (tier.highlighted === true ? 'primary' : 'secondary'),
|
|
28
|
+
})));
|
|
25
29
|
}
|
|
26
30
|
export function renderPricingTable(block, ctx) {
|
|
27
31
|
const hasTitle = block.title !== undefined;
|
|
28
32
|
const tierTag = nestedHeadingTag('pricingTable', hasTitle);
|
|
29
|
-
return
|
|
30
|
-
? heading(blockHeadingTag('pricingTable') ?? 'h2', { class: 'cg-
|
|
31
|
-
: null, h('ul', { class: 'cg-pricing__tiers' }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
|
|
33
|
+
return section('section', 'pricingTable', 'cg-pricing', {}, 'div', hasTitle
|
|
34
|
+
? h('div', { class: 'cg-head' }, heading(blockHeadingTag('pricingTable') ?? 'h2', { class: 'cg-head__title', 'data-field': 'title' }, block.title ?? ''))
|
|
35
|
+
: null, h('ul', { class: 'cg-pricing__tiers', 'data-count': String(Math.min(block.tiers.length, 4)) }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
|
|
32
36
|
}
|
|
33
37
|
//# 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;
|
|
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;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,OAAO,CAAC,CACN,IAAI,EACJ;QACE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,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC;SACxF,CAAC,CACH,CACN,CAAA;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAwB,EAAE,GAAkB;IAC7E,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;IAC1C,MAAM,OAAO,GAAG,gBAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAA;IAC1D,OAAO,OAAO,CACZ,SAAS,EACT,cAAc,EACd,YAAY,EACZ,EAAE,EACF,KAAK,EACL,QAAQ;QACN,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,SAAS,EAAE,EACpB,OAAO,CACL,eAAe,CAAC,cAAc,CAAC,IAAI,IAAI,EACvC,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,EAClD,KAAK,CAAC,KAAK,IAAI,EAAE,CAClB,CACF;QACH,CAAC,CAAC,IAAI,EACR,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EACrF,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAC1D,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
|
+
* A reading column set on the right-hand two thirds of the grid.
|
|
5
|
+
*
|
|
6
|
+
* On a wide screen the text starts at the fifth column and holds a 66ch
|
|
7
|
+
* measure; a second-level heading inside the document hangs out into the
|
|
8
|
+
* four columns to its left (`blocks.css`), so a long page reads as a report,
|
|
9
|
+
* with its section titles in the margin, rather than as one centred column.
|
|
10
|
+
*
|
|
11
|
+
* `prose` declares `headingLevel: 'none'`: whatever headings appear come
|
|
12
|
+
* from the rich text document, whose vocabulary starts at `h2`.
|
|
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
|
+
* A reading column set on the right-hand two thirds of the grid.
|
|
5
|
+
*
|
|
6
|
+
* On a wide screen the text starts at the fifth column and holds a 66ch
|
|
7
|
+
* measure; a second-level heading inside the document hangs out into the
|
|
8
|
+
* four columns to its left (`blocks.css`), so a long page reads as a report,
|
|
9
|
+
* with its section titles in the margin, rather than as one centred column.
|
|
10
|
+
*
|
|
11
|
+
* `prose` declares `headingLevel: 'none'`: whatever headings appear come
|
|
12
|
+
* from the rich text document, whose vocabulary starts at `h2`.
|
|
6
13
|
*/
|
|
7
14
|
export function renderProse(block, ctx) {
|
|
8
|
-
return
|
|
15
|
+
return section('div', 'prose', 'cg-text', {}, 'div', h('div', { class: 'cg-prose' }, 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,SAAS,EACT,EAAE,EACF,KAAK,EACL,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CACjE,CAAA;AACH,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { QuoteBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* thin divider — the shape a case-study or client-testimonial section takes
|
|
7
|
-
* on a serious B2B site.
|
|
4
|
+
* An editorial quotation inside the reading column: the display serif in
|
|
5
|
+
* italic, under a hairline, with the attribution set small beneath it.
|
|
8
6
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* Quieter than `testimonial`, which is this theme's large pull quote: a
|
|
8
|
+
* `quote` belongs to the flow of a page, aligned with the prose column
|
|
9
|
+
* rather than spread across the grid, and never in a shaded box.
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* `<figure><blockquote>…</blockquote><figcaption>` is the attribution pattern
|
|
12
|
+
* the HTML spec prescribes: putting the name inside the `<blockquote>` would
|
|
13
|
+
* claim it was part of what was said. The portrait is decorative (the name
|
|
14
|
+
* is right beside it), so its media entity's alt text is expected to be
|
|
15
|
+
* empty; `image` writes the attribute either way (WCAG 1.1.1).
|
|
16
16
|
*/
|
|
17
17
|
export declare function renderQuote(block: QuoteBlock, ctx: RenderContext): HtmlElement;
|
|
18
18
|
//# 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;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiC9E"}
|