create-nersh 0.1.6 → 0.2.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.
Files changed (61) hide show
  1. package/README.md +187 -0
  2. package/dist/index.mjs +169 -40
  3. package/package.json +4 -3
  4. package/templates/default-site.json +668 -0
  5. package/templates/next/app/globals.css +25 -0
  6. package/templates/next/components.json +23 -0
  7. package/templates/next/package.json.tmpl +5 -3
  8. package/templates/next/postcss.config.mjs +8 -0
  9. package/templates/next/site.json +0 -121
  10. package/templates/next/src/components/site/SafeEmbed.tsx +0 -72
  11. package/templates/next/src/components/site/SiteButton.tsx +0 -65
  12. package/templates/next/src/components/site/SiteCard.tsx +0 -46
  13. package/templates/next/src/components/site/SiteCodeBlock.tsx +0 -56
  14. package/templates/next/src/components/site/SiteHeading.tsx +0 -50
  15. package/templates/next/src/components/site/SiteMobileSlider.tsx +0 -71
  16. package/templates/next/src/components/site/SiteSectionShell.tsx +0 -91
  17. package/templates/next/src/components/site/SiteStructuralContext.tsx +0 -52
  18. package/templates/next/src/lib/brandContext.ts +0 -65
  19. package/templates/next/src/lib/codeBlock.ts +0 -76
  20. package/templates/next/src/lib/componentLibrary/providers/shadcn/components.ts +0 -146
  21. package/templates/next/src/lib/componentLibrary/resolveComponent.ts +0 -35
  22. package/templates/next/src/lib/componentLibrary/schema.ts +0 -219
  23. package/templates/next/src/lib/embeds/index.ts +0 -232
  24. package/templates/next/src/lib/humanize.ts +0 -58
  25. package/templates/next/src/lib/sectionItems.ts +0 -48
  26. package/templates/next/src/lib/sectionSurface.ts +0 -70
  27. package/templates/next/src/lib/utils.ts +0 -6
  28. package/templates/next/src/registry.ts +0 -16
  29. package/templates/next/src/sections/about/Component.tsx +0 -51
  30. package/templates/next/src/sections/about/index.ts +0 -7
  31. package/templates/next/src/sections/about/meta.ts +0 -8
  32. package/templates/next/src/sections/about/schema.ts +0 -38
  33. package/templates/next/src/sections/about/writeCopy.ts +0 -10
  34. package/templates/next/src/sections/copyHelpers.ts +0 -59
  35. package/templates/next/src/sections/features/Component.tsx +0 -122
  36. package/templates/next/src/sections/features/index.ts +0 -7
  37. package/templates/next/src/sections/features/meta.ts +0 -14
  38. package/templates/next/src/sections/features/schema.ts +0 -23
  39. package/templates/next/src/sections/features/writeCopy.ts +0 -18
  40. package/templates/next/src/sections/footer/Component.tsx +0 -103
  41. package/templates/next/src/sections/footer/index.ts +0 -7
  42. package/templates/next/src/sections/footer/meta.ts +0 -8
  43. package/templates/next/src/sections/footer/schema.ts +0 -39
  44. package/templates/next/src/sections/footer/writeCopy.ts +0 -31
  45. package/templates/next/src/sections/marketing-hero/Component.tsx +0 -187
  46. package/templates/next/src/sections/marketing-hero/index.ts +0 -7
  47. package/templates/next/src/sections/marketing-hero/meta.ts +0 -13
  48. package/templates/next/src/sections/marketing-hero/schema.ts +0 -106
  49. package/templates/next/src/sections/marketing-hero/writeCopy.ts +0 -18
  50. package/templates/next/src/sections/navbar/Component.tsx +0 -53
  51. package/templates/next/src/sections/navbar/index.ts +0 -7
  52. package/templates/next/src/sections/navbar/meta.ts +0 -8
  53. package/templates/next/src/sections/navbar/schema.ts +0 -50
  54. package/templates/next/src/sections/navbar/writeCopy.ts +0 -16
  55. package/templates/next/src/sections/pricing/Component.tsx +0 -125
  56. package/templates/next/src/sections/pricing/index.ts +0 -7
  57. package/templates/next/src/sections/pricing/meta.ts +0 -12
  58. package/templates/next/src/sections/pricing/schema.ts +0 -25
  59. package/templates/next/src/sections/pricing/writeCopy.ts +0 -22
  60. package/templates/next/src/sections/siteLayoutClasses.ts +0 -9
  61. package/templates/next/src/sections/types.ts +0 -119
