@lets-ship/site 1.0.1 → 2.0.0
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/blog/article-view.d.ts.map +1 -1
- package/dist/blog/article-view.js +2 -1
- package/dist/blog/article-view.js.map +1 -1
- package/dist/blog/batches.d.ts +13 -0
- package/dist/blog/batches.d.ts.map +1 -0
- package/dist/blog/batches.js +17 -0
- package/dist/blog/batches.js.map +1 -0
- package/dist/blog/index-view.d.ts +5 -0
- package/dist/blog/index-view.d.ts.map +1 -1
- package/dist/blog/index-view.js +25 -8
- package/dist/blog/index-view.js.map +1 -1
- package/dist/blog/more-posts.d.ts +17 -0
- package/dist/blog/more-posts.d.ts.map +1 -0
- package/dist/blog/more-posts.js +65 -0
- package/dist/blog/more-posts.js.map +1 -0
- package/dist/config/site-config.d.ts +49 -2
- package/dist/config/site-config.d.ts.map +1 -1
- package/dist/config/site-config.js +46 -1
- package/dist/config/site-config.js.map +1 -1
- package/dist/i18n/tables/de.d.ts.map +1 -1
- package/dist/i18n/tables/de.js +17 -0
- package/dist/i18n/tables/de.js.map +1 -1
- package/dist/i18n/tables/en.d.ts.map +1 -1
- package/dist/i18n/tables/en.js +17 -0
- package/dist/i18n/tables/en.js.map +1 -1
- package/dist/i18n/tables/es.d.ts.map +1 -1
- package/dist/i18n/tables/es.js +17 -0
- package/dist/i18n/tables/es.js.map +1 -1
- package/dist/i18n/tables/fr.d.ts.map +1 -1
- package/dist/i18n/tables/fr.js +17 -0
- package/dist/i18n/tables/fr.js.map +1 -1
- package/dist/i18n/tables/nl.d.ts.map +1 -1
- package/dist/i18n/tables/nl.js +17 -0
- package/dist/i18n/tables/nl.js.map +1 -1
- package/dist/i18n/tables/pt.d.ts.map +1 -1
- package/dist/i18n/tables/pt.js +17 -0
- package/dist/i18n/tables/pt.js.map +1 -1
- package/dist/i18n/tables/tr.d.ts.map +1 -1
- package/dist/i18n/tables/tr.js +17 -0
- package/dist/i18n/tables/tr.js.map +1 -1
- package/dist/i18n/types.d.ts +27 -0
- package/dist/i18n/types.d.ts.map +1 -1
- package/dist/layout/footer.d.ts +9 -5
- package/dist/layout/footer.d.ts.map +1 -1
- package/dist/layout/footer.js +71 -8
- package/dist/layout/footer.js.map +1 -1
- package/dist/layout/frame.d.ts +14 -0
- package/dist/layout/frame.d.ts.map +1 -0
- package/dist/layout/frame.js +15 -0
- package/dist/layout/frame.js.map +1 -0
- package/dist/layout/header-menu.d.ts +27 -0
- package/dist/layout/header-menu.d.ts.map +1 -0
- package/dist/layout/header-menu.js +89 -0
- package/dist/layout/header-menu.js.map +1 -0
- package/dist/layout/header.d.ts +12 -0
- package/dist/layout/header.d.ts.map +1 -0
- package/dist/layout/header.js +101 -0
- package/dist/layout/header.js.map +1 -0
- package/dist/layout/nav-width.d.ts +29 -0
- package/dist/layout/nav-width.d.ts.map +1 -0
- package/dist/layout/nav-width.js +32 -0
- package/dist/layout/nav-width.js.map +1 -0
- package/dist/layout/nav.d.ts +13 -0
- package/dist/layout/nav.d.ts.map +1 -0
- package/dist/layout/nav.js +5 -0
- package/dist/layout/nav.js.map +1 -0
- package/dist/layout/root.d.ts.map +1 -1
- package/dist/layout/root.js +8 -1
- package/dist/layout/root.js.map +1 -1
- package/dist/mdx/allow-list.d.ts +2 -2
- package/dist/mdx/allow-list.d.ts.map +1 -1
- package/dist/mdx/allow-list.js +6 -0
- package/dist/mdx/allow-list.js.map +1 -1
- package/dist/mdx/components.d.ts +4 -1
- package/dist/mdx/components.d.ts.map +1 -1
- package/dist/mdx/components.js +14 -4
- package/dist/mdx/components.js.map +1 -1
- package/dist/node/errors.js +1 -1
- package/dist/node/errors.js.map +1 -1
- package/dist/site/app.d.ts.map +1 -1
- package/dist/site/app.js +3 -2
- package/dist/site/app.js.map +1 -1
- package/dist/site/site-page.d.ts.map +1 -1
- package/dist/site/site-page.js +4 -4
- package/dist/site/site-page.js.map +1 -1
- package/dist/website/blocks/announcement-dismiss.d.ts +13 -0
- package/dist/website/blocks/announcement-dismiss.d.ts.map +1 -0
- package/dist/website/blocks/announcement-dismiss.js +49 -0
- package/dist/website/blocks/announcement-dismiss.js.map +1 -0
- package/dist/website/blocks/announcement-views.d.ts +24 -0
- package/dist/website/blocks/announcement-views.d.ts.map +1 -0
- package/dist/website/blocks/announcement-views.js +31 -0
- package/dist/website/blocks/announcement-views.js.map +1 -0
- package/dist/website/blocks/button.d.ts +21 -0
- package/dist/website/blocks/button.d.ts.map +1 -0
- package/dist/website/blocks/button.js +32 -0
- package/dist/website/blocks/button.js.map +1 -0
- package/dist/website/blocks/call-to-action-views.d.ts +15 -0
- package/dist/website/blocks/call-to-action-views.d.ts.map +1 -0
- package/dist/website/blocks/call-to-action-views.js +36 -0
- package/dist/website/blocks/call-to-action-views.js.map +1 -0
- package/dist/website/blocks/card-grid-views.d.ts +41 -0
- package/dist/website/blocks/card-grid-views.d.ts.map +1 -0
- package/dist/website/blocks/card-grid-views.js +94 -0
- package/dist/website/blocks/card-grid-views.js.map +1 -0
- package/dist/website/blocks/carousel-controls.d.ts +13 -0
- package/dist/website/blocks/carousel-controls.d.ts.map +1 -0
- package/dist/website/blocks/carousel-controls.js +48 -0
- package/dist/website/blocks/carousel-controls.js.map +1 -0
- package/dist/website/blocks/carousel.d.ts +16 -0
- package/dist/website/blocks/carousel.d.ts.map +1 -0
- package/dist/website/blocks/carousel.js +12 -0
- package/dist/website/blocks/carousel.js.map +1 -0
- package/dist/website/blocks/catalog.d.ts +35 -0
- package/dist/website/blocks/catalog.d.ts.map +1 -0
- package/dist/website/blocks/catalog.js +26 -0
- package/dist/website/blocks/catalog.js.map +1 -0
- package/dist/website/blocks/commerce.d.ts +9 -16
- package/dist/website/blocks/commerce.d.ts.map +1 -1
- package/dist/website/blocks/commerce.js +12 -13
- package/dist/website/blocks/commerce.js.map +1 -1
- package/dist/website/blocks/contact-views.d.ts +28 -0
- package/dist/website/blocks/contact-views.d.ts.map +1 -0
- package/dist/website/blocks/contact-views.js +55 -0
- package/dist/website/blocks/contact-views.js.map +1 -0
- package/dist/website/blocks/content.d.ts +12 -20
- package/dist/website/blocks/content.d.ts.map +1 -1
- package/dist/website/blocks/content.js +18 -9
- package/dist/website/blocks/content.js.map +1 -1
- package/dist/website/blocks/empty-state-views.d.ts +32 -0
- package/dist/website/blocks/empty-state-views.d.ts.map +1 -0
- package/dist/website/blocks/empty-state-views.js +39 -0
- package/dist/website/blocks/empty-state-views.js.map +1 -0
- package/dist/website/blocks/faq-views.d.ts +20 -0
- package/dist/website/blocks/faq-views.d.ts.map +1 -0
- package/dist/website/blocks/faq-views.js +38 -0
- package/dist/website/blocks/faq-views.js.map +1 -0
- package/dist/website/blocks/feature-views.d.ts +17 -0
- package/dist/website/blocks/feature-views.d.ts.map +1 -0
- package/dist/website/blocks/feature-views.js +40 -0
- package/dist/website/blocks/feature-views.js.map +1 -0
- package/dist/website/blocks/hero-views.d.ts +15 -0
- package/dist/website/blocks/hero-views.d.ts.map +1 -0
- package/dist/website/blocks/hero-views.js +27 -0
- package/dist/website/blocks/hero-views.js.map +1 -0
- package/dist/website/blocks/icons.d.ts +63 -0
- package/dist/website/blocks/icons.d.ts.map +1 -0
- package/dist/website/blocks/icons.js +63 -0
- package/dist/website/blocks/icons.js.map +1 -0
- package/dist/website/blocks/list.d.ts +20 -0
- package/dist/website/blocks/list.d.ts.map +1 -0
- package/dist/website/blocks/list.js +29 -0
- package/dist/website/blocks/list.js.map +1 -0
- package/dist/website/blocks/logo-stats-views.d.ts +29 -0
- package/dist/website/blocks/logo-stats-views.d.ts.map +1 -0
- package/dist/website/blocks/logo-stats-views.js +51 -0
- package/dist/website/blocks/logo-stats-views.js.map +1 -0
- package/dist/website/blocks/marketing.d.ts +11 -22
- package/dist/website/blocks/marketing.d.ts.map +1 -1
- package/dist/website/blocks/marketing.js +12 -14
- package/dist/website/blocks/marketing.js.map +1 -1
- package/dist/website/blocks/media-views.d.ts +17 -0
- package/dist/website/blocks/media-views.d.ts.map +1 -0
- package/dist/website/blocks/media-views.js +24 -0
- package/dist/website/blocks/media-views.js.map +1 -0
- package/dist/website/blocks/newsletter-views.d.ts +26 -0
- package/dist/website/blocks/newsletter-views.d.ts.map +1 -0
- package/dist/website/blocks/newsletter-views.js +43 -0
- package/dist/website/blocks/newsletter-views.js.map +1 -0
- package/dist/website/blocks/parts.d.ts +19 -1
- package/dist/website/blocks/parts.d.ts.map +1 -1
- package/dist/website/blocks/parts.js +15 -2
- package/dist/website/blocks/parts.js.map +1 -1
- package/dist/website/blocks/sections.d.ts +27 -0
- package/dist/website/blocks/sections.d.ts.map +1 -0
- package/dist/website/blocks/sections.js +27 -0
- package/dist/website/blocks/sections.js.map +1 -0
- package/dist/website/blocks/team-views.d.ts +24 -0
- package/dist/website/blocks/team-views.d.ts.map +1 -0
- package/dist/website/blocks/team-views.js +45 -0
- package/dist/website/blocks/team-views.js.map +1 -0
- package/dist/website/blocks/testimonial-views.d.ts +24 -0
- package/dist/website/blocks/testimonial-views.d.ts.map +1 -0
- package/dist/website/blocks/testimonial-views.js +68 -0
- package/dist/website/blocks/testimonial-views.js.map +1 -0
- package/dist/website/blocks/variant.d.ts +28 -0
- package/dist/website/blocks/variant.d.ts.map +1 -0
- package/dist/website/blocks/variant.js +58 -0
- package/dist/website/blocks/variant.js.map +1 -0
- package/package.json +3 -2
- package/styles.css +840 -6
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import { type Action, type Anchor, type BlockImage } from "./parts.js";
|
|
3
|
+
export declare const HERO_VARIANTS: readonly ["split", "centered", "left"];
|
|
4
|
+
export type HeroVariant = (typeof HERO_VARIANTS)[number];
|
|
5
|
+
export type HeroProps = Anchor & {
|
|
6
|
+
readonly title: string;
|
|
7
|
+
/** A part of the title to show in the brand colour. It must appear in the title as written. */
|
|
8
|
+
readonly highlight?: string;
|
|
9
|
+
readonly subtitle?: string;
|
|
10
|
+
readonly primary?: Action;
|
|
11
|
+
readonly secondary?: Action;
|
|
12
|
+
readonly image?: BlockImage;
|
|
13
|
+
};
|
|
14
|
+
export declare function heroView(variant: HeroVariant, props: HeroProps): ReactElement;
|
|
15
|
+
//# sourceMappingURL=hero-views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/hero-views.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,KAAK,MAAM,EAAW,KAAK,MAAM,EAAE,KAAK,UAAU,EAAY,MAAM,YAAY,CAAC;AAG1F,eAAO,MAAM,aAAa,wCAAsB,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+FAA+F;IAC/F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;CAC5B,CAAC;AAkDF,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,GAAG,YAAY,CAE7E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BLOCK_VARIANTS } from "./catalog.js";
|
|
3
|
+
import { Actions, BlockImg } from "./parts.js";
|
|
4
|
+
import { anchorOf, BlockPropError } from "./variant.js";
|
|
5
|
+
export const HERO_VARIANTS = BLOCK_VARIANTS.Hero;
|
|
6
|
+
/** The title, with the highlighted words in the brand colour. */
|
|
7
|
+
function heroTitle(variant, title, highlight) {
|
|
8
|
+
if (highlight === undefined)
|
|
9
|
+
return title;
|
|
10
|
+
const at = title.indexOf(highlight);
|
|
11
|
+
if (at < 0 || highlight === "")
|
|
12
|
+
throw new BlockPropError("Hero", variant, "highlight", `"${highlight}" is not in the title "${title}"`);
|
|
13
|
+
return (_jsxs(_Fragment, { children: [title.slice(0, at), _jsx("strong", { className: "site-highlight", children: highlight }), title.slice(at + highlight.length)] }));
|
|
14
|
+
}
|
|
15
|
+
/** The block's own look: the text beside an optional image. */
|
|
16
|
+
function SplitHero(props) {
|
|
17
|
+
return (_jsx("section", { id: anchorOf("Hero", props.id), className: "site-block site-hero", "data-block": "Hero", children: _jsxs("div", { className: "site-container grid items-center gap-10 md:grid-cols-2", children: [_jsxs("div", { children: [_jsx("h1", { className: "site-hero-title", children: heroTitle("split", props.title, props.highlight) }), props.subtitle ? _jsx("p", { className: "site-hero-subtitle", children: props.subtitle }) : null, _jsx(Actions, { primary: props.primary, secondary: props.secondary })] }), props.image ? _jsx(BlockImg, { image: props.image, className: "site-card w-full" }) : null] }) }));
|
|
18
|
+
}
|
|
19
|
+
/** The text in one column, centred or from the start, with the image under it. */
|
|
20
|
+
function ColumnHero({ props, variant }) {
|
|
21
|
+
const center = variant === "centered";
|
|
22
|
+
return (_jsx("section", { id: anchorOf("Hero", props.id), className: "site-block site-hero", "data-block": "Hero", "data-variant": variant, children: _jsxs("div", { className: "site-container", children: [_jsxs("div", { className: center ? "mx-auto max-w-3xl text-center" : "max-w-3xl", children: [_jsx("h1", { className: "site-hero-title", children: heroTitle(variant, props.title, props.highlight) }), props.subtitle ? _jsx("p", { className: "site-hero-subtitle", children: props.subtitle }) : null, _jsx(Actions, { primary: props.primary, secondary: props.secondary, center: center })] }), props.image ? _jsx(BlockImg, { image: props.image, className: "site-hero-image mt-12 w-full" }) : null] }) }));
|
|
23
|
+
}
|
|
24
|
+
export function heroView(variant, props) {
|
|
25
|
+
return variant === "split" ? _jsx(SplitHero, { ...props }) : _jsx(ColumnHero, { props: props, variant: variant });
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=hero-views.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-views.js","sourceRoot":"","sources":["../../../src/website/blocks/hero-views.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAe,OAAO,EAAgC,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC,IAAI,CAAC;AAajD,iEAAiE;AACjE,SAAS,SAAS,CAAC,OAAoB,EAAE,KAAa,EAAE,SAA6B;IACpF,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC1C,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,EAAE,GAAG,CAAC,IAAI,SAAS,KAAK,EAAE;QAC7B,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,SAAS,0BAA0B,KAAK,GAAG,CAAC,CAAC;IACzG,OAAO,CACN,8BACE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EACnB,iBAAQ,SAAS,EAAC,gBAAgB,YAAE,SAAS,GAAU,EACtD,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,IACjC,CACH,CAAC;AACH,CAAC;AAED,+DAA+D;AAC/D,SAAS,SAAS,CAAC,KAAgB;IAClC,OAAO,CACN,kBAAS,EAAE,EAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,SAAS,EAAC,sBAAsB,gBAAY,MAAM,YAC1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E,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,GAAI,IAC1E,EACL,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAC,8BAA8B,GAAG,CAAC,CAAC,CAAC,IAAI,IAC1F,GACG,CACV,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAAoB,EAAE,KAAgB;IAC9D,OAAO,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,KAAC,SAAS,OAAK,KAAK,GAAI,CAAC,CAAC,CAAC,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AACxG,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The icons a block can show, by a plain name content can write (`icon: "rocket"`). The set is
|
|
3
|
+
* Phosphor's, through its server build, so an icon renders in a static export with no client code.
|
|
4
|
+
* Colour comes from the text colour around it, so the brand themes it like any text.
|
|
5
|
+
*/
|
|
6
|
+
import type { Icon } from "@phosphor-icons/react/dist/lib/types";
|
|
7
|
+
import type { ReactElement } from "react";
|
|
8
|
+
export declare const BLOCK_ICONS: {
|
|
9
|
+
readonly "arrow-left": Icon;
|
|
10
|
+
readonly "arrow-right": Icon;
|
|
11
|
+
readonly bell: Icon;
|
|
12
|
+
readonly calendar: Icon;
|
|
13
|
+
readonly "chart-line": Icon;
|
|
14
|
+
readonly chat: Icon;
|
|
15
|
+
readonly "check-circle": Icon;
|
|
16
|
+
readonly clock: Icon;
|
|
17
|
+
readonly close: Icon;
|
|
18
|
+
readonly cloud: Icon;
|
|
19
|
+
readonly code: Icon;
|
|
20
|
+
readonly "credit-card": Icon;
|
|
21
|
+
readonly database: Icon;
|
|
22
|
+
readonly envelope: Icon;
|
|
23
|
+
readonly gear: Icon;
|
|
24
|
+
readonly github: Icon;
|
|
25
|
+
readonly globe: Icon;
|
|
26
|
+
readonly heart: Icon;
|
|
27
|
+
readonly home: Icon;
|
|
28
|
+
readonly instagram: Icon;
|
|
29
|
+
readonly leaf: Icon;
|
|
30
|
+
readonly lightbulb: Icon;
|
|
31
|
+
readonly lightning: Icon;
|
|
32
|
+
readonly linkedin: Icon;
|
|
33
|
+
readonly list: Icon;
|
|
34
|
+
readonly lock: Icon;
|
|
35
|
+
readonly "map-pin": Icon;
|
|
36
|
+
readonly package: Icon;
|
|
37
|
+
readonly phone: Icon;
|
|
38
|
+
readonly plugs: Icon;
|
|
39
|
+
readonly rocket: Icon;
|
|
40
|
+
readonly search: Icon;
|
|
41
|
+
readonly "shield-check": Icon;
|
|
42
|
+
readonly sliders: Icon;
|
|
43
|
+
readonly sparkle: Icon;
|
|
44
|
+
readonly star: Icon;
|
|
45
|
+
readonly target: Icon;
|
|
46
|
+
readonly "trend-up": Icon;
|
|
47
|
+
readonly truck: Icon;
|
|
48
|
+
readonly users: Icon;
|
|
49
|
+
readonly wrench: Icon;
|
|
50
|
+
readonly x: Icon;
|
|
51
|
+
};
|
|
52
|
+
export type BlockIconName = keyof typeof BLOCK_ICONS;
|
|
53
|
+
export declare const BLOCK_ICON_NAMES: BlockIconName[];
|
|
54
|
+
/** An icon name the set does not have. */
|
|
55
|
+
export declare class BlockIconError extends Error {
|
|
56
|
+
constructor(name: string);
|
|
57
|
+
}
|
|
58
|
+
/** One icon, hidden from assistive technology: the text next to it says what it means. */
|
|
59
|
+
export declare function BlockIcon({ name, className }: {
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly className?: string;
|
|
62
|
+
}): ReactElement;
|
|
63
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/icons.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AA6CjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C2B,CAAC;AAEpD,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,WAAW,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAA+B,aAAa,EAAE,CAAC;AAE5E,0CAA0C;AAC1C,qBAAa,cAAe,SAAQ,KAAK;gBAC5B,IAAI,EAAE,MAAM;CAIxB;AAID,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAInH"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowLeft, ArrowRight, Bell, Calendar, ChartLine, ChatCircle, CheckCircle, Clock, Cloud, Code, CreditCard, Database, EnvelopeSimple, Gear, GithubLogo, Globe, Heart, House, InstagramLogo, Leaf, Lightbulb, Lightning, LinkedinLogo, List, Lock, MagnifyingGlass, MapPin, Package, Phone, Plugs, Rocket, ShieldCheck, Sliders, Sparkle, Star, Target, TrendUp, Truck, Users, Wrench, X, XLogo, } from "@phosphor-icons/react/dist/ssr";
|
|
3
|
+
export const BLOCK_ICONS = {
|
|
4
|
+
"arrow-left": ArrowLeft,
|
|
5
|
+
"arrow-right": ArrowRight,
|
|
6
|
+
bell: Bell,
|
|
7
|
+
calendar: Calendar,
|
|
8
|
+
"chart-line": ChartLine,
|
|
9
|
+
chat: ChatCircle,
|
|
10
|
+
"check-circle": CheckCircle,
|
|
11
|
+
clock: Clock,
|
|
12
|
+
close: X,
|
|
13
|
+
cloud: Cloud,
|
|
14
|
+
code: Code,
|
|
15
|
+
"credit-card": CreditCard,
|
|
16
|
+
database: Database,
|
|
17
|
+
envelope: EnvelopeSimple,
|
|
18
|
+
gear: Gear,
|
|
19
|
+
github: GithubLogo,
|
|
20
|
+
globe: Globe,
|
|
21
|
+
heart: Heart,
|
|
22
|
+
home: House,
|
|
23
|
+
instagram: InstagramLogo,
|
|
24
|
+
leaf: Leaf,
|
|
25
|
+
lightbulb: Lightbulb,
|
|
26
|
+
lightning: Lightning,
|
|
27
|
+
linkedin: LinkedinLogo,
|
|
28
|
+
list: List,
|
|
29
|
+
lock: Lock,
|
|
30
|
+
"map-pin": MapPin,
|
|
31
|
+
package: Package,
|
|
32
|
+
phone: Phone,
|
|
33
|
+
plugs: Plugs,
|
|
34
|
+
rocket: Rocket,
|
|
35
|
+
search: MagnifyingGlass,
|
|
36
|
+
"shield-check": ShieldCheck,
|
|
37
|
+
sliders: Sliders,
|
|
38
|
+
sparkle: Sparkle,
|
|
39
|
+
star: Star,
|
|
40
|
+
target: Target,
|
|
41
|
+
"trend-up": TrendUp,
|
|
42
|
+
truck: Truck,
|
|
43
|
+
users: Users,
|
|
44
|
+
wrench: Wrench,
|
|
45
|
+
x: XLogo,
|
|
46
|
+
};
|
|
47
|
+
export const BLOCK_ICON_NAMES = Object.keys(BLOCK_ICONS);
|
|
48
|
+
/** An icon name the set does not have. */
|
|
49
|
+
export class BlockIconError extends Error {
|
|
50
|
+
constructor(name) {
|
|
51
|
+
super(`block icon: there is no icon "${name}". Use one of ${BLOCK_ICON_NAMES.join(", ")}.`);
|
|
52
|
+
this.name = "BlockIconError";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const isIconName = (name) => Object.hasOwn(BLOCK_ICONS, name);
|
|
56
|
+
/** One icon, hidden from assistive technology: the text next to it says what it means. */
|
|
57
|
+
export function BlockIcon({ name, className }) {
|
|
58
|
+
if (!isIconName(name))
|
|
59
|
+
throw new BlockIconError(name);
|
|
60
|
+
const Glyph = BLOCK_ICONS[name];
|
|
61
|
+
return _jsx(Glyph, { "aria-hidden": "true", focusable: "false", className: className });
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/website/blocks/icons.tsx"],"names":[],"mappings":";AAOA,OAAO,EACN,SAAS,EACT,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,KAAK,EACL,KAAK,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,cAAc,EACd,IAAI,EACJ,UAAU,EACV,KAAK,EACL,KAAK,EACL,KAAK,EACL,aAAa,EACb,IAAI,EACJ,SAAS,EACT,SAAS,EACT,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,eAAe,EACf,MAAM,EACN,OAAO,EACP,KAAK,EACL,KAAK,EACL,MAAM,EACN,WAAW,EACX,OAAO,EACP,OAAO,EACP,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,KAAK,EACL,MAAM,EACN,CAAC,EACD,KAAK,GACL,MAAM,gCAAgC,CAAC;AAGxC,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,YAAY,EAAE,SAAS;IACvB,aAAa,EAAE,UAAU;IACzB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,SAAS;IACvB,IAAI,EAAE,UAAU;IAChB,cAAc,EAAE,WAAW;IAC3B,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,IAAI;IACV,aAAa,EAAE,UAAU;IACzB,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,cAAc;IACxB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,KAAK;IACX,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,IAAI;IACV,SAA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AAS,GAAI,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a block lays out a list of content: the key of each item and the columns of a grid.
|
|
3
|
+
* Pure functions, so tests and the gallery can call them without rendering.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* A content list with a React key for each item: its position. A page never reorders its
|
|
7
|
+
* lists, and content may repeat a title or a link, so no field of an item is a safe key.
|
|
8
|
+
*/
|
|
9
|
+
export declare function keyed<T>(items: readonly T[]): readonly {
|
|
10
|
+
readonly key: string;
|
|
11
|
+
readonly item: T;
|
|
12
|
+
}[];
|
|
13
|
+
/**
|
|
14
|
+
* The columns a grid of `count` items gets on a wide screen, at most `max`. A short list keeps
|
|
15
|
+
* at least two columns, so one item does not stretch across the page. A longer list takes `max`
|
|
16
|
+
* or one fewer, whichever needs fewer rows and then leaves fewer gaps in the last row: four
|
|
17
|
+
* items with a `max` of 3 make two rows of two, not a row of three and one.
|
|
18
|
+
*/
|
|
19
|
+
export declare function gridColumns(count: number, max: number): number;
|
|
20
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/list.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;CAAE,EAAE,CAEnG;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ9D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a block lays out a list of content: the key of each item and the columns of a grid.
|
|
3
|
+
* Pure functions, so tests and the gallery can call them without rendering.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* A content list with a React key for each item: its position. A page never reorders its
|
|
7
|
+
* lists, and content may repeat a title or a link, so no field of an item is a safe key.
|
|
8
|
+
*/
|
|
9
|
+
export function keyed(items) {
|
|
10
|
+
return items.map((item, index) => ({ key: String(index), item }));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The columns a grid of `count` items gets on a wide screen, at most `max`. A short list keeps
|
|
14
|
+
* at least two columns, so one item does not stretch across the page. A longer list takes `max`
|
|
15
|
+
* or one fewer, whichever needs fewer rows and then leaves fewer gaps in the last row: four
|
|
16
|
+
* items with a `max` of 3 make two rows of two, not a row of three and one.
|
|
17
|
+
*/
|
|
18
|
+
export function gridColumns(count, max) {
|
|
19
|
+
if (count <= max)
|
|
20
|
+
return Math.max(count, Math.min(2, max));
|
|
21
|
+
const rows = (columns) => Math.ceil(count / columns);
|
|
22
|
+
const gaps = (columns) => rows(columns) * columns - count;
|
|
23
|
+
const fewer = max - 1;
|
|
24
|
+
if (fewer < 2)
|
|
25
|
+
return max;
|
|
26
|
+
const better = rows(fewer) < rows(max) || (rows(fewer) === rows(max) && gaps(fewer) < gaps(max));
|
|
27
|
+
return better ? fewer : max;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/website/blocks/list.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAI,KAAmB;IAC3C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACnE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,GAAW;IACrD,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC3D,MAAM,IAAI,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC;IACrE,MAAM,IAAI,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,KAAK,CAAC;IAC1E,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC;IACtB,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACjG,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { SiteStrings } from "../../i18n/strings.js";
|
|
3
|
+
import { type Anchor, type BlockImage } from "./parts.js";
|
|
4
|
+
export declare const LOGO_CLOUD_VARIANTS: readonly ["row", "grid", "tiles", "carousel"];
|
|
5
|
+
export type LogoCloudVariant = (typeof LOGO_CLOUD_VARIANTS)[number];
|
|
6
|
+
export type Logo = BlockImage & {
|
|
7
|
+
readonly href?: string;
|
|
8
|
+
};
|
|
9
|
+
export type LogoCloudProps = Anchor & {
|
|
10
|
+
readonly title?: string;
|
|
11
|
+
readonly intro?: string;
|
|
12
|
+
readonly logos: readonly Logo[];
|
|
13
|
+
readonly strings: SiteStrings;
|
|
14
|
+
};
|
|
15
|
+
export declare function logoCloudView(variant: LogoCloudVariant, props: LogoCloudProps): ReactElement;
|
|
16
|
+
export declare const STATS_VARIANTS: readonly ["cards", "outlined", "divided", "tinted"];
|
|
17
|
+
export type StatsVariant = (typeof STATS_VARIANTS)[number];
|
|
18
|
+
type Stat = {
|
|
19
|
+
readonly value: string;
|
|
20
|
+
readonly label: string;
|
|
21
|
+
};
|
|
22
|
+
export type StatsProps = Anchor & {
|
|
23
|
+
readonly title?: string;
|
|
24
|
+
readonly intro?: string;
|
|
25
|
+
readonly items: readonly Stat[];
|
|
26
|
+
};
|
|
27
|
+
export declare function statsView(variant: StatsVariant, props: StatsProps): ReactElement;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=logo-stats-views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-stats-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/logo-stats-views.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAqB,MAAM,YAAY,CAAC;AAG7E,eAAO,MAAM,mBAAmB,+CAA2B,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC9B,CAAC;AAqEF,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,GAAG,YAAY,CAK5F;AAED,eAAO,MAAM,cAAc,qDAAuB,CAAC;AACnD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,KAAK,IAAI,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAC/D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAA;CAAE,CAAC;AA8CxH,wBAAgB,SAAS,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,GAAG,YAAY,CAGhF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CarouselRow } from "./carousel.js";
|
|
3
|
+
import { BLOCK_VARIANTS } from "./catalog.js";
|
|
4
|
+
import { gridColumns, keyed } from "./list.js";
|
|
5
|
+
import { BlockImg, Section } from "./parts.js";
|
|
6
|
+
import { filled } from "./variant.js";
|
|
7
|
+
export const LOGO_CLOUD_VARIANTS = BLOCK_VARIANTS.LogoCloud;
|
|
8
|
+
function LogoImage({ logo, className }) {
|
|
9
|
+
const img = _jsx(BlockImg, { image: logo, className: className });
|
|
10
|
+
return logo.href ? _jsx("a", { href: logo.href, children: img }) : img;
|
|
11
|
+
}
|
|
12
|
+
/** The block's own look: one centred row of logos. */
|
|
13
|
+
function RowLogos(props) {
|
|
14
|
+
return (_jsx(Section, { name: "LogoCloud", id: props.id, title: props.title, intro: props.intro, children: _jsx("ul", { className: "flex flex-wrap items-center justify-center gap-10", children: keyed(props.logos).map(({ key, item: logo }) => (_jsx("li", { children: _jsx(LogoImage, { logo: logo, className: "site-logo" }) }, key))) }) }));
|
|
15
|
+
}
|
|
16
|
+
/** Logos in a grid of equal cells, in grey until a pointer rests on one (grid), or on tiles (tiles). */
|
|
17
|
+
function GridLogos({ props, variant }) {
|
|
18
|
+
const tiles = variant === "tiles";
|
|
19
|
+
return (_jsx(Section, { name: "LogoCloud", id: props.id, title: props.title, intro: props.intro, align: tiles ? undefined : "center", children: _jsx("ul", { className: tiles ? "site-logo-tiles site-grid site-grid-hairline overflow-hidden" : "site-grid site-grid-flush", "data-cols": gridColumns(props.logos.length, 4), "data-phone": "2", "data-variant": variant, children: keyed(props.logos).map(({ key, item: logo }) => (_jsx("li", { className: tiles ? "site-logo-tile grid aspect-video place-content-center p-4" : "grid place-content-center p-4", children: _jsx(LogoImage, { logo: logo, className: "site-logo site-logo-muted" }) }, key))) }) }));
|
|
20
|
+
}
|
|
21
|
+
/** The logos in one row the reader scrolls, for more logos than one row holds. */
|
|
22
|
+
function CarouselLogos(props) {
|
|
23
|
+
return (_jsx(Section, { name: "LogoCloud", id: props.id, title: props.title, intro: props.intro, align: "center", children: _jsx(CarouselRow, { kind: "logos", label: props.title, items: props.logos, strings: props.strings, render: (logo) => _jsx(LogoImage, { logo: logo, className: "site-logo" }) }) }));
|
|
24
|
+
}
|
|
25
|
+
export function logoCloudView(variant, props) {
|
|
26
|
+
const full = { ...props, logos: filled("LogoCloud", variant, "logos", props.logos) };
|
|
27
|
+
if (variant === "row")
|
|
28
|
+
return _jsx(RowLogos, { ...full });
|
|
29
|
+
if (variant === "carousel")
|
|
30
|
+
return _jsx(CarouselLogos, { ...full });
|
|
31
|
+
return _jsx(GridLogos, { props: full, variant: variant });
|
|
32
|
+
}
|
|
33
|
+
export const STATS_VARIANTS = BLOCK_VARIANTS.Stats;
|
|
34
|
+
/** The block's own look: a card for each figure, its label above it. */
|
|
35
|
+
function CardStats(props) {
|
|
36
|
+
return (_jsx(Section, { name: "Stats", id: props.id, title: props.title, intro: props.intro, children: _jsx("dl", { className: "site-grid", "data-cols": gridColumns(props.items.length, 4), "data-phone": "2", children: keyed(props.items).map(({ key, item }) => (_jsxs("div", { className: "site-card", children: [_jsx("dt", { className: "site-stat-label", children: item.label }), _jsx("dd", { className: "site-stat-value", children: item.value })] }, key))) }) }));
|
|
37
|
+
}
|
|
38
|
+
const STAT_CELL = {
|
|
39
|
+
outlined: "site-stat-outlined",
|
|
40
|
+
divided: "site-stat-divided",
|
|
41
|
+
tinted: "site-stat-tinted",
|
|
42
|
+
};
|
|
43
|
+
/** Large figures in the brand colour, centred, each over its label. */
|
|
44
|
+
function FeatureStats({ props, variant, }) {
|
|
45
|
+
return (_jsx(Section, { name: "Stats", id: props.id, title: props.title, intro: props.intro, align: "center", children: _jsx("dl", { className: "site-grid site-grid-tight", "data-cols": gridColumns(props.items.length, 4), "data-variant": variant, children: keyed(props.items).map(({ key, item }) => (_jsxs("div", { className: `${STAT_CELL[variant]} flex flex-col px-4 py-8 text-center`, children: [_jsx("dt", { className: "site-stat-caption order-last", children: item.label }), _jsx("dd", { className: "site-stat-figure", children: item.value })] }, key))) }) }));
|
|
46
|
+
}
|
|
47
|
+
export function statsView(variant, props) {
|
|
48
|
+
const full = { ...props, items: filled("Stats", variant, "items", props.items) };
|
|
49
|
+
return variant === "cards" ? _jsx(CardStats, { ...full }) : _jsx(FeatureStats, { props: full, variant: variant });
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=logo-stats-views.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-stats-views.js","sourceRoot":"","sources":["../../../src/website/blocks/logo-stats-views.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAA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+
import { type CallToActionProps, type CallToActionVariant } from "./call-to-action-views.js";
|
|
3
|
+
import { type HeroProps, type HeroVariant } from "./hero-views.js";
|
|
4
|
+
import { type LogoCloudProps, type LogoCloudVariant, type StatsProps, type StatsVariant } from "./logo-stats-views.js";
|
|
3
5
|
/** The opening band of a page: the headline, one line under it, up to two actions and an image. */
|
|
4
|
-
export declare function Hero({
|
|
5
|
-
readonly
|
|
6
|
-
readonly subtitle?: string;
|
|
7
|
-
readonly primary?: Action;
|
|
8
|
-
readonly secondary?: Action;
|
|
9
|
-
readonly image?: BlockImage;
|
|
6
|
+
export declare function Hero({ variant, ...props }: HeroProps & {
|
|
7
|
+
readonly variant?: HeroVariant;
|
|
10
8
|
}): ReactElement;
|
|
11
9
|
/** A closing band that asks for one action. */
|
|
12
|
-
export declare function CallToAction({
|
|
13
|
-
readonly
|
|
14
|
-
readonly text?: string;
|
|
15
|
-
readonly action: Action;
|
|
10
|
+
export declare function CallToAction({ variant, ...props }: CallToActionProps & {
|
|
11
|
+
readonly variant?: CallToActionVariant;
|
|
16
12
|
}): ReactElement;
|
|
17
13
|
/** The logos of customers or partners, each with its alt text and an optional link. */
|
|
18
|
-
export declare function LogoCloud({
|
|
19
|
-
readonly
|
|
20
|
-
readonly logos: ReadonlyArray<BlockImage & {
|
|
21
|
-
readonly href?: string;
|
|
22
|
-
}>;
|
|
14
|
+
export declare function LogoCloud({ variant, ...props }: LogoCloudProps & {
|
|
15
|
+
readonly variant?: LogoCloudVariant;
|
|
23
16
|
}): ReactElement;
|
|
24
17
|
/** A row of figures, each a value and what it counts. */
|
|
25
|
-
export declare function Stats({
|
|
26
|
-
readonly
|
|
27
|
-
readonly items: ReadonlyArray<{
|
|
28
|
-
readonly value: string;
|
|
29
|
-
readonly label: string;
|
|
30
|
-
}>;
|
|
18
|
+
export declare function Stats({ variant, ...props }: StatsProps & {
|
|
19
|
+
readonly variant?: StatsVariant;
|
|
31
20
|
}): ReactElement;
|
|
32
21
|
//# sourceMappingURL=marketing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketing.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/marketing.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"marketing.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/marketing.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAEN,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,WAAW,EAAY,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAEN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAGrB,KAAK,UAAU,EACf,KAAK,YAAY,EAEjB,MAAM,uBAAuB,CAAC;AAG/B,mGAAmG;AACnG,wBAAgB,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAA;CAAE,GAAG,YAAY,CAExG;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,EAC5B,OAAO,EACP,GAAG,KAAK,EACR,EAAE,iBAAiB,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAAE,GAAG,YAAY,CAE/E;AAED,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,EACzB,OAAO,EACP,GAAG,KAAK,EACR,EAAE,cAAc,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAAE,GAAG,YAAY,CAEzE;AAED,yDAAyD;AACzD,wBAAgB,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAA;CAAE,GAAG,YAAY,CAE3G"}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CALL_TO_ACTION_VARIANTS, callToActionView, } from "./call-to-action-views.js";
|
|
2
|
+
import { HERO_VARIANTS, heroView } from "./hero-views.js";
|
|
3
|
+
import { LOGO_CLOUD_VARIANTS, logoCloudView, STATS_VARIANTS, statsView, } from "./logo-stats-views.js";
|
|
4
|
+
import { variantOf } from "./variant.js";
|
|
3
5
|
/** The opening band of a page: the headline, one line under it, up to two actions and an image. */
|
|
4
|
-
export function Hero({
|
|
5
|
-
return (
|
|
6
|
+
export function Hero({ variant, ...props }) {
|
|
7
|
+
return heroView(variantOf("Hero", variant, HERO_VARIANTS), props);
|
|
6
8
|
}
|
|
7
9
|
/** A closing band that asks for one action. */
|
|
8
|
-
export function CallToAction({
|
|
9
|
-
return (
|
|
10
|
+
export function CallToAction({ variant, ...props }) {
|
|
11
|
+
return callToActionView(variantOf("CallToAction", variant, CALL_TO_ACTION_VARIANTS), props);
|
|
10
12
|
}
|
|
11
13
|
/** The logos of customers or partners, each with its alt text and an optional link. */
|
|
12
|
-
export function LogoCloud({
|
|
13
|
-
return (
|
|
14
|
-
// biome-ignore lint/performance/noImgElement: static export, images ship as they are
|
|
15
|
-
const img = _jsx("img", { src: logo.src, alt: logo.alt, className: "site-logo" });
|
|
16
|
-
return _jsx("li", { children: logo.href ? _jsx("a", { href: logo.href, children: img }) : img }, logo.src);
|
|
17
|
-
}) }) }));
|
|
14
|
+
export function LogoCloud({ variant, ...props }) {
|
|
15
|
+
return logoCloudView(variantOf("LogoCloud", variant, LOGO_CLOUD_VARIANTS), props);
|
|
18
16
|
}
|
|
19
17
|
/** A row of figures, each a value and what it counts. */
|
|
20
|
-
export function Stats({
|
|
21
|
-
return (
|
|
18
|
+
export function Stats({ variant, ...props }) {
|
|
19
|
+
return statsView(variantOf("Stats", variant, STATS_VARIANTS), props);
|
|
22
20
|
}
|
|
23
21
|
//# sourceMappingURL=marketing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketing.js","sourceRoot":"","sources":["../../../src/website/blocks/marketing.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"marketing.js","sourceRoot":"","sources":["../../../src/website/blocks/marketing.tsx"],"names":[],"mappings":"AACA,OAAO,EACN,uBAAuB,EAGvB,gBAAgB,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAoC,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EACN,mBAAmB,EAGnB,aAAa,EACb,cAAc,EAGd,SAAS,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,mGAAmG;AACnG,MAAM,UAAU,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAkD;IACzF,OAAO,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,KAAK,CAAC,CAAC;AACnE,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,YAAY,CAAC,EAC5B,OAAO,EACP,GAAG,KAAK,EACwD;IAChE,OAAO,gBAAgB,CAAC,SAAS,CAAC,cAAc,EAAE,OAAO,EAAE,uBAAuB,CAAC,EAAE,KAAK,CAAC,CAAC;AAC7F,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,SAAS,CAAC,EACzB,OAAO,EACP,GAAG,KAAK,EACkD;IAC1D,OAAO,aAAa,CAAC,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE,KAAK,CAAC,CAAC;AACnF,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAoD;IAC5F,OAAO,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,KAAK,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import { type Action, type Anchor, type BlockImage } from "./parts.js";
|
|
3
|
+
export declare const MEDIA_SECTION_VARIANTS: readonly ["split", "wide", "wide-reversed", "stacked"];
|
|
4
|
+
export type MediaSectionVariant = (typeof MEDIA_SECTION_VARIANTS)[number];
|
|
5
|
+
export type MediaSectionProps = Anchor & {
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly text: string;
|
|
8
|
+
readonly image: BlockImage;
|
|
9
|
+
readonly primary?: Action;
|
|
10
|
+
readonly secondary?: Action;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A heading and a paragraph with a picture: side by side in halves (split), beside a wide
|
|
14
|
+
* picture (wide, or wide-reversed with the picture first), or over it (stacked).
|
|
15
|
+
*/
|
|
16
|
+
export declare function mediaSectionView(variant: MediaSectionVariant, props: MediaSectionProps): ReactElement;
|
|
17
|
+
//# sourceMappingURL=media-views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/media-views.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,KAAK,MAAM,EAAW,KAAK,MAAM,EAAE,KAAK,UAAU,EAAY,MAAM,YAAY,CAAC;AAG1F,eAAO,MAAM,sBAAsB,wDAA8B,CAAC;AAClE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAaF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAmBrG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BLOCK_VARIANTS } from "./catalog.js";
|
|
3
|
+
import { Actions, BlockImg } from "./parts.js";
|
|
4
|
+
import { anchorOf } from "./variant.js";
|
|
5
|
+
export const MEDIA_SECTION_VARIANTS = BLOCK_VARIANTS.MediaSection;
|
|
6
|
+
/** The grid of each layout, and the share of it the words take. */
|
|
7
|
+
const LAYOUT = {
|
|
8
|
+
split: { grid: "md:grid-cols-2 md:gap-12", words: "", image: "" },
|
|
9
|
+
// The words take a third from a large screen up; a quarter, as in HyperUI, wraps a heading
|
|
10
|
+
// to a word a line on a tablet.
|
|
11
|
+
wide: { grid: "lg:grid-cols-3 lg:gap-10", words: "", image: "lg:col-span-2" },
|
|
12
|
+
"wide-reversed": { grid: "lg:grid-cols-3 lg:gap-10", words: "lg:order-last", image: "lg:col-span-2" },
|
|
13
|
+
// A picture the width of the page is cut to a band, so the next block is still in view.
|
|
14
|
+
stacked: { grid: "", words: "max-w-2xl", image: "max-h-[28rem]" },
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A heading and a paragraph with a picture: side by side in halves (split), beside a wide
|
|
18
|
+
* picture (wide, or wide-reversed with the picture first), or over it (stacked).
|
|
19
|
+
*/
|
|
20
|
+
export function mediaSectionView(variant, props) {
|
|
21
|
+
const layout = LAYOUT[variant];
|
|
22
|
+
return (_jsx("section", { id: anchorOf("MediaSection", props.id), className: "site-block", "data-block": "MediaSection", "data-variant": variant === "split" ? undefined : variant, children: _jsxs("div", { className: `site-container grid grid-cols-1 items-center gap-6 ${layout.grid}`, children: [_jsxs("div", { className: layout.words, children: [_jsx("h2", { className: "site-block-title", children: props.title }), _jsx("p", { className: "site-media-text", children: props.text }), _jsx(Actions, { primary: props.primary, secondary: props.secondary })] }), _jsx(BlockImg, { image: props.image, className: `site-media-image w-full object-cover ${layout.image}` })] }) }));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=media-views.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-views.js","sourceRoot":"","sources":["../../../src/website/blocks/media-views.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAe,OAAO,EAAgC,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAAC,YAAY,CAAC;AAWlE,mEAAmE;AACnE,MAAM,MAAM,GAAgF;IAC3F,KAAK,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IACjE,2FAA2F;IAC3F,gCAAgC;IAChC,IAAI,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE;IAC7E,eAAe,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IACrG,wFAAwF;IACxF,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE;CACjE,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAA4B,EAAE,KAAwB;IACtF,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/B,OAAO,CACN,kBACC,EAAE,EAAE,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,EACtC,SAAS,EAAC,YAAY,gBACX,cAAc,kBACX,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,YAEvD,eAAK,SAAS,EAAE,sDAAsD,MAAM,CAAC,IAAI,EAAE,aAClF,eAAK,SAAS,EAAE,MAAM,CAAC,KAAK,aAC3B,aAAI,SAAS,EAAC,kBAAkB,YAAE,KAAK,CAAC,KAAK,GAAM,EACnD,YAAG,SAAS,EAAC,iBAAiB,YAAE,KAAK,CAAC,IAAI,GAAK,EAC/C,KAAC,OAAO,IAAC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,IAC1D,EACN,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,wCAAwC,MAAM,CAAC,KAAK,EAAE,GAAI,IAC9F,GACG,CACV,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import type { SiteStrings } from "../../i18n/strings.js";
|
|
3
|
+
import type { Anchor } from "./parts.js";
|
|
4
|
+
export declare const NEWSLETTER_VARIANTS: readonly ["start", "centered", "panel"];
|
|
5
|
+
export type NewsletterVariant = (typeof NEWSLETTER_VARIANTS)[number];
|
|
6
|
+
export type NewsletterProps = Anchor & {
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly text?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Where the form posts the address. A static site has no server of its own, so this is the
|
|
11
|
+
* site's mailing-list service or its own Worker route.
|
|
12
|
+
*/
|
|
13
|
+
readonly action?: string;
|
|
14
|
+
/** A line under the form, such as how often mail comes or how to leave the list. */
|
|
15
|
+
readonly note?: string;
|
|
16
|
+
readonly strings: SiteStrings;
|
|
17
|
+
};
|
|
18
|
+
/** One email field and its button, side by side from a small screen up. */
|
|
19
|
+
export declare function EmailSignup({ action, strings, center, }: {
|
|
20
|
+
readonly action: string;
|
|
21
|
+
readonly strings: SiteStrings;
|
|
22
|
+
readonly center?: boolean;
|
|
23
|
+
}): ReactElement;
|
|
24
|
+
/** A signup for the site's mailing list: one email field and a button. */
|
|
25
|
+
export declare function newsletterView(variant: NewsletterVariant, props: NewsletterProps): ReactElement;
|
|
26
|
+
//# sourceMappingURL=newsletter-views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"newsletter-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/newsletter-views.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGzC,eAAO,MAAM,mBAAmB,yCAA4B,CAAC;AAC7D,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC9B,CAAC;AAEF,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,MAAc,GACd,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,YAAY,CA0Bf;AAiED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,GAAG,YAAY,CAG/F"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Newsletter layouts, adapted from HyperUI's newsletter signups and CTAs
|
|
4
|
+
* (https://github.com/markmead/hyperui, MIT, Copyright (c) Mark Mead): colours, type and radii
|
|
5
|
+
* come from the brand instead of fixed Tailwind colours.
|
|
6
|
+
*/
|
|
7
|
+
import { useId } from "react";
|
|
8
|
+
import { BLOCK_VARIANTS } from "./catalog.js";
|
|
9
|
+
import { anchorOf, required } from "./variant.js";
|
|
10
|
+
export const NEWSLETTER_VARIANTS = BLOCK_VARIANTS.Newsletter;
|
|
11
|
+
/** One email field and its button, side by side from a small screen up. */
|
|
12
|
+
export function EmailSignup({ action, strings, center = false, }) {
|
|
13
|
+
// Two signups on one page must not share an id, or a label names the other form's field.
|
|
14
|
+
const id = `${useId()}-email`;
|
|
15
|
+
return (_jsxs("form", { method: "post", action: action, className: `site-form flex w-full max-w-xl flex-col gap-3 sm:flex-row ${center ? "mx-auto" : ""}`, children: [_jsx("label", { htmlFor: id, className: "sr-only", children: strings.emailAddress }), _jsx("input", { id: id, name: "email", type: "email", autoComplete: "email", required: true, placeholder: strings.emailAddress, className: "site-input flex-1" }), _jsx("button", { type: "submit", className: "site-button justify-center", children: strings.subscribe })] }));
|
|
16
|
+
}
|
|
17
|
+
function Words({ props, center }) {
|
|
18
|
+
const head = center ? "site-block-head-center" : "";
|
|
19
|
+
return (_jsxs(_Fragment, { children: [_jsx("h2", { className: `site-block-title ${head}`, children: props.title }), props.text ? _jsx("p", { className: `site-block-intro ${head}`, children: props.text }) : null] }));
|
|
20
|
+
}
|
|
21
|
+
function Note({ note, center }) {
|
|
22
|
+
if (!note)
|
|
23
|
+
return null;
|
|
24
|
+
return _jsx("p", { className: `site-card-text mt-3 ${center ? "text-center" : ""}`, children: note });
|
|
25
|
+
}
|
|
26
|
+
/** The words over the form on a quiet band, aligned to the start (start) or centred (centered). */
|
|
27
|
+
function BandNewsletter({ props, variant, }) {
|
|
28
|
+
const action = required("Newsletter", variant, "action", props.action, 'add action="<the URL the form posts to>"');
|
|
29
|
+
const center = variant === "centered";
|
|
30
|
+
return (_jsx("section", { id: anchorOf("Newsletter", props.id), className: "site-block site-band-muted", "data-block": "Newsletter", "data-variant": center ? variant : undefined, children: _jsxs("div", { className: "site-container", children: [_jsx(Words, { props: props, center: center }), _jsx(EmailSignup, { action: action, strings: props.strings, center: center }), _jsx(Note, { note: props.note, center: center })] }) }));
|
|
31
|
+
}
|
|
32
|
+
/** A rounded panel with the words on one side and the form on the other. */
|
|
33
|
+
function PanelNewsletter(props) {
|
|
34
|
+
const action = required("Newsletter", "panel", "action", props.action, 'add action="<the URL the form posts to>"');
|
|
35
|
+
return (_jsx("section", { id: anchorOf("Newsletter", props.id), className: "site-block", "data-block": "Newsletter", "data-variant": "panel", children: _jsx("div", { className: "site-container", children: _jsxs("div", { className: "site-cta-panel grid items-center gap-6 p-8 md:grid-cols-2 md:p-12", children: [_jsxs("div", { children: [_jsx("h2", { className: "site-block-title", children: props.title }), props.text ? _jsx("p", { className: "site-media-text", children: props.text }) : null] }), _jsxs("div", { children: [_jsx(EmailSignup, { action: action, strings: props.strings }), _jsx(Note, { note: props.note, center: false })] })] }) }) }));
|
|
36
|
+
}
|
|
37
|
+
/** A signup for the site's mailing list: one email field and a button. */
|
|
38
|
+
export function newsletterView(variant, props) {
|
|
39
|
+
if (variant === "panel")
|
|
40
|
+
return _jsx(PanelNewsletter, { ...props });
|
|
41
|
+
return _jsx(BandNewsletter, { props: props, variant: variant });
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=newsletter-views.js.map
|
|
@@ -0,0 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