vowel 0.3.2 → 0.3.3

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 CHANGED
@@ -43,7 +43,7 @@ See the docs: [vowel.cc](https://vowel.cc).
43
43
  - [x] 404.html (just make 404.md)
44
44
  - [ ] Markup
45
45
  - [.] Image as figure
46
- - [ ] Admonitions
46
+ - [x] Admonitions
47
47
  - [x] Heading anchors
48
48
  - [ ] GFM emoji
49
49
  - [ ] Mermaid
@@ -51,7 +51,7 @@ See the docs: [vowel.cc](https://vowel.cc).
51
51
  - [x] TOC
52
52
  - [ ] Non-urgent fixes / improvements
53
53
  - [ ] Compare metadata on file update
54
- - [ ] Prune/cleanup step
54
+ - [x] Prune/cleanup step
55
55
  - [ ] Dependency type (file, settings, folder)
56
56
  - [ ] New systems
57
57
  - [ ] Tags
@@ -134,7 +134,7 @@ See the docs: [vowel.cc](https://vowel.cc).
134
134
  - [ ] Sort nav items
135
135
  - [ ] Canonical URL
136
136
  - [ ] Handle external links
137
- - [ ] Admonitions
137
+ - [x] Admonitions
138
138
  - [ ] Use hgroup for site title, page title, etc
139
139
  - [ ] Images as `<figure>`
140
140
  - [ ] Hidden routes
package/bin.js CHANGED
@@ -196,7 +196,7 @@ async function main() {
196
196
  const dbExists = await exists(".votive.db")
197
197
 
198
198
  await removeCache(args.logging === "verbose")
199
- // await removeDB(args.logging === "verbose")
199
+ await removeDB(args.logging === "verbose")
200
200
  await fs.mkdir(config.destinationFolder, { recursive: true })
201
201
 
202
202
  if (!args.skip && !dbExists) {
package/config.js CHANGED
@@ -4,6 +4,7 @@ import vowelMarkdownPlugin from "./plugins/markdown/index.js"
4
4
  import vowelRobotsPlugin from "./plugins/robots/index.js"
5
5
  import vowelXMLPlugin from "./plugins/xml/index.js"
6
6
  import vowelVectorPlugin from "./plugins/vectors/index.js"
7
+ import vowelFontsPlugin from "./plugins/fonts/index.js"
7
8
 
8
9
  /** @import {VotiveConfig} from "votive" */
9
10
  export const config = {
@@ -15,6 +16,7 @@ export const config = {
15
16
  vowelStylesPlugin,
16
17
  vowelRobotsPlugin,
17
18
  vowelXMLPlugin,
18
- vowelVectorPlugin
19
+ vowelVectorPlugin,
20
+ vowelFontsPlugin
19
21
  ]
20
22
  }
@@ -0,0 +1,5 @@
1
+ # Blog
2
+
3
+ Here's a blog.
4
+
5
+ /blog?count=100&content=false
@@ -1,9 +1,13 @@
1
- # Long Live the URL
1
+ ---
2
+ link: https://www.nngroup.com/articles/url-as-ui/
3
+ breadcrumb: URL Design
4
+ ---
2
5
 
3
6
  June 27, 2024
4
7
 
5
8
  ![some things](./dog.jpeg)
6
9
 
10
+ # Long Live the URL
7
11
 
8
12
  This article from 1999 about how to write good URLs is awesome. Some tips:
9
13
 
@@ -7,7 +7,7 @@ To create one, prefix a file or folder with a `$`, such as `$faqs`. The file or
7
7
  ```md
8
8
  Here are answers to common questions:
9
9
 
10
- /faqs?count=10
10
+ /$faqs?count=10
11
11
  ```
12
12
 
13
13
  This also allows richer content, as the item will be displayed with frontmatter.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vowel",
3
3
  "type": "module",
4
- "version": "0.3.2",
4
+ "version": "0.3.3",
5
5
  "bin": "bin.js",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -67,8 +67,8 @@
67
67
  "unist-util-visit": "^5.0.0",
68
68
  "unist-util-visit-parents": "^6.0.0",
69
69
  "url-metadata": "^5.4.1",
70
+ "votive": "^0.2.0",
70
71
  "voot": "^0.1.0",
71
- "votive": "^0.1.0",
72
72
  "xast-util-sitemap": "^2.0.0",
73
73
  "xast-util-to-xml": "^4.0.0",
74
74
  "xml": "^1.0.1",
@@ -1,15 +1,27 @@
1
+ import { readFile } from "node:fs/promises"
1
2
  /** @import * as Votive from "votive" */
2
3
 
4
+ /** @type {Votive.ProcessorWrite} */
5
+ async function writeFile(destination, database, config) {
6
+ const buffer = await readFile(destination.abstract.filePath)
7
+ return {
8
+ data: buffer,
9
+ }
10
+ }
11
+
12
+ function readFont(filePath) {
13
+ return {
14
+ abstract: { filePath },
15
+ metadata: {}
16
+ }
17
+ }
18
+
3
19
  /** @type {Votive.VotiveProcessor} */
4
20
  const fontsReader = {
5
- syntax: "font",
6
- filter: {
7
- extensions: [".woff", ".woff2", ".ttf", ".otf"]
8
- },
9
- read: {
10
- path: null,
11
- },
12
- write: null
21
+ format: "buffer",
22
+ extensions: [".woff", ".woff2", ".ttf", ".otf"],
23
+ readFile: readFont,
24
+ writeFile
13
25
  }
14
26
 
15
27
  /** @type {Votive.VotivePlugin} */
@@ -82,6 +82,13 @@ function makeHead(metadata, url) {
82
82
  })
83
83
  )
84
84
 
85
+ if (!metadata.image && metadata.first_image && url) treeMainHead.push(
86
+ h("img", {
87
+ src: metadata.first_image,
88
+ itemprop: "image"
89
+ })
90
+ )
91
+
85
92
  if (metadata.fm_description) treeMainHead.push(
86
93
  h("p",
87
94
  {
@@ -153,7 +160,6 @@ function readMarkdown(string, filePath, destinationPath, database, config) {
153
160
  normalizeHeadings(mdast)
154
161
  const pathInfo = path.parse(filePath)
155
162
 
156
- const startTitle = performance.now()
157
163
  const metadata = getMetadata(mdast, filePath)
158
164
 
159
165
  metadata.inferred_label = toTitleCase(pathInfo.name)
@@ -168,6 +174,15 @@ function readMarkdown(string, filePath, destinationPath, database, config) {
168
174
 
169
175
  selectMetadata(metadata)
170
176
 
177
+ if (!metadata.image) {
178
+ const firstImageParagraph = mdast.children.find(child => child.children && child.children[0].type === "image")
179
+ if (firstImageParagraph) {
180
+ metadata.first_image = firstImageParagraph.children[0].url
181
+ }
182
+ }
183
+
184
+ if (metadata.fm_published === false) return
185
+
171
186
  if (pathInfo.base === "settings.md") {
172
187
  for (const key in metadata) {
173
188
  database.setting.create(
@@ -461,61 +476,65 @@ function readFolder(folder, database, config, isRoot) {
461
476
  ]
462
477
 
463
478
 
464
- if (themes.includes(settings.theme) || !settings.theme) {
465
- if (!settings.theme) database.setting.create("", "theme", "default")
479
+ if (themes.includes(settings.fm_theme?.[""][0]) || !settings.fm_theme) {
480
+ if (!settings.fm_theme) database.setting.create("", "theme", "default")
466
481
 
467
- database.setting.create(
468
- "",
469
- "stylesheets",
470
- "reset.css"
471
- )
482
+ const theme = settings.fm_theme?.[""][0] || "default"
472
483
 
473
- const resetStylesPath = path.join(VOWEL_DIR, "stylesheets", "ResetStyles.css")
484
+ if (themes.includes(theme)) {
474
485
 
475
- if (settings.theme === "reset") return
486
+ database.setting.create(
487
+ "",
488
+ "stylesheets",
489
+ "reset.css"
490
+ )
476
491
 
477
- database.setting.create(
478
- "",
479
- "stylesheets",
480
- "typography.css"
481
- )
492
+ const resetStylesPath = path.join(VOWEL_DIR, "stylesheets", "ResetStyles.css")
493
+ const resetStyles = readFileSync(resetStylesPath, "utf-8")
482
494
 
483
- if (settings.theme === "typography") return
495
+ database.target.create({
496
+ path: "reset.css",
497
+ abstract: { css: resetStyles },
498
+ metadata: {},
499
+ syntax: "css"
500
+ })
484
501
 
485
- database.setting.create(
486
- "",
487
- "stylesheets",
488
- "default.css"
489
- )
502
+ if (theme === "reset") return
490
503
 
491
- const typeStylesPath = path.join(VOWEL_DIR, "stylesheets", "TypographyStyles.css")
492
- const defaultStylesPath = path.join(VOWEL_DIR, "stylesheets", "DefaultStyles.css")
504
+ database.setting.create(
505
+ "",
506
+ "stylesheets",
507
+ "typography.css"
508
+ )
493
509
 
494
- const resetStyles = readFileSync(resetStylesPath, "utf-8")
495
- const typeStyles = readFileSync(typeStylesPath, "utf-8")
496
- const defaultStyles = readFileSync(defaultStylesPath, "utf-8")
510
+ const typeStylesPath = path.join(VOWEL_DIR, "stylesheets", "TypographyStyles.css")
511
+ const typeStyles = readFileSync(typeStylesPath, "utf-8")
497
512
 
513
+ database.target.create({
514
+ path: "typography.css",
515
+ abstract: { css: typeStyles },
516
+ metadata: {},
517
+ syntax: "css"
518
+ })
498
519
 
499
- database.target.create({
500
- path: "reset.css",
501
- abstract: { css: resetStyles },
502
- metadata: {},
503
- syntax: "css"
504
- })
520
+ if (theme === "typography") return
505
521
 
506
- database.target.create({
507
- path: "typography.css",
508
- abstract: { css: typeStyles },
509
- metadata: {},
510
- syntax: "css"
511
- })
522
+ database.setting.create(
523
+ "",
524
+ "stylesheets",
525
+ "default.css"
526
+ )
512
527
 
513
- database.target.create({
514
- path: "default.css",
515
- abstract: { css: defaultStyles },
516
- metadata: {},
517
- syntax: "css"
518
- })
528
+ const defaultStylesPath = path.join(VOWEL_DIR, "stylesheets", "DefaultStyles.css")
529
+ const defaultStyles = readFileSync(defaultStylesPath, "utf-8")
530
+
531
+ database.target.create({
532
+ path: "default.css",
533
+ abstract: { css: defaultStyles },
534
+ metadata: {},
535
+ syntax: "css"
536
+ })
537
+ }
519
538
  }
520
539
  }
521
540
 
@@ -659,13 +678,29 @@ function writeHTML(destination, database, config) {
659
678
  property: "og:description",
660
679
  content: metadata.description,
661
680
  }),
662
- h("meta", {
663
- property: "og:url",
664
- content: metadata.prettyURL
665
- }),
666
681
  ...treeStyleSheets,
667
682
  ])
668
683
 
684
+ if (settings.fm_domain) {
685
+ const settingsDomain = settings.fm_domain[""][0]
686
+ const domain = settingsDomain.startsWith("http")
687
+ ? settingsDomain
688
+ : "https://" + settingsDomain
689
+
690
+ const { href } = new URL(metadata.prettyURL, domain)
691
+
692
+ treeHead.children.push(
693
+ h("meta", {
694
+ property: "og:url",
695
+ content: href
696
+ }),
697
+ h("link", {
698
+ rel: "canonical",
699
+ href
700
+ })
701
+ )
702
+ }
703
+
669
704
 
670
705
  if (metadata.image) {
671
706
  treeHead.children.push(h("meta", {
@@ -678,7 +713,7 @@ function writeHTML(destination, database, config) {
678
713
  if (settings.title) {
679
714
  treeHead.children.push(h("meta", {
680
715
  property: "og:site_name",
681
- content: settings.title[0]
716
+ content: settings.fm_title?.[""][0]
682
717
  }))
683
718
  }
684
719
 
@@ -762,7 +797,9 @@ function writeHTML(destination, database, config) {
762
797
  headerElements.push(
763
798
  h('a.logo', {
764
799
  href: "/",
765
- rel: "home"
800
+ alt: "",
801
+ rel: "home",
802
+ "style": `mask-image: url("/${settings.fm_logo[""]}")`
766
803
  }, h("img", {
767
804
  src: "/" + settings.fm_logo[""]
768
805
  }))
@@ -843,8 +880,13 @@ function writeHTML(destination, database, config) {
843
880
 
844
881
  visit(treeContent, testPaths, ({ children: [child] }, i, p) => {
845
882
 
846
- const recursive = child.value.endsWith("**")
847
- const many = child.value.endsWith("*")
883
+ // const recursive = child.value.endsWith("**")
884
+ // const many = child.value.endsWith("*")
885
+
886
+ const url = new URL(child.value, "thismessage://")
887
+ const { dir, base } = path.parse(url.pathname)
888
+ const recursive = base === "**"
889
+ const many = base === "*" || base === "**"
848
890
 
849
891
  if (!many) {
850
892
  const targetFilePathInfo = path.parse(child.value)
@@ -853,20 +895,27 @@ function writeHTML(destination, database, config) {
853
895
  const targetFilePath = path.relative("/", path.format(targetFilePathInfo))
854
896
  const target = database.target.getWithTrackers(targetFilePath, destination.path)
855
897
 
856
- const article = h('article', makeHead(target.metadata, target.metadata.prettyURL))
898
+ if (target) {
899
+ const article = h('article', makeHead(target.metadata, target.metadata.prettyURL))
900
+
901
+ p.children.splice(i, 1, article)
902
+ }
857
903
 
858
- p.children.splice(i, 1, article)
859
904
  }
860
905
 
861
906
  if (many) {
862
- const { dir } = path.parse(path.relative("/", child.value))
907
+ const folder = path.relative("/", dir)
908
+ // const url = new URL(child.value, "thismessage://")
909
+ const count = url.searchParams.get("count")
863
910
  const targets = database.target.getManyWithTrackers({
864
- folder: dir,
911
+ folder,
865
912
  recursive,
866
913
  query: {},
867
914
  dependent: destination.path
868
915
  })
869
916
 
917
+ if (count) targets.splice(Number(count))
918
+
870
919
  const list = h("section",
871
920
  targets.map(target => {
872
921
  return h('article', makeHead(target.metadata, target.metadata.prettyURL))
@@ -896,6 +945,9 @@ function writeHTML(destination, database, config) {
896
945
 
897
946
 
898
947
  const treeMain = h('main',
948
+ {
949
+ itemscope: true
950
+ },
899
951
  [
900
952
  h('nav', {
901
953
  'aria-label': 'Breadcrumbs'
@@ -954,15 +1006,16 @@ function writeHTML(destination, database, config) {
954
1006
  folder: "",
955
1007
  recursive: true,
956
1008
  dependent: destination.path,
957
- }).filter(target => target.path)
1009
+ }).filter(target => target.path
1010
+ && target.path.endsWith(".html")
1011
+ && !target.metadata.date
1012
+ )
958
1013
 
959
1014
  const homeFile = everything.find(item => item.path === "index.html" && item.dir === "")
960
1015
 
961
1016
  const globalNavItems = everything.filter(item => {
962
1017
  return item.dir === ""
963
1018
  && item.path !== "index.html"
964
- && item.path.endsWith(".html")
965
- && !item.metadata.date
966
1019
  })
967
1020
  .map(getChildren)
968
1021
 
@@ -10,9 +10,9 @@ function writeCSS(destination, database, config) {
10
10
  code: Buffer.from(destination.abstract.css),
11
11
  minify: true,
12
12
  targets: {
13
- chrome: 146 << 16,
14
- firefox: 149 << 16,
15
- safari: 26 << 16
13
+ chrome: 140 << 16,
14
+ firefox: 140 << 16,
15
+ safari: 20 << 16
16
16
  }
17
17
  })
18
18
 
@@ -6,31 +6,114 @@
6
6
  @layer reset, typography, default;
7
7
 
8
8
 
9
+
9
10
  @layer default {
10
11
  :root {
11
- --text-color: hsl(0, 0%, 13%);
12
- --accent-color: hsl(215, 100%, 35%);
13
- --accent-color-hover: hsl(215, 76%, 49%);
14
- --border-color: hsl(0, 0%, 73%);
15
- --main-background: hsl(0, 0%, 100%);
16
- --code-background: hsl(0, 0%, 95%);
17
- --soft-background: hsl(0, 0%, 95%);
18
- /* --soft-background: #00000005; */
19
- }
20
-
21
- @media (prefers-color-scheme: dark) {
22
- :root {
23
- --text-color: hsl(0, 0%, 80%);
24
- --accent-color: hsl(194, 76%, 49%);
25
- --accent-color-hover: hsl(194, 86%, 57%);
26
- --border-color: hsl(0, 0%, 27%);
27
- --main-background: hsl(0, 0%, 12%);
28
- --code-background: hsl(0, 0%, 5%);
29
- --soft-background: hsl(0, 0%, 14%);
30
- /* --soft-background: #ffffff07; */
31
- }
12
+
13
+ --accent-01: oklch(0.9536456092315344 0.030170139248992922 90.24115342246611);
14
+ --accent-02: oklch(0.8924089806120152 0.08826670827983002 90.24115342246611);
15
+ --accent-03: oklch(0.844618 0.14828222329121668 90.24115342246611);
16
+ --accent-04: oklch(0.7854571400878614 0.18029922017024758 90.24115342246611);
17
+ --accent-05: oklch(0.7110252520511524 0.16670758498691426 90.24115342246611);
18
+ --accent-06: oklch(0.6307554338482158 0.15012908092125463 90.24115342246611);
19
+ --accent-07: oklch(0.5558748958282139 0.12696710517027307 90.24115342246611);
20
+ --accent-08: oklch(0.4945 0.09203251189041753 90.24115342246611);
21
+ --accent-09: oklch(0.38727951482578865 0.05695363236371703 90.24115342246611);
22
+ --accent-10: oklch(0.24916012628129958 0.03201699687903088 90.24115342246611);
23
+ --accent-11: oklch(0.11046170738630641 0.01528852137867617 90.24115342246611);
24
+ --danger-01: oklch(0.9536456092315344 0.037138530373020395 -25.754653176550182);
25
+ --danger-02: oklch(0.8924089806120152 0.0908858065656466 -25.754653176550182);
26
+ --danger-03: oklch(0.844618 0.15656415898125758 -25.754653176550182);
27
+ --danger-04: oklch(0.7854571400878614 0.2115084537674326 -25.754653176550182);
28
+ --danger-05: oklch(0.7110252520511524 0.250891532499265 -25.754653176550182);
29
+ --danger-06: oklch(0.6307554338482158 0.22556107485827934 -25.754653176550182);
30
+ --danger-07: oklch(0.5558748958282139 0.1952478556703251 -25.754653176550182);
31
+ --danger-08: oklch(0.4945 0.15069063355165543 -25.754653176550182);
32
+ --danger-09: oklch(0.38727951482578865 0.1036689817070561 -25.754653176550182);
33
+ --danger-10: oklch(0.24916012628129958 0.058004850702477094 -25.754653176550182);
34
+ --danger-11: oklch(0.11046170738630641 0.02748297973358925 -25.754653176550182);
35
+ --info-01: oklch(0.9536456092315344 0.032559707682643824 244.1900622367698);
36
+ --info-02: oklch(0.8924089806120152 0.07422782322853594 244.1900622367698);
37
+ --info-03: oklch(0.844618 0.12605888808084453 244.1900622367698);
38
+ --info-04: oklch(0.7854571400878614 0.17799411987422387 244.1900622367698);
39
+ --info-05: oklch(0.7110252520511524 0.22040488113200302 244.1900622367698);
40
+ --info-06: oklch(0.6307554338482158 0.25495777982975243 244.1900622367698);
41
+ --info-07: oklch(0.5558748958282139 0.2223980721471087 244.1900622367698);
42
+ --info-08: oklch(0.4945 0.18072995660121655 244.1900622367698);
43
+ --info-09: oklch(0.38727951482578865 0.12889889174890792 244.1900622367698);
44
+ --info-10: oklch(0.24916012628129958 0.0769636599555286 244.1900622367698);
45
+ --info-11: oklch(0.11046170738630641 0.034552898697749426 244.1900622367698);
46
+ --primary-01: oklch(0.9536456092315344 0.033943473040194294 -82.72000000000003);
47
+ --primary-02: oklch(0.8924089806120152 0.07208713732898053 -82.72000000000003);
48
+ --primary-03: oklch(0.844618 0.10967407324412015 -82.72000000000003);
49
+ --primary-04: oklch(0.7854571400878614 0.14835354282702512 -82.72000000000003);
50
+ --primary-05: oklch(0.7110252520511524 0.1870407118569507 -82.72000000000003);
51
+ --primary-06: oklch(0.6307554338482158 0.2246513001779757 -82.72000000000003);
52
+ --primary-07: oklch(0.5558748958282139 0.2627985040398166 -82.72000000000003);
53
+ --primary-08: oklch(0.4945 0.297278 -82.72000000000003);
54
+ --primary-09: oklch(0.38727951482578865 0.22519086267101945 -82.72000000000003);
55
+ --primary-10: oklch(0.24916012628129958 0.1489244571729748 -82.72000000000003);
56
+ --primary-11: oklch(0.11046170738630641 0.07262669982202441 -82.72000000000003);
57
+ --secondary-01: oklch(0.9536456092315344 0.03523506763462919 174.9674);
58
+ --secondary-02: oklch(0.8924089806120152 0.12226651611616707 174.9674);
59
+ --secondary-03: oklch(0.844618 0.159299 174.9674);
60
+ --secondary-04: oklch(0.7854571400878614 0.14932563102137283 174.9674);
61
+ --secondary-05: oklch(0.7110252520511524 0.13708788342722794 174.9674);
62
+ --secondary-06: oklch(0.6307554338482158 0.12406393236537076 174.9674);
63
+ --secondary-07: oklch(0.5558748958282139 0.09651562296811833 174.9674);
64
+ --secondary-08: oklch(0.4945 0.06639390943163861 174.9674);
65
+ --secondary-09: oklch(0.38727951482578865 0.037032483883832935 174.9674);
66
+ --secondary-10: oklch(0.24916012628129958 0.02375390884349093 174.9674);
67
+ --secondary-11: oklch(0.11046170738630641 0.011400212679566413 174.9674);
68
+ --success-01: oklch(0.9536456092315344 0.024257111887574123 148.30000439636984);
69
+ --success-02: oklch(0.8924089806120152 0.07351482341637697 148.30000439636984);
70
+ --success-03: oklch(0.844618 0.12466168066207778 148.30000439636984);
71
+ --success-04: oklch(0.7854571400878614 0.15042101659568144 148.30000439636984);
72
+ --success-05: oklch(0.7110252520511524 0.13948969668297212 148.30000439636984);
73
+ --success-06: oklch(0.6307554338482158 0.1261639047081073 148.30000439636984);
74
+ --success-07: oklch(0.5558748958282139 0.10791110186311959 148.30000439636984);
75
+ --success-08: oklch(0.4945 0.07690619317930446 148.30000439636984);
76
+ --success-09: oklch(0.38727951482578865 0.0457513376060701 148.30000439636984);
77
+ --success-10: oklch(0.24916012628129958 0.02575933593360364 148.30000439636984);
78
+ --success-11: oklch(0.11046170738630641 0.012313506052849059 148.30000439636984);
79
+ --tertiary-01: oklch(0.9536456092315344 0.034046389815560296 2.791302501092794);
80
+ --tertiary-02: oklch(0.8924089806120152 0.08421751016426371 2.791302501092794);
81
+ --tertiary-03: oklch(0.844618 0.14726059081820986 2.791302501092794);
82
+ --tertiary-04: oklch(0.7854571400878614 0.19873235540856865 2.791302501092794);
83
+ --tertiary-05: oklch(0.7110252520511524 0.23494450943888123 2.791302501092794);
84
+ --tertiary-06: oklch(0.6307554338482158 0.21174506900632417 2.791302501092794);
85
+ --tertiary-07: oklch(0.5558748958282139 0.1839025285604721 2.791302501092794);
86
+ --tertiary-08: oklch(0.4945 0.14178977136603388 2.791302501092794);
87
+ --tertiary-09: oklch(0.38727951482578865 0.09664947566806639 2.791302501092794);
88
+ --tertiary-10: oklch(0.24916012628129958 0.053320044751899345 2.791302501092794);
89
+ --tertiary-11: oklch(0.11046170738630641 0.025277009084351466 2.791302501092794);
90
+ --warning-01: oklch(0.9536456092315344 0.033978843637678835 61.19378984733035);
91
+ --warning-02: oklch(0.8924089806120152 0.09727044978770355 61.19378984733035);
92
+ --warning-03: oklch(0.844618 0.16243636817381144 61.19378984733035);
93
+ --warning-04: oklch(0.7854571400878614 0.19844507360799077 61.19378984733035);
94
+ --warning-05: oklch(0.7110252520511524 0.18312495283983363 61.19378984733035);
95
+ --warning-06: oklch(0.6307554338482158 0.164466229970312 61.19378984733035);
96
+ --warning-07: oklch(0.5558748958282139 0.1383102018356785 61.19378984733035);
97
+ --warning-08: oklch(0.4945 0.10117462382028729 61.19378984733035);
98
+ --warning-09: oklch(0.38727951482578865 0.06390117110643204 61.19378984733035);
99
+ --warning-10: oklch(0.24916012628129958 0.03600870543417937 61.19378984733035);
100
+ --warning-11: oklch(0.11046170738630641 0.017183679327988338 61.19378984733035);
101
+
102
+
103
+ --text-color: light-dark(var(--primary-11), var(--primary-01));
104
+ --link-color: light-dark(var(--secondary-07), var(--secondary-03));
105
+ --link-hover-color: light-dark(var(--secondary-06), var(--secondary-04));
106
+ --border-color: light-dark(var(--primary-03), var(--primary-09));
107
+ --main-background: light-dark(var(--primary-01), var(--primary-11));
108
+ --code-background: light-dark(var(--primary-02), var(--primary-10));
109
+ --soft-background: light-dark(var(--primary-02), var(--primary-10));
110
+ }
111
+
112
+ :root {
113
+ color-scheme: light dark;
32
114
  }
33
115
 
116
+
34
117
  /* Layout */
35
118
 
36
119
  body {
@@ -91,10 +174,10 @@
91
174
  }
92
175
 
93
176
  a:where(:not([rel=home])) {
94
- color: var(--accent-color);
177
+ color: var(--link-color);
95
178
 
96
179
  &:hover {
97
- color: var(--accent-color-hover);
180
+ color: var(--link-hover-color);
98
181
  }
99
182
  }
100
183
 
@@ -190,6 +273,16 @@
190
273
  font-size: 1.5em;
191
274
  }
192
275
 
276
+ a.logo {
277
+ /* mask-image: var(--logo); */
278
+ /* mask-image: unset; */
279
+ background: var(--primary-10);
280
+
281
+ img {
282
+ visibility: hidden;
283
+ }
284
+ }
285
+
193
286
  nav {
194
287
  border: 1px solid var(--border-color);
195
288
  padding: 0px 6px;
@@ -240,7 +333,7 @@
240
333
 
241
334
  nav[aria-label=Breadcrumbs] {
242
335
  text-transform: uppercase;
243
- color: var(--border-color);
336
+ color: var(--primary-05);
244
337
 
245
338
  a {
246
339
  color: unset;
@@ -293,8 +386,10 @@
293
386
 
294
387
  /* Main */
295
388
 
296
- p:where([itemprop=description]) {
389
+ p:where([itemprop=description]),
390
+ main>p:first-of-type {
297
391
  font-size: 1.3em;
392
+ color: var(--secondary-10);
298
393
  }
299
394
 
300
395
  article a {
@@ -348,37 +443,51 @@
348
443
 
349
444
  aside.alert.note {
350
445
  --icon: 'ℹ️';
351
- --rgb: 71, 139, 230;
446
+ background: var(--info-02);
447
+ color: var(--info-10);
448
+ border-left: 3px solid var(--info-03);
449
+
450
+ h2 {
451
+ color: var(--info-08);
452
+ }
352
453
  }
353
454
 
354
- aside.alert.tip {
455
+ aside.alert.success {
355
456
  --icon: '💡';
356
- --rgb: 87, 171, 90;
357
- }
457
+ background: var(--success-02);
458
+ color: var(--success-10);
459
+ border-left: 3px solid var(--success-03);
358
460
 
359
- aside.alert.important {
360
- --icon: '💬';
361
- --rgb: 152, 110, 226;
461
+ h2 {
462
+ color: var(--success-08);
463
+ }
362
464
  }
363
465
 
364
466
  aside.alert.warning {
365
467
  --icon: '⚠️';
366
- --rgb: 198, 144, 38;
468
+ background: var(--warning-02);
469
+ color: var(--warning-10);
470
+ border-left: 3px solid var(--warning-03);
471
+
472
+ h2 {
473
+ color: var(--warning-08);
474
+ }
367
475
  }
368
476
 
369
- aside.alert.caution {
477
+
478
+ aside.alert.danger {
370
479
  --icon: '⛔️';
371
- --rgb: 229, 83, 75;
480
+ background: var(--danger-02);
481
+ color: var(--danger-10);
482
+ border-left: 3px solid var(--danger-03);
483
+
484
+ h2 {
485
+ color: var(--danger-08);
486
+ }
372
487
  }
373
488
 
374
489
  aside.alert {
375
- border-left: 3px solid rgb(var(--rgb));
376
490
  padding: 1.5rem 2rem;
377
- background: rgba(var(--rgb), 0.04);
378
- }
379
-
380
- aside.alert h2 {
381
- color: rgb(var(--rgb));
382
491
  }
383
492
 
384
493
  aside.alert h2:before {