feat: add official EmDash marketing template
- Marketing landing page with hero, features, testimonials, FAQ, pricing - EmDash CMS with pages collection and marketing blocks - Full seed data with all content sections - Dockerfile with entrypoint for database persistence - Responsive design with CSS variables Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
416
src/components/MarketingBlocks.astro
Normal file
416
src/components/MarketingBlocks.astro
Normal file
@@ -0,0 +1,416 @@
|
||||
---
|
||||
interface Props {
|
||||
value: any[];
|
||||
}
|
||||
|
||||
const { value } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="marketing-blocks">
|
||||
{value.map((block: any) => {
|
||||
const type = block._type;
|
||||
if (type === "marketing.hero") {
|
||||
return (
|
||||
<section class="hero-section">
|
||||
<div class="container">
|
||||
<div class="hero-content">
|
||||
<h1>{block.headline}</h1>
|
||||
{block.subheadline && <p class="hero-subheadline">{block.subheadline}</p>}
|
||||
<div class="hero-actions">
|
||||
{block.primaryCta && (
|
||||
<a href={block.primaryCta.url} class="btn btn-primary">{block.primaryCta.label}</a>
|
||||
)}
|
||||
{block.secondaryCta && (
|
||||
<a href={block.secondaryCta.url} class="btn btn-secondary">{block.secondaryCta.label}</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
if (type === "marketing.features") {
|
||||
return (
|
||||
<section class="features-section" id="features">
|
||||
<div class="container">
|
||||
<div class="section-header">
|
||||
<h2>{block.headline}</h2>
|
||||
{block.subheadline && <p class="section-subheadline">{block.subheadline}</p>}
|
||||
</div>
|
||||
<div class="features-grid">
|
||||
{block.features?.map((feature: any) => (
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon">
|
||||
<span class="icon">{feature.icon}</span>
|
||||
</div>
|
||||
<h3>{feature.title}</h3>
|
||||
<p>{feature.description}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
if (type === "marketing.testimonials") {
|
||||
return (
|
||||
<section class="testimonials-section">
|
||||
<div class="container">
|
||||
<h2>{block.headline}</h2>
|
||||
<div class="testimonials-grid">
|
||||
{block.testimonials?.map((t: any) => (
|
||||
<blockquote class="testimonial-card">
|
||||
<p>"{t.quote}"</p>
|
||||
<footer>
|
||||
<cite>{t.author}</cite>
|
||||
{t.role && <span>{t.role}{t.company && ` at ${t.company}`}</span>}
|
||||
</footer>
|
||||
</blockquote>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
if (type === "marketing.pricing") {
|
||||
return (
|
||||
<section class="pricing-section" id="pricing">
|
||||
<div class="container">
|
||||
<div class="pricing-grid">
|
||||
{block.plans?.map((plan: any) => (
|
||||
<div class={`pricing-card ${plan.highlighted ? "highlighted" : ""}`}>
|
||||
{plan.highlighted && <span class="badge">Most popular</span>}
|
||||
<h3>{plan.name}</h3>
|
||||
<div class="price">
|
||||
<span class="amount">{plan.price}</span>
|
||||
{plan.period && <span class="period">{plan.period}</span>}
|
||||
</div>
|
||||
{plan.description && <p class="description">{plan.description}</p>}
|
||||
<ul class="features">
|
||||
{plan.features?.map((f: string) => <li>{f}</li>)}
|
||||
</ul>
|
||||
<a href={plan.cta.url} class="btn btn-primary">{plan.cta.label}</a>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
if (type === "marketing.faq") {
|
||||
return (
|
||||
<section class="faq-section">
|
||||
<div class="container">
|
||||
<h2>{block.headline}</h2>
|
||||
<div class="faq-list">
|
||||
{block.items?.map((item: any) => (
|
||||
<div class="faq-item">
|
||||
<h3>{item.question}</h3>
|
||||
<p>{item.answer}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
})}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.marketing-blocks {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: var(--wide-width, 1200px);
|
||||
margin: 0 auto;
|
||||
padding: 0 var(--spacing-lg);
|
||||
}
|
||||
|
||||
/* Hero Section */
|
||||
.hero-section {
|
||||
padding: var(--spacing-5xl) 0;
|
||||
text-align: center;
|
||||
background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.hero-section h1 {
|
||||
font-size: var(--font-size-5xl);
|
||||
font-weight: 800;
|
||||
margin-bottom: var(--spacing-lg);
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.hero-subheadline {
|
||||
font-size: var(--font-size-xl);
|
||||
color: var(--color-muted);
|
||||
margin-bottom: var(--spacing-2xl);
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
gap: var(--spacing-md);
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Features Section */
|
||||
.features-section {
|
||||
padding: var(--spacing-5xl) 0;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
text-align: center;
|
||||
margin-bottom: var(--spacing-4xl);
|
||||
}
|
||||
|
||||
.section-header h2 {
|
||||
font-size: var(--font-size-3xl);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.section-subheadline {
|
||||
font-size: var(--font-size-lg);
|
||||
color: var(--color-muted);
|
||||
}
|
||||
|
||||
.features-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--spacing-xl);
|
||||
transition: all var(--transition-base);
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
border-color: var(--color-primary);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
|
||||
border-radius: var(--radius);
|
||||
margin-bottom: var(--spacing-md);
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.feature-card h3 {
|
||||
font-size: var(--font-size-lg);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.feature-card p {
|
||||
color: var(--color-muted);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
/* Testimonials Section */
|
||||
.testimonials-section {
|
||||
padding: var(--spacing-5xl) 0;
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
.testimonials-section h2 {
|
||||
text-align: center;
|
||||
font-size: var(--font-size-2xl);
|
||||
margin-bottom: var(--spacing-3xl);
|
||||
}
|
||||
|
||||
.testimonials-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.testimonial-card {
|
||||
background: var(--color-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.testimonial-card p {
|
||||
font-size: var(--font-size-base);
|
||||
font-style: italic;
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.testimonial-card footer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.testimonial-card cite {
|
||||
font-weight: 600;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.testimonial-card span {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-muted);
|
||||
}
|
||||
|
||||
/* Pricing Section */
|
||||
.pricing-section {
|
||||
padding: var(--spacing-5xl) 0;
|
||||
}
|
||||
|
||||
.pricing-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.pricing-card {
|
||||
background: var(--color-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--spacing-2xl);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pricing-card.highlighted {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 1px var(--color-primary);
|
||||
}
|
||||
|
||||
.pricing-card .badge {
|
||||
position: absolute;
|
||||
top: -12px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: var(--color-primary);
|
||||
color: white;
|
||||
padding: var(--spacing-xs) var(--spacing-md);
|
||||
border-radius: var(--radius-full);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.pricing-card h3 {
|
||||
font-size: var(--font-size-xl);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.price {
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.price .amount {
|
||||
font-size: var(--font-size-4xl);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.price .period {
|
||||
color: var(--color-muted);
|
||||
}
|
||||
|
||||
.pricing-card .description {
|
||||
color: var(--color-muted);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.pricing-card .features {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 0 var(--spacing-xl);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.pricing-card .features li {
|
||||
padding: var(--spacing-sm) 0;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
/* FAQ Section */
|
||||
.faq-section {
|
||||
padding: var(--spacing-5xl) 0;
|
||||
}
|
||||
|
||||
.faq-section h2 {
|
||||
text-align: center;
|
||||
font-size: var(--font-size-2xl);
|
||||
margin-bottom: var(--spacing-3xl);
|
||||
}
|
||||
|
||||
.faq-list {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.faq-item {
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding: var(--spacing-xl) 0;
|
||||
}
|
||||
|
||||
.faq-item h3 {
|
||||
font-size: var(--font-size-lg);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.faq-item p {
|
||||
color: var(--color-muted);
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--spacing-md) var(--spacing-xl);
|
||||
border-radius: var(--radius);
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--color-primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: var(--color-primary-dark);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: transparent;
|
||||
color: var(--color-text);
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.features-grid,
|
||||
.testimonials-grid,
|
||||
.pricing-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
21
src/components/blocks/FAQ.astro
Normal file
21
src/components/blocks/FAQ.astro
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
interface Props {
|
||||
node: {
|
||||
_key?: string;
|
||||
headline?: string;
|
||||
items: Array<{ question: string; answer: string }>;
|
||||
};
|
||||
}
|
||||
|
||||
const { node } = Astro.props;
|
||||
const { _key, headline, items } = node;
|
||||
---
|
||||
|
||||
{headline && <h2>{headline}</h2>}
|
||||
|
||||
{items?.map((item) => (
|
||||
<div class="faq-item">
|
||||
<h3>{item.question}</h3>
|
||||
<p>{item.answer}</p>
|
||||
</div>
|
||||
))}
|
||||
39
src/components/blocks/Features.astro
Normal file
39
src/components/blocks/Features.astro
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
interface Props {
|
||||
node: {
|
||||
_key?: string;
|
||||
headline?: string;
|
||||
subheadline?: string;
|
||||
features: Array<{
|
||||
icon: string;
|
||||
title: string;
|
||||
description: string;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
const { node } = Astro.props;
|
||||
const { _key, headline, subheadline, features } = node;
|
||||
---
|
||||
|
||||
{(headline || subheadline) && (
|
||||
<div class="features-header">
|
||||
{headline && <h2>{headline}</h2>}
|
||||
{subheadline && <p>{subheadline}</p>}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{features?.map((feature) => (
|
||||
<div class="feature-item" key={feature.icon}>
|
||||
<div class="feature-icon">{feature.icon}</div>
|
||||
<h3>{feature.title}</h3>
|
||||
<p>{feature.description}</p>
|
||||
</div>
|
||||
))}
|
||||
|
||||
<style>
|
||||
.features-header {
|
||||
text-align: center;
|
||||
margin-bottom: var(--spacing-4xl);
|
||||
}
|
||||
</style>
|
||||
4
src/components/blocks/Hero.astro
Normal file
4
src/components/blocks/Hero.astro
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
const { entry: page } = Astro.props;
|
||||
---
|
||||
<h1>{entry.data.title}</h1>
|
||||
35
src/components/blocks/Pricing.astro
Normal file
35
src/components/blocks/Pricing.astro
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
interface Props {
|
||||
node: {
|
||||
_key?: string;
|
||||
headline?: string;
|
||||
plans: Array<{
|
||||
name: string;
|
||||
price: string;
|
||||
period?: string;
|
||||
description?: string;
|
||||
features: string[];
|
||||
cta: { label: string; url: string };
|
||||
highlighted?: boolean;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
const { node } = Astro.props;
|
||||
const { headline, plans } = node;
|
||||
---
|
||||
|
||||
{headline && <h2>{headline}</h2>}
|
||||
|
||||
{plans?.map((plan) => (
|
||||
<div class="plan" data-highlighted={plan.highlighted}>
|
||||
{plan.highlighted && <span class="badge">Most popular</span>}
|
||||
<h3>{plan.name}</h3>
|
||||
<p class="price">{plan.price}{plan.period && <small>{plan.period}</small>}</p>
|
||||
{plan.description && <p class="description">{plan.description}</p>}
|
||||
<ul>
|
||||
{plan.features?.map((f) => <li>{f}</li>)}
|
||||
</ul>
|
||||
<a href={plan.cta.url}>{plan.cta.label}</a>
|
||||
</div>
|
||||
))}
|
||||
29
src/components/blocks/Testimonials.astro
Normal file
29
src/components/blocks/Testimonials.astro
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
interface Props {
|
||||
node: {
|
||||
_key?: string;
|
||||
headline?: string;
|
||||
testimonials: Array<{
|
||||
quote: string;
|
||||
author: string;
|
||||
role?: string;
|
||||
company?: string;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
const { node } = Astro.props;
|
||||
const { headline, testimonials } = node;
|
||||
---
|
||||
|
||||
{headline && <h2>{headline}</h2>}
|
||||
|
||||
{testimonials?.map((t) => (
|
||||
<blockquote>
|
||||
<p>"{t.quote}"</p>
|
||||
<footer>
|
||||
<cite>{t.author}</cite>
|
||||
{t.role && <span>{t.role}{t.company && ` at ${t.company}`}</span>}
|
||||
</footer>
|
||||
</blockquote>
|
||||
))}
|
||||
5
src/components/blocks/index.ts
Normal file
5
src/components/blocks/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export { default as Hero } from "./Hero.astro";
|
||||
export { default as Features } from "./Features.astro";
|
||||
export { default as Testimonials } from "./Testimonials.astro";
|
||||
export { default as Pricing } from "./Pricing.astro";
|
||||
export { default as FAQ } from "./FAQ.astro";
|
||||
156
src/layouts/Base.astro
Normal file
156
src/layouts/Base.astro
Normal file
@@ -0,0 +1,156 @@
|
||||
---
|
||||
import { getMenu, getSiteSettings } from "emdash";
|
||||
import { EmDashHead } from "emdash/ui";
|
||||
import { createPublicPageContext } from "emdash/page";
|
||||
import { Font } from "astro:assets";
|
||||
import "../styles/theme.css";
|
||||
|
||||
interface Props {
|
||||
title?: string;
|
||||
description?: string;
|
||||
image?: string;
|
||||
}
|
||||
|
||||
const { title, description, image } = Astro.props;
|
||||
const settings = await getSiteSettings();
|
||||
const siteTitle = settings?.title || "Acme";
|
||||
const fullTitle = title ? `${title} — ${siteTitle}` : siteTitle;
|
||||
const siteDescription = settings?.tagline || "Build products people actually want";
|
||||
const siteLogo = (settings?.logo as any)?.url ? settings.logo as { mediaId: string; alt?: string; url: string } : null;
|
||||
const siteFavicon = (settings?.favicon as any)?.url ?? null;
|
||||
|
||||
const menu = await getMenu("primary");
|
||||
|
||||
const pageCtx = createPublicPageContext({
|
||||
Astro,
|
||||
kind: "custom",
|
||||
pageType: "website",
|
||||
title: fullTitle,
|
||||
pageTitle: title ?? siteTitle,
|
||||
description: description || siteDescription,
|
||||
canonical: Astro.url.href,
|
||||
image,
|
||||
seo: { ogImage: image },
|
||||
siteName: siteTitle,
|
||||
});
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{fullTitle}</title>
|
||||
{siteFavicon && <link rel="icon" href={siteFavicon} />}
|
||||
{description && <meta name="description" content={description} />}
|
||||
<EmDashHead emdash={Astro.locals.emdash} pageContext={pageCtx} />
|
||||
<Font ...{({ variable: "--font-sans", provider: { type: "google", name: "Inter" } })} />
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<nav class="container nav">
|
||||
<a href="/" class="logo">
|
||||
{siteLogo ? (
|
||||
<img src={siteLogo.url} alt={siteLogo.alt || siteTitle} width="32" height="32" />
|
||||
) : (
|
||||
<span>{siteTitle}</span>
|
||||
)}
|
||||
</a>
|
||||
<ul class="nav-links">
|
||||
{menu?.items.map((item: any) => (
|
||||
<li>
|
||||
<a href={item.url}>{item.label}</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<a href="/contact" class="btn btn-primary">Get Started</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="container">
|
||||
<p>© {new Date().getFullYear()} {siteTitle}. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style>
|
||||
.site-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background: var(--color-bg);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: var(--spacing-md) 0;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-weight: 700;
|
||||
font-size: var(--font-size-xl);
|
||||
text-decoration: none;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
display: flex;
|
||||
gap: var(--spacing-xl);
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.nav-links a {
|
||||
text-decoration: none;
|
||||
color: var(--color-text);
|
||||
font-weight: 500;
|
||||
transition: color var(--transition-fast);
|
||||
}
|
||||
|
||||
.nav-links a:hover {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.site-footer {
|
||||
border-top: 1px solid var(--color-border);
|
||||
padding: var(--spacing-2xl) 0;
|
||||
text-align: center;
|
||||
color: var(--color-muted);
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--spacing-sm) var(--spacing-lg);
|
||||
border-radius: var(--radius);
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--color-primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: var(--color-primary-dark);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.nav-links {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
11
src/live.config.ts
Normal file
11
src/live.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* EmDash Live Content Collections
|
||||
*/
|
||||
import { defineLiveCollection } from "astro:content";
|
||||
import { emdashLoader } from "emdash/runtime";
|
||||
|
||||
export const collections = {
|
||||
_emdash: defineLiveCollection({
|
||||
loader: emdashLoader()
|
||||
}),
|
||||
};
|
||||
230
src/pages/contact.astro
Normal file
230
src/pages/contact.astro
Normal file
@@ -0,0 +1,230 @@
|
||||
---
|
||||
import { Icon } from "astro-iconset/components";
|
||||
import { getEmDashEntry } from "emdash";
|
||||
import Base from "../layouts/Base.astro";
|
||||
import MarketingBlocks from "../components/MarketingBlocks.astro";
|
||||
|
||||
const { entry: page, cacheHint } = await getEmDashEntry("pages", "contact");
|
||||
Astro.cache.set(cacheHint);
|
||||
const pageContent = page?.data.content;
|
||||
---
|
||||
|
||||
<Base title="Contact">
|
||||
{pageContent && <MarketingBlocks blocks={pageContent} />}
|
||||
|
||||
<section class="contact-form-section">
|
||||
<div class="container">
|
||||
<div class="contact-grid">
|
||||
<div class="contact-info">
|
||||
<h2>Talk to our team</h2>
|
||||
<p>Fill out the form and we'll be in touch within 24 hours.</p>
|
||||
|
||||
<div class="contact-methods">
|
||||
<div class="contact-method">
|
||||
<div class="contact-icon">📧</div>
|
||||
<div class="contact-method-content">
|
||||
<h4>Email</h4>
|
||||
<a href="mailto:hello@acme.example">hello@acme.example</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contact-method">
|
||||
<div class="contact-icon">💬</div>
|
||||
<div class="contact-method-content">
|
||||
<h4>Support</h4>
|
||||
<a href="mailto:support@acme.example">support@acme.example</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contact-method">
|
||||
<div class="contact-icon">💼</div>
|
||||
<div class="contact-method-content">
|
||||
<h4>Sales</h4>
|
||||
<a href="mailto:sales@acme.example">sales@acme.example</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contact-form-wrapper">
|
||||
<form method="POST" class="contact-form">
|
||||
<div class="form-row">
|
||||
<div class="form-field">
|
||||
<label for="name">Name *</label>
|
||||
<input type="text" id="name" name="name" required />
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="email">Email *</label>
|
||||
<input type="email" id="email" name="email" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="company">Company</label>
|
||||
<input type="text" id="company" name="company" />
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="message">Message *</label>
|
||||
<textarea id="message" name="message" required></textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary btn-lg">Send Message</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</Base>
|
||||
|
||||
<style>
|
||||
.contact-form-section {
|
||||
padding: var(--spacing-5xl) 0;
|
||||
}
|
||||
|
||||
.contact-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1.5fr;
|
||||
gap: var(--spacing-4xl);
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.contact-info h2 {
|
||||
font-size: var(--font-size-2xl);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.contact-info > p {
|
||||
color: var(--color-muted);
|
||||
margin-bottom: var(--spacing-2xl);
|
||||
}
|
||||
|
||||
.contact-methods {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.contact-method {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.contact-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.25rem;
|
||||
color: white;
|
||||
background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
|
||||
border-radius: var(--radius);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.contact-method-content h4 {
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.contact-method-content a {
|
||||
color: var(--color-primary);
|
||||
font-size: var(--font-size-lg);
|
||||
}
|
||||
|
||||
.contact-form-wrapper {
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--spacing-2xl);
|
||||
}
|
||||
|
||||
.contact-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.form-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.form-field label {
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.form-field input,
|
||||
.form-field textarea {
|
||||
padding: var(--spacing-md);
|
||||
font-family: inherit;
|
||||
font-size: var(--font-size-base);
|
||||
color: var(--color-text);
|
||||
background: var(--color-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
||||
}
|
||||
|
||||
.form-field input:focus,
|
||||
.form-field textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
||||
}
|
||||
|
||||
.form-field textarea {
|
||||
resize: vertical;
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--spacing-sm) var(--spacing-lg);
|
||||
border-radius: var(--radius);
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
transition: all var(--transition-fast);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--color-primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: var(--color-primary-dark);
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
padding: var(--spacing-md) var(--spacing-2xl);
|
||||
font-size: var(--font-size-lg);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.contact-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--spacing-2xl);
|
||||
}
|
||||
|
||||
.form-row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
22
src/pages/index.astro
Normal file
22
src/pages/index.astro
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
import { getEmDashEntry } from "emdash";
|
||||
import Base from "../layouts/Base.astro";
|
||||
import MarketingBlocks from "../components/MarketingBlocks.astro";
|
||||
|
||||
const { entry: page, cacheHint } = await getEmDashEntry("pages", "home");
|
||||
Astro.cache.set(cacheHint);
|
||||
const pageTitle = page?.data.title;
|
||||
const pageContent = page?.data.content;
|
||||
---
|
||||
|
||||
<Base title={pageTitle}>
|
||||
{pageContent ? (
|
||||
<MarketingBlocks blocks={pageContent} />
|
||||
) : (
|
||||
<div>
|
||||
<h1>Welcome to Acme</h1>
|
||||
<p>Edit the home page content in the admin to get started.</p>
|
||||
<a href="/_emdash/admin">Open Admin</a>
|
||||
</div>
|
||||
)}
|
||||
</Base>
|
||||
22
src/pages/pricing.astro
Normal file
22
src/pages/pricing.astro
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
import { getEmDashEntry } from "emdash";
|
||||
import Base from "../layouts/Base.astro";
|
||||
import MarketingBlocks from "../components/MarketingBlocks.astro";
|
||||
|
||||
const { entry: page, cacheHint } = await getEmDashEntry("pages", "pricing");
|
||||
Astro.cache.set(cacheHint);
|
||||
const pageTitle = page?.data.title;
|
||||
const pageContent = page?.data.content;
|
||||
---
|
||||
|
||||
<Base title={pageTitle}>
|
||||
{pageContent ? (
|
||||
<MarketingBlocks blocks={pageContent} />
|
||||
) : (
|
||||
<div>
|
||||
<h1>Pricing</h1>
|
||||
<p>Edit the pricing page content in the admin to get started.</p>
|
||||
<a href="/_emdash/admin">Open Admin</a>
|
||||
</div>
|
||||
)}
|
||||
</Base>
|
||||
70
src/styles/theme.css
Normal file
70
src/styles/theme.css
Normal file
@@ -0,0 +1,70 @@
|
||||
/* theme.css -- Design tokens for the marketing template */
|
||||
|
||||
:root {
|
||||
/* --- Colors --- */
|
||||
--color-bg: #ffffff;
|
||||
--color-text: #0f172a;
|
||||
--color-muted: #64748b;
|
||||
--color-border: #e2e8f0;
|
||||
--color-surface: #f8fafc;
|
||||
--color-primary: #6366f1;
|
||||
--color-primary-dark: #4f46e5;
|
||||
--color-primary-light: #818cf8;
|
||||
--color-accent: #f472b6;
|
||||
--color-accent-light: #f9a8d4;
|
||||
--color-success: #22c55e;
|
||||
--color-warning: #f59e0b;
|
||||
|
||||
/* --- Typography --- */
|
||||
--font-mono: ui-monospace, "SF Mono", monospace;
|
||||
--font-size-xs: 0.75rem;
|
||||
--font-size-sm: 0.875rem;
|
||||
--font-size-base: 1rem;
|
||||
--font-size-lg: 1.125rem;
|
||||
--font-size-xl: 1.25rem;
|
||||
--font-size-2xl: 1.5rem;
|
||||
--font-size-3xl: 2rem;
|
||||
--font-size-4xl: 2.5rem;
|
||||
--font-size-5xl: 3.5rem;
|
||||
--font-size-6xl: 4.5rem;
|
||||
|
||||
/* --- Spacing --- */
|
||||
--spacing-xs: 0.25rem;
|
||||
--spacing-sm: 0.5rem;
|
||||
--spacing-md: 1rem;
|
||||
--spacing-lg: 1.5rem;
|
||||
--spacing-xl: 2rem;
|
||||
--spacing-2xl: 3rem;
|
||||
--spacing-3xl: 4rem;
|
||||
--spacing-4xl: 6rem;
|
||||
--spacing-5xl: 8rem;
|
||||
|
||||
/* --- Layout --- */
|
||||
--max-width: 720px;
|
||||
--wide-width: 1200px;
|
||||
--radius-sm: 6px;
|
||||
--radius: 10px;
|
||||
--radius-lg: 16px;
|
||||
--radius-full: 9999px;
|
||||
|
||||
/* --- Transitions --- */
|
||||
--transition-fast: 150ms ease;
|
||||
--transition-base: 200ms ease;
|
||||
--transition-slow: 300ms ease;
|
||||
|
||||
/* --- Shadows --- */
|
||||
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
||||
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
|
||||
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-bg: #0f172a;
|
||||
--color-text: #f8fafc;
|
||||
--color-muted: #94a3b8;
|
||||
--color-border: #1e293b;
|
||||
--color-surface: #1e293b;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user