bloggie 0.4.1 → 0.4.2
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/AGENTS.md +3 -0
- package/layouts/Base.astro +3 -1
- package/package.json +1 -1
- package/styles/blog.js +3 -0
- package/styles/site.css +0 -147
- package/template/AGENTS.md +3 -2
- package/template/package.json +1 -1
- package/template/src/styles/site.css +58 -0
package/AGENTS.md
CHANGED
|
@@ -28,5 +28,8 @@ and figures. `template/` is the starter blog that `scripts/create.js` copies (`n
|
|
|
28
28
|
`git subtree push` a blog's history here, never force-push main, and keep main buildable: the demo deploys from it.
|
|
29
29
|
A blog takes new commits with `npm run bloggie:update` (`scripts/update.js`). It and `publish.js --main` merge with
|
|
30
30
|
`scripts/subtree.js`, which changes only `bloggie/` and needs only it committed, not `git subtree merge`.
|
|
31
|
+
- Styles: `styles/site.css` and `styles/slides.css` make posts and decks work and look good with no other CSS. A
|
|
32
|
+
blog's own look goes in its `src/styles/*.css`, which loads after them; the template's holds a few writing styles.
|
|
33
|
+
Put a convention that only some blogs use (a callout, a table variant) in the template, not here.
|
|
31
34
|
- Check a change in a blog: `npm run build` and `npm run e2e` there. For the starter blog, make one with
|
|
32
35
|
`node scripts/create.js <folder> --copy-engine` and run the same.
|
package/layouts/Base.astro
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
// The HTML shell of every page: head, site styles, KaTeX's styles and the blog's symbol colors (src/roles.js). Pages
|
|
3
|
-
// pass a title and description.
|
|
3
|
+
// pass a title and description. Bloggie's styles (styles/site.css) make a blog work and look plain and clean on their
|
|
4
|
+
// own; every .css file in the blog's src/styles/ loads after them, so the blog's own rules win.
|
|
4
5
|
import 'katex/dist/katex.min.css'
|
|
5
6
|
import '../styles/site.css'
|
|
7
|
+
import '../styles/blog.js'
|
|
6
8
|
import { site } from '@/site.js'
|
|
7
9
|
import { roleCss } from '../lib/roles.js'
|
|
8
10
|
|
package/package.json
CHANGED
package/styles/blog.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// The blog's own styles: every .css file in its src/styles/. Base.astro imports this after styles/site.css, so these
|
|
2
|
+
// load after Bloggie's and win. (In its own module: Vite moves a glob's imports to the top of the file that has it.)
|
|
3
|
+
import.meta.glob('/src/styles/*.css', { eager: true })
|
package/styles/site.css
CHANGED
|
@@ -301,47 +301,6 @@ pre.astro-code code {
|
|
|
301
301
|
margin-top: 0.4rem;
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
/* A small dropdown under a row's name (the learned weights of that row's model), in tabular digits. Its text
|
|
305
|
-
wraps, so that an open one widens its column only up to the table's width. */
|
|
306
|
-
.wrap .num-table td > details {
|
|
307
|
-
margin-top: 0.15rem;
|
|
308
|
-
font: 0.78rem/1.45 var(--sans);
|
|
309
|
-
font-variant-numeric: tabular-nums;
|
|
310
|
-
color: var(--text-secondary);
|
|
311
|
-
white-space: normal;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.wrap .num-table td > details > summary {
|
|
315
|
-
width: fit-content;
|
|
316
|
-
cursor: pointer;
|
|
317
|
-
color: var(--text-muted);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
.wrap .num-table td > details > summary:hover,
|
|
321
|
-
.wrap .num-table td > details[open] > summary {
|
|
322
|
-
color: var(--text-primary);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
/* A review of an earlier post, collapsed until the reader opens it: `<details class="review">` with a `<summary>`. */
|
|
326
|
-
.wrap details.review {
|
|
327
|
-
margin: 1.6rem 0;
|
|
328
|
-
padding: 0.7rem 1.1rem;
|
|
329
|
-
border: 1px solid var(--rule);
|
|
330
|
-
border-radius: 8px;
|
|
331
|
-
background: var(--surface-1);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.wrap details.review > summary {
|
|
335
|
-
cursor: pointer;
|
|
336
|
-
font: 600 0.95rem var(--sans);
|
|
337
|
-
color: var(--text-secondary);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.wrap details.review[open] > summary {
|
|
341
|
-
margin-bottom: 0.6rem;
|
|
342
|
-
color: var(--text-primary);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
304
|
/* A baseline row, a check rather than a contender: `<span class="baseline">` around its name greys the whole row. */
|
|
346
305
|
.wrap .num-table tr:has(.baseline) {
|
|
347
306
|
color: var(--text-muted);
|
|
@@ -554,34 +513,6 @@ blockquote {
|
|
|
554
513
|
color: var(--text-secondary);
|
|
555
514
|
}
|
|
556
515
|
|
|
557
|
-
/* A quotation the story leans on, set apart from the prose: <blockquote class="pullquote"> holds the words as a
|
|
558
|
-
paragraph and the source in a <footer>. Larger italic type in the text color, the source small below it. */
|
|
559
|
-
blockquote.pullquote {
|
|
560
|
-
margin: 2rem 0;
|
|
561
|
-
padding: 0.2rem 0 0.2rem 1.25rem;
|
|
562
|
-
border-left: 3px solid var(--text-primary);
|
|
563
|
-
color: var(--text-primary);
|
|
564
|
-
font-size: 1.28rem;
|
|
565
|
-
line-height: 1.5;
|
|
566
|
-
font-style: italic;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.pullquote p {
|
|
570
|
-
margin: 0;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
.pullquote footer {
|
|
574
|
-
margin-top: 0.6rem;
|
|
575
|
-
font-family: var(--sans);
|
|
576
|
-
font-size: 0.85rem;
|
|
577
|
-
font-style: normal;
|
|
578
|
-
color: var(--text-secondary);
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
.pullquote footer::before {
|
|
582
|
-
content: '— ';
|
|
583
|
-
}
|
|
584
|
-
|
|
585
516
|
.note {
|
|
586
517
|
font-size: 0.95rem;
|
|
587
518
|
color: var(--text-secondary);
|
|
@@ -590,26 +521,6 @@ blockquote.pullquote {
|
|
|
590
521
|
margin-top: 2rem;
|
|
591
522
|
}
|
|
592
523
|
|
|
593
|
-
/* A key term at its definition, one the rest of the post depends on: <dfn>attention</dfn> in a post, where **bold** marks
|
|
594
|
-
every other defined term. Bold, with an amber marker under the lower part of the line; amber is no symbol role's
|
|
595
|
-
color (--role-*), so a marked word is never read as a colored symbol. */
|
|
596
|
-
.wrap dfn {
|
|
597
|
-
font-style: normal;
|
|
598
|
-
font-weight: 700;
|
|
599
|
-
background: linear-gradient(transparent 60%, color-mix(in srgb, var(--series-4) 40%, transparent) 60%);
|
|
600
|
-
padding: 0 0.08em;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/* A line the argument turns on, set large and marked: <p class="standout">Are we ready?</p>. */
|
|
604
|
-
.standout {
|
|
605
|
-
font: 600 clamp(1.7rem, 4.2vw, 2.2rem)/1.2 var(--serif);
|
|
606
|
-
letter-spacing: -0.02em;
|
|
607
|
-
color: var(--text-primary);
|
|
608
|
-
margin: 2.5rem 0 1.5rem;
|
|
609
|
-
padding: 0.15rem 0 0.15rem 1rem;
|
|
610
|
-
border-left: 5px solid var(--series-1);
|
|
611
|
-
}
|
|
612
|
-
|
|
613
524
|
/* An addendum after the post, such as its related work: the same column in quieter, smaller type, below a rule.
|
|
614
525
|
<div class="addendum"> around the section (blank lines inside, so its Markdown still renders). */
|
|
615
526
|
.addendum {
|
|
@@ -623,12 +534,6 @@ blockquote.pullquote {
|
|
|
623
534
|
color: var(--text-secondary);
|
|
624
535
|
}
|
|
625
536
|
|
|
626
|
-
/* A faint aside in the prose, a detail the reader may skip: <p class="faint">…</p>. */
|
|
627
|
-
.faint {
|
|
628
|
-
font-size: 0.9rem;
|
|
629
|
-
color: var(--text-muted);
|
|
630
|
-
}
|
|
631
|
-
|
|
632
537
|
/* --- table of contents (Post.astro's <nav data-toc>, bloggie/lib/toc.js) ------------------------------------------------
|
|
633
538
|
Wide (75rem and more): a list in the margin left of the text. Narrow: a bar at the top that comes in when the reader
|
|
634
539
|
scrolls up, and opens the list. */
|
|
@@ -1197,13 +1102,6 @@ svg text.mark-label {
|
|
|
1197
1102
|
font-weight: 600;
|
|
1198
1103
|
}
|
|
1199
1104
|
|
|
1200
|
-
/* Prose references to a plotted series carry the series color and its line style. */
|
|
1201
|
-
.series-word { font-weight: 600; text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
|
|
1202
|
-
.soft-word { color: var(--series-1); text-decoration-color: var(--series-1); }
|
|
1203
|
-
.discrete-word { color: var(--series-2); text-decoration-color: var(--series-2); text-decoration-style: dashed; }
|
|
1204
|
-
.soft-key::before, .discrete-key::before { content: ''; display: inline-block; width: 0.9rem; margin-right: 0.3rem; vertical-align: middle; border-top: 2px solid var(--series-1); }
|
|
1205
|
-
.discrete-key::before { border-top: 2px dashed var(--series-2); }
|
|
1206
|
-
|
|
1207
1105
|
.figure-source {
|
|
1208
1106
|
margin: 0 0 1.1rem;
|
|
1209
1107
|
text-align: left;
|
|
@@ -1607,34 +1505,6 @@ svg text.mark-label {
|
|
|
1607
1505
|
margin-right: 0.15rem;
|
|
1608
1506
|
}
|
|
1609
1507
|
|
|
1610
|
-
/* Two equation cards side by side, to compare two models term by term: `<div class="eq-pair figure-wider">` around
|
|
1611
|
-
two .eq-card, each led by `<p class="eq-pair-title">` that names its model. One column on a narrow screen. */
|
|
1612
|
-
.eq-pair {
|
|
1613
|
-
display: grid;
|
|
1614
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1615
|
-
gap: 0 2.5rem;
|
|
1616
|
-
margin-block: 1.6rem;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
.eq-pair > .eq-card {
|
|
1620
|
-
max-width: none;
|
|
1621
|
-
margin: 0;
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
.eq-pair-title {
|
|
1625
|
-
margin: 0;
|
|
1626
|
-
font: 600 0.9rem var(--sans);
|
|
1627
|
-
color: var(--text-secondary);
|
|
1628
|
-
text-align: center;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
@media (max-width: 52rem) {
|
|
1632
|
-
.eq-pair {
|
|
1633
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1634
|
-
gap: 1.2rem;
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
1508
|
/* On a phone an equation that is still wider than the card scrolls inside it (.katex-display). */
|
|
1639
1509
|
@media (max-width: 560px) {
|
|
1640
1510
|
.eq-card { padding-inline: 0.6rem; }
|
|
@@ -1665,23 +1535,6 @@ svg text.mark-label {
|
|
|
1665
1535
|
font-size: 0.85em;
|
|
1666
1536
|
}
|
|
1667
1537
|
|
|
1668
|
-
/* A small figure beside the text (a wrapfig): floats right in the text column on a wide screen, and sits in
|
|
1669
|
-
the flow, centered, on a phone. Equation cards and wide figures start below it. */
|
|
1670
|
-
.wrap .figure-aside {
|
|
1671
|
-
float: right;
|
|
1672
|
-
width: 15rem;
|
|
1673
|
-
margin: 0.3rem 0 1rem 1.5rem;
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
@media (max-width: 40rem) {
|
|
1677
|
-
.wrap .figure-aside {
|
|
1678
|
-
float: none;
|
|
1679
|
-
width: auto;
|
|
1680
|
-
max-width: 18rem;
|
|
1681
|
-
margin: 1.2rem auto;
|
|
1682
|
-
}
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
1538
|
.eq-card,
|
|
1686
1539
|
.wrap > .figure-wide,
|
|
1687
1540
|
.wrap > .figure-wider,
|
package/template/AGENTS.md
CHANGED
|
@@ -26,8 +26,9 @@ node_modules/bloggie/ the engine, Bloggie, an npm package (in a blog ma
|
|
|
26
26
|
- A post's slug is stable and has no date; the date is front matter. The home page lists posts newest first.
|
|
27
27
|
Front matter `tags: [wip]` marks a draft and `tags: [archived]` hides a post; add a tag only when the author asks.
|
|
28
28
|
Set `edited:` to the day you change a post's text, results or figures.
|
|
29
|
-
-
|
|
30
|
-
|
|
29
|
+
- Bloggie's CSS (`node_modules/bloggie/styles/site.css`: color tokens, the figure kit `.viz`, `.controls`, `.readout`)
|
|
30
|
+
gives every page its base look. This blog's own styles go in `src/styles/site.css`, which loads after it and wins.
|
|
31
|
+
A figure's own CSS stays in its `.svelte` file.
|
|
31
32
|
- Dependencies come from npm through `package.json`; no CDN script tags.
|
|
32
33
|
- Import the engine's code as `bloggie/…` (`import { series } from 'bloggie/lib/colors.js'`) and its components and
|
|
33
34
|
layouts as `@bloggie/…`. Code for one post or figure stays in `src/`. Never edit `node_modules/bloggie/`: npm
|
package/template/package.json
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* This blog's own styles, loaded after Bloggie's (bloggie/styles/site.css), so a rule here wins over the engine's.
|
|
2
|
+
Every .css file in src/styles/ is loaded on every page; change or delete these to suit the blog. */
|
|
3
|
+
|
|
4
|
+
/* Writing styles that AGENTS.md suggests: <dfn>, <p class="standout">, a pull quote and a faint aside. */
|
|
5
|
+
|
|
6
|
+
/* A quotation the story leans on, set apart from the prose: <blockquote class="pullquote"> holds the words as a
|
|
7
|
+
paragraph and the source in a <footer>. Larger italic type in the text color, the source small below it. */
|
|
8
|
+
blockquote.pullquote {
|
|
9
|
+
margin: 2rem 0;
|
|
10
|
+
padding: 0.2rem 0 0.2rem 1.25rem;
|
|
11
|
+
border-left: 3px solid var(--text-primary);
|
|
12
|
+
color: var(--text-primary);
|
|
13
|
+
font-size: 1.28rem;
|
|
14
|
+
line-height: 1.5;
|
|
15
|
+
font-style: italic;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pullquote p {
|
|
19
|
+
margin: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.pullquote footer {
|
|
23
|
+
margin-top: 0.6rem;
|
|
24
|
+
font-family: var(--sans);
|
|
25
|
+
font-size: 0.85rem;
|
|
26
|
+
font-style: normal;
|
|
27
|
+
color: var(--text-secondary);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pullquote footer::before {
|
|
31
|
+
content: '— ';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* A key term at its definition, one the rest of the post depends on: <dfn>attention</dfn> in a post, where **bold** marks
|
|
35
|
+
every other defined term. Bold, with an amber marker under the lower part of the line; amber is no symbol role's
|
|
36
|
+
color (--role-*), so a marked word is never read as a colored symbol. */
|
|
37
|
+
.wrap dfn {
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
background: linear-gradient(transparent 60%, color-mix(in srgb, var(--series-4) 40%, transparent) 60%);
|
|
41
|
+
padding: 0 0.08em;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* A line the argument turns on, set large and marked: <p class="standout">Are we ready?</p>. */
|
|
45
|
+
.standout {
|
|
46
|
+
font: 600 clamp(1.7rem, 4.2vw, 2.2rem)/1.2 var(--serif);
|
|
47
|
+
letter-spacing: -0.02em;
|
|
48
|
+
color: var(--text-primary);
|
|
49
|
+
margin: 2.5rem 0 1.5rem;
|
|
50
|
+
padding: 0.15rem 0 0.15rem 1rem;
|
|
51
|
+
border-left: 5px solid var(--series-1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* A faint aside in the prose, a detail the reader may skip: <p class="faint">…</p>. */
|
|
55
|
+
.faint {
|
|
56
|
+
font-size: 0.9rem;
|
|
57
|
+
color: var(--text-muted);
|
|
58
|
+
}
|