@docusaurus/theme-classic 3.7.0-canary-6211 → 3.7.0-canary-6213
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/theme/DocCardList/index.js +9 -3
- package/lib/theme/DocCardList/styles.module.css +14 -0
- package/lib/theme/DocCategoryGeneratedIndexPage/index.js +1 -1
- package/lib/theme/DocCategoryGeneratedIndexPage/styles.module.css +0 -8
- package/lib/theme/DocItem/Paginator/index.js +7 -1
- package/lib/theme/DocPaginator/index.js +3 -2
- package/package.json +15 -15
- package/src/theme/DocCardList/index.tsx +15 -4
- package/src/theme/DocCardList/styles.module.css +14 -0
- package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +1 -1
- package/src/theme/DocCategoryGeneratedIndexPage/styles.module.css +0 -8
- package/src/theme/DocItem/Paginator/index.tsx +7 -1
- package/src/theme/DocPaginator/index.tsx +3 -2
- package/src/theme-classic.d.ts +3 -1
|
@@ -11,10 +11,18 @@ import {
|
|
|
11
11
|
filterDocCardListItems,
|
|
12
12
|
} from '@docusaurus/plugin-content-docs/client';
|
|
13
13
|
import DocCard from '@theme/DocCard';
|
|
14
|
+
import styles from './styles.module.css';
|
|
14
15
|
function DocCardListForCurrentSidebarCategory({className}) {
|
|
15
16
|
const items = useCurrentSidebarSiblings();
|
|
16
17
|
return <DocCardList items={items} className={className} />;
|
|
17
18
|
}
|
|
19
|
+
function DocCardListItem({item}) {
|
|
20
|
+
return (
|
|
21
|
+
<article className={clsx(styles.docCardListItem, 'col col--6')}>
|
|
22
|
+
<DocCard item={item} />
|
|
23
|
+
</article>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
18
26
|
export default function DocCardList(props) {
|
|
19
27
|
const {items, className} = props;
|
|
20
28
|
if (!items) {
|
|
@@ -24,9 +32,7 @@ export default function DocCardList(props) {
|
|
|
24
32
|
return (
|
|
25
33
|
<section className={clsx('row', className)}>
|
|
26
34
|
{filteredItems.map((item, index) => (
|
|
27
|
-
<
|
|
28
|
-
<DocCard item={item} />
|
|
29
|
-
</article>
|
|
35
|
+
<DocCardListItem key={index} item={item} />
|
|
30
36
|
))}
|
|
31
37
|
</section>
|
|
32
38
|
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.docCardListItem {
|
|
9
|
+
margin-bottom: 2rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.docCardListItem > * {
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
@@ -44,7 +44,7 @@ function DocCategoryGeneratedIndexPageContent({categoryGeneratedIndex}) {
|
|
|
44
44
|
<article className="margin-top--lg">
|
|
45
45
|
<DocCardList items={category.items} className={styles.list} />
|
|
46
46
|
</article>
|
|
47
|
-
<footer className="margin-top--
|
|
47
|
+
<footer className="margin-top--md">
|
|
48
48
|
<DocPaginator
|
|
49
49
|
previous={categoryGeneratedIndex.navigation.previous}
|
|
50
50
|
next={categoryGeneratedIndex.navigation.next}
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
.generatedIndexPage {
|
|
10
10
|
max-width: 75% !important;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
.list article:nth-last-child(-n + 2) {
|
|
14
|
-
margin-bottom: 0 !important;
|
|
15
|
-
}
|
|
16
12
|
}
|
|
17
13
|
|
|
18
14
|
/* Duplicated from .markdown h1 */
|
|
@@ -20,7 +16,3 @@
|
|
|
20
16
|
--ifm-h1-font-size: 3rem;
|
|
21
17
|
margin-bottom: calc(1.25 * var(--ifm-leading));
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
.list article:last-child {
|
|
25
|
-
margin-bottom: 0 !important;
|
|
26
|
-
}
|
|
@@ -13,5 +13,11 @@ import DocPaginator from '@theme/DocPaginator';
|
|
|
13
13
|
*/
|
|
14
14
|
export default function DocItemPaginator() {
|
|
15
15
|
const {metadata} = useDoc();
|
|
16
|
-
return
|
|
16
|
+
return (
|
|
17
|
+
<DocPaginator
|
|
18
|
+
className="docusaurus-mt-lg"
|
|
19
|
+
previous={metadata.previous}
|
|
20
|
+
next={metadata.next}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
17
23
|
}
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
9
10
|
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
|
10
11
|
export default function DocPaginator(props) {
|
|
11
|
-
const {previous, next} = props;
|
|
12
|
+
const {className, previous, next} = props;
|
|
12
13
|
return (
|
|
13
14
|
<nav
|
|
14
|
-
className=
|
|
15
|
+
className={clsx(className, 'pagination-nav')}
|
|
15
16
|
aria-label={translate({
|
|
16
17
|
id: 'theme.docs.paginator.navAriaLabel',
|
|
17
18
|
message: 'Docs pages',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "3.7.0-canary-
|
|
3
|
+
"version": "3.7.0-canary-6213",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docusaurus/core": "3.7.0-canary-
|
|
24
|
-
"@docusaurus/logger": "3.7.0-canary-
|
|
25
|
-
"@docusaurus/mdx-loader": "3.7.0-canary-
|
|
26
|
-
"@docusaurus/module-type-aliases": "3.7.0-canary-
|
|
27
|
-
"@docusaurus/plugin-content-blog": "3.7.0-canary-
|
|
28
|
-
"@docusaurus/plugin-content-docs": "3.7.0-canary-
|
|
29
|
-
"@docusaurus/plugin-content-pages": "3.7.0-canary-
|
|
30
|
-
"@docusaurus/theme-common": "3.7.0-canary-
|
|
31
|
-
"@docusaurus/theme-translations": "3.7.0-canary-
|
|
32
|
-
"@docusaurus/types": "3.7.0-canary-
|
|
33
|
-
"@docusaurus/utils": "3.7.0-canary-
|
|
34
|
-
"@docusaurus/utils-common": "3.7.0-canary-
|
|
35
|
-
"@docusaurus/utils-validation": "3.7.0-canary-
|
|
23
|
+
"@docusaurus/core": "3.7.0-canary-6213",
|
|
24
|
+
"@docusaurus/logger": "3.7.0-canary-6213",
|
|
25
|
+
"@docusaurus/mdx-loader": "3.7.0-canary-6213",
|
|
26
|
+
"@docusaurus/module-type-aliases": "3.7.0-canary-6213",
|
|
27
|
+
"@docusaurus/plugin-content-blog": "3.7.0-canary-6213",
|
|
28
|
+
"@docusaurus/plugin-content-docs": "3.7.0-canary-6213",
|
|
29
|
+
"@docusaurus/plugin-content-pages": "3.7.0-canary-6213",
|
|
30
|
+
"@docusaurus/theme-common": "3.7.0-canary-6213",
|
|
31
|
+
"@docusaurus/theme-translations": "3.7.0-canary-6213",
|
|
32
|
+
"@docusaurus/types": "3.7.0-canary-6213",
|
|
33
|
+
"@docusaurus/utils": "3.7.0-canary-6213",
|
|
34
|
+
"@docusaurus/utils-common": "3.7.0-canary-6213",
|
|
35
|
+
"@docusaurus/utils-validation": "3.7.0-canary-6213",
|
|
36
36
|
"@mdx-js/react": "^3.0.0",
|
|
37
37
|
"clsx": "^2.0.0",
|
|
38
38
|
"copy-text-to-clipboard": "^3.2.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=18.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c9fdd7acbf913057cfe0c16c9446875b21592e24"
|
|
66
66
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import React, {type ReactNode} from 'react';
|
|
8
|
+
import React, {type ComponentProps, type ReactNode} from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import {
|
|
11
11
|
useCurrentSidebarSiblings,
|
|
@@ -13,12 +13,25 @@ import {
|
|
|
13
13
|
} from '@docusaurus/plugin-content-docs/client';
|
|
14
14
|
import DocCard from '@theme/DocCard';
|
|
15
15
|
import type {Props} from '@theme/DocCardList';
|
|
16
|
+
import styles from './styles.module.css';
|
|
16
17
|
|
|
17
18
|
function DocCardListForCurrentSidebarCategory({className}: Props) {
|
|
18
19
|
const items = useCurrentSidebarSiblings();
|
|
19
20
|
return <DocCardList items={items} className={className} />;
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
function DocCardListItem({
|
|
24
|
+
item,
|
|
25
|
+
}: {
|
|
26
|
+
item: ComponentProps<typeof DocCard>['item'];
|
|
27
|
+
}) {
|
|
28
|
+
return (
|
|
29
|
+
<article className={clsx(styles.docCardListItem, 'col col--6')}>
|
|
30
|
+
<DocCard item={item} />
|
|
31
|
+
</article>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
22
35
|
export default function DocCardList(props: Props): ReactNode {
|
|
23
36
|
const {items, className} = props;
|
|
24
37
|
if (!items) {
|
|
@@ -28,9 +41,7 @@ export default function DocCardList(props: Props): ReactNode {
|
|
|
28
41
|
return (
|
|
29
42
|
<section className={clsx('row', className)}>
|
|
30
43
|
{filteredItems.map((item, index) => (
|
|
31
|
-
<
|
|
32
|
-
<DocCard item={item} />
|
|
33
|
-
</article>
|
|
44
|
+
<DocCardListItem key={index} item={item} />
|
|
34
45
|
))}
|
|
35
46
|
</section>
|
|
36
47
|
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.docCardListItem {
|
|
9
|
+
margin-bottom: 2rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.docCardListItem > * {
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
@@ -53,7 +53,7 @@ function DocCategoryGeneratedIndexPageContent({
|
|
|
53
53
|
<article className="margin-top--lg">
|
|
54
54
|
<DocCardList items={category.items} className={styles.list} />
|
|
55
55
|
</article>
|
|
56
|
-
<footer className="margin-top--
|
|
56
|
+
<footer className="margin-top--md">
|
|
57
57
|
<DocPaginator
|
|
58
58
|
previous={categoryGeneratedIndex.navigation.previous}
|
|
59
59
|
next={categoryGeneratedIndex.navigation.next}
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
.generatedIndexPage {
|
|
10
10
|
max-width: 75% !important;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
.list article:nth-last-child(-n + 2) {
|
|
14
|
-
margin-bottom: 0 !important;
|
|
15
|
-
}
|
|
16
12
|
}
|
|
17
13
|
|
|
18
14
|
/* Duplicated from .markdown h1 */
|
|
@@ -20,7 +16,3 @@
|
|
|
20
16
|
--ifm-h1-font-size: 3rem;
|
|
21
17
|
margin-bottom: calc(1.25 * var(--ifm-leading));
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
.list article:last-child {
|
|
25
|
-
margin-bottom: 0 !important;
|
|
26
|
-
}
|
|
@@ -15,5 +15,11 @@ import DocPaginator from '@theme/DocPaginator';
|
|
|
15
15
|
*/
|
|
16
16
|
export default function DocItemPaginator(): ReactNode {
|
|
17
17
|
const {metadata} = useDoc();
|
|
18
|
-
return
|
|
18
|
+
return (
|
|
19
|
+
<DocPaginator
|
|
20
|
+
className="docusaurus-mt-lg"
|
|
21
|
+
previous={metadata.previous}
|
|
22
|
+
next={metadata.next}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
19
25
|
}
|
|
@@ -6,15 +6,16 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {type ReactNode} from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
10
11
|
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
|
11
12
|
import type {Props} from '@theme/DocPaginator';
|
|
12
13
|
|
|
13
14
|
export default function DocPaginator(props: Props): ReactNode {
|
|
14
|
-
const {previous, next} = props;
|
|
15
|
+
const {className, previous, next} = props;
|
|
15
16
|
return (
|
|
16
17
|
<nav
|
|
17
|
-
className=
|
|
18
|
+
className={clsx(className, 'pagination-nav')}
|
|
18
19
|
aria-label={translate({
|
|
19
20
|
id: 'theme.docs.paginator.navAriaLabel',
|
|
20
21
|
message: 'Docs pages',
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -624,7 +624,9 @@ declare module '@theme/DocPaginator' {
|
|
|
624
624
|
import type {PropNavigation} from '@docusaurus/plugin-content-docs';
|
|
625
625
|
|
|
626
626
|
// May be simpler to provide a {navigation: PropNavigation} prop?
|
|
627
|
-
export interface Props extends PropNavigation {
|
|
627
|
+
export interface Props extends PropNavigation {
|
|
628
|
+
className?: string;
|
|
629
|
+
}
|
|
628
630
|
|
|
629
631
|
export default function DocPaginator(props: Props): ReactNode;
|
|
630
632
|
}
|