@aitrien/motifspec 1.23.1 → 1.24.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/CHANGELOG.md +14 -0
- package/README.md +2 -1
- package/dist/codex.css +12 -8
- package/dist/favicon.svg +1 -0
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +20 -2
- package/dist/tokens.json +20 -2
- package/docs/components/search.md +1 -2
- package/docs/components/site-header.md +7 -5
- package/docs/foundations/ornaments.md +4 -0
- package/docs/hugo.md +3 -1
- package/layouts/_partials/motifspec/favicon.html +5 -0
- package/layouts/_partials/motifspec/site-header.html +11 -3
- package/package.json +2 -1
- package/scripts/lib.mjs +7 -0
- package/tokens/color.json +1 -1
- package/tokens/typography.json +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Every release of MotifSpec (named brand-codex until 1.10.0), newest first. Entries before 1.10.0 keep the names they were released under. Versions follow the rules in `CONVENTIONS.md`: renaming or removing a semantic token is major, adding tokens, components or icons is minor, and changing a value or fixing a description is a patch. `npm run build` fails if the version in `package.json` has no entry here.
|
|
4
4
|
|
|
5
|
+
## [1.24.1] - 2026-11-16
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- A documentation site's header shows its version beside the wordmark, in the role's place (`cx-header__brand`), still linking to the changelog. Like a role, it shows at the top of the page and goes when the wordmark compacts. It no longer sits with the controls, and the docs header shows no role. The menu's changelog row still carries the version.
|
|
9
|
+
- The search trigger (`search.md`) is a pill (`radius.pill`, was `radius.control`), with `space.inset.md` after the keys (was `space.inset.xs`).
|
|
10
|
+
|
|
11
|
+
## [1.24.0] - 2026-11-08
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- The mark: an acorn, drawn on the Yarndings 12 grid (a checked cup over a tapering nut), in `codex.glyphs.mark` on `font.family.ornament` as 12 rows of stitches. The validator checks its shape.
|
|
15
|
+
- `dist/favicon.svg` (npm: `@aitrien/motifspec/favicon.svg`), built from those rows with two stitches of margin, so each stitch is a whole pixel at 16, 32 and 48px. It is `color.ornament.rest` in each theme, whose description now names the mark.
|
|
16
|
+
- `motifspec/favicon.html`, which publishes it at `/cx/` and links it as the site's icon (`hugo.md`). motifspec.com uses it.
|
|
17
|
+
- The Ornaments page shows the mark at 16, 32, 48 and 96px.
|
|
18
|
+
|
|
5
19
|
## [1.23.1] - 2026-11-06
|
|
6
20
|
|
|
7
21
|
### Changed
|
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ Pin an exact version, as a Hugo site pins a tag: the version you install is the
|
|
|
82
82
|
| `@aitrien/motifspec/theme-init.js` | Inline it in `<head>` before the stylesheet so a stored theme applies before first paint. |
|
|
83
83
|
| `@aitrien/motifspec/plate.js`, `backdrop.html`, `backdrop-foot.html`, `backdrop-side.html` | The contour backdrop and its motion (`backdrop.md`). |
|
|
84
84
|
| `@aitrien/motifspec/icons.svg` | The icon sprite. Inline it once in `<body>`. |
|
|
85
|
+
| `@aitrien/motifspec/favicon.svg` | The mark, the acorn, as a favicon: link it with `<link rel="icon" type="image/svg+xml">`. It is `color.ornament.rest` in each theme. |
|
|
85
86
|
| `@aitrien/motifspec/tokens.js`, `tokens.json` | Every token with its value, tier and CSS name, for build tools. |
|
|
86
87
|
| `@aitrien/motifspec/check` | `checkText` and `checkProject` from the rule checker. |
|
|
87
88
|
| `@aitrien/motifspec/fonts/*` | The WOFF2 files, for preloading. |
|
|
@@ -174,7 +175,7 @@ site/ motifspec.com: a Hugo site whose pages are made from this RE
|
|
|
174
175
|
mcp/ The MCP server (server.mjs), its Lambda handler, bundle step and tests
|
|
175
176
|
infra/mcp.yml The server's AWS stack and deploy role (CloudFormation, applied by hand)
|
|
176
177
|
hugo.toml, go.mod Hugo module definition and its mounts
|
|
177
|
-
dist/ Generated: tokens.css, components in codex.css, chroma.css, fonts.css, icons.svg (sprite), tokens.json, tokens.js (ES module export), codex.js and theme-init.js (behaviour), backdrop.html, backdrop-foot.html and backdrop-side.html, plate.html and plate.js (backdrop and specimen plate), contrast.md
|
|
178
|
+
dist/ Generated: tokens.css, components in codex.css, chroma.css, fonts.css, icons.svg (sprite), tokens.json, tokens.js (ES module export), codex.js and theme-init.js (behaviour), backdrop.html, backdrop-foot.html and backdrop-side.html, plate.html and plate.js (backdrop and specimen plate), favicon.svg (the mark), contrast.md
|
|
178
179
|
```
|
|
179
180
|
|
|
180
181
|
## Commands
|
package/dist/codex.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
|
|
3
3
|
@font-face { font-family: "Yarndings 12"; src: url("../fonts/yarndings-12-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
|
|
4
4
|
|
|
5
|
-
/* MotifSpec 1.
|
|
5
|
+
/* MotifSpec 1.24.1 — generated from tokens/*.json. Do not edit.
|
|
6
6
|
Themes: semantic colours use light-dark(); color-scheme follows the system unless
|
|
7
7
|
<html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
|
|
8
8
|
:root {
|
|
@@ -603,12 +603,11 @@ p, li, dd, figcaption { text-wrap: pretty; }
|
|
|
603
603
|
.cx-page-footer .cx-meta a:hover { color: var(--cx-color-link-hover); text-decoration-thickness: var(--cx-border-width-emphasis); }
|
|
604
604
|
|
|
605
605
|
/* ------------------------------------------------------------ search (a dialog over the page, from the header) */
|
|
606
|
-
/* The trigger looks like the field it opens:
|
|
607
|
-
outlined pill in the nav beside it. */
|
|
606
|
+
/* The trigger looks like the field it opens: sunken, outlined and wide, a pill with room after the keys. */
|
|
608
607
|
.cx-search-trigger {
|
|
609
608
|
flex: 0 1 var(--cx-size-column-sidebar); min-width: 0; display: inline-flex; align-items: center; gap: var(--cx-space-inline-sm);
|
|
610
|
-
min-height: var(--cx-size-target-control); padding-inline: var(--cx-space-inset-sm) var(--cx-space-inset-
|
|
611
|
-
border: var(--cx-border-width-hairline) solid var(--cx-color-border-strong); border-radius: var(--cx-radius-
|
|
609
|
+
min-height: var(--cx-size-target-control); padding-inline: var(--cx-space-inset-sm) var(--cx-space-inset-md);
|
|
610
|
+
border: var(--cx-border-width-hairline) solid var(--cx-color-border-strong); border-radius: var(--cx-radius-pill);
|
|
612
611
|
background: var(--cx-color-surface-sunken); color: var(--cx-color-text-muted); font: inherit; font-size: var(--cx-font-size-small); cursor: text;
|
|
613
612
|
}
|
|
614
613
|
.cx-search-trigger:hover { color: var(--cx-color-text-secondary); }
|
|
@@ -725,21 +724,26 @@ p, li, dd, figcaption { text-wrap: pretty; }
|
|
|
725
724
|
/* The bar keeps its height while the wordmark changes size: the wordmark is a touch target high at any size, with its
|
|
726
725
|
text centred in it (align-content, as its line keeps the name and role on one baseline). */
|
|
727
726
|
.cx-header--docs .cx-wordmark { flex: none; padding-block: 0; align-content: center; }
|
|
727
|
+
/* A docs header's version sits beside the wordmark, in the role's place, on the wordmark's baseline. Its pill padding
|
|
728
|
+
is the gap between them. It is size.target.min high there, so lining up with the wordmark can't make the bar taller. */
|
|
729
|
+
.cx-header__brand { flex: none; display: flex; align-items: baseline; }
|
|
730
|
+
.cx-header__brand > .cx-header__version { min-height: var(--cx-size-target-min); }
|
|
728
731
|
/* A docs header sticks, with its surface, even without dist/codex.js: its menu and "On this page" open from it. */
|
|
729
732
|
.cx-backdrop-page .cx-header--docs:not([data-scrolled]) { position: sticky; background: var(--cx-color-surface-base); }
|
|
730
733
|
@media (width < 64rem) {
|
|
731
734
|
.cx-header--docs .cx-header__end { gap: var(--cx-space-inline-xs); }
|
|
732
|
-
.cx-header--docs .cx-nav, .cx-header--docs .cx-header__end > .cx-
|
|
735
|
+
.cx-header--docs .cx-nav, .cx-header--docs .cx-header__end > .cx-theme-toggle { display: none; }
|
|
733
736
|
.cx-header--docs .cx-wordmark { font-size: var(--cx-font-size-body); }
|
|
734
|
-
.cx-header--docs .cx-wordmark__role { display: none; }
|
|
737
|
+
.cx-header--docs .cx-wordmark__role, .cx-header__brand > .cx-header__version { display: none; }
|
|
735
738
|
.cx-header--docs[data-scrolled="false"] .cx-wordmark { font-size: var(--cx-font-size-heading-4); }
|
|
736
739
|
.cx-header--docs[data-scrolled="false"] .cx-wordmark__role { display: inline; }
|
|
740
|
+
.cx-header--docs[data-scrolled="false"] .cx-header__brand > .cx-header__version { display: inline-flex; }
|
|
737
741
|
.cx-header--docs[data-scrolled="false"] .cx-header__toc { display: none; }
|
|
738
742
|
}
|
|
739
743
|
@media (width >= 64rem) {
|
|
740
744
|
.cx-header__toc, .cx-header__menu { display: none; }
|
|
741
745
|
.cx-header--docs[data-scrolled="true"] .cx-wordmark { font-size: var(--cx-font-size-body); }
|
|
742
|
-
.cx-header--docs[data-scrolled="true"] .cx-wordmark__role { display: none; }
|
|
746
|
+
.cx-header--docs[data-scrolled="true"] .cx-wordmark__role, .cx-header--docs[data-scrolled="true"] .cx-header__brand > .cx-header__version { display: none; }
|
|
743
747
|
}
|
|
744
748
|
|
|
745
749
|
/* ------------------------------------------------------------ component preview (a live example above its code) */
|
package/dist/favicon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 16 16" shape-rendering="crispEdges"><title>acorn</title><style>path{fill:#208347}@media (prefers-color-scheme:dark){path{fill:#7dbc8e}}</style><path d="M5 0h2v1h-2zM5 1h2v1h-2zM2 2h8v1h-8zM1 3h2v1h-2zM4 3h1v1h-1zM7 3h1v1h-1zM9 3h2v1h-2zM1 4h1v1h-1zM3 4h1v1h-1zM5 4h2v1h-2zM8 4h1v1h-1zM10 4h1v1h-1zM1 5h10v1h-10zM2 6h8v1h-8zM2 7h8v1h-8zM2 8h8v1h-8zM3 9h6v1h-6zM4 10h4v1h-4zM5 11h2v1h-2z"/></svg>
|
package/dist/tokens.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* MotifSpec 1.
|
|
1
|
+
/* MotifSpec 1.24.1 — generated from tokens/*.json. Do not edit.
|
|
2
2
|
Themes: semantic colours use light-dark(); color-scheme follows the system unless
|
|
3
3
|
<html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
|
|
4
4
|
:root {
|
package/dist/tokens.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by npm run build. Do not edit.
|
|
2
|
-
export const version = "1.
|
|
2
|
+
export const version = "1.24.1";
|
|
3
3
|
export const changelog = "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md";
|
|
4
4
|
export const showcase = "https://motifspec.com";
|
|
5
5
|
export const tokens = [
|
|
@@ -936,7 +936,7 @@ export const tokens = [
|
|
|
936
936
|
"referencesDark": "primitive.color.sap.400",
|
|
937
937
|
"value": "#208347",
|
|
938
938
|
"valueDark": "#7dbc8e",
|
|
939
|
-
"description": "Yarndings ornaments and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
939
|
+
"description": "Yarndings ornaments, the mark (the favicon) and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
940
940
|
"pairsWith": [
|
|
941
941
|
{
|
|
942
942
|
"token": "color.surface.base",
|
|
@@ -3167,6 +3167,24 @@ export const tokens = [
|
|
|
3167
3167
|
"end-mark": "flower (after an article's last sentence)",
|
|
3168
3168
|
"empty-state": "sprout (404 and empty lists)"
|
|
3169
3169
|
},
|
|
3170
|
+
"mark": {
|
|
3171
|
+
"name": "acorn",
|
|
3172
|
+
"use": "An acorn on the same 12-stitch grid as the glyphs: a checked cup over a tapering nut. It is every site's favicon, from `motifspec/favicon.html` in Hugo or `favicon.svg` from npm, in `color.ornament.rest` for each theme. Use those; never redraw or recolour it.",
|
|
3173
|
+
"stitches": [
|
|
3174
|
+
".....##.....",
|
|
3175
|
+
".....##.....",
|
|
3176
|
+
"..########..",
|
|
3177
|
+
".##.#..#.##.",
|
|
3178
|
+
".#.#.##.#.#.",
|
|
3179
|
+
".##########.",
|
|
3180
|
+
"..########..",
|
|
3181
|
+
"..########..",
|
|
3182
|
+
"..########..",
|
|
3183
|
+
"...######...",
|
|
3184
|
+
"....####....",
|
|
3185
|
+
".....##....."
|
|
3186
|
+
]
|
|
3187
|
+
},
|
|
3170
3188
|
"forbidden": {
|
|
3171
3189
|
"chars": "uvwxyz[]{}",
|
|
3172
3190
|
"reason": "Faces, a robot, hearts and animals read as emoji. Never use them."
|
package/dist/tokens.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.24.1",
|
|
3
3
|
"changelog": "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md",
|
|
4
4
|
"showcase": "https://motifspec.com",
|
|
5
5
|
"tokens": [
|
|
@@ -936,7 +936,7 @@
|
|
|
936
936
|
"referencesDark": "primitive.color.sap.400",
|
|
937
937
|
"value": "#208347",
|
|
938
938
|
"valueDark": "#7dbc8e",
|
|
939
|
-
"description": "Yarndings ornaments and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
939
|
+
"description": "Yarndings ornaments, the mark (the favicon) and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
940
940
|
"pairsWith": [
|
|
941
941
|
{
|
|
942
942
|
"token": "color.surface.base",
|
|
@@ -3167,6 +3167,24 @@
|
|
|
3167
3167
|
"end-mark": "flower (after an article's last sentence)",
|
|
3168
3168
|
"empty-state": "sprout (404 and empty lists)"
|
|
3169
3169
|
},
|
|
3170
|
+
"mark": {
|
|
3171
|
+
"name": "acorn",
|
|
3172
|
+
"use": "An acorn on the same 12-stitch grid as the glyphs: a checked cup over a tapering nut. It is every site's favicon, from `motifspec/favicon.html` in Hugo or `favicon.svg` from npm, in `color.ornament.rest` for each theme. Use those; never redraw or recolour it.",
|
|
3173
|
+
"stitches": [
|
|
3174
|
+
".....##.....",
|
|
3175
|
+
".....##.....",
|
|
3176
|
+
"..########..",
|
|
3177
|
+
".##.#..#.##.",
|
|
3178
|
+
".#.#.##.#.#.",
|
|
3179
|
+
".##########.",
|
|
3180
|
+
"..########..",
|
|
3181
|
+
"..########..",
|
|
3182
|
+
"..########..",
|
|
3183
|
+
"...######...",
|
|
3184
|
+
"....####....",
|
|
3185
|
+
".....##....."
|
|
3186
|
+
]
|
|
3187
|
+
},
|
|
3170
3188
|
"forbidden": {
|
|
3171
3189
|
"chars": "uvwxyz[]{}",
|
|
3172
3190
|
"reason": "Faces, a robot, hearts and animals read as emoji. Never use them."
|
|
@@ -27,7 +27,6 @@ tokens:
|
|
|
27
27
|
- font.size.small
|
|
28
28
|
- font.tracking.ui
|
|
29
29
|
- font.weight.strong
|
|
30
|
-
- radius.control
|
|
31
30
|
- radius.pill
|
|
32
31
|
- size.column.card
|
|
33
32
|
- size.column.sidebar
|
|
@@ -60,7 +59,7 @@ A search control in the header that opens a dialog of results as you type, from
|
|
|
60
59
|
|
|
61
60
|
## Markup
|
|
62
61
|
|
|
63
|
-
The trigger goes in the header's end (`site-header.md`); the dialog can sit next to it. It looks like the field it opens:
|
|
62
|
+
The trigger goes in the header's end (`site-header.md`); the dialog can sit next to it. It looks like the field it opens: a pill (`radius.pill`) on `color.surface.sunken` with a `color.border.strong` outline, as wide as `size.column.sidebar` allows, with `space.inset.md` after the keys. Below `size.breakpoint.lg` it is an icon.
|
|
64
63
|
|
|
65
64
|
```html {preview=true}
|
|
66
65
|
<button class="cx-search-trigger" type="button" data-search-open aria-haspopup="dialog" aria-controls="cx-search" hidden>
|
|
@@ -96,12 +96,15 @@ The bar at the top of every page: wordmark, primary nav and the theme toggle. On
|
|
|
96
96
|
|
|
97
97
|
### In a documentation site
|
|
98
98
|
|
|
99
|
-
A documentation site's header (`cx-header--docs`) also carries search, a link out to the source repository,
|
|
99
|
+
A documentation site's header (`cx-header--docs`) also carries search, a link out to the source repository, and two `<details>` that take over below `size.breakpoint.lg`: "On this page" and a menu. Its nav holds only links out, since the page navigation lists the pages. The bar is one row of `size.target.touch` with `space.inset.xs` above and below, at every width and whatever size the wordmark is, which sits centred in it. The version, linking to the changelog, takes the role's place beside the wordmark (`cx-header__brand`): it shows at the top of the page and goes when the wordmark compacts, as a role does.
|
|
100
100
|
|
|
101
101
|
```html
|
|
102
102
|
<header class="cx-header cx-header--docs">
|
|
103
103
|
<div class="cx-container cx-header__inner">
|
|
104
|
-
<
|
|
104
|
+
<div class="cx-header__brand">
|
|
105
|
+
<a class="cx-wordmark" href="/">MotifSpec</a>
|
|
106
|
+
<a class="cx-header__version" href="/reference/changelog/">v1.22.0<span class="cx-visually-hidden">, changelog</span></a>
|
|
107
|
+
</div>
|
|
105
108
|
<div class="cx-header__end">
|
|
106
109
|
<details class="cx-header__toc" data-pagefind-ignore>
|
|
107
110
|
<summary>On this page<svg class="cx-icon cx-icon--sm cx-header__chevron" aria-hidden="true" focusable="false"><use href="#cx-icon-expand"></use></svg></summary>
|
|
@@ -116,7 +119,6 @@ A documentation site's header (`cx-header--docs`) also carries search, a link ou
|
|
|
116
119
|
<li><a href="https://github.com/owner/repo">GitHub<svg class="cx-icon cx-icon--sm" aria-hidden="true" focusable="false"><use href="#cx-icon-arrow-outward"></use></svg></a></li>
|
|
117
120
|
</ul>
|
|
118
121
|
</nav>
|
|
119
|
-
<a class="cx-header__version" href="/reference/changelog/">v1.22.0<span class="cx-visually-hidden">, changelog</span></a>
|
|
120
122
|
<button class="cx-theme-toggle" type="button" data-theme-toggle hidden aria-label="Switch to dark theme">…</button>
|
|
121
123
|
<details class="cx-header__menu">
|
|
122
124
|
<summary aria-label="Menu"><svg class="cx-icon" data-when="closed" aria-hidden="true" focusable="false"><use href="#cx-icon-menu"></use></svg><svg class="cx-icon" data-when="open" aria-hidden="true" focusable="false"><use href="#cx-icon-close"></use></svg></summary>
|
|
@@ -139,8 +141,8 @@ A documentation site's header (`cx-header--docs`) also carries search, a link ou
|
|
|
139
141
|
<!-- caption: The documentation header by width -->
|
|
140
142
|
| | Below `size.breakpoint.lg` | From `size.breakpoint.lg` |
|
|
141
143
|
|---|---|---|
|
|
142
|
-
| At the top of the page | The wordmark in full, search (an icon) and the menu | The wordmark in full, search (a field), the links out
|
|
143
|
-
| Scrolled | A compact wordmark, "On this page", search and the menu | The same, with a compact wordmark |
|
|
144
|
+
| At the top of the page | The wordmark in full with the version, search (an icon) and the menu | The wordmark in full with the version, search (a field), the links out and the theme toggle |
|
|
145
|
+
| Scrolled | A compact wordmark, "On this page", search and the menu | The same, with a compact wordmark and no version |
|
|
144
146
|
| The menu | A sheet under the bar: the page navigation scrolls; the external links, the changelog with the version, and the theme toggle stay at the bottom | Not shown: the side column has the navigation |
|
|
145
147
|
| "On this page" | A panel under the bar, with Back to top and the page's sections | Not shown: the article has its own |
|
|
146
148
|
|
|
@@ -16,6 +16,10 @@ The system's own ornaments always use these glyphs.
|
|
|
16
16
|
|
|
17
17
|
*Generated from `tokens/typography.json`: approved glyphs.*
|
|
18
18
|
|
|
19
|
+
## The mark
|
|
20
|
+
|
|
21
|
+
*Generated from `tokens/typography.json`: the mark.*
|
|
22
|
+
|
|
19
23
|
## Never used
|
|
20
24
|
|
|
21
25
|
*Generated from `tokens/typography.json`: forbidden glyphs.*
|
package/docs/hugo.md
CHANGED
|
@@ -29,7 +29,8 @@ Pin a release with `hugo mod get github.com/aitrien/motifspec@vX.Y.Z`. The modul
|
|
|
29
29
|
<meta charset="utf-8">
|
|
30
30
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
31
31
|
{{ partial "motifspec/head.html" . }}
|
|
32
|
-
{{
|
|
32
|
+
{{ partial "motifspec/favicon.html" . }}
|
|
33
|
+
{{/* the site's own <title> and meta description */}}
|
|
33
34
|
</head>
|
|
34
35
|
<body class="cx-backdrop-page">
|
|
35
36
|
{{ partial "motifspec/body-start.html" . }}
|
|
@@ -45,6 +46,7 @@ Pin a release with `hugo mod get github.com/aitrien/motifspec@vX.Y.Z`. The modul
|
|
|
45
46
|
| Partial | What it writes |
|
|
46
47
|
|---|---|
|
|
47
48
|
| `motifspec/head.html` | The stored-theme snippet, font preloads, `codex.css` and `codex.js`, in that order. |
|
|
49
|
+
| `motifspec/favicon.html` | The mark, the acorn, as the site's favicon: `dist/favicon.svg`, published at `/cx/` and fingerprinted. It is `color.ornament.rest` in each theme. |
|
|
48
50
|
| `motifspec/body-start.html` | Call with the page. On the home page, the head of the backdrop (on a documentation site's other pages, the side); then the icon sprite and the skip link to `#main`. |
|
|
49
51
|
| `motifspec/site-header.html` | `site-header.md`: wordmark from `site.Title` and `site.Params.role`, nav from `site.Menus.main` and the theme toggle. A menu entry is current when its `identifier` is the page's section; one whose URL starts with `http` gets the outward arrow. With `params.motifspec.search = true`, search comes first (`search.md`); with `params.motifspec.version` (and `changelog`, a URL), the version comes before the theme toggle. With `params.motifspec.layout = "documentation"`, it adds "On this page" and the menu, which take over below `size.breakpoint.lg` (`site-header.md`, In a documentation site). |
|
|
50
52
|
| `motifspec/body-end.html` | The foot of the backdrop, behind the footer, and `plate.js`, which settles the home page's contours and lets the pointer warm them. |
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{{- /* hugo.md: the mark as the site's favicon. dist/favicon.svg is built from codex.glyphs.mark in the pinned
|
|
2
|
+
release's color.accent.fill.rest, light and dark. Call it in <head> after head.html. */ -}}
|
|
3
|
+
{{- with resources.Get "motifspec/favicon.svg" | resources.Copy "cx/favicon.svg" | fingerprint }}
|
|
4
|
+
<link rel="icon" href="{{ .RelPermalink }}" type="image/svg+xml">
|
|
5
|
+
{{- end }}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{{- /* site-header.md. A child page marks its section (a post marks Writing). A menu entry whose URL starts with
|
|
2
2
|
"http" gets the outward arrow. Optional, from params.motifspec: search = true adds search (search.md);
|
|
3
|
-
version = "1.19.0" with changelog = "<url>" adds the version, linked to the changelog.
|
|
3
|
+
version = "1.19.0" with changelog = "<url>" adds the version, linked to the changelog. On a documentation site the
|
|
4
|
+
version sits beside the wordmark in place of the role, and shows and hides as the role does.
|
|
4
5
|
On a documentation site (params.motifspec.layout "documentation"), below size.breakpoint.lg the bar holds only
|
|
5
6
|
the wordmark, "On this page", search and the menu, whose sheet has the page navigation (docs-shell.md), the
|
|
6
7
|
menu's external links, the changelog and the theme toggle. */ -}}
|
|
@@ -9,7 +10,14 @@
|
|
|
9
10
|
{{- $external := where site.Menus.main "URL" "like" `^https?://` -}}
|
|
10
11
|
<header class="cx-header{{ if $docs }} cx-header--docs{{ end }}">
|
|
11
12
|
<div class="cx-container cx-header__inner">
|
|
13
|
+
{{- if and $docs $ms.version }}
|
|
14
|
+
<div class="cx-header__brand">
|
|
15
|
+
<a class="cx-wordmark" href="{{ site.Home.RelPermalink }}">{{ site.Title }}</a>
|
|
16
|
+
<a class="cx-header__version" href="{{ $ms.changelog | default "#" }}">v{{ $ms.version }}<span class="cx-visually-hidden">, changelog</span></a>
|
|
17
|
+
</div>
|
|
18
|
+
{{- else }}
|
|
12
19
|
<a class="cx-wordmark" href="{{ site.Home.RelPermalink }}">{{ site.Title }} <span class="cx-wordmark__role">{{ site.Params.role }}</span></a>
|
|
20
|
+
{{- end }}
|
|
13
21
|
<div class="cx-header__end">
|
|
14
22
|
{{- if $docs }}
|
|
15
23
|
{{- /* "On this page", for a page whose article shows a table of contents: three or more h2s, and no toc: false. */}}
|
|
@@ -38,8 +46,8 @@
|
|
|
38
46
|
{{- end }}
|
|
39
47
|
</ul>
|
|
40
48
|
</nav>
|
|
41
|
-
{{-
|
|
42
|
-
<a class="cx-header__version" href="{{ $ms.changelog | default "#" }}">v{{ . }}<span class="cx-visually-hidden">, changelog</span></a>
|
|
49
|
+
{{- if and $ms.version (not $docs) }}
|
|
50
|
+
<a class="cx-header__version" href="{{ $ms.changelog | default "#" }}">v{{ $ms.version }}<span class="cx-visually-hidden">, changelog</span></a>
|
|
43
51
|
{{- end }}
|
|
44
52
|
{{ partial "motifspec/theme-toggle.html" . }}
|
|
45
53
|
{{- if $docs }}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aitrien/motifspec",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.1",
|
|
4
4
|
"description": "Liam Marshall's design system: DTCG tokens and layered component rules that AI assistants read a layer at a time, with generated CSS, Hugo templates and a rule checker.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"./backdrop-foot.html": "./dist/backdrop-foot.html",
|
|
50
50
|
"./backdrop-side.html": "./dist/backdrop-side.html",
|
|
51
51
|
"./icons.svg": "./dist/icons.svg",
|
|
52
|
+
"./favicon.svg": "./dist/favicon.svg",
|
|
52
53
|
"./tokens.js": "./dist/tokens.js",
|
|
53
54
|
"./tokens.json": "./dist/tokens.json",
|
|
54
55
|
"./check": "./scripts/check.mjs",
|
package/scripts/lib.mjs
CHANGED
|
@@ -148,6 +148,13 @@ export function validate(tokens) {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
// ------------------------------------------------------------------ contrast (WCAG 2.x)
|
|
151
|
+
// The mark's stitches (rows of "#" and ".") as one SVG path on a one-unit-per-stitch grid: a rectangle per run.
|
|
152
|
+
export function stitchPath(rows) {
|
|
153
|
+
const d = [];
|
|
154
|
+
rows.forEach((r, y) => { for (const m of r.matchAll(/#+/g)) d.push(`M${m.index} ${y}h${m[0].length}v1h-${m[0].length}z`); });
|
|
155
|
+
return d.join('');
|
|
156
|
+
}
|
|
157
|
+
|
|
151
158
|
export const hexOf = (c) => c.hex ?? '#' + c.components.map((x) => Math.round(x * 255).toString(16).padStart(2, '0')).join('');
|
|
152
159
|
function luminance(c) {
|
|
153
160
|
const [r, g, b] = c.components.map((x) => (x <= 0.04045 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4));
|
package/tokens/color.json
CHANGED
|
@@ -1267,7 +1267,7 @@
|
|
|
1267
1267
|
"ornament": {
|
|
1268
1268
|
"rest": {
|
|
1269
1269
|
"$value": "{primitive.color.sap.600}",
|
|
1270
|
-
"$description": "Yarndings ornaments and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
1270
|
+
"$description": "Yarndings ornaments, the mark (the favicon) and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
1271
1271
|
"$extensions": {
|
|
1272
1272
|
"codex.modes": {
|
|
1273
1273
|
"dark": "{primitive.color.sap.400}"
|
package/tokens/typography.json
CHANGED
|
@@ -731,6 +731,24 @@
|
|
|
731
731
|
"end-mark": "flower (after an article's last sentence)",
|
|
732
732
|
"empty-state": "sprout (404 and empty lists)"
|
|
733
733
|
},
|
|
734
|
+
"mark": {
|
|
735
|
+
"name": "acorn",
|
|
736
|
+
"use": "An acorn on the same 12-stitch grid as the glyphs: a checked cup over a tapering nut. It is every site's favicon, from `motifspec/favicon.html` in Hugo or `favicon.svg` from npm, in `color.ornament.rest` for each theme. Use those; never redraw or recolour it.",
|
|
737
|
+
"stitches": [
|
|
738
|
+
".....##.....",
|
|
739
|
+
".....##.....",
|
|
740
|
+
"..########..",
|
|
741
|
+
".##.#..#.##.",
|
|
742
|
+
".#.#.##.#.#.",
|
|
743
|
+
".##########.",
|
|
744
|
+
"..########..",
|
|
745
|
+
"..########..",
|
|
746
|
+
"..########..",
|
|
747
|
+
"...######...",
|
|
748
|
+
"....####....",
|
|
749
|
+
".....##....."
|
|
750
|
+
]
|
|
751
|
+
},
|
|
734
752
|
"forbidden": {
|
|
735
753
|
"chars": "uvwxyz[]{}",
|
|
736
754
|
"reason": "Faces, a robot, hearts and animals read as emoji. Never use them."
|