astro-accelerator 5.10.20 → 5.10.22

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.20",
2
+ "version": "5.10.22",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -33,11 +33,11 @@
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.8",
37
- "@img/sharp-linux-x64": "^0.34.4",
38
- "astro": "^5.15.0",
39
- "astro-accelerator-utils": "^0.3.58",
40
- "cspell": "^9.2.2",
36
+ "@astrojs/mdx": "^4.3.10",
37
+ "@img/sharp-linux-x64": "^0.34.5",
38
+ "astro": "^5.15.5",
39
+ "astro-accelerator-utils": "^0.3.59",
40
+ "cspell": "^9.3.1",
41
41
  "csv": "^6.4.1",
42
42
  "glob": "^11.0.3",
43
43
  "hast-util-from-selector": "^3.0.1",
@@ -46,7 +46,7 @@
46
46
  "linkinator": "^6.3.0",
47
47
  "optional": "^0.1.4",
48
48
  "remark-directive": "^4.0.0",
49
- "sharp": "^0.34.4"
49
+ "sharp": "^0.34.5"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@playwright/test": "^1.56.1"
@@ -13,9 +13,9 @@ stats.start();
13
13
 
14
14
  // Properties
15
15
  type Props = {
16
- lang: string;
17
- page: Page<MarkdownInstance<Record<string, any>>>,
18
- pageLinks: Link[],
16
+ lang: string;
17
+ page: Page<MarkdownInstance<Record<string, any>>>;
18
+ pageLinks: Link[];
19
19
  };
20
20
  const { lang, page, pageLinks } = Astro.props satisfies Props;
21
21
 
@@ -25,14 +25,28 @@ const _ = Lang(lang);
25
25
  // Logic
26
26
  stats.stop();
27
27
  ---
28
- <nav class="post-paging" aria-label={ _(Translations.aria.paging) }>
29
- {page.url.prev
30
- ? <a href={ accelerator.urlFormatter.formatAddress(page.url.prev) }>{ _(Translations.articles.previous) }</a>
31
- : <span>{ _(Translations.articles.previous) }</span>}
32
- {pageLinks.map((link) => (
33
- <a href={ accelerator.urlFormatter.formatAddress(link.url) } aria-current={ link.ariaCurrent ? link.ariaCurrent : null } class={ link.class }>{ link.title }</a>
34
- ))}
35
- {page.url.next
36
- ? <a href={ accelerator.urlFormatter.formatAddress(page.url.next) }>{ _(Translations.articles.next) }</a>
37
- : <span>{ _(Translations.articles.next) }</span>}
38
- </nav>
28
+
29
+ {
30
+ page.lastPage > 1 && (
31
+ <nav class="post-paging" aria-label={_(Translations.aria.paging)}>
32
+ {page.url.prev ? (
33
+ <a href={accelerator.urlFormatter.formatAddress(page.url.prev)}>{_(Translations.articles.previous)}</a>
34
+ ) : (
35
+ <span>{_(Translations.articles.previous)}</span>
36
+ )}
37
+ {pageLinks.map(link => (
38
+ <a
39
+ href={accelerator.urlFormatter.formatAddress(link.url)}
40
+ aria-current={link.ariaCurrent ? link.ariaCurrent : null}
41
+ class={link.class}>
42
+ {link.title}
43
+ </a>
44
+ ))}
45
+ {page.url.next ? (
46
+ <a href={accelerator.urlFormatter.formatAddress(page.url.next)}>{_(Translations.articles.next)}</a>
47
+ ) : (
48
+ <span>{_(Translations.articles.next)}</span>
49
+ )}
50
+ </nav>
51
+ )
52
+ }