@docusaurus/theme-classic 0.0.0-4656 → 0.0.0-4660
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.
|
@@ -7,14 +7,26 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Link from '@docusaurus/Link';
|
|
9
9
|
import styles from './styles.module.css';
|
|
10
|
+
|
|
11
|
+
function MaybeLink(props) {
|
|
12
|
+
if (props.href) {
|
|
13
|
+
return <Link {...props} />;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return <>{props.children}</>;
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
export default function BlogPostAuthor({author}) {
|
|
11
|
-
const {name, title, url, imageURL} = author;
|
|
20
|
+
const {name, title, url, imageURL, email} = author;
|
|
21
|
+
const link = url || (email && `mailto:${email}`) || undefined;
|
|
12
22
|
return (
|
|
13
23
|
<div className="avatar margin-bottom--sm">
|
|
14
24
|
{imageURL && (
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
25
|
+
<span className="avatar__photo-link avatar__photo">
|
|
26
|
+
<MaybeLink href={link}>
|
|
27
|
+
<img className={styles.image} src={imageURL} alt={name} />
|
|
28
|
+
</MaybeLink>
|
|
29
|
+
</span>
|
|
18
30
|
)}
|
|
19
31
|
|
|
20
32
|
{name && (
|
|
@@ -24,9 +36,9 @@ export default function BlogPostAuthor({author}) {
|
|
|
24
36
|
itemScope
|
|
25
37
|
itemType="https://schema.org/Person">
|
|
26
38
|
<div className="avatar__name">
|
|
27
|
-
<
|
|
39
|
+
<MaybeLink href={link} itemProp="url">
|
|
28
40
|
<span itemProp="name">{name}</span>
|
|
29
|
-
</
|
|
41
|
+
</MaybeLink>
|
|
30
42
|
</div>
|
|
31
43
|
{title && (
|
|
32
44
|
<small className="avatar__subtitle" itemProp="description">
|
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-4660",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@docusaurus/core": "0.0.0-
|
|
25
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
28
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
30
|
-
"@docusaurus/utils": "0.0.0-
|
|
31
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
32
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
24
|
+
"@docusaurus/core": "0.0.0-4660",
|
|
25
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4660",
|
|
26
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4660",
|
|
27
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4660",
|
|
28
|
+
"@docusaurus/theme-common": "0.0.0-4660",
|
|
29
|
+
"@docusaurus/theme-translations": "0.0.0-4660",
|
|
30
|
+
"@docusaurus/utils": "0.0.0-4660",
|
|
31
|
+
"@docusaurus/utils-common": "0.0.0-4660",
|
|
32
|
+
"@docusaurus/utils-validation": "0.0.0-4660",
|
|
33
33
|
"@mdx-js/react": "^1.6.22",
|
|
34
34
|
"clsx": "^1.1.1",
|
|
35
35
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"rtlcss": "^3.3.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
46
|
-
"@docusaurus/types": "0.0.0-
|
|
45
|
+
"@docusaurus/module-type-aliases": "0.0.0-4660",
|
|
46
|
+
"@docusaurus/types": "0.0.0-4660",
|
|
47
47
|
"@types/mdx-js__react": "^1.5.5",
|
|
48
48
|
"@types/prismjs": "^1.26.0",
|
|
49
49
|
"@types/rtlcss": "^3.1.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=14"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "78417b2a5827489b7e0d8b255843800151615a7b"
|
|
63
63
|
}
|
|
@@ -6,19 +6,29 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import Link from '@docusaurus/Link';
|
|
9
|
+
import Link, {type Props as LinkProps} from '@docusaurus/Link';
|
|
10
10
|
import type {Props} from '@theme/BlogPostAuthor';
|
|
11
11
|
|
|
12
12
|
import styles from './styles.module.css';
|
|
13
13
|
|
|
14
|
+
function MaybeLink(props: LinkProps): JSX.Element {
|
|
15
|
+
if (props.href) {
|
|
16
|
+
return <Link {...props} />;
|
|
17
|
+
}
|
|
18
|
+
return <>{props.children}</>;
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
export default function BlogPostAuthor({author}: Props): JSX.Element {
|
|
15
|
-
const {name, title, url, imageURL} = author;
|
|
22
|
+
const {name, title, url, imageURL, email} = author;
|
|
23
|
+
const link = url || (email && `mailto:${email}`) || undefined;
|
|
16
24
|
return (
|
|
17
25
|
<div className="avatar margin-bottom--sm">
|
|
18
26
|
{imageURL && (
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
27
|
+
<span className="avatar__photo-link avatar__photo">
|
|
28
|
+
<MaybeLink href={link}>
|
|
29
|
+
<img className={styles.image} src={imageURL} alt={name} />
|
|
30
|
+
</MaybeLink>
|
|
31
|
+
</span>
|
|
22
32
|
)}
|
|
23
33
|
|
|
24
34
|
{name && (
|
|
@@ -28,9 +38,9 @@ export default function BlogPostAuthor({author}: Props): JSX.Element {
|
|
|
28
38
|
itemScope
|
|
29
39
|
itemType="https://schema.org/Person">
|
|
30
40
|
<div className="avatar__name">
|
|
31
|
-
<
|
|
41
|
+
<MaybeLink href={link} itemProp="url">
|
|
32
42
|
<span itemProp="name">{name}</span>
|
|
33
|
-
</
|
|
43
|
+
</MaybeLink>
|
|
34
44
|
</div>
|
|
35
45
|
{title && (
|
|
36
46
|
<small className="avatar__subtitle" itemProp="description">
|