astro-accelerator 5.9.18 → 5.9.20
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.9.
|
|
2
|
+
"version": "5.9.20",
|
|
3
3
|
"author": "Steve Fenton",
|
|
4
4
|
"name": "astro-accelerator",
|
|
5
5
|
"description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
|
|
@@ -33,9 +33,10 @@
|
|
|
33
33
|
"dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@astrojs/mdx": "^4.3.
|
|
37
|
-
"
|
|
38
|
-
"astro
|
|
36
|
+
"@astrojs/mdx": "^4.3.4",
|
|
37
|
+
"@img/sharp-linux-x64": "^0.34.3",
|
|
38
|
+
"astro": "^5.13.4",
|
|
39
|
+
"astro-accelerator-utils": "^0.3.52",
|
|
39
40
|
"cspell": "^8.19.4",
|
|
40
41
|
"csv": "^6.4.1",
|
|
41
42
|
"glob": "^11.0.3",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"sharp": "^0.33.5"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
|
-
"@playwright/test": "^1.
|
|
52
|
+
"@playwright/test": "^1.55.0"
|
|
52
53
|
},
|
|
53
54
|
"files": [
|
|
54
55
|
".npmrc",
|
|
@@ -6,28 +6,46 @@ import { Accelerator } from 'astro-accelerator-utils';
|
|
|
6
6
|
import { SITE } from '@config';
|
|
7
7
|
|
|
8
8
|
const accelerator = new Accelerator(SITE);
|
|
9
|
-
const stats = new accelerator.statistics(
|
|
9
|
+
const stats = new accelerator.statistics(
|
|
10
|
+
'accelerator/components/FooterItem.astro'
|
|
11
|
+
);
|
|
10
12
|
stats.start();
|
|
11
13
|
|
|
12
14
|
// Properties
|
|
13
15
|
type Props = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
lang: string;
|
|
17
|
+
page: NavPage;
|
|
16
18
|
};
|
|
17
19
|
const { lang, page } = Astro.props satisfies Props;
|
|
18
20
|
|
|
19
21
|
// Logic
|
|
20
22
|
stats.stop();
|
|
21
23
|
---
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
page.children.length > 0 && (
|
|
27
|
+
<div class="footer-column">
|
|
28
|
+
<h2>
|
|
29
|
+
<Fragment set:html={page.title} />
|
|
30
|
+
</h2>
|
|
31
|
+
<ul>
|
|
32
|
+
{page.children
|
|
33
|
+
.sort((a, b) => a.order - b.order)
|
|
34
|
+
.map((child) => (
|
|
35
|
+
<li>
|
|
36
|
+
<a
|
|
37
|
+
href={accelerator.urlFormatter.formatAddress(
|
|
38
|
+
child.url
|
|
39
|
+
)}
|
|
40
|
+
aria-current={
|
|
41
|
+
child.ariaCurrent ? child.ariaCurrent : null
|
|
42
|
+
}
|
|
43
|
+
rel={child.rel}>
|
|
44
|
+
{child.title}
|
|
45
|
+
</a>
|
|
46
|
+
</li>
|
|
47
|
+
))}
|
|
48
|
+
</ul>
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
@@ -7,12 +7,14 @@ import { SITE } from '@config';
|
|
|
7
7
|
import { menu } from '@data/navigation';
|
|
8
8
|
|
|
9
9
|
const accelerator = new Accelerator(SITE);
|
|
10
|
-
const stats = new accelerator.statistics(
|
|
10
|
+
const stats = new accelerator.statistics(
|
|
11
|
+
'accelerator/components/NavigationBar.astro'
|
|
12
|
+
);
|
|
11
13
|
stats.start();
|
|
12
14
|
|
|
13
15
|
// Properties
|
|
14
16
|
type Props = {
|
|
15
|
-
|
|
17
|
+
lang: string;
|
|
16
18
|
};
|
|
17
19
|
const { lang } = Astro.props satisfies Props;
|
|
18
20
|
|
|
@@ -25,11 +27,26 @@ const pages = accelerator.navigation.menu(currentUrl, SITE.subfolder, menu);
|
|
|
25
27
|
|
|
26
28
|
stats.stop();
|
|
27
29
|
---
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
|
|
31
|
+
<nav
|
|
32
|
+
class="site-nav-bar"
|
|
33
|
+
id="site-nav"
|
|
34
|
+
aria-label={_(Translations.aria.site_navigation)}>
|
|
35
|
+
<h2 class="site-nav-title">{_(Translations.navigation.title)}</h2>
|
|
36
|
+
<ul>
|
|
37
|
+
{
|
|
38
|
+
pages
|
|
39
|
+
.sort((a, b) => a.order - b.order)
|
|
40
|
+
.map((page) => (
|
|
41
|
+
<li>
|
|
42
|
+
<a
|
|
43
|
+
href={accelerator.urlFormatter.formatAddress(
|
|
44
|
+
page.url
|
|
45
|
+
)}>
|
|
46
|
+
{page.title}
|
|
47
|
+
</a>
|
|
48
|
+
</li>
|
|
49
|
+
))
|
|
50
|
+
}
|
|
51
|
+
</ul>
|
|
52
|
+
</nav>
|