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:
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
data.db
|
||||||
|
uploads/
|
||||||
|
.env
|
||||||
|
*.log
|
||||||
28
AGENTS.md
Normal file
28
AGENTS.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
This is an EmDash site -- a CMS built on Astro with a full admin UI.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx emdash dev # Start dev server (runs migrations, seeds, generates types)
|
||||||
|
npx emdash types # Regenerate TypeScript types from schema
|
||||||
|
npx emdash seed seed/seed.json --validate # Validate seed file
|
||||||
|
```
|
||||||
|
|
||||||
|
The admin UI is at `http://localhost:4321/_emdash/admin`.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
| File | Purpose |
|
||||||
|
| ------------------------ | ---------------------------------------------------------------------------------- |
|
||||||
|
| `astro.config.mjs` | Astro config with `emdash()` integration, database, and storage |
|
||||||
|
| `src/live.config.ts` | EmDash loader registration (boilerplate -- don't modify) |
|
||||||
|
| `seed/seed.json` | Schema definition + demo content (collections, fields, taxonomies, menus, widgets) |
|
||||||
|
| `emdash-env.d.ts` | Generated types for collections (auto-regenerated on dev server start) |
|
||||||
|
| `src/layouts/Base.astro` | Base layout with EmDash wiring (menus, search, page contributions) |
|
||||||
|
| `src/pages/` | Astro pages -- all server-rendered |
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
|
||||||
|
- All content pages must be server-rendered (`output: "server"`). No `getStaticPaths()` for CMS content.
|
||||||
|
- `entry.id` is the slug (for URLs). `entry.data.id` is the database ULID (for API calls like `getEntryTerms`).
|
||||||
|
- Always call `Astro.cache.set(cacheHint)` on pages that query content.
|
||||||
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
FROM node:22-alpine AS deps
|
||||||
|
|
||||||
|
RUN apk add --no-cache python3 make g++ sqlite
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json pnpm-lock.yaml* ./
|
||||||
|
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
||||||
|
RUN pnpm install
|
||||||
|
|
||||||
|
FROM deps AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN pnpm build && pnpm exec emdash init && mkdir -p uploads
|
||||||
|
|
||||||
|
FROM deps AS runner
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
|
||||||
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
COPY --from=builder /app/dist ./dist
|
||||||
|
COPY --from=builder /app/uploads ./uploads
|
||||||
|
|
||||||
|
EXPOSE 4321
|
||||||
|
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
29
README.md
Normal file
29
README.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Marketing Template
|
||||||
|
|
||||||
|
A conversion-focused landing page with pricing and contact form. Built on Astro + EmDash CMS.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Hero with CTAs
|
||||||
|
- Feature grid
|
||||||
|
- Pricing cards
|
||||||
|
- FAQ and contact form
|
||||||
|
- EmDash CMS for content management
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run dev # Start dev server
|
||||||
|
npm run build # Build for production
|
||||||
|
npm run bootstrap # Initialize database and seed content
|
||||||
|
```
|
||||||
|
|
||||||
|
## Pages
|
||||||
|
|
||||||
|
- `/` - Homepage with hero, features, testimonials, FAQ
|
||||||
|
- `/pricing` - Pricing page with plans comparison
|
||||||
|
- `/contact` - Contact form
|
||||||
|
|
||||||
|
## Admin
|
||||||
|
|
||||||
|
Access the CMS at `/_emdash/admin` after running bootstrap.
|
||||||
57
astro.config.mjs
Normal file
57
astro.config.mjs
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import node from "@astrojs/node";
|
||||||
|
import react from "@astrojs/react";
|
||||||
|
import icon from "astro-iconset";
|
||||||
|
import { defineConfig, fontProviders } from "astro/config";
|
||||||
|
import emdash, { local } from "emdash/astro";
|
||||||
|
import { sqlite } from "emdash/db";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
output: "server",
|
||||||
|
adapter: node({ mode: "standalone" }),
|
||||||
|
image: {
|
||||||
|
layout: "constrained",
|
||||||
|
responsiveStyles: true,
|
||||||
|
},
|
||||||
|
integrations: [
|
||||||
|
react(),
|
||||||
|
icon({
|
||||||
|
include: {
|
||||||
|
ph: [
|
||||||
|
"chart-bar",
|
||||||
|
"check-circle",
|
||||||
|
"clock",
|
||||||
|
"cloud",
|
||||||
|
"code",
|
||||||
|
"currency-dollar",
|
||||||
|
"envelope",
|
||||||
|
"globe",
|
||||||
|
"heart",
|
||||||
|
"lifebuoy",
|
||||||
|
"lightning",
|
||||||
|
"lock",
|
||||||
|
"shield-check",
|
||||||
|
"sparkle",
|
||||||
|
"star",
|
||||||
|
"users-three",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
emdash({
|
||||||
|
database: sqlite({ url: "file:./data.db" }),
|
||||||
|
storage: local({
|
||||||
|
directory: "./uploads",
|
||||||
|
baseUrl: "/_emdash/api/media/file",
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
fonts: [
|
||||||
|
{
|
||||||
|
provider: fontProviders.google(),
|
||||||
|
name: "Inter",
|
||||||
|
cssVariable: "--font-sans",
|
||||||
|
weights: [400, 500, 600, 700, 800],
|
||||||
|
fallbacks: ["sans-serif"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
devToolbar: { enabled: false },
|
||||||
|
});
|
||||||
24
emdash-env.d.ts
vendored
Normal file
24
emdash-env.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// Generated by EmDash on dev server start
|
||||||
|
// Do not edit manually
|
||||||
|
|
||||||
|
/// <reference types="emdash/locals" />
|
||||||
|
|
||||||
|
import type { ContentBylineCredit, PortableTextBlock } from "emdash";
|
||||||
|
|
||||||
|
export interface Page {
|
||||||
|
id: string;
|
||||||
|
slug: string | null;
|
||||||
|
status: string;
|
||||||
|
title: string;
|
||||||
|
content?: PortableTextBlock[];
|
||||||
|
createdAt: Date;
|
||||||
|
updatedAt: Date;
|
||||||
|
publishedAt: Date | null;
|
||||||
|
bylines?: ContentBylineCredit[];
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module "emdash" {
|
||||||
|
interface EmDashCollections {
|
||||||
|
pages: Page;
|
||||||
|
}
|
||||||
|
}
|
||||||
10
entrypoint.sh
Normal file
10
entrypoint.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Only seed on first launch (when data.db doesn't exist or is empty)
|
||||||
|
if [ ! -f data.db ] || ! sqlite3 data.db "SELECT COUNT(*) FROM content" 2>/dev/null | grep -q "^[1-9]"; then
|
||||||
|
echo "Database missing or empty, running emdash init & seed..."
|
||||||
|
pnpm exec emdash init
|
||||||
|
pnpm exec emdash seed
|
||||||
|
else
|
||||||
|
echo "Database exists with content, starting normally..."
|
||||||
|
fi
|
||||||
|
exec node ./dist/server/entry.mjs
|
||||||
38
package.json
Normal file
38
package.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"name": "@emdash-cms/template-marketing",
|
||||||
|
"version": "0.0.3",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"emdash": {
|
||||||
|
"seed": "seed/seed.json"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"dev": "astro dev",
|
||||||
|
"build": "astro build",
|
||||||
|
"preview": "astro preview",
|
||||||
|
"start": "node ./dist/server/entry.mjs",
|
||||||
|
"bootstrap": "emdash init && emdash seed",
|
||||||
|
"seed": "emdash seed",
|
||||||
|
"typecheck": "astro check"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@astrojs/node": "^10.0.0",
|
||||||
|
"@astrojs/react": "^5.0.0",
|
||||||
|
"@iconify-json/ph": "^1.2.2",
|
||||||
|
"astro": "^6.0.1",
|
||||||
|
"astro-iconset": "^0.0.4",
|
||||||
|
"better-sqlite3": "^12.8.0",
|
||||||
|
"emdash": "^0.8.0",
|
||||||
|
"react": "19.2.4",
|
||||||
|
"react-dom": "19.2.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@astrojs/check": "^0.9.7"
|
||||||
|
},
|
||||||
|
"pnpm": {
|
||||||
|
"onlyBuiltDependencies": [
|
||||||
|
"better-sqlite3",
|
||||||
|
"esbuild"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
283
seed/seed.json
Normal file
283
seed/seed.json
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://emdashcms.com/seed.schema.json",
|
||||||
|
"version": "1",
|
||||||
|
"meta": {
|
||||||
|
"name": "Marketing Starter",
|
||||||
|
"description": "A conversion-focused marketing site with landing pages",
|
||||||
|
"author": "EmDash"
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"title": "Acme",
|
||||||
|
"tagline": "Build products people actually want"
|
||||||
|
},
|
||||||
|
"collections": [
|
||||||
|
{
|
||||||
|
"slug": "pages",
|
||||||
|
"label": "Pages",
|
||||||
|
"labelSingular": "Page",
|
||||||
|
"supports": ["drafts", "revisions", "seo"],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"slug": "title",
|
||||||
|
"label": "Title",
|
||||||
|
"type": "string",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"slug": "content",
|
||||||
|
"label": "Content",
|
||||||
|
"type": "portableText"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"menus": [
|
||||||
|
{
|
||||||
|
"name": "primary",
|
||||||
|
"label": "Primary Navigation",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"label": "Features",
|
||||||
|
"url": "/#features"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"label": "Pricing",
|
||||||
|
"url": "/pricing"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"label": "Contact",
|
||||||
|
"url": "/contact"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"content": {
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"id": "home",
|
||||||
|
"slug": "home",
|
||||||
|
"status": "published",
|
||||||
|
"data": {
|
||||||
|
"title": "Home",
|
||||||
|
"content": [
|
||||||
|
{
|
||||||
|
"_type": "marketing.hero",
|
||||||
|
"_key": "hero",
|
||||||
|
"headline": "Build products people actually want",
|
||||||
|
"subheadline": "The all-in-one platform for modern teams. Ship faster, collaborate better, and focus on what matters.",
|
||||||
|
"primaryCta": {
|
||||||
|
"label": "Start Free Trial",
|
||||||
|
"url": "/signup"
|
||||||
|
},
|
||||||
|
"secondaryCta": {
|
||||||
|
"label": "Watch Demo",
|
||||||
|
"url": "/demo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_type": "marketing.features",
|
||||||
|
"_key": "features",
|
||||||
|
"headline": "Everything you need to ship",
|
||||||
|
"subheadline": "Powerful features that help your team move faster without sacrificing quality.",
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"icon": "zap",
|
||||||
|
"title": "Lightning Fast",
|
||||||
|
"description": "Built for speed from the ground up. Your team will notice the difference from day one."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "shield",
|
||||||
|
"title": "Enterprise Security",
|
||||||
|
"description": "SOC 2 compliant with end-to-end encryption. Your data stays yours."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "users",
|
||||||
|
"title": "Team Collaboration",
|
||||||
|
"description": "Real-time collaboration features that make working together feel effortless."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "chart",
|
||||||
|
"title": "Powerful Analytics",
|
||||||
|
"description": "Understand how your team works with detailed insights and reporting."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "code",
|
||||||
|
"title": "Developer Friendly",
|
||||||
|
"description": "A robust API and CLI tools that integrate with your existing workflow."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "globe",
|
||||||
|
"title": "Global Scale",
|
||||||
|
"description": "Deployed to edge locations worldwide. Fast for everyone, everywhere."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_type": "marketing.testimonials",
|
||||||
|
"_key": "testimonials",
|
||||||
|
"headline": "Trusted by teams everywhere",
|
||||||
|
"testimonials": [
|
||||||
|
{
|
||||||
|
"quote": "We cut our deployment time by 80%. The team actually enjoys shipping now.",
|
||||||
|
"author": "Sarah Chen",
|
||||||
|
"role": "CTO",
|
||||||
|
"company": "Streamline"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"quote": "The best developer experience I've used. Everything just works the way you'd expect.",
|
||||||
|
"author": "Marcus Johnson",
|
||||||
|
"role": "Lead Engineer",
|
||||||
|
"company": "Volt Labs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"quote": "Finally, a tool that doesn't get in the way. Our team is more productive than ever.",
|
||||||
|
"author": "Elena Rodriguez",
|
||||||
|
"role": "VP Engineering",
|
||||||
|
"company": "Nexus"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_type": "marketing.faq",
|
||||||
|
"_key": "faq",
|
||||||
|
"headline": "Frequently asked questions",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"question": "How long does setup take?",
|
||||||
|
"answer": "Most teams are up and running in under 15 minutes. Our onboarding wizard guides you through connecting your existing tools and inviting your team."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "Can I migrate from my current tool?",
|
||||||
|
"answer": "Yes. We have built-in importers for all major platforms, and our support team can help with custom migrations for larger teams."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "What kind of support do you offer?",
|
||||||
|
"answer": "All plans include email support with a 24-hour response time. Pro and Enterprise plans include priority support with dedicated account managers."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "Is there a free trial?",
|
||||||
|
"answer": "Yes, all plans come with a 14-day free trial. No credit card required. You can upgrade, downgrade, or cancel at any time."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "pricing",
|
||||||
|
"slug": "pricing",
|
||||||
|
"status": "published",
|
||||||
|
"data": {
|
||||||
|
"title": "Pricing",
|
||||||
|
"content": [
|
||||||
|
{
|
||||||
|
"_type": "marketing.hero",
|
||||||
|
"_key": "pricing-hero",
|
||||||
|
"headline": "Simple, transparent pricing",
|
||||||
|
"subheadline": "No hidden fees. No surprises. Start free and scale as you grow.",
|
||||||
|
"centered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_type": "marketing.pricing",
|
||||||
|
"_key": "pricing-plans",
|
||||||
|
"plans": [
|
||||||
|
{
|
||||||
|
"name": "Starter",
|
||||||
|
"price": "$0",
|
||||||
|
"period": "/month",
|
||||||
|
"description": "Perfect for trying things out",
|
||||||
|
"features": [
|
||||||
|
"Up to 3 team members",
|
||||||
|
"5 projects",
|
||||||
|
"Basic analytics",
|
||||||
|
"Community support",
|
||||||
|
"1GB storage"
|
||||||
|
],
|
||||||
|
"cta": {
|
||||||
|
"label": "Get Started",
|
||||||
|
"url": "/signup"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Pro",
|
||||||
|
"price": "$29",
|
||||||
|
"period": "/user/month",
|
||||||
|
"description": "For growing teams",
|
||||||
|
"features": [
|
||||||
|
"Unlimited team members",
|
||||||
|
"Unlimited projects",
|
||||||
|
"Advanced analytics",
|
||||||
|
"Priority support",
|
||||||
|
"100GB storage",
|
||||||
|
"Custom integrations",
|
||||||
|
"API access"
|
||||||
|
],
|
||||||
|
"cta": {
|
||||||
|
"label": "Start Free Trial",
|
||||||
|
"url": "/signup?plan=pro"
|
||||||
|
},
|
||||||
|
"highlighted": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Enterprise",
|
||||||
|
"price": "Custom",
|
||||||
|
"description": "For large organizations",
|
||||||
|
"features": [
|
||||||
|
"Everything in Pro",
|
||||||
|
"Dedicated support",
|
||||||
|
"Custom contracts",
|
||||||
|
"SLA guarantee",
|
||||||
|
"Unlimited storage"
|
||||||
|
],
|
||||||
|
"cta": {
|
||||||
|
"label": "Contact Sales",
|
||||||
|
"url": "/contact"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_type": "marketing.faq",
|
||||||
|
"_key": "pricing-faq",
|
||||||
|
"headline": "Pricing FAQ",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"question": "Can I change plans later?",
|
||||||
|
"answer": "Yes, you can upgrade or downgrade at any time. Changes take effect immediately and we'll prorate your billing."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "What payment methods do you accept?",
|
||||||
|
"answer": "We accept all major credit cards, and Enterprise customers can pay via invoice with NET 30 terms."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "Is there a discount for annual billing?",
|
||||||
|
"answer": "Yes, annual plans receive a 20% discount compared to monthly billing."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "contact",
|
||||||
|
"slug": "contact",
|
||||||
|
"status": "published",
|
||||||
|
"data": {
|
||||||
|
"title": "Contact",
|
||||||
|
"content": [
|
||||||
|
{
|
||||||
|
"_type": "marketing.hero",
|
||||||
|
"_key": "contact-hero",
|
||||||
|
"headline": "Get in touch",
|
||||||
|
"subheadline": "Have questions? Want a demo? We'd love to hear from you.",
|
||||||
|
"centered": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
9
tsconfig.json
Normal file
9
tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"extends": "astro/tsconfigs/strict",
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["src/*"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user