astro-accelerator 7.1.29 → 7.1.31

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "7.1.29",
2
+ "version": "7.1.31",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -36,21 +36,21 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@astrojs/markdown-remark": "^7.3.1",
39
- "@astrojs/mdx": "^8.0.1",
40
- "@img/sharp-linux-x64": "^0.35.4",
41
- "astro": "^7.3.3",
42
- "astro-accelerator-utils": "^0.3.111",
43
- "csv": "^6.6.3",
39
+ "@astrojs/mdx": "^8.0.2",
40
+ "@img/sharp-linux-x64": "^0.35.5",
41
+ "astro": "^7.3.5",
42
+ "astro-accelerator-utils": "^0.3.112",
43
+ "csv": "^6.6.4",
44
44
  "hast-util-from-selector": "^3.0.1",
45
45
  "html-to-text": "^10.0.1",
46
46
  "keyword-extractor": "^0.3.0",
47
47
  "optional": "^0.1.4",
48
48
  "remark-directive": "^4.0.0",
49
- "sharp": "^0.35.4"
49
+ "sharp": "^0.35.5"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@playwright/test": "^1.63.0",
53
- "cspell": "^10.3.3",
53
+ "cspell": "^10.3.5",
54
54
  "glob": "^13.0.6",
55
55
  "linkinator": "^8.1.0",
56
56
  "rimraf": "^6.1.3"
@@ -3,8 +3,5 @@ ignoreScripts: true
3
3
  minimumReleaseAge: 10080
4
4
  minimumReleaseAgeExclude:
5
5
  - astro-accelerator-utils
6
- - astro@7.1.3
7
6
  trustPolicy: no-downgrade
8
- trustPolicyExclude:
9
- - 'tinyclip@0.1.13'
10
7
  blockExoticSubdeps: true
