@digitaldefiance/gitdash-team 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -2
- package/bin/gitdash-team.mjs +97 -0
- package/components/TeamGrid.astro +187 -0
- package/package.json +36 -4
- package/templates/team/[slug].astro +36 -0
- package/templates/team/index.astro +29 -0
package/README.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @digitaldefiance/gitdash-team
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A team page for [EmDash](https://github.com/emdash-cms/emdash) sites, including sites on GitHub Pages built with [GitDash](https://github.com/Digital-Defiance/gitdash). It is modelled on the features of the WordPress plugin Team Members Pro.
|
|
4
|
+
|
|
5
|
+
You get a `team` collection, a `TeamGrid` component, a `/team` page with department filter buttons, and a page for each member.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @digitaldefiance/gitdash-team
|
|
11
|
+
npx gitdash-team # adds the "team" collection and three sample members to content/
|
|
12
|
+
cp -r node_modules/@digitaldefiance/gitdash-team/templates/team src/pages/team
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`npx gitdash-team` needs a GitDash site (it uses `@digitaldefiance/gitdash-pages` to build the content database). On a regular EmDash site, create the collection in the admin with the fields below instead.
|
|
16
|
+
|
|
17
|
+
## Fields
|
|
18
|
+
|
|
19
|
+
| Field | Type | Notes |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `title` | string | The member's name |
|
|
22
|
+
| `role` | string | Position |
|
|
23
|
+
| `department` | string | Used for the filter buttons |
|
|
24
|
+
| `photo`, `hover_photo` | image | The hover photo fades in on mouse over |
|
|
25
|
+
| `bio` | rich text | |
|
|
26
|
+
| `more_info` | rich text | Shown in an expandable box |
|
|
27
|
+
| `accent_color` | string | A CSS color for the member's top border and position |
|
|
28
|
+
| `order` | integer | Lower numbers come first |
|
|
29
|
+
| `email`, `website`, `linkedin`, `github`, `twitter`, `mastodon`, `instagram` | string | Links, shown when set |
|
|
30
|
+
|
|
31
|
+
A member that isn't published is not shown.
|
|
32
|
+
|
|
33
|
+
## TeamGrid
|
|
34
|
+
|
|
35
|
+
```astro
|
|
36
|
+
---
|
|
37
|
+
import TeamGrid from "@digitaldefiance/gitdash-team/TeamGrid.astro";
|
|
38
|
+
---
|
|
39
|
+
<TeamGrid members={members} layout="grid" shape="round" photoPosition="top" filter />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- `layout`: `grid` or `list`
|
|
43
|
+
- `shape`: `round` or `square`
|
|
44
|
+
- `photoPosition`: `top`, `side` or `banner`
|
|
45
|
+
- `filter`: show department filter buttons
|
|
46
|
+
|
|
47
|
+
The component links to `/team/<slug>`, so keep the page templates at `src/pages/team/`.
|
|
48
|
+
|
|
49
|
+
## Not included
|
|
50
|
+
|
|
51
|
+
Importing and exporting members, picture filters (such as black and white) and a limit on social links.
|
|
52
|
+
|
|
53
|
+
MIT licensed.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// gitdash-team: adds a "team" collection (fields and three sample members) to a GitDash site's content/ folder.
|
|
3
|
+
// Run from the site root: npx gitdash-team
|
|
4
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
6
|
+
import { dirname, join, resolve } from "node:path";
|
|
7
|
+
import { pathToFileURL } from "node:url";
|
|
8
|
+
import { spawnSync } from "node:child_process";
|
|
9
|
+
|
|
10
|
+
// The adapter was called ghdash-pages before the GitDash rename.
|
|
11
|
+
const ADAPTERS = ["gitdash-pages", "ghdash-pages"];
|
|
12
|
+
const pagesDir = ADAPTERS.map((n) => resolve(`node_modules/@digitaldefiance/${n}`)).find((d) => existsSync(d)) ?? resolve("node_modules/@digitaldefiance/gitdash-pages");
|
|
13
|
+
const bin = ADAPTERS.map((n) => join(pagesDir, `bin/${n}.mjs`)).find((f) => existsSync(f));
|
|
14
|
+
for (const cmd of ["build-db", "fetch-browser-api", "studio-assets"]) {
|
|
15
|
+
const r = spawnSync(process.execPath, [bin, cmd], { stdio: "inherit" });
|
|
16
|
+
if (r.status !== 0) process.exit(r.status ?? 1);
|
|
17
|
+
}
|
|
18
|
+
const require = createRequire(resolve("package.json"));
|
|
19
|
+
const sqlite3InitModule = (await import(pathToFileURL(require.resolve("@sqlite.org/sqlite-wasm")).href)).default;
|
|
20
|
+
const api = await import(pathToFileURL(resolve("public/studio-api/entry.js")).href);
|
|
21
|
+
const studioDir = join(pagesDir, "studio");
|
|
22
|
+
const { openDb } = await import(pathToFileURL(join(studioDir, "load-db.js")).href);
|
|
23
|
+
const { snapshot, filesFromContent, diffFiles } = await import(pathToFileURL(join(studioDir, "tray.js")).href);
|
|
24
|
+
|
|
25
|
+
const sqlite = await sqlite3InitModule({ print() {}, printErr() {} });
|
|
26
|
+
const content = JSON.parse(readFileSync("public/studio-data/content.json", "utf8"));
|
|
27
|
+
const { db: raw, database, freshNames } = openDb(sqlite, readFileSync("public/studio-data/empty.db"), content);
|
|
28
|
+
const baseFiles = filesFromContent(content);
|
|
29
|
+
const db = new api.Kysely({ dialect: new api.SqliteDialect({ database }) });
|
|
30
|
+
const fetchApi = api.createBrowserApi({ db, apiBase: "/_api", user: { id: "team", email: "team@users.noreply.github.com", name: "Team" } });
|
|
31
|
+
const call = async (method, path, body) => {
|
|
32
|
+
const res = await fetchApi(`https://team.local/_api${path}`, {
|
|
33
|
+
method,
|
|
34
|
+
headers: { "content-type": "application/json", "x-emdash-request": "1" },
|
|
35
|
+
body: body && JSON.stringify(body),
|
|
36
|
+
});
|
|
37
|
+
const json = await res.json();
|
|
38
|
+
if (!json.success) throw new Error(`${method} ${path}: ${json.error?.message}`);
|
|
39
|
+
return json;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const have = raw.selectValue("select count(*) from _emdash_collections where slug = 'team'");
|
|
43
|
+
if (!have) {
|
|
44
|
+
await call("POST", "/schema/collections", {
|
|
45
|
+
slug: "team",
|
|
46
|
+
label: "Team",
|
|
47
|
+
labelSingular: "Team member",
|
|
48
|
+
supports: ["drafts", "revisions", "search"],
|
|
49
|
+
});
|
|
50
|
+
const fields = [
|
|
51
|
+
{ slug: "title", label: "Name", type: "string", required: true, searchable: true },
|
|
52
|
+
{ slug: "role", label: "Position", type: "string", searchable: true },
|
|
53
|
+
{ slug: "department", label: "Department", type: "string" },
|
|
54
|
+
{ slug: "photo", label: "Photo", type: "image" },
|
|
55
|
+
{ slug: "hover_photo", label: "Photo shown on hover", type: "image" },
|
|
56
|
+
{ slug: "bio", label: "Bio", type: "portableText", searchable: true },
|
|
57
|
+
{ slug: "more_info", label: "More info (shown when expanded)", type: "portableText" },
|
|
58
|
+
{ slug: "accent_color", label: "Accent color (e.g. #2a7de1)", type: "string" },
|
|
59
|
+
{ slug: "order", label: "Order", type: "integer" },
|
|
60
|
+
{ slug: "email", label: "Email", type: "string" },
|
|
61
|
+
{ slug: "website", label: "Website", type: "string" },
|
|
62
|
+
{ slug: "linkedin", label: "LinkedIn URL", type: "string" },
|
|
63
|
+
{ slug: "github", label: "GitHub URL", type: "string" },
|
|
64
|
+
{ slug: "twitter", label: "X / Twitter URL", type: "string" },
|
|
65
|
+
{ slug: "mastodon", label: "Mastodon URL", type: "string" },
|
|
66
|
+
{ slug: "instagram", label: "Instagram URL", type: "string" },
|
|
67
|
+
];
|
|
68
|
+
for (const f of fields) await call("POST", "/schema/collections/team/fields", f);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const sample = [
|
|
72
|
+
["Ada Rivera", "Founder & Director", "Leadership", "Ada started the studio in 2019 and still reviews every project.", "Ada likes long walks and short meetings.", "#2a7de1", 1, "https://github.com/example"],
|
|
73
|
+
["Ben Okafor", "Lead Developer", "Engineering", "Ben builds the sites and keeps the build green.", "Ben maintains our open source tools.", "#e1622a", 2, "https://github.com/example"],
|
|
74
|
+
["Chen Wu", "Designer", "Design", "Chen designs the interfaces and the illustrations.", "", "#2ae17d", 3, ""],
|
|
75
|
+
];
|
|
76
|
+
const para = (text) => [{ _type: "block", _key: "b" + Math.random().toString(36).slice(2, 8), style: "normal", markDefs: [], children: [{ _type: "span", _key: "s" + Math.random().toString(36).slice(2, 8), text, marks: [] }] }];
|
|
77
|
+
for (const [name, role, department, bio, more, color, order, github] of sample) {
|
|
78
|
+
const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-");
|
|
79
|
+
const exists = raw.selectValue("select count(*) from ec_team where slug = ? and deleted_at is null", [slug]);
|
|
80
|
+
if (exists) continue;
|
|
81
|
+
const data = { title: name, role, department, bio: para(bio), accent_color: color, order };
|
|
82
|
+
if (more) data.more_info = para(more);
|
|
83
|
+
if (github) data.github = github;
|
|
84
|
+
const made = await call("POST", "/content/team", { data, slug, status: "draft" });
|
|
85
|
+
await call("POST", `/content/team/${made.data.item.id}/publish`, {});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
let written = 0;
|
|
89
|
+
const after = snapshot(raw, freshNames);
|
|
90
|
+
for (const change of diffFiles(baseFiles, after)) {
|
|
91
|
+
const text = after.get(change.path);
|
|
92
|
+
if (text === undefined) continue;
|
|
93
|
+
mkdirSync(dirname(join("content", change.path)), { recursive: true });
|
|
94
|
+
writeFileSync(join("content", change.path), text);
|
|
95
|
+
written++;
|
|
96
|
+
}
|
|
97
|
+
console.log(`wrote ${written} file(s) in content/`);
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Image } from "emdash/ui";
|
|
3
|
+
import { PortableText } from "emdash/ui";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
members: Array<any>;
|
|
7
|
+
layout?: "grid" | "list";
|
|
8
|
+
/** Show the departments as filter buttons above the grid. */
|
|
9
|
+
filter?: boolean;
|
|
10
|
+
/** Shape of the photos. */
|
|
11
|
+
shape?: "round" | "square";
|
|
12
|
+
/** Where the photo sits relative to the text. */
|
|
13
|
+
photoPosition?: "top" | "side" | "banner";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const { members, layout = "grid", filter = false, shape = "round", photoPosition = "top" } = Astro.props;
|
|
17
|
+
const departments = [...new Set(members.map((m) => m.data.department).filter(Boolean))];
|
|
18
|
+
const links = [
|
|
19
|
+
["website", "Website"],
|
|
20
|
+
["email", "Email"],
|
|
21
|
+
["linkedin", "LinkedIn"],
|
|
22
|
+
["github", "GitHub"],
|
|
23
|
+
["twitter", "X"],
|
|
24
|
+
["mastodon", "Mastodon"],
|
|
25
|
+
["instagram", "Instagram"],
|
|
26
|
+
] as const;
|
|
27
|
+
const hrefFor = (key: string, value: string) => (key === "email" && !value.includes(":") ? `mailto:${value}` : value);
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
<div class:list={["team", `team--${layout}`, `team--${shape}`, `team--${photoPosition}`]}>
|
|
31
|
+
{
|
|
32
|
+
filter && departments.length > 1 && (
|
|
33
|
+
<div class="team__filter" role="group" aria-label="Filter by department">
|
|
34
|
+
<button type="button" data-department="" aria-pressed="true">All</button>
|
|
35
|
+
{departments.map((d) => (
|
|
36
|
+
<button type="button" data-department={d} aria-pressed="false">
|
|
37
|
+
{d}
|
|
38
|
+
</button>
|
|
39
|
+
))}
|
|
40
|
+
</div>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
<ul class="team__list">
|
|
44
|
+
{
|
|
45
|
+
members.map((m) => (
|
|
46
|
+
<li
|
|
47
|
+
class="member"
|
|
48
|
+
data-department={m.data.department ?? ""}
|
|
49
|
+
style={m.data.accent_color ? `--member-color: ${m.data.accent_color}` : undefined}
|
|
50
|
+
>
|
|
51
|
+
<a class="member__photo" href={`/team/${m.id}`} tabindex="-1" aria-hidden="true">
|
|
52
|
+
{m.data.photo && <Image image={m.data.photo} sizes="(min-width: 700px) 320px, 100vw" class="member__img" />}
|
|
53
|
+
{m.data.hover_photo && <Image image={m.data.hover_photo} sizes="320px" class="member__img member__img--hover" />}
|
|
54
|
+
</a>
|
|
55
|
+
<div class="member__body">
|
|
56
|
+
<h3 class="member__name">
|
|
57
|
+
<a href={`/team/${m.id}`}>{m.data.title}</a>
|
|
58
|
+
</h3>
|
|
59
|
+
{m.data.role && <p class="member__role">{m.data.role}</p>}
|
|
60
|
+
{m.data.bio && (
|
|
61
|
+
<div class="member__bio">
|
|
62
|
+
<PortableText value={m.data.bio} />
|
|
63
|
+
</div>
|
|
64
|
+
)}
|
|
65
|
+
{m.data.more_info && (
|
|
66
|
+
<details class="member__more">
|
|
67
|
+
<summary>More info</summary>
|
|
68
|
+
<PortableText value={m.data.more_info} />
|
|
69
|
+
</details>
|
|
70
|
+
)}
|
|
71
|
+
<ul class="member__links">
|
|
72
|
+
{links.map(([key, label]) => m.data[key] && (
|
|
73
|
+
<li>
|
|
74
|
+
<a href={hrefFor(key, m.data[key])} rel="me noopener">
|
|
75
|
+
{label}
|
|
76
|
+
</a>
|
|
77
|
+
</li>
|
|
78
|
+
))}
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
</li>
|
|
82
|
+
))
|
|
83
|
+
}
|
|
84
|
+
</ul>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<script>
|
|
88
|
+
for (const group of document.querySelectorAll<HTMLElement>(".team__filter")) {
|
|
89
|
+
const root = group.closest(".team")!;
|
|
90
|
+
group.addEventListener("click", (e) => {
|
|
91
|
+
const button = (e.target as HTMLElement).closest("button");
|
|
92
|
+
if (!button) return;
|
|
93
|
+
const dept = button.dataset.department ?? "";
|
|
94
|
+
for (const b of group.querySelectorAll("button")) b.setAttribute("aria-pressed", String(b === button));
|
|
95
|
+
for (const li of root.querySelectorAll<HTMLElement>(".member"))
|
|
96
|
+
li.hidden = dept !== "" && li.dataset.department !== dept;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<style>
|
|
102
|
+
.team__list {
|
|
103
|
+
list-style: none;
|
|
104
|
+
margin: 0;
|
|
105
|
+
padding: 0;
|
|
106
|
+
display: grid;
|
|
107
|
+
gap: var(--spacing-6, 1.5rem);
|
|
108
|
+
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
|
|
109
|
+
}
|
|
110
|
+
.team--list .team__list {
|
|
111
|
+
grid-template-columns: 1fr;
|
|
112
|
+
}
|
|
113
|
+
.member {
|
|
114
|
+
display: grid;
|
|
115
|
+
align-content: start;
|
|
116
|
+
gap: 0.75rem;
|
|
117
|
+
padding: 1rem;
|
|
118
|
+
border-top: 4px solid var(--member-color, currentColor);
|
|
119
|
+
border-radius: 0.5rem;
|
|
120
|
+
background: color-mix(in srgb, currentColor 5%, transparent);
|
|
121
|
+
}
|
|
122
|
+
.member[hidden] {
|
|
123
|
+
display: none;
|
|
124
|
+
}
|
|
125
|
+
.team--list .member,
|
|
126
|
+
.team--side .member {
|
|
127
|
+
grid-template-columns: 8rem minmax(0, 1fr);
|
|
128
|
+
align-items: start;
|
|
129
|
+
}
|
|
130
|
+
.member__photo {
|
|
131
|
+
position: relative;
|
|
132
|
+
display: block;
|
|
133
|
+
aspect-ratio: 1;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
background: color-mix(in srgb, var(--member-color, currentColor) 20%, transparent);
|
|
136
|
+
}
|
|
137
|
+
.team--round .member__photo {
|
|
138
|
+
border-radius: 50%;
|
|
139
|
+
}
|
|
140
|
+
.team--banner .member__photo {
|
|
141
|
+
aspect-ratio: 16 / 9;
|
|
142
|
+
border-radius: 0.25rem;
|
|
143
|
+
}
|
|
144
|
+
.member__img {
|
|
145
|
+
position: absolute;
|
|
146
|
+
inset: 0;
|
|
147
|
+
width: 100%;
|
|
148
|
+
height: 100%;
|
|
149
|
+
object-fit: cover;
|
|
150
|
+
}
|
|
151
|
+
.member__img--hover {
|
|
152
|
+
opacity: 0;
|
|
153
|
+
transition: opacity 0.2s;
|
|
154
|
+
}
|
|
155
|
+
.member__photo:hover .member__img--hover {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
}
|
|
158
|
+
.member__name {
|
|
159
|
+
margin: 0;
|
|
160
|
+
}
|
|
161
|
+
.member__role {
|
|
162
|
+
margin: 0;
|
|
163
|
+
color: var(--member-color, inherit);
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
}
|
|
166
|
+
.member__more summary {
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
}
|
|
169
|
+
.member__links {
|
|
170
|
+
list-style: none;
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-wrap: wrap;
|
|
173
|
+
gap: 0.75rem;
|
|
174
|
+
margin: 0;
|
|
175
|
+
padding: 0;
|
|
176
|
+
}
|
|
177
|
+
.team__filter {
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-wrap: wrap;
|
|
180
|
+
gap: 0.5rem;
|
|
181
|
+
margin-block-end: 1.5rem;
|
|
182
|
+
}
|
|
183
|
+
.team__filter button[aria-pressed="true"] {
|
|
184
|
+
font-weight: 700;
|
|
185
|
+
text-decoration: underline;
|
|
186
|
+
}
|
|
187
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/gitdash-team",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "A team members collection, grid component and pages for EmDash and GitDash sites.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Digital-Defiance/gitdash-plugins.git",
|
|
10
|
+
"directory": "packages/team"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/Digital-Defiance/gitdash-plugins/tree/main/packages/team#readme",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"emdash",
|
|
15
|
+
"gitdash",
|
|
16
|
+
"astro",
|
|
17
|
+
"team",
|
|
18
|
+
"staff"
|
|
19
|
+
],
|
|
20
|
+
"bin": {
|
|
21
|
+
"gitdash-team": "bin/gitdash-team.mjs",
|
|
22
|
+
"ghdash-team": "bin/gitdash-team.mjs"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
"./TeamGrid.astro": "./components/TeamGrid.astro",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"bin",
|
|
30
|
+
"components",
|
|
31
|
+
"templates",
|
|
32
|
+
"README.md"
|
|
33
|
+
],
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"astro": ">=5",
|
|
36
|
+
"emdash": ">=1.5.0"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
export async function getStaticPaths() {
|
|
3
|
+
const { getEmDashCollection } = await import("emdash");
|
|
4
|
+
const { entries } = await getEmDashCollection("team", { limit: 1000 });
|
|
5
|
+
return entries.map((e) => ({ params: { slug: e.id } }));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
import { getEmDashEntry, decodeSlug } from "emdash";
|
|
9
|
+
import { PortableText } from "emdash/ui";
|
|
10
|
+
import Base from "../../layouts/Base.astro";
|
|
11
|
+
import TeamGrid from "@digitaldefiance/gitdash-team/TeamGrid.astro";
|
|
12
|
+
|
|
13
|
+
const slug = decodeSlug(Astro.params.slug);
|
|
14
|
+
if (!slug) return Astro.rewrite("/404");
|
|
15
|
+
const { entry: member } = await getEmDashEntry("team", slug);
|
|
16
|
+
if (!member) return Astro.rewrite("/404");
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<Base title={member.data.title} pageTitle={member.data.title} description={member.data.role ?? ""}>
|
|
20
|
+
<article class="band" data-pagefind-body>
|
|
21
|
+
<div class="frame">
|
|
22
|
+
<p><a href="/team">All team members</a></p>
|
|
23
|
+
<TeamGrid members={[member]} layout="list" />
|
|
24
|
+
</div>
|
|
25
|
+
</article>
|
|
26
|
+
</Base>
|
|
27
|
+
|
|
28
|
+
<style>
|
|
29
|
+
.band {
|
|
30
|
+
padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
|
|
31
|
+
}
|
|
32
|
+
h1 {
|
|
33
|
+
font-size: var(--font-size-display, 2.5rem);
|
|
34
|
+
margin-block-end: 1.5rem;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { getEmDashCollection, getSiteSettings } from "emdash";
|
|
3
|
+
import Base from "../../layouts/Base.astro";
|
|
4
|
+
import TeamGrid from "@digitaldefiance/gitdash-team/TeamGrid.astro";
|
|
5
|
+
import { resolveBlogSiteIdentity } from "../../utils/site-identity";
|
|
6
|
+
|
|
7
|
+
const { entries } = await getEmDashCollection("team", { limit: 1000 });
|
|
8
|
+
const members = entries.toSorted((a, b) => (a.data.order ?? 9999) - (b.data.order ?? 9999));
|
|
9
|
+
const { siteTitle } = resolveBlogSiteIdentity(await getSiteSettings());
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<Base title={`Team | ${siteTitle}`} pageTitle="Team" description="The people behind the site.">
|
|
13
|
+
<section class="band">
|
|
14
|
+
<div class="frame">
|
|
15
|
+
<h1>Team</h1>
|
|
16
|
+
<TeamGrid members={members} filter />
|
|
17
|
+
</div>
|
|
18
|
+
</section>
|
|
19
|
+
</Base>
|
|
20
|
+
|
|
21
|
+
<style>
|
|
22
|
+
.band {
|
|
23
|
+
padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
|
|
24
|
+
}
|
|
25
|
+
h1 {
|
|
26
|
+
font-size: var(--font-size-display, 2.5rem);
|
|
27
|
+
margin-block-end: 1.5rem;
|
|
28
|
+
}
|
|
29
|
+
</style>
|