@brimsites/create-brim 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +110 -0
- package/README.md +7 -2
- package/index.js +190 -0
- package/package.json +25 -3
- package/template/AGENTS.md +116 -0
- package/template/README.md +69 -0
- package/template/_gitignore +9 -0
- package/template/astro.config.mjs +12 -0
- package/template/package.json +19 -0
- package/template/public/favicon.svg +1 -0
- package/template/public/images/hero.svg +1 -0
- package/template/src/components/CallToAction.astro +33 -0
- package/template/src/components/Features.astro +62 -0
- package/template/src/components/Hero.astro +53 -0
- package/template/src/components/SiteFooter.astro +88 -0
- package/template/src/components/SiteHeader.astro +116 -0
- package/template/src/components/navigation.ts +12 -0
- package/template/src/content-types/ArticlePage.astro +80 -0
- package/template/src/content-types/article.ts +31 -0
- package/template/src/content-types/index.ts +4 -0
- package/template/src/layouts/Site.astro +30 -0
- package/template/src/page-templates/LandingPage.astro +40 -0
- package/template/src/page-templates/index.ts +16 -0
- package/template/src/pages/about.astro +55 -0
- package/template/src/pages/blog/index.astro +20 -0
- package/template/src/pages/components.astro +234 -0
- package/template/src/pages/contact.astro +35 -0
- package/template/src/pages/index.astro +49 -0
- package/template/src/site-settings.ts +14 -0
- package/template/src/styles/global.css +94 -0
- package/template/tsconfig.json +1 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Icon, Text } from "@brimsites/brimjs/components";
|
|
3
|
+
|
|
4
|
+
/** A row of short points, each with an icon the owner can change. */
|
|
5
|
+
interface Props {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
features: { icon: string; title: string; text: string }[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { id, title, features } = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<section class="section section--tinted">
|
|
15
|
+
<div class="container">
|
|
16
|
+
<Text nodeId={`${id}-title`} as="h2">
|
|
17
|
+
{title}
|
|
18
|
+
</Text>
|
|
19
|
+
<div class="features">
|
|
20
|
+
{features.map((feature, index) => (
|
|
21
|
+
<article class="feature">
|
|
22
|
+
<Icon nodeId={`${id}-${index + 1}-icon`} icon={feature.icon} class="feature__icon" />
|
|
23
|
+
<Text nodeId={`${id}-${index + 1}-title`} as="h3">
|
|
24
|
+
{feature.title}
|
|
25
|
+
</Text>
|
|
26
|
+
<Text nodeId={`${id}-${index + 1}-text`}>{feature.text}</Text>
|
|
27
|
+
</article>
|
|
28
|
+
))}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
32
|
+
|
|
33
|
+
<style>
|
|
34
|
+
.features {
|
|
35
|
+
display: grid;
|
|
36
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
|
|
37
|
+
gap: 1.5rem;
|
|
38
|
+
margin-top: 2rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.feature {
|
|
42
|
+
padding: 1.75rem;
|
|
43
|
+
border-radius: var(--site-radius);
|
|
44
|
+
background: var(--brim-theme-background);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.feature :global(.feature__icon) {
|
|
48
|
+
padding: 0.6rem;
|
|
49
|
+
border-radius: var(--site-radius);
|
|
50
|
+
background: var(--brim-theme-light1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.feature h3 {
|
|
54
|
+
margin-top: 1rem;
|
|
55
|
+
font-size: 1.25rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.feature p {
|
|
59
|
+
margin: 0;
|
|
60
|
+
color: var(--brim-theme-dark1);
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Button, Image, Text } from "@brimsites/brimjs/components";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A section built from primitives. `id` prefixes every node id inside, so the same section
|
|
6
|
+
* can appear on several pages and each copy keeps its own edits.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
id: string;
|
|
10
|
+
eyebrow: string;
|
|
11
|
+
title: string;
|
|
12
|
+
lead: string;
|
|
13
|
+
cta: { text: string; url: string };
|
|
14
|
+
image: { src: string; alt: string };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const { id, eyebrow, title, lead, cta, image } = Astro.props;
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<section class="section hero">
|
|
21
|
+
<div class="container hero__grid">
|
|
22
|
+
<div class="stack">
|
|
23
|
+
<Text nodeId={`${id}-eyebrow`} class="eyebrow">
|
|
24
|
+
{eyebrow}
|
|
25
|
+
</Text>
|
|
26
|
+
<Text nodeId={`${id}-title`} as="h1">
|
|
27
|
+
{title}
|
|
28
|
+
</Text>
|
|
29
|
+
<Text nodeId={`${id}-lead`} class="lead">
|
|
30
|
+
{lead}
|
|
31
|
+
</Text>
|
|
32
|
+
<Button
|
|
33
|
+
nodeId={`${id}-cta`}
|
|
34
|
+
text={cta.text}
|
|
35
|
+
url={cta.url}
|
|
36
|
+
variant="accent"
|
|
37
|
+
size="lg"
|
|
38
|
+
showIcon
|
|
39
|
+
icon="arrow-right"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
<Image nodeId={`${id}-image`} src={image.src} alt={image.alt} width="640" height="480" />
|
|
43
|
+
</div>
|
|
44
|
+
</section>
|
|
45
|
+
|
|
46
|
+
<style>
|
|
47
|
+
.hero__grid {
|
|
48
|
+
display: grid;
|
|
49
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: clamp(2rem, 5vw, 4rem);
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { FooterValue } from "@brimsites/brimjs";
|
|
3
|
+
import { Footer, Setting, SocialMedia } from "@brimsites/brimjs/components";
|
|
4
|
+
import { getSiteSettings } from "@brimsites/brimjs/content";
|
|
5
|
+
import { siteSettings } from "../site-settings.ts";
|
|
6
|
+
import { SITE_NAME, pages } from "./navigation.ts";
|
|
7
|
+
|
|
8
|
+
// From Site Settings (src/site-settings.ts), typed by its fields: the owner changes them once, for every page.
|
|
9
|
+
const { email, phone } = await getSiteSettings(siteSettings);
|
|
10
|
+
|
|
11
|
+
const groups = [
|
|
12
|
+
{ title: "Pages", items: pages.slice(0, 3) },
|
|
13
|
+
{ title: "More", items: pages.slice(3) },
|
|
14
|
+
];
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<Footer nodeId="footer" logoText={SITE_NAME} groups={groups} class="site-footer">
|
|
18
|
+
{({ logoText, groups }: FooterValue) => (
|
|
19
|
+
<div class="container site-footer__inner">
|
|
20
|
+
<div class="stack">
|
|
21
|
+
<strong class="site-footer__brand">{logoText}</strong>
|
|
22
|
+
{email && (
|
|
23
|
+
<a href={`mailto:${email}`}>
|
|
24
|
+
<Setting name="email" />
|
|
25
|
+
</a>
|
|
26
|
+
)}
|
|
27
|
+
{phone && (
|
|
28
|
+
<a href={`tel:${phone.replace(/[^+\d]/g, "")}`}>
|
|
29
|
+
<Setting name="phone" />
|
|
30
|
+
</a>
|
|
31
|
+
)}
|
|
32
|
+
<SocialMedia
|
|
33
|
+
nodeId="footer-social"
|
|
34
|
+
mode="profile"
|
|
35
|
+
profiles={{ instagram: "https://instagram.com", linkedin: "https://linkedin.com" }}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
{groups.map((group) => (
|
|
39
|
+
<section>
|
|
40
|
+
<h2 class="site-footer__title">{group.title}</h2>
|
|
41
|
+
<ul class="site-footer__links">
|
|
42
|
+
{group.items.map((item) => (
|
|
43
|
+
<li>
|
|
44
|
+
<a href={item.href}>{item.label}</a>
|
|
45
|
+
</li>
|
|
46
|
+
))}
|
|
47
|
+
</ul>
|
|
48
|
+
</section>
|
|
49
|
+
))}
|
|
50
|
+
</div>
|
|
51
|
+
)}
|
|
52
|
+
</Footer>
|
|
53
|
+
|
|
54
|
+
<style>
|
|
55
|
+
.site-footer {
|
|
56
|
+
background: var(--brim-theme-dark2);
|
|
57
|
+
color: var(--brim-theme-light2);
|
|
58
|
+
padding-block: 3.5rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.site-footer__inner {
|
|
62
|
+
display: grid;
|
|
63
|
+
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
|
|
64
|
+
gap: 2rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.site-footer__brand {
|
|
68
|
+
font-size: 1.125rem;
|
|
69
|
+
color: var(--brim-theme-background);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.site-footer__title {
|
|
73
|
+
font-size: 0.8125rem;
|
|
74
|
+
letter-spacing: 0.08em;
|
|
75
|
+
text-transform: uppercase;
|
|
76
|
+
color: var(--brim-theme-background);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.site-footer__links {
|
|
80
|
+
margin: 0;
|
|
81
|
+
padding: 0;
|
|
82
|
+
list-style: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.site-footer__links a {
|
|
86
|
+
text-decoration: none;
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { NavbarValue } from "@brimsites/brimjs";
|
|
3
|
+
import { MobileMenu, Navbar } from "@brimsites/brimjs/components";
|
|
4
|
+
import { SITE_NAME, pages } from "./navigation.ts";
|
|
5
|
+
|
|
6
|
+
// The Navbar primitive holds only the logo, the name and the links; the markup below is the site's own. On phones the
|
|
7
|
+
// links are in MobileMenu, which opens over the page whatever the header's CSS does.
|
|
8
|
+
const current = (href: string) => (href === Astro.url.pathname ? "page" : undefined);
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Navbar nodeId="navbar" logoText={SITE_NAME} items={pages} class="site-header">
|
|
12
|
+
{({ logo, logoText, items }: NavbarValue) => (
|
|
13
|
+
<div class="container site-header__inner">
|
|
14
|
+
<a class="site-header__brand" href="/">
|
|
15
|
+
{logo && <img src={logo.src} alt={logo.alt} height="32" />}
|
|
16
|
+
{logoText}
|
|
17
|
+
</a>
|
|
18
|
+
<nav class="site-header__nav" aria-label="Main">
|
|
19
|
+
<ul class="site-header__links">
|
|
20
|
+
{items.map((item) => (
|
|
21
|
+
<li>
|
|
22
|
+
<a href={item.href} aria-current={current(item.href)}>
|
|
23
|
+
{item.label}
|
|
24
|
+
</a>
|
|
25
|
+
</li>
|
|
26
|
+
))}
|
|
27
|
+
</ul>
|
|
28
|
+
</nav>
|
|
29
|
+
<MobileMenu label="Menu" closeLabel="Close menu" class="site-header__menu">
|
|
30
|
+
<ul class="site-header__menu-links">
|
|
31
|
+
{items.map((item) => (
|
|
32
|
+
<li>
|
|
33
|
+
<a href={item.href} aria-current={current(item.href)}>
|
|
34
|
+
{item.label}
|
|
35
|
+
</a>
|
|
36
|
+
</li>
|
|
37
|
+
))}
|
|
38
|
+
</ul>
|
|
39
|
+
</MobileMenu>
|
|
40
|
+
</div>
|
|
41
|
+
)}
|
|
42
|
+
</Navbar>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
.site-header {
|
|
46
|
+
border-bottom: 1px solid var(--brim-theme-light2);
|
|
47
|
+
background: var(--brim-theme-background);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.site-header__inner {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
gap: 1rem;
|
|
55
|
+
min-height: 4.5rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.site-header__brand {
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 0.625rem;
|
|
62
|
+
font-weight: 700;
|
|
63
|
+
font-size: 1.125rem;
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.site-header__links {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-wrap: wrap;
|
|
70
|
+
gap: 0.25rem 1.5rem;
|
|
71
|
+
margin: 0;
|
|
72
|
+
padding: 0;
|
|
73
|
+
list-style: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.site-header__links a {
|
|
77
|
+
color: var(--brim-theme-dark1);
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.site-header__links a:hover,
|
|
82
|
+
.site-header__links a[aria-current="page"] {
|
|
83
|
+
color: var(--brim-theme-primary);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.site-header__menu {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.site-header__menu-links {
|
|
91
|
+
margin: 0;
|
|
92
|
+
padding: 0;
|
|
93
|
+
list-style: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.site-header__menu-links a {
|
|
97
|
+
display: block;
|
|
98
|
+
padding-block: 0.75rem;
|
|
99
|
+
font-size: 1.25rem;
|
|
100
|
+
text-decoration: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.site-header__menu-links a[aria-current="page"] {
|
|
104
|
+
font-weight: 700;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media (max-width: 48rem) {
|
|
108
|
+
.site-header__nav {
|
|
109
|
+
display: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.site-header__menu {
|
|
113
|
+
display: block;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { NavItem } from "@brimsites/brimjs";
|
|
2
|
+
|
|
3
|
+
export const SITE_NAME = "{{siteName}}";
|
|
4
|
+
|
|
5
|
+
/** The starting navigation. Once the owner reorders or renames links in the editor, their version is used. */
|
|
6
|
+
export const pages: NavItem[] = [
|
|
7
|
+
{ label: "Home", href: "/" },
|
|
8
|
+
{ label: "About", href: "/about" },
|
|
9
|
+
{ label: "Blog", href: "/blog" },
|
|
10
|
+
{ label: "Components", href: "/components" },
|
|
11
|
+
{ label: "Contact", href: "/contact" },
|
|
12
|
+
];
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ItemPageProps } from "@brimsites/brimjs";
|
|
3
|
+
import { Blocks, Image, Link, Text } from "@brimsites/brimjs/components";
|
|
4
|
+
import Site from "../layouts/Site.astro";
|
|
5
|
+
import type { article as Article } from "./article.ts";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The template of every article: Brim draws it at /blog/<address> with the article as `item`. The title,
|
|
9
|
+
* description, author, image and the blocks of its body (text, images, videos…) are the article's, edited on its page; the rest
|
|
10
|
+
* is the template, changed once for all articles.
|
|
11
|
+
*/
|
|
12
|
+
// Typed from the fields article.ts declares: a misspelt field fails the build instead of showing nothing.
|
|
13
|
+
const { item: article } = Astro.props as ItemPageProps<typeof Article>;
|
|
14
|
+
const { description, image, published, author } = article.data;
|
|
15
|
+
const date = published ? new Date(published).toLocaleDateString("en", { dateStyle: "long" }) : undefined;
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
{/* The page's title, description, image and author for search engines are the article's own. */}
|
|
19
|
+
<Site>
|
|
20
|
+
<article class="section">
|
|
21
|
+
<div class="container article">
|
|
22
|
+
<Link nodeId="article-back" href="/blog" class="article__back">
|
|
23
|
+
← All articles
|
|
24
|
+
</Link>
|
|
25
|
+
{(date || author) && (
|
|
26
|
+
<p class="eyebrow article__meta">
|
|
27
|
+
{date && <time datetime={published}>{date}</time>}
|
|
28
|
+
{author && (
|
|
29
|
+
<Text nodeId="article-author" item={article} field="author" as="span">
|
|
30
|
+
{author}
|
|
31
|
+
</Text>
|
|
32
|
+
)}
|
|
33
|
+
</p>
|
|
34
|
+
)}
|
|
35
|
+
<Text nodeId="article-title" item={article} field="title" as="h1">
|
|
36
|
+
{article.title}
|
|
37
|
+
</Text>
|
|
38
|
+
<Text nodeId="article-description" item={article} field="description" class="lead">
|
|
39
|
+
{description}
|
|
40
|
+
</Text>
|
|
41
|
+
{image && (
|
|
42
|
+
<div class="article__cover">
|
|
43
|
+
<Image nodeId="article-image" item={article} field="image" src={image.src} alt={image.alt} />
|
|
44
|
+
</div>
|
|
45
|
+
)}
|
|
46
|
+
<Blocks nodeId="article-body" item={article} field="body" class="article__body" />
|
|
47
|
+
</div>
|
|
48
|
+
</article>
|
|
49
|
+
</Site>
|
|
50
|
+
|
|
51
|
+
<style>
|
|
52
|
+
.article {
|
|
53
|
+
max-width: 46rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.article :global(.article__back) {
|
|
57
|
+
display: inline-block;
|
|
58
|
+
margin-bottom: 2rem;
|
|
59
|
+
color: var(--brim-theme-dark1);
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.article :global(.article__meta > * + *::before) {
|
|
64
|
+
content: "·";
|
|
65
|
+
margin-inline: 0.5em;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.article__cover {
|
|
69
|
+
margin-block: 2rem;
|
|
70
|
+
--brim-image-radius: var(--site-radius);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.article :global(.article__body) {
|
|
74
|
+
font-size: 1.0625rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.article :global(.article__body > * + *) {
|
|
78
|
+
margin-top: 1.5rem;
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineContentType } from "@brimsites/brimjs";
|
|
2
|
+
import ArticlePage from "./ArticlePage.astro";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Articles are written in the editor; each one gets a page at /blog/<address>, drawn by ArticlePage. Brim adds their
|
|
6
|
+
* description, image, published date, author and tags, and gives them to search engines; declare one here only to
|
|
7
|
+
* change its label or make it required, as the description is.
|
|
8
|
+
*/
|
|
9
|
+
export const article = defineContentType({
|
|
10
|
+
key: "article",
|
|
11
|
+
label: "Articles",
|
|
12
|
+
singular: "Article",
|
|
13
|
+
slug: "blog",
|
|
14
|
+
component: ArticlePage,
|
|
15
|
+
article: true,
|
|
16
|
+
fields: [
|
|
17
|
+
{
|
|
18
|
+
name: "description",
|
|
19
|
+
label: "Description",
|
|
20
|
+
type: "textarea",
|
|
21
|
+
required: true,
|
|
22
|
+
help: "Shown on cards and in search results.",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "body",
|
|
26
|
+
label: "Body",
|
|
27
|
+
type: "blocks",
|
|
28
|
+
help: "Text, images, videos and more, added on the article's page.",
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
import "../styles/global.css";
|
|
3
|
+
import { Seo } from "@brimsites/brimjs/components";
|
|
4
|
+
import SiteFooter from "../components/SiteFooter.astro";
|
|
5
|
+
import SiteHeader from "../components/SiteHeader.astro";
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
/** Left out on an item's page (an article): its own title and description go in the head. */
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { title, description } = Astro.props;
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<html lang={Astro.currentLocale ?? "{{lang}}"}>
|
|
17
|
+
<head>
|
|
18
|
+
<meta charset="utf-8" />
|
|
19
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
20
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
21
|
+
<Seo title={title} description={description} />
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
<SiteHeader />
|
|
25
|
+
<main>
|
|
26
|
+
<slot />
|
|
27
|
+
</main>
|
|
28
|
+
<SiteFooter />
|
|
29
|
+
</body>
|
|
30
|
+
</html>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { TemplatePageProps } from "@brimsites/brimjs";
|
|
3
|
+
import CallToAction from "../components/CallToAction.astro";
|
|
4
|
+
import Features from "../components/Features.astro";
|
|
5
|
+
import Hero from "../components/Hero.astro";
|
|
6
|
+
import Site from "../layouts/Site.astro";
|
|
7
|
+
|
|
8
|
+
/** One landing page: a hero, three points and a call to action. Each page made from it keeps its own edits. */
|
|
9
|
+
interface Props {
|
|
10
|
+
page: TemplatePageProps;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { page } = Astro.props;
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<Site title={page.title}>
|
|
17
|
+
<Hero
|
|
18
|
+
id="landing-hero"
|
|
19
|
+
eyebrow="New"
|
|
20
|
+
title={page.title}
|
|
21
|
+
lead="One sentence on what this page offers and who it is for. Click any text to rewrite it."
|
|
22
|
+
cta={{ text: "Get in touch", url: "/contact" }}
|
|
23
|
+
image={{ src: "/images/hero.svg", alt: "Colorful abstract shapes" }}
|
|
24
|
+
/>
|
|
25
|
+
<Features
|
|
26
|
+
id="landing-features"
|
|
27
|
+
title="Why it works"
|
|
28
|
+
features={[
|
|
29
|
+
{ icon: "check", title: "Clear", text: "Say what you do in one line." },
|
|
30
|
+
{ icon: "star", title: "Proven", text: "Show a result people care about." },
|
|
31
|
+
{ icon: "heart", title: "Personal", text: "Tell them who they will work with." },
|
|
32
|
+
]}
|
|
33
|
+
/>
|
|
34
|
+
<CallToAction
|
|
35
|
+
id="landing-cta"
|
|
36
|
+
title="Ready to start?"
|
|
37
|
+
text="Tell us what you need and we will answer within a day."
|
|
38
|
+
cta={{ text: "Contact us", url: "/contact" }}
|
|
39
|
+
/>
|
|
40
|
+
</Site>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { definePageTemplate } from "@brimsites/brimjs";
|
|
2
|
+
import LandingPage from "./LandingPage.astro";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Templates of pages the owner adds in the editor (Site map → New page) or an AI agent adds through the
|
|
6
|
+
* site's MCP. A page made from one is content: its address, title and texts live in the database.
|
|
7
|
+
*/
|
|
8
|
+
export const landing = definePageTemplate({
|
|
9
|
+
key: "landing",
|
|
10
|
+
label: "Landing page",
|
|
11
|
+
description: "A hero with the page's title, three short points and a call to action.",
|
|
12
|
+
component: LandingPage,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
/** Every page template of the site. Add a file next to this one and list it here; Brim reads this list. */
|
|
16
|
+
export const pageTemplates = [landing];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Accordion, ImageGallery, RichText, Text } from "@brimsites/brimjs/components";
|
|
3
|
+
import Site from "../layouts/Site.astro";
|
|
4
|
+
|
|
5
|
+
const photos = [
|
|
6
|
+
{ url: "/images/hero.svg", alt: "Colorful abstract shapes", title: "Studio" },
|
|
7
|
+
{ url: "/images/hero.svg", alt: "Colorful abstract shapes", title: "Workshop" },
|
|
8
|
+
{ url: "/images/hero.svg", alt: "Colorful abstract shapes", title: "Garden" },
|
|
9
|
+
];
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<Site title="About" description="Who we are and how we work.">
|
|
13
|
+
<section class="section">
|
|
14
|
+
<div class="container stack">
|
|
15
|
+
<Text nodeId="about-eyebrow" class="eyebrow">
|
|
16
|
+
About
|
|
17
|
+
</Text>
|
|
18
|
+
<Text nodeId="about-title" as="h1">
|
|
19
|
+
A small team with a clear way of working
|
|
20
|
+
</Text>
|
|
21
|
+
<RichText nodeId="about-body" class="lead">
|
|
22
|
+
<p>We plan carefully, build in small steps and keep you in the loop the whole time.</p>
|
|
23
|
+
<h2>How we work</h2>
|
|
24
|
+
<ul>
|
|
25
|
+
<li>We agree on the goal and the pages first.</li>
|
|
26
|
+
<li>We build the site and show it to you every week.</li>
|
|
27
|
+
<li>You edit the content yourself once it is live.</li>
|
|
28
|
+
</ul>
|
|
29
|
+
</RichText>
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
32
|
+
|
|
33
|
+
<section class="section section--tinted">
|
|
34
|
+
<div class="container">
|
|
35
|
+
<Text nodeId="about-gallery-title" as="h2">
|
|
36
|
+
Where we work
|
|
37
|
+
</Text>
|
|
38
|
+
<ImageGallery nodeId="about-gallery" images={photos} columns={3} />
|
|
39
|
+
</div>
|
|
40
|
+
</section>
|
|
41
|
+
|
|
42
|
+
<section class="section">
|
|
43
|
+
<div class="container">
|
|
44
|
+
<Text nodeId="about-faq-title" as="h2">Questions</Text>
|
|
45
|
+
<Accordion
|
|
46
|
+
nodeId="about-faq"
|
|
47
|
+
items={[
|
|
48
|
+
{ title: "How long does a site take?", content: "Most sites are live in two to four weeks." },
|
|
49
|
+
{ title: "Can I edit it myself?", content: "Yes. Texts, images, links and settings change in the browser." },
|
|
50
|
+
{ title: "Where is it hosted?", content: "Anywhere that serves static files." },
|
|
51
|
+
]}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
</section>
|
|
55
|
+
</Site>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Listing, Text } from "@brimsites/brimjs/components";
|
|
3
|
+
import Site from "../../layouts/Site.astro";
|
|
4
|
+
|
|
5
|
+
// Articles are added in the editor's content browser; published ones appear here.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<Site title="Blog" description="Notes, news and articles.">
|
|
9
|
+
<section class="section">
|
|
10
|
+
<div class="container">
|
|
11
|
+
<Text nodeId="blog-title" as="h1">
|
|
12
|
+
Blog
|
|
13
|
+
</Text>
|
|
14
|
+
<Text nodeId="blog-lead" class="lead">
|
|
15
|
+
Notes, news and things we learned.
|
|
16
|
+
</Text>
|
|
17
|
+
<Listing nodeId="blog-articles" type="article" columns={3} />
|
|
18
|
+
</div>
|
|
19
|
+
</section>
|
|
20
|
+
</Site>
|