@@ -1,122 +0,0 @@
1
- import type { SectionProps } from "../types";
2
- import { sectionSurfaceStyle } from "@/lib/sectionSurface";
3
- import { parseFeatureItems } from "@/lib/sectionItems";
4
- import { SiteButton } from "@/components/site/SiteButton";
5
- import { SiteCard } from "@/components/site/SiteCard";
6
- import { SiteMobileSlider, SiteMobileSliderSlide } from "@/components/site/SiteMobileSlider";
7
- import { SiteSectionShell } from "@/components/site/SiteSectionShell";
8
- import { SITE_GRID_2, SITE_GRID_3, SITE_GRID_4 } from "../siteLayoutClasses";
9
- import { cn } from "@/lib/utils";
10
-
11
- function gridClassForLayout(layout: string | undefined, count: number): string {
12
- switch (layout) {
13
- case "grid-2":
14
- return SITE_GRID_2;
15
- case "grid-4":
16
- return SITE_GRID_4;
17
- case "list":
18
- return "flex flex-col gap-8";
19
- case "grid-3":
20
- return SITE_GRID_3;
21
- }
22
- // No explicit layout → balance columns to the item count so the final row
23
- // never orphans (4 items render 2×2 instead of 3 + 1).
24
- return count === 4 ? SITE_GRID_2 : SITE_GRID_3;
25
- }
26
-
27
- export function Component({ copy, layout }: SectionProps) {
28
- const headline = copy.headline ?? "";
29
- const sub = copy.sub ?? "";
30
- const ctaLabel = copy.ctaLabel ?? "";
31
- const ctaHref = copy.ctaHref ?? "";
32
- const features = parseFeatureItems(copy);
33
- const isList = layout === "list";
34
-
35
- const featureCards = features.map((f, i) => (
36
- <SiteCard
37
- key={i}
38
- interactive={!isList}
39
- className={cn(
40
- "h-full gap-3",
41
- isList && "mx-auto w-full max-w-3xl text-left",
42
- )}
43
- >
44
- {f.icon && (
45
- <span className={cn("leading-none", isList ? "text-4xl" : "text-2xl")}>
46
- {f.icon}
47
- </span>
48
- )}
49
- <h3 className="site-type-heading font-semibold">
50
- {f.label}
51
- </h3>
52
- {f.desc && (
53
- <p className="site-type-sm text-[var(--muted-fg)]">
54
- {f.desc}
55
- </p>
56
- )}
57
- {f.bullets && f.bullets.length > 0 && (
58
- <ul
59
- className={cn(
60
- "site-type-sm mt-2 w-full space-y-2 text-[var(--muted-fg)]",
61
- isList
62
- ? "site-feature-checklist list-none"
63
- : "list-disc pl-5",
64
- )}
65
- >
66
- {f.bullets.map((bullet) => (
67
- <li
68
- key={bullet}
69
- className={cn(
70
- isList && "flex items-start gap-2.5",
71
- )}
72
- >
73
- {isList && (
74
- <span
75
- className="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full border-2 border-[var(--foreground)] bg-[var(--muted)] text-[var(--accent)] text-[10px] font-bold leading-none"
76
- aria-hidden
77
- >
78
- ✓
79
- </span>
80
- )}
81
- <span>{bullet}</span>
82
- </li>
83
- ))}
84
- </ul>
85
- )}
86
- {f.linkLabel && (
87
- <div className="mt-4">
88
- <SiteButton variant="secondary" href={f.linkHref || "#"}>
89
- {f.linkLabel}
90
- </SiteButton>
91
- </div>
92
- )}
93
- </SiteCard>
94
- ));
95
-
96
- return (
97
- <SiteSectionShell
98
- id={copy.anchor}
99
- heading={headline || undefined}
100
- sub={sub || undefined}
101
- style={sectionSurfaceStyle(copy)}
102
- className="bg-[var(--section-bg,var(--background))] text-[var(--section-fg,var(--foreground))]"
103
- >
104
- {isList ? (
105
- <div className="flex flex-col gap-8">{featureCards}</div>
106
- ) : (
107
- <SiteMobileSlider desktopClass={gridClassForLayout(layout, features.length)}>
108
- {featureCards.map((card, i) => (
109
- <SiteMobileSliderSlide key={i}>{card}</SiteMobileSliderSlide>
110
- ))}
111
- </SiteMobileSlider>
112
- )}
113
- {ctaLabel && ctaHref && (
114
- <div className="mt-12 text-center">
115
- <SiteButton variant="primary" href={ctaHref}>
116
- {ctaLabel}
117
- </SiteButton>
118
- </div>
119
- )}
120
- </SiteSectionShell>
121
- );
122
- }
@@ -1,7 +0,0 @@
1
- import type { Section } from "../types";
2
- import { meta } from "./meta";
3
- import { schema } from "./schema";
4
- import { Component } from "./Component";
5
- import { writeCopy } from "./writeCopy";
6
-
7
- export const features: Section = { meta, schema, Component, writeCopy };
@@ -1,14 +0,0 @@
1
- import type { SectionMeta } from "../types";
2
-
3
- export const meta: SectionMeta = {
4
- id: "features",
5
- displayName: "Features",
6
- family: "content",
7
- tags: ["features", "benefits", "cards", "marketing"],
8
- layouts: [
9
- { id: "grid-3", label: "3-column grid" },
10
- { id: "grid-2", label: "2-column grid" },
11
- { id: "grid-4", label: "4-column grid" },
12
- { id: "list", label: "Stacked list" },
13
- ],
14
- };
@@ -1,23 +0,0 @@
1
- import type { SectionCopySchemaField } from "../types";
2
-
3
- export const schema: SectionCopySchemaField[] = [
4
- { key: "headline", label: "Headline", type: "text", placeholder: '"Features"', maxLength: 60 },
5
- { key: "anchor", label: "Section anchor (for nav links, e.g. services)", type: "text", placeholder: "services", maxLength: 40 },
6
- { key: "sub", label: "Subheading", type: "textarea", placeholder: "Everything you need, nothing you don't.", maxLength: 200 },
7
- { key: "ctaLabel", label: "Section CTA label", type: "text", placeholder: "Email us", maxLength: 48 },
8
- { key: "ctaHref", label: "Section CTA link", type: "text", placeholder: "mailto:hello@example.com" },
9
- {
10
- key: "items",
11
- label: "Feature items",
12
- type: "items",
13
- },
14
- { key: "feature1Icon", label: "Feature 1 — icon (emoji)", type: "text", placeholder: "⚡" },
15
- { key: "feature1Label", label: "Feature 1 — label", type: "text", placeholder: "Fast", maxLength: 40 },
16
- { key: "feature1Desc", label: "Feature 1 — description", type: "textarea", placeholder: "Launches in seconds.", maxLength: 160 },
17
- { key: "feature2Icon", label: "Feature 2 — icon (emoji)", type: "text", placeholder: "🔒" },
18
- { key: "feature2Label", label: "Feature 2 — label", type: "text", placeholder: "Secure", maxLength: 40 },
19
- { key: "feature2Desc", label: "Feature 2 — description", type: "textarea", placeholder: "HTTPS on every site.", maxLength: 160 },
20
- { key: "feature3Icon", label: "Feature 3 — icon (emoji)", type: "text", placeholder: "✨" },
21
- { key: "feature3Label", label: "Feature 3 — label", type: "text", placeholder: "Simple", maxLength: 40 },
22
- { key: "feature3Desc", label: "Feature 3 — description", type: "textarea", placeholder: "Anyone can build.", maxLength: 160 },
23
- ];
@@ -1,18 +0,0 @@
1
- import type { BrandContext } from "@/lib/brandContext";
2
- import { virgilQuote } from "../copyHelpers";
3
-
4
- export function writeCopy(_ctx: BrandContext): Record<string, string> {
5
- return {
6
- headline: virgilQuote("Features"),
7
- sub: "Everything you need to launch and grow — nothing you don't.",
8
- feature1Icon: "⚡",
9
- feature1Label: "Fast",
10
- feature1Desc: "Your site is live in seconds.",
11
- feature2Icon: "🔒",
12
- feature2Label: "Secure",
13
- feature2Desc: "HTTPS on every site, free forever.",
14
- feature3Icon: "✨",
15
- feature3Label: "Simple",
16
- feature3Desc: "Anyone can build something great.",
17
- };
18
- }
@@ -1,103 +0,0 @@
1
- import type { SectionProps } from "../types";
2
- import { sectionSurfaceStyle } from "@/lib/sectionSurface";
3
-
4
- function isExternalHref(href: string): boolean {
5
- return /^https?:\/\//i.test(href);
6
- }
7
-
8
- export function Component({ copy }: SectionProps) {
9
- const wordmark = copy.wordmark ?? "";
10
- const tagline = copy.tagline ?? "";
11
- const phone = copy.phone ?? "";
12
- const phoneHref = copy.phoneHref || `tel:${phone.replace(/\D/g, "")}`;
13
- const email = copy.email ?? "";
14
- const hours = copy.hours ?? "";
15
-
16
- const quickLinks = [1, 2, 3, 4, 5]
17
- .map((i) => ({ label: copy[`link${i}Label`], href: copy[`link${i}Href`] }))
18
- .filter((l) => l.label && l.href);
19
-
20
- const socialLinks = [1, 2, 3]
21
- .map((i) => ({ label: copy[`social${i}Label`], href: copy[`social${i}Href`] }))
22
- .filter((l) => l.label && l.href);
23
-
24
- return (
25
- <section
26
- data-section="footer"
27
- style={sectionSurfaceStyle(copy)}
28
- className="site-footer px-6 py-14 border-t border-[var(--border)] bg-[var(--section-bg,var(--footer-bg,var(--background)))] text-[var(--section-fg,var(--footer-fg,var(--foreground)))]"
29
- >
30
- <div className="max-w-5xl mx-auto grid gap-10 @md/site:grid-cols-3">
31
- <div>
32
- {wordmark && (
33
- <p className="site-type-heading font-bold">
34
- {wordmark}
35
- </p>
36
- )}
37
- {tagline && (
38
- <p className="site-type-sm mt-2 opacity-80">
39
- {tagline}
40
- </p>
41
- )}
42
- </div>
43
-
44
- {quickLinks.length > 0 && (
45
- <div>
46
- <p className="site-type-sm mb-3 font-bold uppercase tracking-wide">Quick links</p>
47
- <ul className="space-y-2 site-type-sm">
48
- {quickLinks.map((l, i) => (
49
- <li key={i}>
50
- <a
51
- href={l.href}
52
- className="text-[var(--accent)] hover:underline"
53
- {...(isExternalHref(l.href!)
54
- ? { target: "_blank", rel: "noopener noreferrer" }
55
- : {})}
56
- >
57
- {l.label}
58
- </a>
59
- </li>
60
- ))}
61
- </ul>
62
- </div>
63
- )}
64
-
65
- <div>
66
- <p className="site-type-sm mb-3 font-bold uppercase tracking-wide">Get in touch</p>
67
- <ul className="space-y-2 site-type-sm opacity-80">
68
- {phone && (
69
- <li>
70
- <a href={phoneHref} className="text-[var(--accent)] hover:underline">
71
- {phone}
72
- </a>
73
- </li>
74
- )}
75
- {email && (
76
- <li>
77
- <a href={`mailto:${email}`} className="text-[var(--accent)] hover:underline">
78
- {email}
79
- </a>
80
- </li>
81
- )}
82
- {hours && <li>{hours}</li>}
83
- </ul>
84
- {socialLinks.length > 0 && (
85
- <div className="mt-4 flex flex-wrap gap-3 site-type-sm">
86
- {socialLinks.map((l, i) => (
87
- <a
88
- key={i}
89
- href={l.href}
90
- target="_blank"
91
- rel="noopener noreferrer"
92
- className="text-[var(--accent)] hover:underline"
93
- >
94
- {l.label}
95
- </a>
96
- ))}
97
- </div>
98
- )}
99
- </div>
100
- </div>
101
- </section>
102
- );
103
- }
@@ -1,7 +0,0 @@
1
- import type { Section } from "../types";
2
- import { Component } from "./Component";
3
- import { schema } from "./schema";
4
- import { meta } from "./meta";
5
- import { writeCopy } from "./writeCopy";
6
-
7
- export const footer: Section = { meta, schema, Component, writeCopy };
@@ -1,8 +0,0 @@
1
- import type { SectionMeta } from "../types";
2
-
3
- export const meta: SectionMeta = {
4
- id: "footer",
5
- displayName: "Footer",
6
- family: "footer",
7
- tags: ["footer", "attribution", "close"],
8
- };
@@ -1,39 +0,0 @@
1
- import type { SectionCopySchemaField } from "../types";
2
-
3
- export const schema: SectionCopySchemaField[] = [
4
- {
5
- key: "wordmark",
6
- label: "Wordmark",
7
- type: "text",
8
- placeholder: "your name",
9
- required: false,
10
- maxLength: 40,
11
- },
12
- {
13
- key: "tagline",
14
- label: "Tagline",
15
- type: "text",
16
- placeholder: "the short thing",
17
- required: false,
18
- maxLength: 80,
19
- },
20
- { key: "phone", label: "Phone", type: "text", placeholder: "(541) 555-0100", maxLength: 32 },
21
- { key: "email", label: "Email", type: "text", placeholder: "hello@example.com" },
22
- { key: "hours", label: "Hours", type: "text", placeholder: "Mon–Sun · 9 AM – 5 PM", maxLength: 80 },
23
- { key: "link1Label", label: "Quick link 1 label", type: "text", maxLength: 40 },
24
- { key: "link1Href", label: "Quick link 1 href", type: "text" },
25
- { key: "link2Label", label: "Quick link 2 label", type: "text", maxLength: 40 },
26
- { key: "link2Href", label: "Quick link 2 href", type: "text" },
27
- { key: "link3Label", label: "Quick link 3 label", type: "text", maxLength: 40 },
28
- { key: "link3Href", label: "Quick link 3 href", type: "text" },
29
- { key: "link4Label", label: "Quick link 4 label", type: "text", maxLength: 40 },
30
- { key: "link4Href", label: "Quick link 4 href", type: "text" },
31
- { key: "link5Label", label: "Quick link 5 label", type: "text", maxLength: 40 },
32
- { key: "link5Href", label: "Quick link 5 href", type: "text" },
33
- { key: "social1Label", label: "Social 1 label", type: "text", placeholder: "Instagram", maxLength: 24 },
34
- { key: "social1Href", label: "Social 1 URL", type: "text" },
35
- { key: "social2Label", label: "Social 2 label", type: "text", placeholder: "Facebook", maxLength: 24 },
36
- { key: "social2Href", label: "Social 2 URL", type: "text" },
37
- { key: "social3Label", label: "Social 3 label", type: "text", placeholder: "Nextdoor", maxLength: 24 },
38
- { key: "social3Href", label: "Social 3 URL", type: "text" },
39
- ];
@@ -1,31 +0,0 @@
1
- import type { SectionWriteCopy } from "../types";
2
- import type { Platform } from "@/lib/brandContext";
3
- import { firstWord } from "../copyHelpers";
4
-
5
- const PLATFORM_LABELS: Record<Platform, string> = {
6
- twitter: "X",
7
- instagram: "Instagram",
8
- linkedin: "LinkedIn",
9
- youtube: "YouTube",
10
- tiktok: "TikTok",
11
- bluesky: "Bluesky",
12
- github: "GitHub",
13
- facebook: "Facebook",
14
- threads: "Threads",
15
- substack: "Substack",
16
- mastodon: "Mastodon",
17
- site: "Website",
18
- link: "Link",
19
- };
20
-
21
- export const writeCopy: SectionWriteCopy = (ctx) => {
22
- const out: Record<string, string> = {
23
- wordmark: firstWord(ctx.purpose ?? ""),
24
- tagline: "",
25
- };
26
- (ctx.handles ?? []).slice(0, 3).forEach((h, i) => {
27
- out[`link${i + 1}Label`] = PLATFORM_LABELS[h.platform] ?? "Link";
28
- out[`link${i + 1}Href`] = h.url;
29
- });
30
- return out;
31
- };
@@ -1,187 +0,0 @@
1
- import type { SectionProps } from "../types";
2
- import { SiteButton } from "@/components/site/SiteButton";
3
- import { SiteCard } from "@/components/site/SiteCard";
4
- import { SiteHeading } from "@/components/site/SiteHeading";
5
- import { SiteSectionShell } from "@/components/site/SiteSectionShell";
6
- import { SafeEmbedFromUrl } from "@/components/site/SafeEmbed";
7
- import { SITE_GRID_2 } from "../siteLayoutClasses";
8
- import { cn } from "@/lib/utils";
9
-
10
- export function Component({ copy, layout, fullHeight }: SectionProps) {
11
- const layoutId = layout ?? "centered";
12
- const isTurf = layoutId === "turf";
13
- const isSplit = layoutId === "split";
14
- // `card` collapses the hero to a single primary CTA inside a card — no
15
- // competing secondary button. Full-height, centered.
16
- const isCard = layoutId === "card";
17
- const isFullHeight = fullHeight !== false;
18
-
19
- const eyebrow = copy.eyebrow ?? "";
20
- const headline = copy.headline ?? "";
21
- const sub = copy.sub ?? "";
22
- const ctaLabel = copy.ctaLabel ?? "";
23
- const ctaHref = copy.ctaHref || "#";
24
- const cta2Label = copy.cta2Label ?? "";
25
- const cta2Href = copy.cta2Href || "#";
26
- const heroImage = copy.heroImage ?? "";
27
- const heroVideo = copy.heroVideo ?? "";
28
- const hasMedia = Boolean(heroImage || heroVideo);
29
-
30
- const trustBadges = [copy.trustBadge1, copy.trustBadge2, copy.trustBadge3].filter(Boolean);
31
-
32
- const headerRegion = (
33
- <div className="flex flex-col gap-4">
34
- {eyebrow ? (
35
- <p className="site-hero-eyebrow site-type-sm">{eyebrow}</p>
36
- ) : null}
37
- {headline ? (
38
- <SiteHeading
39
- level="hero"
40
- as="h1"
41
- align="center"
42
- className={cn(
43
- "site-comparison-heading tracking-tight text-[var(--foreground)]",
44
- isSplit && "@md/site:text-left",
45
- isTurf && "site-sparkle-heading",
46
- )}
47
- >
48
- {headline}
49
- </SiteHeading>
50
- ) : null}
51
- {sub ? (
52
- <p
53
- className={cn(
54
- "site-type-lead font-medium text-[var(--foreground)]",
55
- isSplit && "@md/site:text-left",
56
- )}
57
- >
58
- {sub}
59
- </p>
60
- ) : null}
61
- </div>
62
- );
63
-
64
- const actionsRegion =
65
- ctaLabel || cta2Label ? (
66
- <div className="site-btn-row">
67
- {ctaLabel ? (
68
- <SiteButton variant="primary" href={ctaHref}>
69
- {ctaLabel}
70
- </SiteButton>
71
- ) : null}
72
- {cta2Label ? (
73
- <SiteButton variant="secondary" href={cta2Href}>
74
- {cta2Label}
75
- </SiteButton>
76
- ) : null}
77
- </div>
78
- ) : null;
79
-
80
- const ctaCard =
81
- isCard && ctaLabel ? (
82
- <SiteCard className="mx-auto w-full max-w-md items-center gap-4 text-center">
83
- {copy.cardHeading ? (
84
- <p className="site-type-heading font-semibold text-[var(--foreground)]">
85
- {copy.cardHeading}
86
- </p>
87
- ) : null}
88
- {copy.cardSub ? (
89
- <p className="site-type-sm text-[var(--muted-fg)]">{copy.cardSub}</p>
90
- ) : null}
91
- <SiteButton variant="primary" href={ctaHref} className="w-full @sm/site:w-auto">
92
- {ctaLabel}
93
- </SiteButton>
94
- </SiteCard>
95
- ) : null;
96
-
97
- const trustRegion =
98
- trustBadges.length > 0 ? (
99
- <ul
100
- className={cn(
101
- "site-hero-trust flex flex-wrap gap-3",
102
- isSplit ? "justify-center @md/site:justify-start" : "justify-center",
103
- )}
104
- >
105
- {trustBadges.map((badge) => (
106
- <li
107
- key={badge}
108
- className={cn(
109
- "site-type-sm font-medium",
110
- isTurf ? "site-trust-pill" : "site-trust-pill-default",
111
- )}
112
- >
113
- {badge}
114
- </li>
115
- ))}
116
- </ul>
117
- ) : null;
118
-
119
- const mediaRegion = hasMedia ? (
120
- <div className="flex w-full flex-col gap-4">
121
- {heroImage ? (
122
- <div className="site-media-frame site-media-frame--hero site-media-frame--scrim">
123
- {/* eslint-disable-next-line @next/next/no-img-element */}
124
- <img src={heroImage} alt="" className="site-media-img" />
125
- </div>
126
- ) : null}
127
- {heroVideo ? (
128
- <SafeEmbedFromUrl url={heroVideo} kind="videoEmbed" title="Hero video" />
129
- ) : null}
130
- </div>
131
- ) : null;
132
-
133
- const copyColumn = (
134
- <div
135
- className={cn(
136
- "flex w-full flex-col gap-6",
137
- isSplit && "items-center text-center @md/site:items-start @md/site:text-left",
138
- )}
139
- >
140
- {headerRegion}
141
- {actionsRegion}
142
- {trustRegion}
143
- </div>
144
- );
145
-
146
- const body =
147
- isSplit && hasMedia ? (
148
- <div className={cn(SITE_GRID_2, "w-full gap-8 @md/site:items-center")}>
149
- {copyColumn}
150
- {mediaRegion}
151
- </div>
152
- ) : isSplit ? (
153
- copyColumn
154
- ) : (
155
- <div
156
- className={cn(
157
- "site-hero-inner flex flex-col items-center gap-8 text-center",
158
- isTurf && "px-6",
159
- )}
160
- >
161
- {headerRegion}
162
- {isCard ? ctaCard : actionsRegion}
163
- {trustRegion}
164
- {mediaRegion}
165
- </div>
166
- );
167
-
168
- return (
169
- <SiteSectionShell
170
- id={copy.anchor}
171
- dataSection="marketing-hero"
172
- dataLayout={layoutId}
173
- dataFullHeight={isFullHeight}
174
- innerClassName={cn(
175
- isFullHeight && "flex min-h-0 w-full flex-1 flex-col justify-center",
176
- isSplit ? "items-stretch" : isFullHeight && "items-center",
177
- )}
178
- className={cn(
179
- "text-[var(--foreground)]",
180
- isFullHeight && "flex min-h-0 flex-1 flex-col",
181
- isTurf ? "site-hero-turf w-full" : "bg-[var(--background)]",
182
- )}
183
- >
184
- {body}
185
- </SiteSectionShell>
186
- );
187
- }
@@ -1,7 +0,0 @@
1
- import type { Section } from "../types";
2
- import { Component } from "./Component";
3
- import { schema } from "./schema";
4
- import { meta } from "./meta";
5
- import { writeCopy } from "./writeCopy";
6
-
7
- export const marketingHero: Section = { meta, schema, Component, writeCopy };
@@ -1,13 +0,0 @@
1
- import type { SectionMeta } from "../types";
2
-
3
- export const meta: SectionMeta = {
4
- id: "marketing-hero",
5
- displayName: "Marketing hero",
6
- family: "hero",
7
- tags: ["hero", "marketing", "product", "saas", "landing", "centered", "above-fold"],
8
- layouts: [
9
- { id: "centered", label: "Centered" },
10
- { id: "card", label: "Centered + CTA card" },
11
- { id: "split", label: "Split (text + media)" },
12
- ],
13
- };