@spunto/brand-kit 0.6.0 → 0.8.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/package.json +1 -1
- package/src/home/check.ts +14 -0
- package/src/home/editions/ci.json +2 -2
- package/src/home/editions/cms.json +394 -0
- package/src/home/editions.ts +2 -2
- package/src/home/guide.ts +16 -0
- package/src/home/home.tsx +45 -0
- package/src/home/index.ts +2 -0
- package/src/home/showcase/catalog.ts +62 -0
- package/src/home/showcase/cms/board.tsx +162 -0
- package/src/home/showcase/cms/page.tsx +169 -0
- package/src/home/showcase/cms/parts.tsx +130 -0
- package/src/home/showcase/cms/sample.ts +172 -0
- package/src/home/showcase/cms/table.tsx +207 -0
- package/src/home/showcase/cms/views.tsx +166 -0
- package/src/home/showcase/stage.tsx +328 -0
- package/src/home/showcase/view.tsx +30 -0
- package/src/home/types.ts +17 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { FONT, hexAlpha } from "../../../theme"
|
|
4
|
+
import { AppWindow, CodeCard, Cursor, Float, LINE, MUTED, Stage, u, useStage, WASH, type StageColors } from "../stage"
|
|
5
|
+
import { Avatar, CardTitle, Labels, ListHead, SIDE, TOP, WIN, type Lang } from "./parts"
|
|
6
|
+
import { article, CAPTION, cover, LIST, PEOPLE, STATUS, STATUSES, TINT } from "./sample"
|
|
7
|
+
|
|
8
|
+
/* The board: a card is taken from « En rédaction » and dropped in « Relecture » — then what hears of it.
|
|
9
|
+
|
|
10
|
+
The webhook is the documented event (content/docs/api/events-and-webhooks.mdx), ids elided as the
|
|
11
|
+
documentation elides them; the Slack message is the connector's (apps/connectors/lib/slack/message.ts),
|
|
12
|
+
which writes in French whatever the workspace's language. */
|
|
13
|
+
|
|
14
|
+
const H = 590
|
|
15
|
+
const STILL = 6
|
|
16
|
+
/* 0 rest · 1 the pointer goes to the card · 2 takes it · 3 carries it · 4 drops it · 5 the webhook · 6 Slack · 7 fade · 8 rewind */
|
|
17
|
+
const LENGTHS = [1000, 750, 380, 1050, 650, 1500, 3600, 450, 90] as const
|
|
18
|
+
|
|
19
|
+
const COL = { w: 191, gap: 12, head: 38, inset: 7, between: 8 }
|
|
20
|
+
const START = [[5, 8, 9], [1, 4], [2, 7], [10, 6, 3]]
|
|
21
|
+
const MOVED = [[5, 8, 9], [4], [1, 2, 7], [10, 6, 3]]
|
|
22
|
+
const CARRIED = 1
|
|
23
|
+
const GRIP = { x: 112, y: 98 }
|
|
24
|
+
|
|
25
|
+
const height = (n: number) => (article(n).cover ? 150 : 76)
|
|
26
|
+
|
|
27
|
+
function place(columns: number[][]) {
|
|
28
|
+
const at: Record<number, { x: number; y: number }> = {}
|
|
29
|
+
columns.forEach((column, c) => {
|
|
30
|
+
let y = TOP + COL.head
|
|
31
|
+
for (const n of column) {
|
|
32
|
+
at[n] = { x: SIDE + c * (COL.w + COL.gap) + COL.inset, y }
|
|
33
|
+
y += height(n) + COL.between
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
return at
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const AT_START = place(START)
|
|
40
|
+
const AT_MOVED = place(MOVED)
|
|
41
|
+
|
|
42
|
+
export function BoardScreen({ lang, colors, night, label }: { lang: Lang; colors: StageColors; night: boolean; label: string }) {
|
|
43
|
+
const { ref, step } = useStage(LENGTHS, STILL)
|
|
44
|
+
const at = step >= 3 && step <= 7 ? AT_MOVED : AT_START
|
|
45
|
+
const counted = step >= 4 && step <= 7 ? MOVED : START
|
|
46
|
+
const lifted = step === 2 || step === 3
|
|
47
|
+
const moving = step >= 1 && step <= 6
|
|
48
|
+
const a = article(CARRIED)
|
|
49
|
+
const actor = PEOPLE[a.author].name[lang]
|
|
50
|
+
const pointer = step === 0 || step === 8 ? { x: 560, y: 430 } : { x: (step < 3 ? AT_START : AT_MOVED)[CARRIED].x + GRIP.x, y: (step < 3 ? AT_START : AT_MOVED)[CARRIED].y + GRIP.y }
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Stage stageRef={ref} colors={colors} night={night} height={H} label={label}>
|
|
54
|
+
<AppWindow {...WIN} h={H} address="cms.spunto.net">
|
|
55
|
+
<ListHead view={0} lang={lang} tone={colors.tone} />
|
|
56
|
+
{STATUSES.map((key, c) => (
|
|
57
|
+
<div
|
|
58
|
+
key={key}
|
|
59
|
+
style={{
|
|
60
|
+
position: "absolute",
|
|
61
|
+
left: u(SIDE + c * (COL.w + COL.gap)),
|
|
62
|
+
top: u(TOP),
|
|
63
|
+
width: u(COL.w),
|
|
64
|
+
height: u(H),
|
|
65
|
+
borderRadius: u(7),
|
|
66
|
+
border: `1px solid ${LINE}`,
|
|
67
|
+
background: step === 3 && c === 2 ? hexAlpha(colors.tone, 0.07) : WASH,
|
|
68
|
+
transition: "background 0.4s ease",
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
<div style={{ margin: `${u(7)} ${u(8)} 0`, height: u(3), borderRadius: u(2), background: TINT[STATUS[key].tint].dot }} />
|
|
72
|
+
<div style={{ display: "flex", alignItems: "center", gap: u(7), padding: `${u(7)} ${u(9)}`, fontSize: u(11.5), fontWeight: 650 }}>
|
|
73
|
+
{STATUS[key].label[lang]}
|
|
74
|
+
<span style={{ minWidth: u(16), padding: `0 ${u(4)}`, borderRadius: u(8), border: `1px solid ${LINE}`, background: "#ffffff", fontSize: u(9.5), fontWeight: 500, color: MUTED, textAlign: "center", fontVariantNumeric: "tabular-nums" }}>
|
|
75
|
+
{counted[c].length}
|
|
76
|
+
</span>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
))}
|
|
80
|
+
<div style={{ opacity: step >= 7 ? 0 : 1, transition: "opacity 0.4s ease" }}>
|
|
81
|
+
{START.flat().map((n) => {
|
|
82
|
+
const card = article(n)
|
|
83
|
+
const carried = n === CARRIED
|
|
84
|
+
return (
|
|
85
|
+
<div
|
|
86
|
+
key={n}
|
|
87
|
+
style={{
|
|
88
|
+
position: "absolute",
|
|
89
|
+
left: 0,
|
|
90
|
+
top: 0,
|
|
91
|
+
width: u(COL.w - COL.inset * 2),
|
|
92
|
+
height: u(height(n)),
|
|
93
|
+
zIndex: carried ? 3 : 1,
|
|
94
|
+
borderRadius: u(6),
|
|
95
|
+
border: `1px solid ${LINE}`,
|
|
96
|
+
background: "#ffffff",
|
|
97
|
+
overflow: "hidden",
|
|
98
|
+
transform: `translate(${u(at[n].x)}, ${u(at[n].y)}) rotate(${carried && lifted ? 2.4 : 0}deg) scale(${carried && lifted ? 1.035 : 1})`,
|
|
99
|
+
boxShadow: carried && lifted ? `0 ${u(18)} ${u(34)} ${u(-10)} rgba(18,27,23,0.45)` : `0 ${u(1)} ${u(2)} rgba(18,27,23,0.06)`,
|
|
100
|
+
transition: moving ? "transform 0.95s cubic-bezier(0.3, 0.7, 0.2, 1), box-shadow 0.3s ease" : "none",
|
|
101
|
+
}}
|
|
102
|
+
>
|
|
103
|
+
{card.cover && <div style={{ height: u(74), background: cover(card.cover) }} />}
|
|
104
|
+
<div style={{ padding: `${u(9)} ${u(10)}` }}>
|
|
105
|
+
<CardTitle a={card} lang={lang} lines={2} style={{ height: u(31) }} />
|
|
106
|
+
<div style={{ display: "flex", alignItems: "center", gap: u(4), marginTop: u(8), overflow: "hidden" }}>
|
|
107
|
+
<Labels a={card} lang={lang} />
|
|
108
|
+
<Avatar person={card.author} lang={lang} size={16} style={{ marginLeft: "auto" }} />
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
)
|
|
113
|
+
})}
|
|
114
|
+
</div>
|
|
115
|
+
<Cursor {...pointer} down={lifted} hidden={step === 0 || step >= 5} ms={step === 3 ? 950 : 700} />
|
|
116
|
+
</AppWindow>
|
|
117
|
+
|
|
118
|
+
<Float x={14} y={372} w={338} depth={110} show={step === 5 || step === 6}>
|
|
119
|
+
<CodeCard
|
|
120
|
+
title={CAPTION.webhook[lang]}
|
|
121
|
+
meta="POST"
|
|
122
|
+
signal={colors.signal}
|
|
123
|
+
lines={[
|
|
124
|
+
{ text: `https://${CAPTION.webhookTo[lang]}` },
|
|
125
|
+
{ text: "X-Spunto-Signature: t=1793180564,v1=8c41f0…" },
|
|
126
|
+
{ text: "" },
|
|
127
|
+
{ text: "{" },
|
|
128
|
+
{ text: ' "type": "item.updated",', hot: true },
|
|
129
|
+
{ text: ' "resource": { "kind": "item", "id": "0192…" },' },
|
|
130
|
+
{ text: ' "changes": { "statusId": {' },
|
|
131
|
+
{ text: ' "before": "…", "after": "…" } },' },
|
|
132
|
+
{ text: ' "cause": "edit"' },
|
|
133
|
+
{ text: "}" },
|
|
134
|
+
]}
|
|
135
|
+
/>
|
|
136
|
+
</Float>
|
|
137
|
+
|
|
138
|
+
<Float x={548} y={418} w={356} depth={190} show={step === 6} style={{ background: "#ffffff" }}>
|
|
139
|
+
<div style={{ padding: `${u(7)} ${u(12)}`, borderBottom: `1px solid ${LINE}`, fontSize: u(10), fontWeight: 600, color: MUTED }}>Slack · {CAPTION.slackChannel[lang]}</div>
|
|
140
|
+
<div style={{ display: "flex", gap: u(9), padding: `${u(10)} ${u(12)} ${u(12)}` }}>
|
|
141
|
+
<span style={{ display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, width: u(30), height: u(30), borderRadius: u(6), background: colors.field, color: colors.signal, fontFamily: FONT.display, fontSize: u(17) }}>S</span>
|
|
142
|
+
<div style={{ minWidth: 0, fontSize: u(11), lineHeight: 1.45 }}>
|
|
143
|
+
<div style={{ display: "flex", alignItems: "center", gap: u(5) }}>
|
|
144
|
+
<strong style={{ fontWeight: 700 }}>Spunto CMS</strong>
|
|
145
|
+
<span style={{ padding: `0 ${u(3)}`, borderRadius: u(2), background: "#e8eae9", fontSize: u(7.5), fontWeight: 650, color: MUTED }}>APP</span>
|
|
146
|
+
<span style={{ fontSize: u(9), color: MUTED }}>10:42</span>
|
|
147
|
+
</div>
|
|
148
|
+
<div>
|
|
149
|
+
🔀 Statut changé dans <span style={{ color: "#1264a3" }}>{LIST.name}</span>
|
|
150
|
+
</div>
|
|
151
|
+
<div style={{ fontWeight: 700, color: "#1264a3", overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis" }}>
|
|
152
|
+
{a.icon} {LIST.key}-{a.n} — {a.title[lang]}
|
|
153
|
+
</div>
|
|
154
|
+
<div style={{ marginTop: u(3), fontSize: u(9.8), color: MUTED }}>
|
|
155
|
+
{STATUS.drafting.label[lang]} → <strong style={{ fontWeight: 700 }}>{STATUS.review.label[lang]}</strong> · par {actor}
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</Float>
|
|
160
|
+
</Stage>
|
|
161
|
+
)
|
|
162
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import type { ReactNode } from "react"
|
|
4
|
+
import { FONT } from "../../../theme"
|
|
5
|
+
import { AppWindow, CodeCard, Cursor, Float, Icon, LINE, MUTED, Rich, Stage, u, useStage, WASH, type IconId, type StageColors } from "../stage"
|
|
6
|
+
import { Avatar, Chip, Labels, StatusChip, WIN, type Lang } from "./parts"
|
|
7
|
+
import { article, BODY, CAPTION, cover, FIELDS, LIST, PEOPLE, TINT, TOPICS, UI } from "./sample"
|
|
8
|
+
|
|
9
|
+
/* A card, open: the first article of the list as the app shows it — cover, title, status and publication,
|
|
10
|
+
its properties on the right, its body in blocks. A box is ticked, a callout is written, the card is
|
|
11
|
+
published; beside it, the same blocks as the API serves them (content/docs/concepts/page-bodies.mdx). */
|
|
12
|
+
|
|
13
|
+
const H = 600
|
|
14
|
+
const STILL = 7
|
|
15
|
+
/* 0 rest · 1 to the third box · 2 ticked, saving · 3 saved · 4 a callout is written, saving · 5 saved · 6 to Publish ·
|
|
16
|
+
7 published · 8 fade · 9 rewind */
|
|
17
|
+
const LENGTHS = [1000, 750, 700, 700, 1700, 800, 850, 2800, 450, 90] as const
|
|
18
|
+
|
|
19
|
+
const MAIN = { x: 70, w: 486 }
|
|
20
|
+
const PROPS = { x: 594, w: 222 }
|
|
21
|
+
const Y = { cover: 40, title: 164, meta: 234, body: 316 }
|
|
22
|
+
const META_ROW = 23
|
|
23
|
+
const TODO_ROW = 22
|
|
24
|
+
/** The publication chip keeps one width, so the Publish button stays where the pointer goes. */
|
|
25
|
+
const PUBLICATION_W = 64
|
|
26
|
+
|
|
27
|
+
function Meta({ icon, label, children }: { icon: IconId; label: string; children: ReactNode }) {
|
|
28
|
+
return (
|
|
29
|
+
<div style={{ display: "flex", alignItems: "center", height: u(META_ROW) }}>
|
|
30
|
+
<span style={{ display: "flex", alignItems: "center", gap: u(6), width: u(104), fontSize: u(11), color: MUTED }}>
|
|
31
|
+
<Icon id={icon} size={11.5} />
|
|
32
|
+
{label}
|
|
33
|
+
</span>
|
|
34
|
+
{children}
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function Property({ label, children }: { label: string; children: ReactNode }) {
|
|
40
|
+
return (
|
|
41
|
+
<div style={{ display: "flex", alignItems: "center", height: u(28) }}>
|
|
42
|
+
<span style={{ flexShrink: 0, width: u(98), fontSize: u(10.5), color: MUTED, whiteSpace: "nowrap" }}>{label}</span>
|
|
43
|
+
<span style={{ display: "flex", alignItems: "center", gap: u(4), minWidth: 0, fontSize: u(11) }}>{children}</span>
|
|
44
|
+
</div>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function PageScreen({ lang, colors, night, label }: { lang: Lang; colors: StageColors; night: boolean; label: string }) {
|
|
49
|
+
const { ref, step } = useStage(LENGTHS, STILL)
|
|
50
|
+
const a = article(1)
|
|
51
|
+
const ticked = step >= 2 && step <= 8
|
|
52
|
+
const written = step >= 4 && step <= 8
|
|
53
|
+
const published = step >= 7 && step <= 8
|
|
54
|
+
const saving = step === 2 || step === 4
|
|
55
|
+
const todoY = Y.body + 76
|
|
56
|
+
const pointer = step === 0 || step === 9 ? { x: 430, y: 300 } : step <= 5 ? { x: MAIN.x + 6, y: todoY + 2 * TODO_ROW + 10 } : { x: MAIN.x + 104 + PUBLICATION_W + 30, y: Y.meta + META_ROW + 12 }
|
|
57
|
+
const date = a.date.split("-")
|
|
58
|
+
const elided = lang === "fr" ? "« … »" : "“…”"
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<Stage stageRef={ref} colors={colors} night={night} height={H} label={label}>
|
|
62
|
+
<AppWindow {...WIN} h={H} address="cms.spunto.net">
|
|
63
|
+
<div style={{ position: "absolute", left: u(28), right: u(24), top: 0, height: u(34), display: "flex", alignItems: "center", gap: u(8), fontSize: u(10.5), color: MUTED }}>
|
|
64
|
+
{LIST.group[lang]} › <span style={{ color: "#2b3530" }}>{LIST.name}</span>
|
|
65
|
+
<span style={{ marginLeft: "auto", display: "flex", alignItems: "center", gap: u(4), opacity: step >= 2 && step <= 7 ? 1 : 0, transition: "opacity 0.3s ease" }}>
|
|
66
|
+
{!saving && <Icon id="check" size={10} width={2.4} />}
|
|
67
|
+
{saving ? UI.saving[lang] : UI.saved[lang]}
|
|
68
|
+
</span>
|
|
69
|
+
<span style={{ padding: `${u(2)} ${u(7)}`, borderRadius: u(4), background: "#e9edea", fontFamily: FONT.mono, fontSize: u(9.5), color: "#2b3530" }}>
|
|
70
|
+
{LIST.key}-{a.n}
|
|
71
|
+
</span>
|
|
72
|
+
<span style={{ fontFamily: FONT.mono, fontSize: u(9.5) }}>UUID</span>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div style={{ position: "absolute", left: u(MAIN.x), top: u(Y.cover), width: u(MAIN.w), height: u(112), borderRadius: u(6), background: cover("braise") }} />
|
|
76
|
+
<div style={{ position: "absolute", left: u(MAIN.x), top: u(Y.title), width: u(MAIN.w), fontFamily: FONT.display, fontSize: u(25), lineHeight: 1.12, letterSpacing: "-0.015em" }}>
|
|
77
|
+
<span style={{ marginRight: u(6) }}>{a.icon}</span>
|
|
78
|
+
{a.title[lang]}
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div style={{ opacity: step >= 8 ? 0 : 1, transition: "opacity 0.4s ease" }}>
|
|
82
|
+
<div style={{ position: "absolute", left: u(MAIN.x), top: u(Y.meta), width: u(MAIN.w) }}>
|
|
83
|
+
<Meta icon="status" label={UI.status[lang]}>
|
|
84
|
+
<StatusChip status={a.status} lang={lang} />
|
|
85
|
+
</Meta>
|
|
86
|
+
<Meta icon="globe" label={UI.publication[lang]}>
|
|
87
|
+
<span style={{ display: "inline-flex", alignItems: "center", gap: u(5), width: u(PUBLICATION_W), fontSize: u(10), fontWeight: 550, color: published ? TINT.green.fg : "#44403c" }}>
|
|
88
|
+
<span style={{ width: u(6), height: u(6), borderRadius: "50%", background: published ? TINT.green.dot : TINT.gray.dot, transition: "background 0.3s ease" }} />
|
|
89
|
+
{published ? UI.published[lang] : UI.draft[lang]}
|
|
90
|
+
</span>
|
|
91
|
+
<span style={{ padding: `${u(2.5)} ${u(9)}`, borderRadius: u(5), border: `1px solid ${LINE}`, background: "#ffffff", fontSize: u(10.5), fontWeight: 550, opacity: published ? 0 : 1, transition: "opacity 0.3s ease" }}>{UI.publish[lang]}</span>
|
|
92
|
+
</Meta>
|
|
93
|
+
<Meta icon="calendar" label={UI.created[lang]}>
|
|
94
|
+
<span style={{ fontSize: u(11), color: MUTED }}>{UI.createdOn[lang]}</span>
|
|
95
|
+
</Meta>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<div style={{ position: "absolute", left: u(MAIN.x), top: u(Y.body), width: u(MAIN.w), fontSize: u(11.8), lineHeight: 1.6 }}>
|
|
99
|
+
<div style={{ height: u(38), overflow: "hidden" }}>
|
|
100
|
+
<Rich text={BODY.lead[lang]} />
|
|
101
|
+
</div>
|
|
102
|
+
<div style={{ height: u(38), paddingTop: u(12), fontSize: u(15), fontWeight: 650, lineHeight: 1.3 }}>{BODY.heading[lang]}</div>
|
|
103
|
+
{BODY.todos.map((todo, i) => {
|
|
104
|
+
const on = i < 2 || ticked
|
|
105
|
+
return (
|
|
106
|
+
<div key={i} style={{ display: "flex", alignItems: "center", gap: u(8), height: u(TODO_ROW) }}>
|
|
107
|
+
<span style={{ display: "flex", alignItems: "center", justifyContent: "center", width: u(13), height: u(13), borderRadius: u(3), border: `1px solid ${on ? colors.tone : "#c5ccc8"}`, background: on ? colors.tone : "#ffffff", transition: "background 0.2s ease, border-color 0.2s ease" }}>
|
|
108
|
+
<Icon id="check" size={9} color="#ffffff" width={3} style={{ opacity: on ? 1 : 0, transition: "opacity 0.2s ease" }} />
|
|
109
|
+
</span>
|
|
110
|
+
{todo[lang]}
|
|
111
|
+
</div>
|
|
112
|
+
)
|
|
113
|
+
})}
|
|
114
|
+
<div style={{ marginTop: u(8), maxHeight: written ? u(60) : 0, opacity: written ? 1 : 0, overflow: "hidden", transition: "max-height 0.5s ease, opacity 0.6s ease 0.15s" }}>
|
|
115
|
+
<div style={{ padding: `${u(8)} ${u(11)}`, borderRadius: u(6), border: `1px solid ${LINE}`, background: WASH }}>
|
|
116
|
+
<Rich text={BODY.callout[lang]} />
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<div style={{ position: "absolute", left: u(PROPS.x), top: u(Y.cover), width: u(PROPS.w) }}>
|
|
123
|
+
<Property label={FIELDS.topic.name[lang]}>
|
|
124
|
+
<Chip tint={TOPICS[a.topic].tint}>{TOPICS[a.topic].label[lang]}</Chip>
|
|
125
|
+
</Property>
|
|
126
|
+
<Property label={FIELDS.author.name[lang]}>
|
|
127
|
+
<Avatar person={a.author} lang={lang} size={18} />
|
|
128
|
+
<span style={{ whiteSpace: "nowrap" }}>{PEOPLE[a.author].name[lang]}</span>
|
|
129
|
+
</Property>
|
|
130
|
+
<Property label={FIELDS.date.name[lang]}>
|
|
131
|
+
<span style={{ fontVariantNumeric: "tabular-nums" }}>{lang === "fr" ? `${date[2]}/${date[1]}/${date[0]}` : `${date[1]}/${date[2]}/${date[0]}`}</span>
|
|
132
|
+
</Property>
|
|
133
|
+
<Property label={FIELDS.tags.name[lang]}>
|
|
134
|
+
<Labels a={a} lang={lang} topic={false} />
|
|
135
|
+
</Property>
|
|
136
|
+
<Property label={FIELDS.reviewers.name[lang]}>
|
|
137
|
+
{a.reviewers.map((r, i) => (
|
|
138
|
+
<Avatar key={r} person={r} lang={lang} size={18} style={{ marginLeft: i ? u(-8) : 0 }} />
|
|
139
|
+
))}
|
|
140
|
+
</Property>
|
|
141
|
+
<Property label={FIELDS.minutes.name[lang]}>{a.minutes}</Property>
|
|
142
|
+
<div style={{ display: "flex", alignItems: "center", gap: u(6), height: u(30), fontSize: u(10.5), color: MUTED }}>
|
|
143
|
+
<Icon id="plus" size={11} />
|
|
144
|
+
{UI.addProperty[lang]}
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
<Cursor {...pointer} down={step === 2 || step === 7} hidden={step === 0 || step === 4 || step === 5 || step >= 8} />
|
|
148
|
+
</AppWindow>
|
|
149
|
+
|
|
150
|
+
<Float x={586} y={352} w={322} depth={150}>
|
|
151
|
+
<CodeCard
|
|
152
|
+
title={CAPTION.blocks[lang]}
|
|
153
|
+
meta="blocks"
|
|
154
|
+
signal={colors.signal}
|
|
155
|
+
lines={[
|
|
156
|
+
{ text: '{ "type": "heading", "level": 2,' },
|
|
157
|
+
{ text: ` "text": [{ "text": "${BODY.heading[lang]}" }] },` },
|
|
158
|
+
{ text: '{ "type": "todo", "checked": true, "text": […] },' },
|
|
159
|
+
{ text: '{ "type": "todo", "checked": true, "text": […] },' },
|
|
160
|
+
{ text: `{ "type": "todo", "checked": ${ticked}, "text": […] },`, hot: step === 2 || step === 3 },
|
|
161
|
+
{ text: '{ "type": "callout", "text": [', hidden: !written, hot: step === 4 || step === 5 },
|
|
162
|
+
{ text: ` { "text": ${JSON.stringify(elided)} }, { "text": ${JSON.stringify(elided)},`, hidden: !written, hot: step === 4 || step === 5 },
|
|
163
|
+
{ text: ' "bold": true }, … ] }', hidden: !written, hot: step === 4 || step === 5 },
|
|
164
|
+
]}
|
|
165
|
+
/>
|
|
166
|
+
</Float>
|
|
167
|
+
</Stage>
|
|
168
|
+
)
|
|
169
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import type { CSSProperties, ReactNode } from "react"
|
|
4
|
+
import { FONT } from "../../../theme"
|
|
5
|
+
import { Icon, INK, LINE, MUTED, u, type IconId } from "../stage"
|
|
6
|
+
import { LIST, PEOPLE, STATUS, TAGS, TINT, TOPICS, UI, VIEWS, type Article, type StatusKey, type Tint } from "./sample"
|
|
7
|
+
|
|
8
|
+
/* What the CMS screens share: the app's chips and avatars, the head of a list (back link, name, the
|
|
9
|
+
tabs of its saved views), and where its content starts. Positions are the window's design pixels. */
|
|
10
|
+
|
|
11
|
+
export type Lang = "en" | "fr"
|
|
12
|
+
|
|
13
|
+
/** The window on the 920-wide board, and where a list's content starts under its head. */
|
|
14
|
+
export const WIN = { x: 40, y: 32, w: 840 }
|
|
15
|
+
export const TOP = 108
|
|
16
|
+
export const SIDE = 20
|
|
17
|
+
|
|
18
|
+
export function Chip({ tint, children, style }: { tint: Tint; children: ReactNode; style?: CSSProperties }) {
|
|
19
|
+
const t = TINT[tint]
|
|
20
|
+
return (
|
|
21
|
+
<span style={{ display: "inline-flex", alignItems: "center", flexShrink: 0, padding: `${u(1.5)} ${u(6)}`, borderRadius: u(4), background: t.bg, color: t.fg, fontSize: u(9.6), fontWeight: 550, lineHeight: 1.4, whiteSpace: "nowrap", transition: "background 0.3s ease, color 0.3s ease", ...style }}>
|
|
22
|
+
{children}
|
|
23
|
+
</span>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function StatusChip({ status, lang }: { status: StatusKey; lang: Lang }) {
|
|
28
|
+
return <Chip tint={STATUS[status].tint}>{STATUS[status].label[lang]}</Chip>
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const initials = (name: string) =>
|
|
32
|
+
name
|
|
33
|
+
.split(" ")
|
|
34
|
+
.map((part) => part[0])
|
|
35
|
+
.join("")
|
|
36
|
+
.slice(0, 2)
|
|
37
|
+
|
|
38
|
+
export function Avatar({ person, lang, size = 17, style }: { person: number; lang: Lang; size?: number; style?: CSSProperties }) {
|
|
39
|
+
const p = PEOPLE[person]
|
|
40
|
+
return (
|
|
41
|
+
<span style={{ display: "inline-flex", alignItems: "center", justifyContent: "center", flexShrink: 0, width: u(size), height: u(size), borderRadius: "50%", background: p.tint, color: "#35403a", fontSize: u(size * 0.42), fontWeight: 650, letterSpacing: "-0.02em", boxShadow: "0 0 0 1px #ffffff", ...style }}>
|
|
42
|
+
{initials(p.name[lang])}
|
|
43
|
+
</span>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** A card's topic and tags, as the app chips them. */
|
|
48
|
+
export function Labels({ a, lang, topic = true }: { a: Article; lang: Lang; topic?: boolean }) {
|
|
49
|
+
return (
|
|
50
|
+
<>
|
|
51
|
+
{topic && <Chip tint={TOPICS[a.topic].tint}>{TOPICS[a.topic].label[lang]}</Chip>}
|
|
52
|
+
{a.tags.map((t) => (
|
|
53
|
+
<Chip key={t} tint={TAGS[t].tint}>
|
|
54
|
+
{TAGS[t].label[lang]}
|
|
55
|
+
</Chip>
|
|
56
|
+
))}
|
|
57
|
+
</>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const TAB_ICON: IconId[] = ["board", "table", "list"]
|
|
62
|
+
const TAB_X = [0, 100, 254]
|
|
63
|
+
const TAB_W = [92, 146, 108]
|
|
64
|
+
|
|
65
|
+
/** Where the pointer clicks a view's tab. */
|
|
66
|
+
export const tabPoint = (view: number) => ({ x: SIDE + TAB_X[view] + TAB_W[view] / 2, y: 80 })
|
|
67
|
+
|
|
68
|
+
/** The head of the list: back link, name, its saved views as tabs — the active one underlined in the product's tone. */
|
|
69
|
+
export function ListHead({ view, lang, tone }: { view: number; lang: Lang; tone: string }) {
|
|
70
|
+
return (
|
|
71
|
+
<div style={{ position: "absolute", left: u(SIDE), right: u(SIDE), top: 0, height: u(95), borderBottom: `1px solid ${LINE}` }}>
|
|
72
|
+
<div style={{ position: "absolute", top: u(12), fontSize: u(10), color: MUTED }}>{UI.back[lang]}</div>
|
|
73
|
+
<div style={{ position: "absolute", top: u(26), fontFamily: FONT.display, fontSize: u(25), lineHeight: 1.1, letterSpacing: "-0.01em" }}>{LIST.name}</div>
|
|
74
|
+
{VIEWS.map((v, i) => (
|
|
75
|
+
<div
|
|
76
|
+
key={i}
|
|
77
|
+
style={{
|
|
78
|
+
position: "absolute",
|
|
79
|
+
left: u(TAB_X[i]),
|
|
80
|
+
top: u(66),
|
|
81
|
+
width: u(TAB_W[i]),
|
|
82
|
+
height: u(29),
|
|
83
|
+
display: "flex",
|
|
84
|
+
alignItems: "center",
|
|
85
|
+
gap: u(6),
|
|
86
|
+
paddingLeft: u(4),
|
|
87
|
+
fontSize: u(11.5),
|
|
88
|
+
fontWeight: i === view ? 550 : 450,
|
|
89
|
+
color: i === view ? INK : MUTED,
|
|
90
|
+
whiteSpace: "nowrap",
|
|
91
|
+
transition: "color 0.3s ease",
|
|
92
|
+
}}
|
|
93
|
+
>
|
|
94
|
+
<Icon id={TAB_ICON[i]} size={12} color={i === view ? tone : MUTED} />
|
|
95
|
+
{v[lang]}
|
|
96
|
+
</div>
|
|
97
|
+
))}
|
|
98
|
+
<div style={{ position: "absolute", left: 0, bottom: -1, height: u(2), width: u(TAB_W[view]), background: tone, borderRadius: u(2), transform: `translateX(${u(TAB_X[view])})`, transition: "transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1), width 0.45s cubic-bezier(0.3, 0.7, 0.2, 1)" }} />
|
|
99
|
+
<div style={{ position: "absolute", right: 0, top: u(66), height: u(24), display: "flex", alignItems: "center", gap: u(12), fontSize: u(10.5), fontWeight: 500 }}>
|
|
100
|
+
<span style={{ display: "flex", alignItems: "center", gap: u(5) }}>
|
|
101
|
+
<Icon id="sliders" size={11} />
|
|
102
|
+
{UI.editView[lang]}
|
|
103
|
+
</span>
|
|
104
|
+
<span style={{ display: "flex", alignItems: "center", gap: u(4), padding: `${u(4)} ${u(9)}`, border: `1px solid ${LINE}`, borderRadius: u(5), background: "#ffffff" }}>
|
|
105
|
+
<Icon id="plus" size={10} />
|
|
106
|
+
{UI.newView[lang]}
|
|
107
|
+
</span>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** A card's title with its icon — one line cut short, or wrapped on two. */
|
|
114
|
+
export function CardTitle({ a, lang, lines = 1, style }: { a: Article; lang: Lang; lines?: 1 | 2; style?: CSSProperties }) {
|
|
115
|
+
return (
|
|
116
|
+
<span
|
|
117
|
+
style={{
|
|
118
|
+
fontSize: u(11.5),
|
|
119
|
+
fontWeight: 520,
|
|
120
|
+
lineHeight: 1.34,
|
|
121
|
+
overflow: "hidden",
|
|
122
|
+
...(lines === 1 ? { display: "block", whiteSpace: "nowrap", textOverflow: "ellipsis" } : { display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical" }),
|
|
123
|
+
...style,
|
|
124
|
+
}}
|
|
125
|
+
>
|
|
126
|
+
<span style={{ marginRight: u(5) }}>{a.icon}</span>
|
|
127
|
+
{a.title[lang]}
|
|
128
|
+
</span>
|
|
129
|
+
)
|
|
130
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// What the CMS screens show: the product's own demo workspace, not invented content.
|
|
2
|
+
//
|
|
3
|
+
// Copied from spuntodotnet/spunto-cms@00155ca — apps/api/src/scripts/vitrine.ts, the seed behind the
|
|
4
|
+
// captures of cms.spunto.net (« Maison Lumen » in French, “Lumen House” in English: same structure,
|
|
5
|
+
// same covers, same dates, its own words in each language). Labels are the app's (lib/i18n/messages),
|
|
6
|
+
// chip colours its status palette (components/status-palette.ts), the block and event shapes its
|
|
7
|
+
// documentation's (content/docs). When the seed or the app changes, this file is what to refresh.
|
|
8
|
+
|
|
9
|
+
import type { Words } from "../../../facts"
|
|
10
|
+
|
|
11
|
+
export type Tint = "gray" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink"
|
|
12
|
+
|
|
13
|
+
/** The app's chip colours (Tailwind's 100 / 800 pairs, and the 500 for a dot). */
|
|
14
|
+
export const TINT: Record<Tint, { bg: string; fg: string; dot: string }> = {
|
|
15
|
+
gray: { bg: "#ebe9e8", fg: "#44403c", dot: "#a8a29e" },
|
|
16
|
+
orange: { bg: "#ffedd5", fg: "#9a3412", dot: "#f97316" },
|
|
17
|
+
yellow: { bg: "#fef3c7", fg: "#78350f", dot: "#f59e0b" },
|
|
18
|
+
green: { bg: "#d1fae5", fg: "#065f46", dot: "#10b981" },
|
|
19
|
+
blue: { bg: "#e0f2fe", fg: "#075985", dot: "#0ea5e9" },
|
|
20
|
+
purple: { bg: "#ede9fe", fg: "#5b21b6", dot: "#8b5cf6" },
|
|
21
|
+
pink: { bg: "#fce7f3", fg: "#9d174d", dot: "#ec4899" },
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type Rgb = [number, number, number]
|
|
25
|
+
|
|
26
|
+
/** The seed's covers: a gradient from → to, and a glow at 72 % / 30 %. */
|
|
27
|
+
const COVERS = {
|
|
28
|
+
braise: [[58, 18, 8], [214, 82, 30], [255, 196, 120]],
|
|
29
|
+
lagon: [[8, 40, 64], [24, 132, 160], [168, 236, 228]],
|
|
30
|
+
mousse: [[20, 46, 30], [86, 150, 92], [222, 240, 170]],
|
|
31
|
+
prune: [[40, 16, 56], [150, 70, 160], [255, 190, 220]],
|
|
32
|
+
sable: [[96, 64, 36], [222, 178, 120], [255, 244, 214]],
|
|
33
|
+
nuit: [[12, 14, 30], [52, 64, 140], [150, 180, 255]],
|
|
34
|
+
} satisfies Record<string, [Rgb, Rgb, Rgb]>
|
|
35
|
+
|
|
36
|
+
export type CoverId = keyof typeof COVERS
|
|
37
|
+
|
|
38
|
+
/** A cover in CSS — the seed paints the same picture into a PNG. */
|
|
39
|
+
export function cover(id: CoverId): string {
|
|
40
|
+
const [from, to, glow] = COVERS[id]
|
|
41
|
+
return `radial-gradient(circle at 72% 30%, rgba(${glow.join(",")},0.62), rgba(${glow.join(",")},0) 46%), linear-gradient(124deg, rgb(${from.join(",")}), rgb(${to.join(",")}))`
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type StatusKey = "idea" | "drafting" | "review" | "ready"
|
|
45
|
+
|
|
46
|
+
export const STATUSES: StatusKey[] = ["idea", "drafting", "review", "ready"]
|
|
47
|
+
|
|
48
|
+
export const STATUS: Record<StatusKey, { label: Words; tint: Tint }> = {
|
|
49
|
+
idea: { label: { en: "Idea", fr: "Idée" }, tint: "gray" },
|
|
50
|
+
drafting: { label: { en: "Drafting", fr: "En rédaction" }, tint: "blue" },
|
|
51
|
+
review: { label: { en: "In review", fr: "Relecture" }, tint: "orange" },
|
|
52
|
+
ready: { label: { en: "Ready", fr: "Prêt" }, tint: "green" },
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const TOPICS: { label: Words; tint: Tint }[] = [
|
|
56
|
+
{ label: { en: "Guide", fr: "Guide" }, tint: "blue" },
|
|
57
|
+
{ label: { en: "Case study", fr: "Étude de cas" }, tint: "purple" },
|
|
58
|
+
{ label: { en: "Announcement", fr: "Annonce" }, tint: "orange" },
|
|
59
|
+
{ label: { en: "Behind the scenes", fr: "Coulisses" }, tint: "pink" },
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
export const TAGS: { label: Words; tint: Tint }[] = [
|
|
63
|
+
{ label: { en: "seo", fr: "seo" }, tint: "green" },
|
|
64
|
+
{ label: { en: "product", fr: "produit" }, tint: "orange" },
|
|
65
|
+
{ label: { en: "api", fr: "api" }, tint: "blue" },
|
|
66
|
+
{ label: { en: "design", fr: "design" }, tint: "pink" },
|
|
67
|
+
{ label: { en: "team", fr: "équipe" }, tint: "yellow" },
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
/** The four members, and the tint the app gives each one's initials. */
|
|
71
|
+
export const PEOPLE: { name: Words; tint: string }[] = [
|
|
72
|
+
{ name: { en: "Maya Collins", fr: "Camille Roux" }, tint: "#e1e5e2" },
|
|
73
|
+
{ name: { en: "Sam Okafor", fr: "Yanis Benali" }, tint: "#cde6d5" },
|
|
74
|
+
{ name: { en: "Nora Lindqvist", fr: "Léa Martin" }, tint: "#e7d3e3" },
|
|
75
|
+
{ name: { en: "Theo Park", fr: "Hugo Petit" }, tint: "#dcdfe3" },
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
export type Article = {
|
|
79
|
+
/** Its number in the list: the card's key is `BLG-<n>`. */
|
|
80
|
+
n: number
|
|
81
|
+
icon: string
|
|
82
|
+
cover?: CoverId
|
|
83
|
+
status: StatusKey
|
|
84
|
+
topic: number
|
|
85
|
+
author: number
|
|
86
|
+
reviewers: number[]
|
|
87
|
+
date: string
|
|
88
|
+
tags: number[]
|
|
89
|
+
minutes: number
|
|
90
|
+
title: Words
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const LIST = { name: "Blog", key: "BLG", group: { en: "Editorial", fr: "Éditorial" } }
|
|
94
|
+
|
|
95
|
+
export const ARTICLES: Article[] = [
|
|
96
|
+
{ n: 1, icon: "⚡️", cover: "braise", status: "drafting", topic: 0, author: 0, reviewers: [1, 2], date: "2026-10-28", tags: [2, 0], minutes: 8, title: { en: "Wire Next.js to a headless CMS in ten minutes", fr: "Brancher Next.js sur un CMS headless en dix minutes" } },
|
|
97
|
+
{ n: 2, icon: "🧭", cover: "lagon", status: "review", topic: 1, author: 2, reviewers: [0], date: "2026-10-22", tags: [1], minutes: 6, title: { en: "How the Northwind team left their spreadsheet", fr: "Comment l’équipe d’Atelier Nord a quitté son tableur" } },
|
|
98
|
+
{ n: 3, icon: "📣", cover: "prune", status: "ready", topic: 2, author: 1, reviewers: [3, 0], date: "2026-10-20", tags: [2, 1], minutes: 3, title: { en: "Shared views are coming to the API", fr: "Les vues partagées arrivent dans l’API" } },
|
|
99
|
+
{ n: 4, icon: "🔎", cover: "mousse", status: "drafting", topic: 0, author: 3, reviewers: [2], date: "2026-11-04", tags: [0], minutes: 11, title: { en: "Writing to be found: our SEO playbook", fr: "Écrire pour être trouvé : notre méthode SEO" } },
|
|
100
|
+
{ n: 5, icon: "☕️", cover: "sable", status: "idea", topic: 3, author: 0, reviewers: [], date: "2026-11-12", tags: [4], minutes: 5, title: { en: "A week in the newsroom", fr: "Une semaine dans la rédaction" } },
|
|
101
|
+
{ n: 6, icon: "🔤", cover: "nuit", status: "ready", topic: 3, author: 2, reviewers: [1], date: "2026-10-15", tags: [3], minutes: 7, title: { en: "Typography: why we changed our typeface", fr: "Typographie : pourquoi nous avons changé de police" } },
|
|
102
|
+
{ n: 7, icon: "🤖", status: "review", topic: 1, author: 1, reviewers: [0, 3], date: "2026-10-30", tags: [2, 4], minutes: 9, title: { en: "An agent that writes our changelog for us", fr: "Un agent qui rédige le changelog à notre place" } },
|
|
103
|
+
{ n: 8, icon: "📦", status: "idea", topic: 0, author: 3, reviewers: [], date: "2026-11-18", tags: [1], minutes: 10, title: { en: "Migrating from Notion without losing history", fr: "Migrer depuis Notion sans perdre l’historique" } },
|
|
104
|
+
{ n: 9, icon: "🔔", status: "idea", topic: 0, author: 1, reviewers: [], date: "2026-11-25", tags: [2], minutes: 6, title: { en: "Webhooks: react to every publish", fr: "Webhooks : réagir à chaque publication" } },
|
|
105
|
+
{ n: 10, icon: "🎨", status: "ready", topic: 3, author: 2, reviewers: [0], date: "2026-10-08", tags: [3, 4], minutes: 4, title: { en: "The new brand kit, behind the scenes", fr: "Le nouveau kit de marque, côté coulisses" } },
|
|
106
|
+
]
|
|
107
|
+
|
|
108
|
+
export const article = (n: number) => ARTICLES[n - 1]
|
|
109
|
+
|
|
110
|
+
/** The list's three saved views: a board, a table, a grouped list. */
|
|
111
|
+
export const VIEWS: Words[] = [
|
|
112
|
+
{ en: "Planning", fr: "Planning" },
|
|
113
|
+
{ en: "Editorial calendar", fr: "Calendrier éditorial" },
|
|
114
|
+
{ en: "By topic", fr: "Par rubrique" },
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
/** The list's properties and the type each was declared with (the registry's own type names). */
|
|
118
|
+
export const FIELDS = {
|
|
119
|
+
topic: { name: { en: "Topic", fr: "Rubrique" }, type: { en: "Select", fr: "Liste de choix" } },
|
|
120
|
+
author: { name: { en: "Author", fr: "Auteur·rice" }, type: { en: "Person", fr: "Personne" } },
|
|
121
|
+
date: { name: { en: "Publish date", fr: "Parution" }, type: { en: "Date", fr: "Date" } },
|
|
122
|
+
tags: { name: { en: "Tags", fr: "Tags" }, type: { en: "Multi-select", fr: "Choix multiples" } },
|
|
123
|
+
reviewers: { name: { en: "Reviewers", fr: "Relecteurs" }, type: { en: "Members (multiple)", fr: "Membres (plusieurs)" } },
|
|
124
|
+
minutes: { name: { en: "Reading time (min)", fr: "Lecture (min)" }, type: { en: "Number", fr: "Nombre" } },
|
|
125
|
+
} satisfies Record<string, { name: Words; type: Words }>
|
|
126
|
+
|
|
127
|
+
/** The app's own labels. */
|
|
128
|
+
export const UI = {
|
|
129
|
+
back: { en: "← all lists", fr: "← toutes les listes" },
|
|
130
|
+
editView: { en: "Edit view", fr: "Éditer la vue" },
|
|
131
|
+
newView: { en: "New view", fr: "Nouvelle vue" },
|
|
132
|
+
newCard: { en: "New card", fr: "Nouvelle carte" },
|
|
133
|
+
title: { en: "Title", fr: "Titre" },
|
|
134
|
+
status: { en: "Status", fr: "Statut" },
|
|
135
|
+
publication: { en: "Publication", fr: "Publication" },
|
|
136
|
+
created: { en: "Created", fr: "Création" },
|
|
137
|
+
createdOn: { en: "Oct 23, 2026", fr: "23 oct. 2026" },
|
|
138
|
+
draft: { en: "Draft", fr: "Brouillon" },
|
|
139
|
+
published: { en: "Published", fr: "Publiée" },
|
|
140
|
+
publish: { en: "Publish", fr: "Publier" },
|
|
141
|
+
saving: { en: "Saving…", fr: "Enregistrement…" },
|
|
142
|
+
saved: { en: "Saved", fr: "Enregistré" },
|
|
143
|
+
addProperty: { en: "Add a property", fr: "Ajouter une propriété" },
|
|
144
|
+
properties: { en: "Properties", fr: "Propriétés" },
|
|
145
|
+
} satisfies Record<string, Words>
|
|
146
|
+
|
|
147
|
+
/** The body of the first article, block by block (the seed's ARTICLE_FR / ARTICLE_EN). `**bold**` marks a bold run. */
|
|
148
|
+
export const BODY = {
|
|
149
|
+
lead: {
|
|
150
|
+
en: "A headless CMS separates **where you write** from **where you serve**. This guide shows how to wire a Next.js site to a list, with no export and no copy.",
|
|
151
|
+
fr: "Un CMS headless sépare **l’endroit où l’on écrit** de **l’endroit d’où l’on sert**. Ce guide montre comment brancher un site Next.js sur une liste, sans export ni copie.",
|
|
152
|
+
},
|
|
153
|
+
heading: { en: "What you need", fr: "Ce qu’il vous faut" },
|
|
154
|
+
todos: [
|
|
155
|
+
{ en: "A “Blog” list and its properties", fr: "Une liste « Blog » et ses propriétés" },
|
|
156
|
+
{ en: "A read-only API key, scoped to the workspace", fr: "Une clé d’API en lecture, limitée à l’espace" },
|
|
157
|
+
{ en: "A saved “Ready to publish” view", fr: "Une vue « Prêt à publier » enregistrée" },
|
|
158
|
+
],
|
|
159
|
+
callout: {
|
|
160
|
+
en: "The view your team looks at and the query your site makes are the **same definition**: change a filter here and you change what the API serves.",
|
|
161
|
+
fr: "La vue que voit l’équipe et la requête que fait le site sont la **même définition** : un filtre changé ici change ce que sert l’API.",
|
|
162
|
+
},
|
|
163
|
+
} satisfies Record<string, Words | Words[]>
|
|
164
|
+
|
|
165
|
+
/** What the kit says around a screen — its own captions, not the app's. */
|
|
166
|
+
export const CAPTION = {
|
|
167
|
+
webhook: { en: "Signed webhook", fr: "Webhook signé" },
|
|
168
|
+
webhookTo: { en: "your-site.com/hooks/cms", fr: "votre-site.fr/hooks/cms" },
|
|
169
|
+
slackChannel: { en: "#newsroom", fr: "#redaction" },
|
|
170
|
+
blocks: { en: "What your site reads", fr: "Ce que lit votre site" },
|
|
171
|
+
definition: { en: "The same view, from the API", fr: "La même vue, côté API" },
|
|
172
|
+
} satisfies Record<string, Words>
|