@docusaurus/theme-classic 0.0.0-5335 → 0.0.0-5340
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/lib/getSwizzleConfig.js
CHANGED
|
@@ -348,6 +348,13 @@ function getSwizzleConfig() {
|
|
|
348
348
|
// By default it's an empty placeholder for the user to fill
|
|
349
349
|
description: 'The search bar component of your site, appearing in the navbar.',
|
|
350
350
|
},
|
|
351
|
+
SkipToContent: {
|
|
352
|
+
actions: {
|
|
353
|
+
eject: 'safe',
|
|
354
|
+
wrap: 'safe',
|
|
355
|
+
},
|
|
356
|
+
description: 'The component responsible for implementing the accessibility "skip to content" link (https://www.w3.org/TR/WCAG20-TECHS/G1.html)',
|
|
357
|
+
},
|
|
351
358
|
'prism-include-languages': {
|
|
352
359
|
actions: {
|
|
353
360
|
eject: 'safe',
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import ErrorBoundary from '@docusaurus/ErrorBoundary';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
PageMetadata,
|
|
12
|
+
SkipToContentFallbackId,
|
|
13
|
+
ThemeClassNames,
|
|
14
|
+
} from '@docusaurus/theme-common';
|
|
11
15
|
import {useKeyboardNavigation} from '@docusaurus/theme-common/internal';
|
|
12
16
|
import SkipToContent from '@theme/SkipToContent';
|
|
13
17
|
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
@@ -37,6 +41,7 @@ export default function Layout(props) {
|
|
|
37
41
|
<Navbar />
|
|
38
42
|
|
|
39
43
|
<div
|
|
44
|
+
id={SkipToContentFallbackId}
|
|
40
45
|
className={clsx(
|
|
41
46
|
ThemeClassNames.wrapper.main,
|
|
42
47
|
styles.mainWrapper,
|
|
@@ -5,24 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import
|
|
9
|
-
import {useSkipToContent} from '@docusaurus/theme-common/internal';
|
|
8
|
+
import {SkipToContentLink} from '@docusaurus/theme-common';
|
|
10
9
|
import styles from './styles.module.css';
|
|
11
10
|
export default function SkipToContent() {
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<div
|
|
15
|
-
ref={containerRef}
|
|
16
|
-
role="region"
|
|
17
|
-
aria-label={translate({id: 'theme.common.skipToMainContent'})}>
|
|
18
|
-
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
|
19
|
-
<a href="#" className={styles.skipToContent} onClick={handleSkip}>
|
|
20
|
-
<Translate
|
|
21
|
-
id="theme.common.skipToMainContent"
|
|
22
|
-
description="The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation">
|
|
23
|
-
Skip to main content
|
|
24
|
-
</Translate>
|
|
25
|
-
</a>
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
11
|
+
return <SkipToContentLink className={styles.skipToContent} />;
|
|
28
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5340",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docusaurus/core": "0.0.0-
|
|
24
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
25
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
28
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
30
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
31
|
-
"@docusaurus/types": "0.0.0-
|
|
32
|
-
"@docusaurus/utils": "0.0.0-
|
|
33
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
34
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
23
|
+
"@docusaurus/core": "0.0.0-5340",
|
|
24
|
+
"@docusaurus/mdx-loader": "0.0.0-5340",
|
|
25
|
+
"@docusaurus/module-type-aliases": "0.0.0-5340",
|
|
26
|
+
"@docusaurus/plugin-content-blog": "0.0.0-5340",
|
|
27
|
+
"@docusaurus/plugin-content-docs": "0.0.0-5340",
|
|
28
|
+
"@docusaurus/plugin-content-pages": "0.0.0-5340",
|
|
29
|
+
"@docusaurus/theme-common": "0.0.0-5340",
|
|
30
|
+
"@docusaurus/theme-translations": "0.0.0-5340",
|
|
31
|
+
"@docusaurus/types": "0.0.0-5340",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-5340",
|
|
33
|
+
"@docusaurus/utils-common": "0.0.0-5340",
|
|
34
|
+
"@docusaurus/utils-validation": "0.0.0-5340",
|
|
35
35
|
"@mdx-js/react": "^1.6.22",
|
|
36
36
|
"clsx": "^1.2.1",
|
|
37
37
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=16.14"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "4ca40b74f67cede21e3ff2f88d4764f596057e72"
|
|
66
66
|
}
|
package/src/getSwizzleConfig.ts
CHANGED
|
@@ -377,6 +377,14 @@ export default function getSwizzleConfig(): SwizzleConfig {
|
|
|
377
377
|
description:
|
|
378
378
|
'The search bar component of your site, appearing in the navbar.',
|
|
379
379
|
},
|
|
380
|
+
SkipToContent: {
|
|
381
|
+
actions: {
|
|
382
|
+
eject: 'safe',
|
|
383
|
+
wrap: 'safe',
|
|
384
|
+
},
|
|
385
|
+
description:
|
|
386
|
+
'The component responsible for implementing the accessibility "skip to content" link (https://www.w3.org/TR/WCAG20-TECHS/G1.html)',
|
|
387
|
+
},
|
|
380
388
|
'prism-include-languages': {
|
|
381
389
|
actions: {
|
|
382
390
|
eject: 'safe',
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import ErrorBoundary from '@docusaurus/ErrorBoundary';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
PageMetadata,
|
|
13
|
+
SkipToContentFallbackId,
|
|
14
|
+
ThemeClassNames,
|
|
15
|
+
} from '@docusaurus/theme-common';
|
|
12
16
|
import {useKeyboardNavigation} from '@docusaurus/theme-common/internal';
|
|
13
17
|
import SkipToContent from '@theme/SkipToContent';
|
|
14
18
|
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
@@ -42,6 +46,7 @@ export default function Layout(props: Props): JSX.Element {
|
|
|
42
46
|
<Navbar />
|
|
43
47
|
|
|
44
48
|
<div
|
|
49
|
+
id={SkipToContentFallbackId}
|
|
45
50
|
className={clsx(
|
|
46
51
|
ThemeClassNames.wrapper.main,
|
|
47
52
|
styles.mainWrapper,
|
|
@@ -6,26 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import
|
|
10
|
-
import {useSkipToContent} from '@docusaurus/theme-common/internal';
|
|
9
|
+
import {SkipToContentLink} from '@docusaurus/theme-common';
|
|
11
10
|
|
|
12
11
|
import styles from './styles.module.css';
|
|
13
12
|
|
|
14
13
|
export default function SkipToContent(): JSX.Element {
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<div
|
|
18
|
-
ref={containerRef}
|
|
19
|
-
role="region"
|
|
20
|
-
aria-label={translate({id: 'theme.common.skipToMainContent'})}>
|
|
21
|
-
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
|
22
|
-
<a href="#" className={styles.skipToContent} onClick={handleSkip}>
|
|
23
|
-
<Translate
|
|
24
|
-
id="theme.common.skipToMainContent"
|
|
25
|
-
description="The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation">
|
|
26
|
-
Skip to main content
|
|
27
|
-
</Translate>
|
|
28
|
-
</a>
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
14
|
+
return <SkipToContentLink className={styles.skipToContent} />;
|
|
31
15
|
}
|