barakopress 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/LICENSE +21 -0
- package/README.md +274 -0
- package/dist/cms.d.ts +47 -0
- package/dist/cms.d.ts.map +1 -0
- package/dist/cms.js +131 -0
- package/dist/cms.js.map +1 -0
- package/dist/config.d.ts +91 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +75 -0
- package/dist/config.js.map +1 -0
- package/dist/delivery.d.ts +45 -0
- package/dist/delivery.d.ts.map +1 -0
- package/dist/delivery.js +62 -0
- package/dist/delivery.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/markdown.d.ts +5 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +91 -0
- package/dist/markdown.js.map +1 -0
- package/dist/routes/feed.d.ts +3 -0
- package/dist/routes/feed.d.ts.map +1 -0
- package/dist/routes/feed.js +73 -0
- package/dist/routes/feed.js.map +1 -0
- package/dist/routes/revalidate.d.ts +25 -0
- package/dist/routes/revalidate.d.ts.map +1 -0
- package/dist/routes/revalidate.js +136 -0
- package/dist/routes/revalidate.js.map +1 -0
- package/dist/routes/robots.d.ts +4 -0
- package/dist/routes/robots.d.ts.map +1 -0
- package/dist/routes/robots.js +18 -0
- package/dist/routes/robots.js.map +1 -0
- package/dist/routes/sitemap.d.ts +4 -0
- package/dist/routes/sitemap.d.ts.map +1 -0
- package/dist/routes/sitemap.js +33 -0
- package/dist/routes/sitemap.js.map +1 -0
- package/dist/screens/archive.d.ts +13 -0
- package/dist/screens/archive.d.ts.map +1 -0
- package/dist/screens/archive.js +47 -0
- package/dist/screens/archive.js.map +1 -0
- package/dist/screens/blog-index.d.ts +9 -0
- package/dist/screens/blog-index.d.ts.map +1 -0
- package/dist/screens/blog-index.js +38 -0
- package/dist/screens/blog-index.js.map +1 -0
- package/dist/screens/blog-post.d.ts +20 -0
- package/dist/screens/blog-post.d.ts.map +1 -0
- package/dist/screens/blog-post.js +103 -0
- package/dist/screens/blog-post.js.map +1 -0
- package/dist/screens/post-view.d.ts +8 -0
- package/dist/screens/post-view.d.ts.map +1 -0
- package/dist/screens/post-view.js +19 -0
- package/dist/screens/post-view.js.map +1 -0
- package/package.json +76 -0
- package/src/cms.ts +196 -0
- package/src/config.ts +159 -0
- package/src/delivery.ts +134 -0
- package/src/index.ts +69 -0
- package/src/markdown.ts +96 -0
- package/src/routes/feed.ts +79 -0
- package/src/routes/revalidate.ts +157 -0
- package/src/routes/robots.ts +20 -0
- package/src/routes/sitemap.ts +35 -0
- package/src/screens/archive.tsx +79 -0
- package/src/screens/blog-index.tsx +122 -0
- package/src/screens/blog-post.tsx +110 -0
- package/src/screens/post-view.tsx +84 -0
- package/src/styles.css +314 -0
package/src/styles.css
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Signal, the barakoCMS palette, as plain CSS custom properties.
|
|
3
|
+
*
|
|
4
|
+
* Copied from barakoBrew's globals.css so this site and the console look like one product. No
|
|
5
|
+
* Tailwind and no component library here on purpose: a starter that ships a design system is a
|
|
6
|
+
* template somebody has to delete their way out of. Take the tokens, bring your own framework.
|
|
7
|
+
*
|
|
8
|
+
* Light only. Dark mode was deferred in the design rather than drawn, so there is no theme to
|
|
9
|
+
* switch to and no toggle pretending otherwise.
|
|
10
|
+
*
|
|
11
|
+
* The rule doing most of the work: every machine-produced value (a slug, an id, a timestamp, a
|
|
12
|
+
* route) is monospace with tabular numerals, and human prose is not. That single distinction is
|
|
13
|
+
* what makes the surface read as a developer tool.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
:root {
|
|
17
|
+
--background: #fafafc;
|
|
18
|
+
--foreground: #101223;
|
|
19
|
+
--muted: #f2f2f7;
|
|
20
|
+
--muted-foreground: #4a4d63;
|
|
21
|
+
--card: #ffffff;
|
|
22
|
+
--border: #e6e6ef;
|
|
23
|
+
--primary: #5a46d6;
|
|
24
|
+
--primary-foreground: #ffffff;
|
|
25
|
+
|
|
26
|
+
--radius-chip: 0.5625rem;
|
|
27
|
+
--radius-control: 0.6875rem;
|
|
28
|
+
--radius-card: 0.875rem;
|
|
29
|
+
|
|
30
|
+
--font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
31
|
+
--font-display: "Sora", var(--font-sans);
|
|
32
|
+
--font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
* {
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
html,
|
|
40
|
+
body {
|
|
41
|
+
margin: 0;
|
|
42
|
+
padding: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body {
|
|
46
|
+
background: var(--background);
|
|
47
|
+
color: var(--foreground);
|
|
48
|
+
font-family: var(--font-sans);
|
|
49
|
+
font-size: 17px;
|
|
50
|
+
line-height: 1.65;
|
|
51
|
+
-webkit-font-smoothing: antialiased;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
h1,
|
|
55
|
+
h2,
|
|
56
|
+
h3 {
|
|
57
|
+
font-family: var(--font-display);
|
|
58
|
+
letter-spacing: -0.02em;
|
|
59
|
+
line-height: 1.15;
|
|
60
|
+
margin: 0 0 0.6rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
h1 {
|
|
64
|
+
font-size: 2.6rem;
|
|
65
|
+
font-weight: 700;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
h2 {
|
|
69
|
+
font-size: 1.5rem;
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
a {
|
|
74
|
+
color: var(--primary);
|
|
75
|
+
text-decoration: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
a:hover {
|
|
79
|
+
text-decoration: underline;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
code,
|
|
83
|
+
.mono,
|
|
84
|
+
time {
|
|
85
|
+
font-family: var(--font-mono);
|
|
86
|
+
font-variant-numeric: tabular-nums;
|
|
87
|
+
font-size: 0.88em;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.shell {
|
|
91
|
+
max-width: 46rem;
|
|
92
|
+
margin: 0 auto;
|
|
93
|
+
padding: 2.5rem 1.25rem 6rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.topbar {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: space-between;
|
|
100
|
+
gap: 1rem;
|
|
101
|
+
padding: 1rem 1.25rem;
|
|
102
|
+
border-bottom: 1px solid var(--border);
|
|
103
|
+
background: var(--card);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.topbar .brand {
|
|
107
|
+
font-family: var(--font-display);
|
|
108
|
+
font-weight: 700;
|
|
109
|
+
color: var(--foreground);
|
|
110
|
+
letter-spacing: -0.01em;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.card {
|
|
114
|
+
background: var(--card);
|
|
115
|
+
border: 1px solid var(--border);
|
|
116
|
+
border-radius: var(--radius-card);
|
|
117
|
+
padding: 1.4rem 1.5rem;
|
|
118
|
+
margin-bottom: 1rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.card h2 {
|
|
122
|
+
margin-bottom: 0.25rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.meta {
|
|
126
|
+
color: var(--muted-foreground);
|
|
127
|
+
font-size: 0.85rem;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.btn {
|
|
131
|
+
display: inline-block;
|
|
132
|
+
border: 0;
|
|
133
|
+
border-radius: var(--radius-control);
|
|
134
|
+
background: var(--primary);
|
|
135
|
+
color: var(--primary-foreground);
|
|
136
|
+
font: inherit;
|
|
137
|
+
font-weight: 600;
|
|
138
|
+
font-size: 0.95rem;
|
|
139
|
+
padding: 0.6rem 1.1rem;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.btn.ghost {
|
|
144
|
+
background: transparent;
|
|
145
|
+
color: var(--muted-foreground);
|
|
146
|
+
border: 1px solid var(--border);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.field {
|
|
150
|
+
display: block;
|
|
151
|
+
margin-bottom: 0.9rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.field span {
|
|
155
|
+
display: block;
|
|
156
|
+
font-size: 0.85rem;
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
margin-bottom: 0.3rem;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.field input {
|
|
162
|
+
width: 100%;
|
|
163
|
+
font: inherit;
|
|
164
|
+
padding: 0.6rem 0.75rem;
|
|
165
|
+
border: 1px solid var(--border);
|
|
166
|
+
border-radius: var(--radius-control);
|
|
167
|
+
background: var(--card);
|
|
168
|
+
color: var(--foreground);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.field input:focus-visible {
|
|
172
|
+
outline: 2px solid var(--primary);
|
|
173
|
+
outline-offset: 1px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.notice {
|
|
177
|
+
border: 1px solid var(--border);
|
|
178
|
+
border-left: 4px solid var(--primary);
|
|
179
|
+
border-radius: var(--radius-chip);
|
|
180
|
+
background: var(--muted);
|
|
181
|
+
padding: 0.9rem 1.1rem;
|
|
182
|
+
margin-bottom: 1.5rem;
|
|
183
|
+
font-size: 0.95rem;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.error {
|
|
187
|
+
border-left-color: #c0392b;
|
|
188
|
+
color: #7d241a;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* barakoPress: the blog surface on top of the Signal tokens above. */
|
|
192
|
+
|
|
193
|
+
.masthead {
|
|
194
|
+
margin-bottom: 2.5rem;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.masthead h1 {
|
|
198
|
+
font-size: 2.9rem;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.tagline {
|
|
202
|
+
color: var(--muted-foreground);
|
|
203
|
+
font-size: 1.1rem;
|
|
204
|
+
margin: 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.featured-card {
|
|
208
|
+
border-color: var(--primary);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.chip {
|
|
212
|
+
display: inline-block;
|
|
213
|
+
font-family: var(--font-mono);
|
|
214
|
+
font-size: 0.7rem;
|
|
215
|
+
letter-spacing: 0.08em;
|
|
216
|
+
text-transform: uppercase;
|
|
217
|
+
color: var(--primary);
|
|
218
|
+
background: #eeebfd;
|
|
219
|
+
border-radius: var(--radius-chip);
|
|
220
|
+
padding: 0.15rem 0.5rem;
|
|
221
|
+
margin-bottom: 0.5rem;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.excerpt {
|
|
225
|
+
margin: 0.5rem 0 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.tags {
|
|
229
|
+
margin: 0.9rem 0 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.tag {
|
|
233
|
+
font-family: var(--font-mono);
|
|
234
|
+
font-size: 0.78rem;
|
|
235
|
+
color: var(--muted-foreground);
|
|
236
|
+
background: var(--muted);
|
|
237
|
+
border-radius: var(--radius-chip);
|
|
238
|
+
padding: 0.12rem 0.45rem;
|
|
239
|
+
margin-right: 0.35rem;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.cover {
|
|
243
|
+
width: 100%;
|
|
244
|
+
border-radius: var(--radius-card);
|
|
245
|
+
margin: 1.5rem 0;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.preview-banner {
|
|
249
|
+
border-left-color: #b8860b;
|
|
250
|
+
background: #fdf6e3;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.foot {
|
|
254
|
+
max-width: 46rem;
|
|
255
|
+
margin: 0 auto;
|
|
256
|
+
padding: 2rem 1.25rem 4rem;
|
|
257
|
+
border-top: 1px solid var(--border);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* Rendered markdown. The only place this site emits HTML it did not write itself, so the rules
|
|
261
|
+
here are visual only; the safety is in lib/markdown.ts. */
|
|
262
|
+
.prose {
|
|
263
|
+
font-size: 1.05rem;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.prose h2 {
|
|
267
|
+
margin-top: 2.2rem;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.prose h3 {
|
|
271
|
+
margin-top: 1.6rem;
|
|
272
|
+
font-size: 1.15rem;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.prose pre {
|
|
276
|
+
background: var(--foreground);
|
|
277
|
+
color: #e8e9f2;
|
|
278
|
+
padding: 1rem 1.15rem;
|
|
279
|
+
border-radius: var(--radius-control);
|
|
280
|
+
overflow-x: auto;
|
|
281
|
+
font-size: 0.86rem;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.prose pre code {
|
|
285
|
+
background: none;
|
|
286
|
+
padding: 0;
|
|
287
|
+
color: inherit;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.prose blockquote {
|
|
291
|
+
margin: 1.5rem 0;
|
|
292
|
+
padding-left: 1.1rem;
|
|
293
|
+
border-left: 4px solid var(--primary);
|
|
294
|
+
color: var(--muted-foreground);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.prose img {
|
|
298
|
+
max-width: 100%;
|
|
299
|
+
border-radius: var(--radius-control);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.prose table {
|
|
303
|
+
width: 100%;
|
|
304
|
+
border-collapse: collapse;
|
|
305
|
+
margin: 1.4rem 0;
|
|
306
|
+
font-size: 0.95rem;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.prose th,
|
|
310
|
+
.prose td {
|
|
311
|
+
border: 1px solid var(--border);
|
|
312
|
+
padding: 0.5rem 0.7rem;
|
|
313
|
+
text-align: left;
|
|
314
|
+
}
|