@@ -42,6 +42,7 @@ summary {
42
42
  color: var(--fore-link);
43
43
  cursor: pointer;
44
44
  text-decoration: underline;
45
+ text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
45
46
 
46
47
  @media (prefers-reduced-motion: no-preference) {
47
48
  transition: all 200ms ease-in-out;
@@ -335,36 +336,6 @@ table {
335
336
  }
336
337
  }
337
338
 
338
- /* Breadcrumbs */
339
-
340
- .site-breadcrumbs {
341
- & ol {
342
- font-size: 0.8rem;
343
- padding: 0.1em 1em;
344
- text-align: center;
345
- }
346
-
347
- & li {
348
- display: inline;
349
- padding: 0.2em;
350
-
351
- &::before {
352
- content: '>';
353
- margin-inline-end: 0.3rem;
354
- }
355
-
356
- &:first-child::before {
357
- content: '';
358
- margin-inline-end: 0;
359
- }
360
- }
361
-
362
- & a[aria-current] {
363
- color: var(--fore);
364
- text-decoration: none;
365
- }
366
- }
367
-
368
339
  /* Navigation */
369
340
 
370
341
  .overlay-menu {
@@ -447,71 +418,7 @@ table {
447
418
  }
448
419
  }
449
420
 
450
- /* Table of Contents (TOC) */
451
-
452
- .page-toc {
453
- font-size: var(--font-size-meta);
454
- margin: 0 0 var(--paragraph-margin) 0;
455
-
456
- & ol {
457
- list-style: none;
458
- }
459
-
460
- & li {
461
- & a {
462
- display: block;
463
- padding: 0.5rem 1rem;
464
- }
465
-
466
- &.toc-lev-2 {
467
- margin-left: 0rem;
468
- }
469
-
470
- &.toc-lev-3 a {
471
- margin-left: 1rem;
472
- }
473
-
474
- &.toc-lev-4 a {
475
- margin-left: 2rem;
476
- }
477
-
478
- &.toc-lev-5 a {
479
- margin-left: 3rem;
480
- }
481
-
482
- &.toc-lev-6 a {
483
- margin-left: 4rem;
484
- }
485
- }
486
- }
487
-
488
- /* Footer */
489
-
490
- .site-footer {
491
- background-color: var(--aft-block);
492
- margin-top: 4rem;
493
- padding: 0.5rem 0;
494
- text-align: center;
495
- width: 100%;
496
-
497
- & h2 {
498
- padding-top: 2rem;
499
- }
500
-
501
- & a {
502
- color: var(--fore-link);
503
- display: block;
504
- padding: 0.5rem 1rem;
505
- text-decoration: none;
506
-
507
- &:hover,
508
- &:focus {
509
- color: var(--fore-link-alt);
510
- }
511
- }
512
- }
513
-
514
- /* Overlay (Mobile Navigation, Search) */
421
+ /* Overlay (Mobile Navigation) */
515
422
 
516
423
  .overlay {
517
424
  background-color: var(--aft);
@@ -530,8 +437,6 @@ table {
530
437
  margin: 0 auto;
531
438
  }
532
439
 
533
- /* Site Search */
534
-
535
440
  /* Articles */
536
441
 
537
442
  .post-list {
@@ -694,6 +599,8 @@ table {
694
599
  padding-left: 0.6rem;
695
600
  }
696
601
 
602
+ /* Post meta */
603
+
697
604
  .post-meta {
698
605
  &:not(.mini) {
699
606
  border-top: 1px solid var(--icon-block);
@@ -827,8 +734,6 @@ table {
827
734
  }
828
735
  }
829
736
 
830
- /* Taxonomy */
831
-
832
737
  /* Video */
833
738
 
834
739
  .yt-video {
@@ -42,6 +42,7 @@ summary {
42
42
  color: var(--fore-link);
43
43
  cursor: pointer;
44
44
  text-decoration: underline;
45
+ text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
45
46
 
46
47
  @media (prefers-reduced-motion: no-preference) {
47
48
  transition: all 200ms ease-in-out;
@@ -335,36 +336,6 @@ table {
335
336
  }
336
337
  }
337
338
 
338
- /* Breadcrumbs */
339
-
340
- .site-breadcrumbs {
341
- & ol {
342
- font-size: 0.8rem;
343
- padding: 0.1em 1em;
344
- text-align: center;
345
- }
346
-
347
- & li {
348
- display: inline;
349
- padding: 0.2em;
350
-
351
- &::before {
352
- content: '>';
353
- margin-inline-end: 0.3rem;
354
- }
355
-
356
- &:first-child::before {
357
- content: '';
358
- margin-inline-end: 0;
359
- }
360
- }
361
-
362
- & a[aria-current] {
363
- color: var(--fore);
364
- text-decoration: none;
365
- }
366
- }
367
-
368
339
  /* Navigation */
369
340
 
370
341
  .overlay-menu {
@@ -447,71 +418,7 @@ table {
447
418
  }
448
419
  }
449
420
 
450
- /* Table of Contents (TOC) */
451
-
452
- .page-toc {
453
- font-size: var(--font-size-meta);
454
- margin: 0 0 var(--paragraph-margin) 0;
455
-
456
- & ol {
457
- list-style: none;
458
- }
459
-
460
- & li {
461
- & a {
462
- display: block;
463
- padding: 0.5rem 1rem;
464
- }
465
-
466
- &.toc-lev-2 {
467
- margin-left: 0rem;
468
- }
469
-
470
- &.toc-lev-3 a {
471
- margin-left: 1rem;
472
- }
473
-
474
- &.toc-lev-4 a {
475
- margin-left: 2rem;
476
- }
477
-
478
- &.toc-lev-5 a {
479
- margin-left: 3rem;
480
- }
481
-
482
- &.toc-lev-6 a {
483
- margin-left: 4rem;
484
- }
485
- }
486
- }
487
-
488
- /* Footer */
489
-
490
- .site-footer {
491
- background-color: var(--aft-block);
492
- margin-top: 4rem;
493
- padding: 0.5rem 0;
494
- text-align: center;
495
- width: 100%;
496
-
497
- & h2 {
498
- padding-top: 2rem;
499
- }
500
-
501
- & a {
502
- color: var(--fore-link);
503
- display: block;
504
- padding: 0.5rem 1rem;
505
- text-decoration: none;
506
-
507
- &:hover,
508
- &:focus {
509
- color: var(--fore-link-alt);
510
- }
511
- }
512
- }
513
-
514
- /* Overlay (Mobile Navigation, Search) */
421
+ /* Overlay (Mobile Navigation) */
515
422
 
516
423
  .overlay {
517
424
  background-color: var(--aft);
@@ -530,8 +437,6 @@ table {
530
437
  margin: 0 auto;
531
438
  }
532
439
 
533
- /* Site Search */
534
-
535
440
  /* Articles */
536
441
 
537
442
  .post-list {
@@ -694,6 +599,8 @@ table {
694
599
  padding-left: 0.6rem;
695
600
  }
696
601
 
602
+ /* Post meta */
603
+
697
604
  .post-meta {
698
605
  &:not(.mini) {
699
606
  border-top: 1px solid var(--icon-block);
@@ -827,8 +734,6 @@ table {
827
734
  }
828
735
  }
829
736
 
830
- /* Taxonomy */
831
-
832
737
  /* Video */
833
738
 
834
739
  .yt-video {
@@ -38,6 +38,7 @@ type Article = {
38
38
  title: string;
39
39
  frontmatter: Record<string, any>;
40
40
  img: ImageInfo | null;
41
+ imageAlt: string;
41
42
  };
42
43
 
43
44
  const articles: Article[] = [];
@@ -47,9 +48,10 @@ for (let p of posts.filter(PostFiltering.isListable)) {
47
48
  url: p.url ?? "",
48
49
  title: await accelerator.markdown.getTextFrom(p.frontmatter?.title),
49
50
  frontmatter: p.frontmatter,
50
- img: p.frontmatter.bannerImage
51
+ img: p.frontmatter.bannerImage?.src
51
52
  ? getImageInfo(p.frontmatter.bannerImage.src, "", SITE.images.listerSize)
52
53
  : null,
54
+ imageAlt: p.frontmatter.bannerImage?.alt ?? "",
53
55
  };
54
56
 
55
57
  articles.push(item);
@@ -70,7 +72,7 @@ stats.stop();
70
72
  <li
71
73
  class="list-item"
72
74
  data-destination={accelerator.urlFormatter.formatAddress(post.url)}
73
- data-image={(post.frontmatter.bannerImage?.src.length > 0).toString()}>
75
+ data-image={Boolean(post.img).toString()}>
74
76
  <article>
75
77
  <div class="list-item-image">
76
78
  {post.img && (
@@ -78,7 +80,7 @@ stats.stop();
78
80
  srcset={post.img.srcset}
79
81
  sizes={post.img.sizes}
80
82
  src={post.img.src}
81
- alt={post.frontmatter.bannerImage.alt}
83
+ alt={post.imageAlt}
82
84
  class={post.img.class}
83
85
  width={post.img.metadata?.width}
84
86
  height={post.img.metadata?.height}
@@ -25,20 +25,25 @@ const _ = Lang(lang);
25
25
  const authorList = accelerator.authors.forPost(frontmatter);
26
26
 
27
27
  // Get image info
28
- const authorImage = authorList?.image?.src
28
+ const authorImage = authorList?.image?.src
29
29
  ? getImageInfo(authorList.image.src, 'author-image', SITE.images.authorSize)
30
30
  : null;
31
31
 
32
32
  const canonical = frontmatter.meta?.find(
33
33
  (meta) => meta.name.toLowerCase() === 'canonical',
34
34
  )?.content;
35
- const canonicalDomain = canonical ? new URL(canonical).hostname : undefined;
35
+ let canonicalDomain: string | undefined;
36
+ try {
37
+ canonicalDomain = canonical ? new URL(canonical).hostname : undefined;
38
+ } catch {
39
+ canonicalDomain = undefined;
40
+ }
36
41
 
37
42
  stats.stop();
38
43
  ---
39
- {authorList.writers.length > 0 &&
44
+ {authorList.writers.length > 0 &&
40
45
  <div class="post-meta">
41
- {authorImage &&
46
+ {authorImage &&
42
47
  <img
43
48
  srcset={ authorImage.srcset }
44
49
  sizes={ authorImage.sizes }
@@ -64,7 +69,7 @@ stats.stop();
64
69
  { _(Translations.post.last_modified) + ' ' + accelerator.dateFormatter.formatDate(frontmatter.modDate, lang) }
65
70
  </time>
66
71
  }
67
- {canonical &&
72
+ {canonicalDomain &&
68
73
  <br /><span set:html={ _(Translations.post.originally_published).replace('{link}', `<a href="${canonical}">${canonicalDomain}</a>`) }></span>
69
74
  }
70
75
  {authorList.mainAuthor &&
@@ -73,4 +78,4 @@ stats.stop();
73
78
  </div>
74
79
  </div>
75
80
  </div>
76
- }
81
+ }
@@ -37,7 +37,12 @@ const authorImage = authorList?.image?.src
37
37
  const canonical = frontmatter.meta?.find(
38
38
  (meta) => meta.name.toLowerCase() === "canonical",
39
39
  )?.content;
40
- const canonicalDomain = canonical ? new URL(canonical).hostname : undefined;
40
+ let canonicalDomain: string | undefined;
41
+ try {
42
+ canonicalDomain = canonical ? new URL(canonical).hostname : undefined;
43
+ } catch {
44
+ canonicalDomain = undefined;
45
+ }
41
46
 
42
47
  stats.stop();
43
48
  ---
@@ -87,7 +92,7 @@ stats.stop();
87
92
  )}
88
93
  />
89
94
  <ReadingTime lang={lang} frontmatter={frontmatter} />
90
- {canonical && (
95
+ {canonicalDomain && (
91
96
  <span
92
97
  class="originally-published"
93
98
  set:html={_(
@@ -1,13 +1,15 @@
1
1
  ---
2
2
  // warning: This file is overwritten by Astro Accelerator
3
3
 
4
- import { Accelerator } from 'astro-accelerator-utils';
5
- import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
6
- import { SITE } from '@config';
7
- import { Translations, Lang } from '@util/Languages';
4
+ import { Accelerator } from "astro-accelerator-utils";
5
+ import type { Frontmatter } from "astro-accelerator-utils/types/Frontmatter";
6
+ import { SITE } from "@config";
7
+ import { Translations, Lang } from "@util/Languages";
8
8
 
9
9
  const accelerator = new Accelerator(SITE);
10
- const stats = new accelerator.statistics('accelerator/components/Breadcrumbs.astro');
10
+ const stats = new accelerator.statistics(
11
+ "accelerator/components/Breadcrumbs.astro",
12
+ );
11
13
  stats.start();
12
14
 
13
15
  // Properties
@@ -24,9 +26,13 @@ const _ = Lang(lang);
24
26
 
25
27
  // Logic
26
28
  const currentUrl = new URL(Astro.request.url);
27
- const navPages = accelerator.navigation.breadcrumbs(currentUrl, SITE.subfolder, breadcrumbs?.length ?? 0);
29
+ const navPages = accelerator.navigation.breadcrumbs(
30
+ currentUrl,
31
+ SITE.subfolder,
32
+ breadcrumbs?.length ?? 0,
33
+ );
28
34
 
29
- let metaIndex = navPages.length;
35
+ let metaIndex = navPages.length + 1;
30
36
 
31
37
  stats.stop();
32
38
  ---
@@ -35,22 +41,77 @@ stats.stop();
35
41
  <ol vocab="http://schema.org/" typeof="BreadcrumbList">
36
42
  {
37
43
  navPages.map((page, index) => (
38
- <li property="itemListElement" typeof="ListItem">
39
- <meta property="position" content={index.toString()} />
40
- <a property="item" typeof="WebPage" href={accelerator.urlFormatter.formatAddress(page.url)} aria-current={page.ariaCurrent ? page.ariaCurrent : null} rel={page.rel}>
41
- <span property="name">{page.title}</span></a>
42
- </li>
44
+ <li property="itemListElement" typeof="ListItem">
45
+ <meta
46
+ property="position"
47
+ content={(index + 1).toString()}
48
+ />
49
+ <a
50
+ property="item"
51
+ typeof="WebPage"
52
+ href={accelerator.urlFormatter.formatAddress(page.url)}
53
+ aria-current={
54
+ page.ariaCurrent ? page.ariaCurrent : null
55
+ }
56
+ rel={page.rel}>
57
+ <span property="name">{page.title}</span>
58
+ </a>
59
+ </li>
43
60
  ))
44
61
  }
45
62
  {
46
63
  breadcrumbs &&
47
- breadcrumbs.map(crumb => (
48
- <li property="itemListElement" typeof="ListItem">
49
- <meta property="position" content={(metaIndex++).toString()} />
50
- <a property="item" typeof="WebPage" href={accelerator.urlFormatter.formatAddress(crumb.url)} aria-current={crumb.ariaCurrent ? crumb.ariaCurrent : null}>
51
- <span property="name">{crumb.title}</span></a>
52
- </li>
64
+ breadcrumbs.map((crumb) => (
65
+ <li property="itemListElement" typeof="ListItem">
66
+ <meta
67
+ property="position"
68
+ content={(metaIndex++).toString()}
69
+ />
70
+ <a
71
+ property="item"
72
+ typeof="WebPage"
73
+ href={accelerator.urlFormatter.formatAddress(
74
+ crumb.url,
75
+ )}
76
+ aria-current={
77
+ crumb.ariaCurrent ? crumb.ariaCurrent : null
78
+ }>
79
+ <span property="name">{crumb.title}</span>
80
+ </a>
81
+ </li>
53
82
  ))
54
83
  }
55
84
  </ol>
56
85
  </nav>
86
+
87
+ <style is:global>
88
+ /* Breadcrumbs */
89
+
90
+ .site-breadcrumbs {
91
+ & ol {
92
+ font-size: 0.8rem;
93
+ padding: 0.1em 1em;
94
+ text-align: center;
95
+ }
96
+
97
+ & li {
98
+ display: inline;
99
+ padding: 0.2em;
100
+
101
+ &::before {
102
+ content: ">";
103
+ margin-inline-end: 0.3rem;
104
+ }
105
+
106
+ &:first-child::before {
107
+ content: "";
108
+ margin-inline-end: 0;
109
+ }
110
+ }
111
+
112
+ & a[aria-current] {
113
+ color: var(--fore);
114
+ text-decoration: none;
115
+ }
116
+ }
117
+ </style>
@@ -44,6 +44,30 @@ stats.stop();
44
44
  </footer>
45
45
 
46
46
  <style is:global>
47
+ .site-footer {
48
+ background-color: var(--aft-block);
49
+ margin-top: 4rem;
50
+ padding: 0.5rem 0;
51
+ text-align: center;
52
+ width: 100%;
53
+
54
+ & h2 {
55
+ padding-top: 2rem;
56
+ }
57
+
58
+ & a {
59
+ color: var(--fore-link);
60
+ display: block;
61
+ padding: 0.5rem 1rem;
62
+ text-decoration: none;
63
+
64
+ &:hover,
65
+ &:focus {
66
+ color: var(--fore-link-alt);
67
+ }
68
+ }
69
+ }
70
+
47
71
  .footer-columns {
48
72
  display: grid;
49
73
  gap: var(--block-gap);
@@ -52,6 +52,10 @@ const pkg = JSON.parse(
52
52
  const cssDir = path.join(process.cwd(), "public", SITE.subfolder, "css");
53
53
 
54
54
  const cssHref = (baseName: string) => {
55
+ if (!import.meta.env.PROD) {
56
+ return SITE.subfolder + `/css/${baseName}`;
57
+ }
58
+
55
59
  const baseWithoutExt = baseName.slice(0, -".css".length);
56
60
  const versionedName = `${baseWithoutExt}.${pkg.version}.css`;
57
61
  const versionedPath = path.join(cssDir, versionedName);
@@ -36,7 +36,7 @@ stats.stop();
36
36
  <h2 class="site-nav-title">{_(Translations.navigation.title)}</h2>
37
37
  <ul>
38
38
  {
39
- pages
39
+ [...pages]
40
40
  .sort((a, b) => a.order - b.order)
41
41
  .map((page) => <NavigationItem lang={lang} page={page} />)
42
42
  }
@@ -35,7 +35,7 @@ stats.stop();
35
35
  <h2 class="site-nav-title">{_(Translations.navigation.title)}</h2>
36
36
  <ul>
37
37
  {
38
- pages
38
+ [...pages]
39
39
  .sort((a, b) => a.order - b.order)
40
40
  .map((page) => (
41
41
  <li>
@@ -33,7 +33,7 @@ stats.stop();
33
33
  <details class="sub-nav" open={ page.isOpen }>
34
34
  <summary><span>{ page.section }</span></summary>
35
35
  <ul>
36
- { page.children.sort((a, b) => a.order - b.order).map((page) => (
36
+ { [...page.children].sort((a, b) => a.order - b.order).map((page) => (
37
37
  <Astro.self lang={ lang } page={ page } />
38
38
  ))}
39
39
  </ul>
@@ -24,8 +24,9 @@ const accelerator = new Accelerator(SITE);
24
24
  {showSearch &&
25
25
  <form method="GET" action={SITE.search.fallbackUrl ?? "https://www.google.com/search"} role="search" autocomplete="off" data-sourcedata={SITE.subfolder + "/search.json"}>
26
26
  <fieldset>
27
- <input type="hidden" name={SITE.search.fallbackSite ?? "q"} value={"site:" + siteUrl} />
28
- <input type="text" name={SITE.search.fallbackSite ?? "q"} class="site-search-query" placeholder={_(Translations.search.search_for)} spellcheck="true" autocomplete="off" autofocus="autofocus" />
27
+ <input type="hidden" name={SITE.search.fallbackQuery ?? "q"} value={"site:" + siteUrl} />
28
+ <label class="visually-hidden" for="site-search-query">{_(Translations.search.search_for)}</label>
29
+ <input id="site-search-query" type="text" name={SITE.search.fallbackQuery ?? "q"} class="site-search-query" placeholder={_(Translations.search.search_for)} spellcheck="true" autocomplete="off" />
29
30
  <button type="submit" set:html={_(Translations.search.submit)}></button>
30
31
  </fieldset>
31
32
  </form>
@@ -34,6 +34,22 @@ if (maxLevel == null) {
34
34
  maxLevel = 3;
35
35
  }
36
36
 
37
+ const tocItems: {
38
+ heading: (typeof headings)[number];
39
+ children: (typeof headings)[number][];
40
+ }[] = [];
41
+ let currentParent: (typeof tocItems)[number] | undefined;
42
+
43
+ for (const heading of (headings ?? []).filter((h) => h.depth <= maxLevel)) {
44
+ if (heading.depth === 3 && currentParent) {
45
+ currentParent.children.push(heading);
46
+ } else {
47
+ const item = { heading, children: [] };
48
+ tocItems.push(item);
49
+ currentParent = heading.depth === 2 ? item : undefined;
50
+ }
51
+ }
52
+
37
53
  if (typeof expanded === "number") {
38
54
  openInteraction = expanded;
39
55
  } else if (expanded === true) {
@@ -49,13 +65,20 @@ stats.stop();
49
65
  <details open={openAttribute} data-openon={openInteraction}>
50
66
  <summary>{_(Translations.toc.title)}</summary>
51
67
  <ol>
52
- {headings
53
- .filter((h) => h.depth <= maxLevel)
54
- .map((heading) => (
55
- <li class={"toc-lev-" + heading.depth}>
56
- <a href={"#" + heading.slug}>{heading.text}</a>
57
- </li>
58
- ))}
68
+ {tocItems.map(({ heading, children }) => (
69
+ <li class={"toc-lev-" + heading.depth}>
70
+ <a href={"#" + heading.slug}>{heading.text}</a>
71
+ {children.length > 0 && (
72
+ <ol>
73
+ {children.map((child) => (
74
+ <li class={"toc-lev-" + child.depth}>
75
+ <a href={"#" + child.slug}>{child.text}</a>
76
+ </li>
77
+ ))}
78
+ </ol>
79
+ )}
80
+ </li>
81
+ ))}
59
82
  </ol>
60
83
  </details>
61
84
  </nav>
@@ -63,41 +86,50 @@ stats.stop();
63
86
  }
64
87
 
65
88
  <style is:global>
89
+ /* Table of Contents (TOC) */
90
+
66
91
  .page-toc {
67
- margin: 0 0 var(--paragraph-margin) 0;
68
92
  font-size: var(--font-size-meta);
69
- }
70
-
71
- .page-toc ol {
72
- list-style: none;
73
- }
74
-
75
- .page-toc li a {
76
- display: block;
77
- padding: 0.5rem 1rem;
78
- }
79
-
80
- .page-toc li.toc-lev-2 {
81
- margin-left: 0rem;
82
- }
83
-
84
- .page-toc li.toc-lev-3 a {
85
- margin-left: 1rem;
86
- }
87
-
88
- .page-toc li.toc-lev-4 a {
89
- margin-left: 2rem;
90
- }
91
-
92
- .page-toc li.toc-lev-5 a {
93
- margin-left: 3rem;
94
- }
95
-
96
- .page-toc li.toc-lev-6 a {
97
- margin-left: 4rem;
98
- }
93
+ margin: 0 0 var(--paragraph-margin) 0;
99
94
 
100
- .page-toc summary {
101
- cursor: pointer;
95
+ & ol {
96
+ list-style: square;
97
+ margin-block: 0;
98
+ }
99
+
100
+ & li {
101
+ & a {
102
+ display: block;
103
+ padding: 0.5rem;
104
+ font-size: 1rem;
105
+ }
106
+
107
+ & ol {
108
+ display: flex;
109
+ flex-wrap: wrap;
110
+ list-style: none;
111
+
112
+ & li {
113
+ text-align: left;
114
+ hyphens: none;
115
+
116
+ & a {
117
+ border-radius: var(--block-radius);
118
+ background-color: var(--aft-block);
119
+ color: var(--fore-link);
120
+ display: inline-block;
121
+ margin-inline: 0 0.3rem;
122
+ margin-block: 0 0.3rem;
123
+ font-size: var(--font-size-meta);
124
+ }
125
+
126
+ & a:hover,
127
+ a:focus {
128
+ background-color: var(--fore-link-alt);
129
+ color: var(--aft);
130
+ }
131
+ }
132
+ }
133
+ }
102
134
  }
103
135
  </style>
@@ -39,13 +39,12 @@ stats.stop();
39
39
  autocomplete="off"
40
40
  data-sourcedata={SITE.subfolder + '/search.json'}>
41
41
  <fieldset>
42
- <input type="hidden" name={SITE.search.fallbackSite ?? 'q'} value={'site:' + siteUrl} />
42
+ <input type="hidden" name={SITE.search.fallbackQuery ?? 'q'} value={'site:' + siteUrl} />
43
43
  <div>
44
44
  <label for="site-search-query">{_(Translations.search.search_for)}</label>
45
45
  <input
46
- autofocus="autofocus"
47
46
  type="text"
48
- name={SITE.search.fallbackSite ?? 'q'}
47
+ name={SITE.search.fallbackQuery ?? 'q'}
49
48
  id="site-search-query"
50
49
  spellcheck="true"
51
50
  autocomplete="off"
File without changes
File without changes
File without changes