astro-accelerator 5.9.20 → 5.9.21
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,21 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
// warning: This file is overwritten by Astro Accelerator
|
|
3
3
|
|
|
4
|
-
import { Accelerator, PostFiltering } from
|
|
5
|
-
import type { Frontmatter } from
|
|
6
|
-
import { SITE } from
|
|
7
|
-
import { Translations, Lang } from
|
|
4
|
+
import { Accelerator, PostFiltering } 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(
|
|
10
|
+
const stats = new accelerator.statistics('accelerator/components/Header.astro');
|
|
11
11
|
stats.start();
|
|
12
12
|
|
|
13
13
|
// Properties
|
|
14
14
|
type Props = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
lang: string;
|
|
16
|
+
frontmatter: Frontmatter;
|
|
17
|
+
headings: { depth: number; slug: string; text: string }[];
|
|
18
|
+
showSearch: boolean;
|
|
19
19
|
};
|
|
20
20
|
const { lang, showSearch } = Astro.props satisfies Props;
|
|
21
21
|
|
|
@@ -29,18 +29,36 @@ stats.stop();
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
31
|
<header class="site-header">
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
<a href={(SITE.subfolder ?? '') + '/'} class="site-title" translate="no">{SITE.title}</a>
|
|
33
|
+
<a href={searchUrl} class="header-icon" title={_(Translations.header.toggle_search)}>
|
|
34
|
+
<svg
|
|
35
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
36
|
+
width="40"
|
|
37
|
+
height="40"
|
|
38
|
+
viewBox="0 0 20 19"
|
|
39
|
+
stroke-width="1"
|
|
40
|
+
fill="none"
|
|
41
|
+
stroke-linecap="round"
|
|
42
|
+
stroke-linejoin="round">
|
|
43
|
+
<path
|
|
44
|
+
d="M19.0524 16.4267L15.3727 12.7273C15.2067 12.5603 14.9815 12.4675 14.7453 12.4675H14.1437C15.1624 11.1577 15.7676 9.5102 15.7676 7.718C15.7676 3.45455 12.3316 0 8.09097 0C3.85035 0 0.414307 3.45455 0.414307 7.718C0.414307 11.9814 3.85035 15.436 8.09097 15.436C9.87358 15.436 11.5123 14.8275 12.8151 13.8033V14.4082C12.8151 14.6456 12.9073 14.872 13.0734 15.039L16.7531 18.7384C17.1 19.0872 17.661 19.0872 18.0042 18.7384L19.0487 17.6883C19.3956 17.3395 19.3956 16.7755 19.0524 16.4267ZM8.09097 12.4675C5.48164 12.4675 3.36687 10.3451 3.36687 7.718C3.36687 5.09462 5.47795 2.96846 8.09097 2.96846C10.7003 2.96846 12.8151 5.09091 12.8151 7.718C12.8151 10.3414 10.704 12.4675 8.09097 12.4675Z"
|
|
45
|
+
></path>
|
|
46
|
+
</svg>
|
|
47
|
+
</a>
|
|
48
|
+
<a href="#site-nav" data-navigationid="site-nav" class="header-icon" title={_(Translations.header.toggle_menu)}>
|
|
49
|
+
<svg
|
|
50
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
51
|
+
width="40"
|
|
52
|
+
height="40"
|
|
53
|
+
viewBox="0 0 24 24"
|
|
54
|
+
stroke-width="1.5"
|
|
55
|
+
fill="none"
|
|
56
|
+
stroke-linecap="round"
|
|
57
|
+
stroke-linejoin="round">
|
|
58
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
59
|
+
<line x1="4" y1="6" x2="20" y2="6"></line>x``
|
|
60
|
+
<line x1="4" y1="12" x2="20" y2="12"></line>
|
|
61
|
+
<line x1="4" y1="18" x2="20" y2="18"></line>
|
|
62
|
+
</svg>
|
|
63
|
+
</a>
|
|
46
64
|
</header>
|