@casoon/pages-theme 0.12.6 → 0.12.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/layouts/Base.astro +5 -3
- package/package.json +17 -2
- package/styles/tokens.css +4 -4
package/README.md
CHANGED
|
@@ -270,6 +270,11 @@ to it as well.
|
|
|
270
270
|
in `fonts/OFL.txt`), no CDNs, embeds, analytics or cookies.
|
|
271
271
|
- JavaScript: two small inline scripts (theme before first paint; theme toggle and copy
|
|
272
272
|
buttons). Tabs work without JavaScript. The one exception is a `Demo` stage, see above.
|
|
273
|
-
- Footer on every page: "
|
|
274
|
-
|
|
273
|
+
- Footer on every page, in the site's language (`lang`): "A CASOON project · Jörn Seidel",
|
|
274
|
+
licence, imprint and privacy policy (casoon.de), the project catalog on casoon.dev.
|
|
275
275
|
- Light and dark theme, following `prefers-color-scheme` until the visitor chooses.
|
|
276
|
+
|
|
277
|
+
## Maintaining
|
|
278
|
+
|
|
279
|
+
Development, releases, the rollout to all project sites and setting up a new one:
|
|
280
|
+
[MAINTAINING.md](MAINTAINING.md).
|
package/layouts/Base.astro
CHANGED
|
@@ -26,10 +26,12 @@ const home = Astro.site && new URL(url(), Astro.site).href;
|
|
|
26
26
|
const ogImage = Astro.site && new URL(url('og.png'), Astro.site).href;
|
|
27
27
|
const sameAs = [config.website, ...config.packages.map((p) => p.href)].filter(Boolean);
|
|
28
28
|
|
|
29
|
+
// tokens.css sets --accent with the same selectors and is linked after this inline style, so the
|
|
30
|
+
// selectors repeat :root to outrank it whatever the order in <head> (scripts/test-accent.mjs).
|
|
29
31
|
const accentCss = config.accent
|
|
30
|
-
? `:root{--accent:${config.accent.light}}` +
|
|
31
|
-
`:root[data-theme="dark"]{--accent:${config.accent.dark}}` +
|
|
32
|
-
`@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--accent:${config.accent.dark}}}`
|
|
32
|
+
? `:root:root{--accent:${config.accent.light}}` +
|
|
33
|
+
`:root:root[data-theme="dark"]{--accent:${config.accent.dark}}` +
|
|
34
|
+
`@media (prefers-color-scheme:dark){:root:root:not([data-theme="light"]){--accent:${config.accent.dark}}}`
|
|
33
35
|
: '';
|
|
34
36
|
|
|
35
37
|
const structuredData = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casoon/pages-theme",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.8",
|
|
4
4
|
"description": "Shared Astro theme for the GitHub Pages sites of CASOON open-source projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,6 +44,15 @@
|
|
|
44
44
|
"withastro",
|
|
45
45
|
"casoon"
|
|
46
46
|
],
|
|
47
|
+
"scripts": {
|
|
48
|
+
"dev": "pnpm --filter starter-site dev",
|
|
49
|
+
"build": "pnpm --filter starter-site build",
|
|
50
|
+
"preview": "pnpm --filter starter-site preview",
|
|
51
|
+
"check": "biome check .",
|
|
52
|
+
"check:fix": "biome check --write .",
|
|
53
|
+
"type-check": "pnpm --filter starter-site type-check",
|
|
54
|
+
"test:accent": "node scripts/test-accent.mjs"
|
|
55
|
+
},
|
|
47
56
|
"peerDependencies": {
|
|
48
57
|
"astro": "^7.3.2"
|
|
49
58
|
},
|
|
@@ -54,5 +63,11 @@
|
|
|
54
63
|
"publishConfig": {
|
|
55
64
|
"access": "public",
|
|
56
65
|
"provenance": true
|
|
57
|
-
}
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@axe-core/playwright": "^4.14.0",
|
|
69
|
+
"@biomejs/biome": "^2.6.4",
|
|
70
|
+
"@playwright/test": "^1.64.1"
|
|
71
|
+
},
|
|
72
|
+
"packageManager": "pnpm@10.26.0"
|
|
58
73
|
}
|
package/styles/tokens.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Design tokens. Brand colours follow casoon.de,
|
|
3
|
-
*
|
|
2
|
+
* Design tokens. Brand colours follow casoon.de, adjusted for 4.5:1 text contrast on the
|
|
3
|
+
* page background and on the sand bands (--bg-deep, --bg-sunken).
|
|
4
4
|
* --brand carries CASOON, --accent carries the project (override via the
|
|
5
5
|
* integration's `accent` option).
|
|
6
6
|
*/
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
--text: #44423f;
|
|
20
20
|
--heading: #11100e;
|
|
21
21
|
--muted: #5c5a56;
|
|
22
|
-
--brand: #
|
|
22
|
+
--brand: #ad3216;
|
|
23
23
|
--brand-soft: rgb(236 74 32 / 0.1);
|
|
24
|
-
--accent: #
|
|
24
|
+
--accent: #ad3216;
|
|
25
25
|
--accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
|
|
26
26
|
--accent-fill: #d4421d;
|
|
27
27
|
--accent-top: #e46140;
|