astro-accelerator 5.10.3 → 5.10.4

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": "5.10.3",
2
+ "version": "5.10.4",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -3,6 +3,7 @@
3
3
  html {
4
4
  box-sizing: border-box;
5
5
  interpolate-size: allow-keywords;
6
+ scrollbar-gutter: stable;
6
7
 
7
8
  @media (prefers-reduced-motion: no-preference) {
8
9
  scroll-behavior: smooth;
@@ -22,13 +23,7 @@ html {
22
23
  padding: 0;
23
24
  vertical-align: baseline;
24
25
  text-decoration-skip-ink: auto;
25
- }
26
-
27
- html {
28
- scroll-padding-top: 5em;
29
- @media (prefers-reduced-motion: no-preference) {
30
- scroll-behavior: smooth;
31
- }
26
+ scrollbar-gutter: stable;
32
27
  }
33
28
 
34
29
  body {
@@ -106,6 +101,7 @@ button {
106
101
  }
107
102
 
108
103
  summary {
104
+ padding-inline: 0;
109
105
  text-decoration: none;
110
106
  }
111
107
 
@@ -446,37 +442,32 @@ a.navigation-icon:focus {
446
442
  /* Navigation */
447
443
 
448
444
  .site-nav {
445
+ --site-nav-indent: 0.5rem;
449
446
  font-size: var(--font-size-meta);
450
447
  }
451
448
 
452
- .site-nav ul {
453
- border-top: 1px solid var(--fore-link);
449
+ .site-nav > ul {
450
+ border-bottom: 1px solid var(--fore-link);
454
451
  }
455
452
 
456
453
  .site-nav li {
457
454
  list-style: none;
458
- border-bottom: 1px solid var(--fore-link);
455
+ }
456
+
457
+ .site-nav > ul > li {
458
+ border-top: 1px solid var(--fore-link);
459
+ }
460
+
461
+ .site-nav > ul > li li {
462
+ border-top: 1px solid color-mix(in srgb, var(--fore-link) 50%, transparent);
459
463
  }
460
464
 
461
465
  .site-nav a {
462
466
  text-indent: var(--marker-size);
463
467
  width: calc(100% - 2.07rem);
464
468
  display: inline-block;
465
- padding: 0.5rem 1rem;
469
+ padding: 1rem var(--site-nav-indent);
466
470
  text-decoration: none;
467
- padding: 1rem;
468
- }
469
-
470
- .site-nav li.has-children summary span {
471
- text-indent: 0;
472
- display: inline-block;
473
- padding: 0.5rem 1rem;
474
- text-decoration: none;
475
- padding: 1rem;
476
- }
477
-
478
- .site-nav li.has-children ul a {
479
- text-indent: calc(var(--marker-size) * 2);
480
471
  }
481
472
 
482
473
  .site-nav a[aria-current] {
@@ -493,6 +484,21 @@ a.navigation-icon:focus {
493
484
  width: 1em;
494
485
  }
495
486
 
487
+ .site-nav li.has-children summary span {
488
+ text-indent: 0;
489
+ display: inline-block;
490
+ padding: 1rem var(--site-nav-indent);
491
+ text-decoration: none;
492
+ }
493
+
494
+ details.sub-nav {
495
+ padding: 0rem !important;
496
+ }
497
+
498
+ details.sub-nav details {
499
+ margin-inline-start: calc(var(--marker-size) + var(--site-nav-indent));
500
+ }
501
+
496
502
  .overlay-menu .site-nav {
497
503
  font-size: 1.4em;
498
504
 
@@ -609,11 +615,11 @@ a.navigation-icon:focus {
609
615
  .overlay {
610
616
  position: fixed;
611
617
  top: 0;
612
- width: calc(100% - 2em);
613
- height: calc(100% - 7rem);
618
+ width: calc(100vw - 6rem);
619
+ height: calc(100vh - 7rem);
614
620
  max-height: 100vh;
615
621
  background-color: var(--aft);
616
- padding: 5rem 1em 2rem 1em;
622
+ padding: 5rem 3rem 2rem 3rem;
617
623
  overflow-y: auto;
618
624
  z-index: 1;
619
625
  }
@@ -16,9 +16,7 @@ const getData = async () => {
16
16
  const accelerator = new Accelerator(SITE);
17
17
 
18
18
  for (const path in allPages) {
19
- const page = (await allPages[path]()) as MarkdownInstance<
20
- Record<string, any>
21
- >;
19
+ const page = (await allPages[path]()) as MarkdownInstance<Record<string, any>>;
22
20
 
23
21
  if (!PostFiltering.showInSearch(page)) {
24
22
  continue;
@@ -31,10 +29,8 @@ const getData = async () => {
31
29
  }
32
30
 
33
31
  const headings = await page.getHeadings();
34
- const title = await accelerator.markdown.getTextFrom(
35
- page.frontmatter?.title
36
- );
37
- const content = page.compiledContent ? page.compiledContent() : '';
32
+ const title = await accelerator.markdown.getTextFrom(page.frontmatter?.title);
33
+ const content = page.compiledContent ? await page.compiledContent() : '';
38
34
  let counted: { word: string; count: number }[] = [];
39
35
 
40
36
  if (content) {
@@ -47,22 +43,22 @@ const getData = async () => {
47
43
  });
48
44
 
49
45
  counted = words
50
- .map((w) => {
46
+ .map(w => {
51
47
  return {
52
48
  word: w,
53
- count: words.filter((wd) => wd === w).length,
49
+ count: words.filter(wd => wd === w).length,
54
50
  };
55
51
  })
56
- .filter((e) => e.word.replace(/[^a-z]+/g, '').length > 1);
52
+ .filter(e => e.word.replace(/[^a-z]+/g, '').length > 1);
57
53
  }
58
54
 
59
55
  items.push({
60
56
  title: title,
61
- headings: headings.map((h) => {
57
+ headings: headings.map(h => {
62
58
  return { text: h.text, slug: h.slug };
63
59
  }),
64
60
  description: page.frontmatter.description ?? '',
65
- keywords: counted.map((c) => c.word).join(' '),
61
+ keywords: counted.map(c => c.word).join(' '),
66
62
  tags: page.frontmatter.tags ?? [],
67
63
  url: SITE.url + accelerator.urlFormatter.formatAddress(url),
68
64
  date: page.frontmatter.pubDate ?? '',