@docusaurus/theme-classic 0.0.0-5994 → 0.0.0-5995

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.
Files changed (39) hide show
  1. package/lib/getSwizzleConfig.js +10 -0
  2. package/lib/theme/BlogPostItem/Header/Author/Socials/index.d.ts +11 -0
  3. package/lib/theme/BlogPostItem/Header/Author/Socials/index.js +48 -0
  4. package/lib/theme/BlogPostItem/Header/Author/Socials/styles.module.css +34 -0
  5. package/lib/theme/BlogPostItem/Header/Author/index.js +20 -5
  6. package/lib/theme/BlogPostItem/Header/Author/styles.module.css +21 -0
  7. package/lib/theme/BlogPostItem/Header/Authors/index.js +3 -1
  8. package/lib/theme/BlogPostItem/Header/Authors/styles.module.css +0 -1
  9. package/lib/theme/Icon/Socials/Default/index.d.ts +9 -0
  10. package/lib/theme/Icon/Socials/Default/index.js +30 -0
  11. package/lib/theme/Icon/Socials/GitHub/index.d.ts +9 -0
  12. package/lib/theme/Icon/Socials/GitHub/index.js +25 -0
  13. package/lib/theme/Icon/Socials/GitHub/styles.module.css +14 -0
  14. package/lib/theme/Icon/Socials/LinkedIn/index.d.ts +9 -0
  15. package/lib/theme/Icon/Socials/LinkedIn/index.js +24 -0
  16. package/lib/theme/Icon/Socials/StackOverflow/index.d.ts +9 -0
  17. package/lib/theme/Icon/Socials/StackOverflow/index.js +27 -0
  18. package/lib/theme/Icon/Socials/Twitter/index.d.ts +9 -0
  19. package/lib/theme/Icon/Socials/Twitter/index.js +24 -0
  20. package/lib/theme/Icon/Socials/X/index.d.ts +9 -0
  21. package/lib/theme/Icon/Socials/X/index.js +25 -0
  22. package/lib/theme/Icon/Socials/X/styles.module.css +14 -0
  23. package/package.json +14 -14
  24. package/src/getSwizzleConfig.ts +11 -0
  25. package/src/theme/BlogPostItem/Header/Author/Socials/index.tsx +61 -0
  26. package/src/theme/BlogPostItem/Header/Author/Socials/styles.module.css +34 -0
  27. package/src/theme/BlogPostItem/Header/Author/index.tsx +19 -4
  28. package/src/theme/BlogPostItem/Header/Author/styles.module.css +21 -0
  29. package/src/theme/BlogPostItem/Header/Authors/index.tsx +3 -1
  30. package/src/theme/BlogPostItem/Header/Authors/styles.module.css +0 -1
  31. package/src/theme/Icon/Socials/Default/index.tsx +33 -0
  32. package/src/theme/Icon/Socials/GitHub/index.tsx +29 -0
  33. package/src/theme/Icon/Socials/GitHub/styles.module.css +14 -0
  34. package/src/theme/Icon/Socials/LinkedIn/index.tsx +27 -0
  35. package/src/theme/Icon/Socials/StackOverflow/index.tsx +30 -0
  36. package/src/theme/Icon/Socials/Twitter/index.tsx +27 -0
  37. package/src/theme/Icon/Socials/X/index.tsx +29 -0
  38. package/src/theme/Icon/Socials/X/styles.module.css +14 -0
  39. package/src/theme-classic.d.ts +64 -2
@@ -270,6 +270,16 @@ function getSwizzleConfig() {
270
270
  },
271
271
  description: 'The menu icon component',
272
272
  },
273
+ 'Icon/Socials': {
274
+ actions: {
275
+ // Forbidden because it's a parent folder, makes the CLI crash atm
276
+ // TODO the CLI should rather support --eject
277
+ // Subfolders can be swizzled
278
+ eject: 'forbidden',
279
+ wrap: 'forbidden',
280
+ },
281
+ description: 'The Icon/Socials folder is not directly swizzle-able, but you can swizzle its sub-components.',
282
+ },
273
283
  MDXComponents: {
274
284
  actions: {
275
285
  eject: 'safe',
@@ -0,0 +1,11 @@
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
+ import React from 'react';
8
+ import type { Props } from '@theme/BlogPostItem/Header/Author/Socials';
9
+ export default function AuthorSocials({ author }: {
10
+ author: Props['author'];
11
+ }): React.JSX.Element;
@@ -0,0 +1,48 @@
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
+ import React from 'react';
8
+ import clsx from 'clsx';
9
+ import Link from '@docusaurus/Link';
10
+ import Twitter from '@theme/Icon/Socials/Twitter';
11
+ import GitHub from '@theme/Icon/Socials/GitHub';
12
+ import X from '@theme/Icon/Socials/X';
13
+ import StackOverflow from '@theme/Icon/Socials/StackOverflow';
14
+ import LinkedIn from '@theme/Icon/Socials/LinkedIn';
15
+ import DefaultSocialIcon from '@theme/Icon/Socials/Default';
16
+ import styles from './styles.module.css';
17
+ const SocialPlatformConfigs = {
18
+ twitter: {Icon: Twitter, label: 'Twitter'},
19
+ github: {Icon: GitHub, label: 'GitHub'},
20
+ stackoverflow: {Icon: StackOverflow, label: 'Stack Overflow'},
21
+ linkedin: {Icon: LinkedIn, label: 'LinkedIn'},
22
+ x: {Icon: X, label: 'X'},
23
+ };
24
+ function getSocialPlatformConfig(platformKey) {
25
+ return (
26
+ SocialPlatformConfigs[platformKey] ?? {
27
+ Icon: DefaultSocialIcon,
28
+ label: platformKey,
29
+ }
30
+ );
31
+ }
32
+ function SocialLink({platform, link}) {
33
+ const {Icon, label} = getSocialPlatformConfig(platform);
34
+ return (
35
+ <Link className={styles.authorSocialLink} href={link} title={label}>
36
+ <Icon className={clsx(styles.authorSocialLink)} />
37
+ </Link>
38
+ );
39
+ }
40
+ export default function AuthorSocials({author}) {
41
+ return (
42
+ <div className={styles.authorSocials}>
43
+ {Object.entries(author.socials ?? {}).map(([platform, linkUrl]) => {
44
+ return <SocialLink key={platform} platform={platform} link={linkUrl} />;
45
+ })}
46
+ </div>
47
+ );
48
+ }
@@ -0,0 +1,34 @@
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
+ :root {
9
+ --docusaurus-blog-social-icon-size: 1rem;
10
+ }
11
+
12
+ .authorSocials {
13
+ margin-top: 0.2rem;
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ align-items: center;
17
+ line-height: 0;
18
+ overflow: hidden;
19
+ line-clamp: 1;
20
+ -webkit-line-clamp: 1;
21
+ -webkit-box-orient: vertical;
22
+ }
23
+
24
+ .authorSocialLink {
25
+ height: var(--docusaurus-blog-social-icon-size);
26
+ width: var(--docusaurus-blog-social-icon-size);
27
+ line-height: 0;
28
+ margin-right: 0.3rem;
29
+ }
30
+
31
+ .authorSocialIcon {
32
+ width: var(--docusaurus-blog-social-icon-size);
33
+ height: var(--docusaurus-blog-social-icon-size);
34
+ }
@@ -7,15 +7,29 @@
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
9
  import Link from '@docusaurus/Link';
10
+ import AuthorSocials from '@theme/BlogPostItem/Header/Author/Socials';
11
+ import styles from './styles.module.css';
10
12
  function MaybeLink(props) {
11
13
  if (props.href) {
12
14
  return <Link {...props} />;
13
15
  }
14
16
  return <>{props.children}</>;
15
17
  }
16
- export default function BlogPostItemHeaderAuthor({author, className}) {
17
- const {name, title, url, imageURL, email} = author;
18
+ function AuthorTitle({title}) {
19
+ return (
20
+ <small className={styles.authorTitle} title={title}>
21
+ {title}
22
+ </small>
23
+ );
24
+ }
25
+ export default function BlogPostItemHeaderAuthor({
26
+ // singleAuthor, // may be useful in the future, or for swizzle users
27
+ author,
28
+ className,
29
+ }) {
30
+ const {name, title, url, socials, imageURL, email} = author;
18
31
  const link = url || (email && `mailto:${email}`) || undefined;
32
+ const hasSocials = socials && Object.keys(socials).length > 0;
19
33
  return (
20
34
  <div className={clsx('avatar margin-bottom--sm', className)}>
21
35
  {imageURL && (
@@ -24,14 +38,15 @@ export default function BlogPostItemHeaderAuthor({author, className}) {
24
38
  </MaybeLink>
25
39
  )}
26
40
 
27
- {name && (
41
+ {(name || title) && (
28
42
  <div className="avatar__intro">
29
43
  <div className="avatar__name">
30
44
  <MaybeLink href={link}>
31
- <span>{name}</span>
45
+ <span className={styles.authorName}>{name}</span>
32
46
  </MaybeLink>
33
47
  </div>
34
- {title && <small className="avatar__subtitle">{title}</small>}
48
+ {!!title && <AuthorTitle title={title} />}
49
+ {hasSocials && <AuthorSocials author={author} />}
35
50
  </div>
36
51
  )}
37
52
  </div>
@@ -0,0 +1,21 @@
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
+ .authorName {
9
+ font-size: 1.1rem;
10
+ }
11
+
12
+ .authorTitle {
13
+ margin-top: 0.06rem;
14
+ font-size: 0.8rem;
15
+ line-height: 0.8rem;
16
+ display: -webkit-box;
17
+ overflow: hidden;
18
+ line-clamp: 1;
19
+ -webkit-line-clamp: 1;
20
+ -webkit-box-orient: vertical;
21
+ }
@@ -20,6 +20,7 @@ export default function BlogPostItemHeaderAuthors({className}) {
20
20
  return null;
21
21
  }
22
22
  const imageOnly = authors.every(({name}) => !name);
23
+ const singleAuthor = authors.length === 1;
23
24
  return (
24
25
  <div
25
26
  className={clsx(
@@ -30,11 +31,12 @@ export default function BlogPostItemHeaderAuthors({className}) {
30
31
  {authors.map((author, idx) => (
31
32
  <div
32
33
  className={clsx(
33
- !imageOnly && 'col col--6',
34
+ !imageOnly && (singleAuthor ? 'col col--12' : 'col col--6'),
34
35
  imageOnly ? styles.imageOnlyAuthorCol : styles.authorCol,
35
36
  )}
36
37
  key={idx}>
37
38
  <BlogPostItemHeaderAuthor
39
+ singleAuthor={singleAuthor}
38
40
  author={{
39
41
  ...author,
40
42
  // Handle author images using relative paths
@@ -7,7 +7,6 @@
7
7
 
8
8
  .authorCol {
9
9
  max-width: inherit !important;
10
- flex-grow: 1 !important;
11
10
  }
12
11
 
13
12
  .imageOnlyAuthorRow {
@@ -0,0 +1,9 @@
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
+ import type { SVGProps } from 'react';
8
+ declare function DefaultSocial(props: SVGProps<SVGSVGElement>): JSX.Element;
9
+ export default DefaultSocial;
@@ -0,0 +1,30 @@
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
+ // SVG Source: https://tabler.io/
8
+ function DefaultSocial(props) {
9
+ return (
10
+ <svg
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ width="1em"
13
+ height="1em"
14
+ viewBox="0 0 24 24"
15
+ fill="none"
16
+ stroke="currentColor"
17
+ strokeWidth="2"
18
+ strokeLinecap="round"
19
+ strokeLinejoin="round"
20
+ {...props}>
21
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
22
+ <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" />
23
+ <path d="M3.6 9h16.8" />
24
+ <path d="M3.6 15h16.8" />
25
+ <path d="M11.5 3a17 17 0 0 0 0 18" />
26
+ <path d="M12.5 3a17 17 0 0 1 0 18" />
27
+ </svg>
28
+ );
29
+ }
30
+ export default DefaultSocial;
@@ -0,0 +1,9 @@
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
+ import type { SVGProps } from 'react';
8
+ declare function GitHub(props: SVGProps<SVGSVGElement>): JSX.Element;
9
+ export default GitHub;
@@ -0,0 +1,25 @@
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
+ import clsx from 'clsx';
8
+ import styles from './styles.module.css';
9
+ // SVG Source: https://svgl.app/
10
+ function GitHub(props) {
11
+ return (
12
+ <svg
13
+ viewBox="0 0 256 250"
14
+ width="1em"
15
+ height="1em"
16
+ {...props}
17
+ className={clsx(props.className, styles.githubSvg)}
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ style={{'--dark': '#000', '--light': '#fff'}}
20
+ preserveAspectRatio="xMidYMid">
21
+ <path d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46 6.397 1.185 8.746-2.777 8.746-6.158 0-3.052-.12-13.135-.174-23.83-35.61 7.742-43.124-15.103-43.124-15.103-5.823-14.795-14.213-18.73-14.213-18.73-11.613-7.944.876-7.78.876-7.78 12.853.902 19.621 13.19 19.621 13.19 11.417 19.568 29.945 13.911 37.249 10.64 1.149-8.272 4.466-13.92 8.127-17.116-28.431-3.236-58.318-14.212-58.318-63.258 0-13.975 5-25.394 13.188-34.358-1.329-3.224-5.71-16.242 1.24-33.874 0 0 10.749-3.44 35.21 13.121 10.21-2.836 21.16-4.258 32.038-4.307 10.878.049 21.837 1.47 32.066 4.307 24.431-16.56 35.165-13.12 35.165-13.12 6.967 17.63 2.584 30.65 1.255 33.873 8.207 8.964 13.173 20.383 13.173 34.358 0 49.163-29.944 59.988-58.447 63.157 4.591 3.972 8.682 11.762 8.682 23.704 0 17.126-.148 30.91-.148 35.126 0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002 256 57.307 198.691 0 128.001 0Zm-80.06 182.34c-.282.636-1.283.827-2.194.39-.929-.417-1.45-1.284-1.15-1.922.276-.655 1.279-.838 2.205-.399.93.418 1.46 1.293 1.139 1.931Zm6.296 5.618c-.61.566-1.804.303-2.614-.591-.837-.892-.994-2.086-.375-2.66.63-.566 1.787-.301 2.626.591.838.903 1 2.088.363 2.66Zm4.32 7.188c-.785.545-2.067.034-2.86-1.104-.784-1.138-.784-2.503.017-3.05.795-.547 2.058-.055 2.861 1.075.782 1.157.782 2.522-.019 3.08Zm7.304 8.325c-.701.774-2.196.566-3.29-.49-1.119-1.032-1.43-2.496-.726-3.27.71-.776 2.213-.558 3.315.49 1.11 1.03 1.45 2.505.701 3.27Zm9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033-1.448-.439-2.395-1.613-2.103-2.626.301-1.01 1.747-1.484 3.207-1.028 1.446.436 2.396 1.602 2.095 2.622Zm10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95-1.53.034-2.769-.82-2.786-1.86 0-1.065 1.202-1.932 2.733-1.958 1.522-.03 2.768.818 2.768 1.868Zm10.555-.405c.182 1.03-.875 2.088-2.387 2.37-1.485.271-2.861-.365-3.05-1.386-.184-1.056.893-2.114 2.376-2.387 1.514-.263 2.868.356 3.061 1.403Z" />
22
+ </svg>
23
+ );
24
+ }
25
+ export default GitHub;
@@ -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
+ [data-theme='dark'] .githubSvg {
9
+ fill: var(--light);
10
+ }
11
+
12
+ [data-theme='light'] .githubSvg {
13
+ fill: var(--dark);
14
+ }
@@ -0,0 +1,9 @@
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
+ import type { SVGProps } from 'react';
8
+ declare function LinkedIn(props: SVGProps<SVGSVGElement>): JSX.Element;
9
+ export default LinkedIn;
@@ -0,0 +1,24 @@
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
+ // SVG Source: https://svgl.app/
8
+ function LinkedIn(props) {
9
+ return (
10
+ <svg
11
+ width="1em"
12
+ height="1em"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ preserveAspectRatio="xMidYMid"
15
+ viewBox="0 0 256 256"
16
+ {...props}>
17
+ <path
18
+ d="M218.123 218.127h-37.931v-59.403c0-14.165-.253-32.4-19.728-32.4-19.756 0-22.779 15.434-22.779 31.369v60.43h-37.93V95.967h36.413v16.694h.51a39.907 39.907 0 0 1 35.928-19.733c38.445 0 45.533 25.288 45.533 58.186l-.016 67.013ZM56.955 79.27c-12.157.002-22.014-9.852-22.016-22.009-.002-12.157 9.851-22.014 22.008-22.016 12.157-.003 22.014 9.851 22.016 22.008A22.013 22.013 0 0 1 56.955 79.27m18.966 138.858H37.95V95.967h37.97v122.16ZM237.033.018H18.89C8.58-.098.125 8.161-.001 18.471v219.053c.122 10.315 8.576 18.582 18.89 18.474h218.144c10.336.128 18.823-8.139 18.966-18.474V18.454c-.147-10.33-8.635-18.588-18.966-18.453"
19
+ fill="#0A66C2"
20
+ />
21
+ </svg>
22
+ );
23
+ }
24
+ export default LinkedIn;
@@ -0,0 +1,9 @@
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
+ import type { SVGProps } from 'react';
8
+ declare function StackOverflow(props: SVGProps<SVGSVGElement>): JSX.Element;
9
+ export default StackOverflow;
@@ -0,0 +1,27 @@
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
+ // SVG Source: https://svgl.app/
8
+ function StackOverflow(props) {
9
+ return (
10
+ <svg
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ viewBox="0 0 169.61 200"
13
+ width="1em"
14
+ height="1em"
15
+ {...props}>
16
+ <path
17
+ d="M140.44 178.38v-48.65h21.61V200H0v-70.27h21.61v48.65z"
18
+ fill="#bcbbbb"
19
+ />
20
+ <path
21
+ d="M124.24 140.54l4.32-16.22-86.97-17.83-3.78 17.83zM49.7 82.16L130.72 120l7.56-16.22-81.02-37.83zm22.68-40l68.06 57.3 11.35-13.51-68.6-57.3-11.35 13.51zM116.14 0l-14.59 10.81 53.48 71.89 14.58-10.81zM37.81 162.16h86.43v-16.21H37.81z"
22
+ fill="#f48024"
23
+ />
24
+ </svg>
25
+ );
26
+ }
27
+ export default StackOverflow;
@@ -0,0 +1,9 @@
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
+ import type { SVGProps } from 'react';
8
+ declare function Twitter(props: SVGProps<SVGSVGElement>): JSX.Element;
9
+ export default Twitter;
@@ -0,0 +1,24 @@
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
+ // SVG Source: https://svgl.app/
8
+ function Twitter(props) {
9
+ return (
10
+ <svg
11
+ viewBox="0 0 256 209"
12
+ width="1em"
13
+ height="1em"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ preserveAspectRatio="xMidYMid"
16
+ {...props}>
17
+ <path
18
+ d="M256 25.45c-9.42 4.177-19.542 7-30.166 8.27 10.845-6.5 19.172-16.793 23.093-29.057a105.183 105.183 0 0 1-33.351 12.745C205.995 7.201 192.346.822 177.239.822c-29.006 0-52.523 23.516-52.523 52.52 0 4.117.465 8.125 1.36 11.97-43.65-2.191-82.35-23.1-108.255-54.876-4.52 7.757-7.11 16.78-7.11 26.404 0 18.222 9.273 34.297 23.365 43.716a52.312 52.312 0 0 1-23.79-6.57c-.003.22-.003.44-.003.661 0 25.447 18.104 46.675 42.13 51.5a52.592 52.592 0 0 1-23.718.9c6.683 20.866 26.08 36.05 49.062 36.475-17.975 14.086-40.622 22.483-65.228 22.483-4.24 0-8.42-.249-12.529-.734 23.243 14.902 50.85 23.597 80.51 23.597 96.607 0 149.434-80.031 149.434-149.435 0-2.278-.05-4.543-.152-6.795A106.748 106.748 0 0 0 256 25.45"
19
+ fill="#55acee"
20
+ />
21
+ </svg>
22
+ );
23
+ }
24
+ export default Twitter;
@@ -0,0 +1,9 @@
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
+ import type { SVGProps } from 'react';
8
+ declare function X(props: SVGProps<SVGSVGElement>): JSX.Element;
9
+ export default X;
@@ -0,0 +1,25 @@
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
+ import clsx from 'clsx';
8
+ import styles from './styles.module.css';
9
+ // SVG Source: https://svgl.app/
10
+ function X(props) {
11
+ return (
12
+ <svg
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ width="1em"
15
+ height="1em"
16
+ fill="none"
17
+ viewBox="0 0 1200 1227"
18
+ {...props}
19
+ className={clsx(props.className, styles.xSvg)}
20
+ style={{'--dark': '#000', '--light': '#fff'}}>
21
+ <path d="M714.163 519.284 1160.89 0h-105.86L667.137 450.887 357.328 0H0l468.492 681.821L0 1226.37h105.866l409.625-476.152 327.181 476.152H1200L714.137 519.284h.026ZM569.165 687.828l-47.468-67.894-377.686-540.24h162.604l304.797 435.991 47.468 67.894 396.2 566.721H892.476L569.165 687.854v-.026Z" />
22
+ </svg>
23
+ );
24
+ }
25
+ export default X;
@@ -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
+ [data-theme='dark'] .xSvg {
9
+ fill: var(--light);
10
+ }
11
+
12
+ [data-theme='light'] .xSvg {
13
+ fill: var(--dark);
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-5994",
3
+ "version": "0.0.0-5995",
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-5994",
24
- "@docusaurus/mdx-loader": "0.0.0-5994",
25
- "@docusaurus/module-type-aliases": "0.0.0-5994",
26
- "@docusaurus/plugin-content-blog": "0.0.0-5994",
27
- "@docusaurus/plugin-content-docs": "0.0.0-5994",
28
- "@docusaurus/plugin-content-pages": "0.0.0-5994",
29
- "@docusaurus/theme-common": "0.0.0-5994",
30
- "@docusaurus/theme-translations": "0.0.0-5994",
31
- "@docusaurus/types": "0.0.0-5994",
32
- "@docusaurus/utils": "0.0.0-5994",
33
- "@docusaurus/utils-common": "0.0.0-5994",
34
- "@docusaurus/utils-validation": "0.0.0-5994",
23
+ "@docusaurus/core": "0.0.0-5995",
24
+ "@docusaurus/mdx-loader": "0.0.0-5995",
25
+ "@docusaurus/module-type-aliases": "0.0.0-5995",
26
+ "@docusaurus/plugin-content-blog": "0.0.0-5995",
27
+ "@docusaurus/plugin-content-docs": "0.0.0-5995",
28
+ "@docusaurus/plugin-content-pages": "0.0.0-5995",
29
+ "@docusaurus/theme-common": "0.0.0-5995",
30
+ "@docusaurus/theme-translations": "0.0.0-5995",
31
+ "@docusaurus/types": "0.0.0-5995",
32
+ "@docusaurus/utils": "0.0.0-5995",
33
+ "@docusaurus/utils-common": "0.0.0-5995",
34
+ "@docusaurus/utils-validation": "0.0.0-5995",
35
35
  "@mdx-js/react": "^3.0.0",
36
36
  "clsx": "^2.0.0",
37
37
  "copy-text-to-clipboard": "^3.2.0",
@@ -61,5 +61,5 @@
61
61
  "engines": {
62
62
  "node": ">=18.0"
63
63
  },
64
- "gitHead": "4905b76b4b39c2f102bbc78d018933f57ea39b78"
64
+ "gitHead": "c12bf10b9832a94916891f384814d62c4f49fd34"
65
65
  }
@@ -289,6 +289,17 @@ export default function getSwizzleConfig(): SwizzleConfig {
289
289
  },
290
290
  description: 'The menu icon component',
291
291
  },
292
+ 'Icon/Socials': {
293
+ actions: {
294
+ // Forbidden because it's a parent folder, makes the CLI crash atm
295
+ // TODO the CLI should rather support --eject
296
+ // Subfolders can be swizzled
297
+ eject: 'forbidden',
298
+ wrap: 'forbidden',
299
+ },
300
+ description:
301
+ 'The Icon/Socials folder is not directly swizzle-able, but you can swizzle its sub-components.',
302
+ },
292
303
  MDXComponents: {
293
304
  actions: {
294
305
  eject: 'safe',
@@ -0,0 +1,61 @@
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
+ import type {ComponentType} from 'react';
9
+ import React from 'react';
10
+ import clsx from 'clsx';
11
+ import Link from '@docusaurus/Link';
12
+ import type {Props} from '@theme/BlogPostItem/Header/Author/Socials';
13
+
14
+ import Twitter from '@theme/Icon/Socials/Twitter';
15
+ import GitHub from '@theme/Icon/Socials/GitHub';
16
+ import X from '@theme/Icon/Socials/X';
17
+ import StackOverflow from '@theme/Icon/Socials/StackOverflow';
18
+ import LinkedIn from '@theme/Icon/Socials/LinkedIn';
19
+ import DefaultSocialIcon from '@theme/Icon/Socials/Default';
20
+
21
+ import styles from './styles.module.css';
22
+
23
+ type SocialIcon = ComponentType<{className: string}>;
24
+
25
+ type SocialPlatformConfig = {Icon: SocialIcon; label: string};
26
+
27
+ const SocialPlatformConfigs: Record<string, SocialPlatformConfig> = {
28
+ twitter: {Icon: Twitter, label: 'Twitter'},
29
+ github: {Icon: GitHub, label: 'GitHub'},
30
+ stackoverflow: {Icon: StackOverflow, label: 'Stack Overflow'},
31
+ linkedin: {Icon: LinkedIn, label: 'LinkedIn'},
32
+ x: {Icon: X, label: 'X'},
33
+ };
34
+
35
+ function getSocialPlatformConfig(platformKey: string): SocialPlatformConfig {
36
+ return (
37
+ SocialPlatformConfigs[platformKey] ?? {
38
+ Icon: DefaultSocialIcon,
39
+ label: platformKey,
40
+ }
41
+ );
42
+ }
43
+
44
+ function SocialLink({platform, link}: {platform: string; link: string}) {
45
+ const {Icon, label} = getSocialPlatformConfig(platform);
46
+ return (
47
+ <Link className={styles.authorSocialLink} href={link} title={label}>
48
+ <Icon className={clsx(styles.authorSocialLink)} />
49
+ </Link>
50
+ );
51
+ }
52
+
53
+ export default function AuthorSocials({author}: {author: Props['author']}) {
54
+ return (
55
+ <div className={styles.authorSocials}>
56
+ {Object.entries(author.socials ?? {}).map(([platform, linkUrl]) => {
57
+ return <SocialLink key={platform} platform={platform} link={linkUrl} />;
58
+ })}
59
+ </div>
60
+ );
61
+ }
@@ -0,0 +1,34 @@
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
+ :root {
9
+ --docusaurus-blog-social-icon-size: 1rem;
10
+ }
11
+
12
+ .authorSocials {
13
+ margin-top: 0.2rem;
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ align-items: center;
17
+ line-height: 0;
18
+ overflow: hidden;
19
+ line-clamp: 1;
20
+ -webkit-line-clamp: 1;
21
+ -webkit-box-orient: vertical;
22
+ }
23
+
24
+ .authorSocialLink {
25
+ height: var(--docusaurus-blog-social-icon-size);
26
+ width: var(--docusaurus-blog-social-icon-size);
27
+ line-height: 0;
28
+ margin-right: 0.3rem;
29
+ }
30
+
31
+ .authorSocialIcon {
32
+ width: var(--docusaurus-blog-social-icon-size);
33
+ height: var(--docusaurus-blog-social-icon-size);
34
+ }
@@ -8,8 +8,10 @@
8
8
  import React from 'react';
9
9
  import clsx from 'clsx';
10
10
  import Link, {type Props as LinkProps} from '@docusaurus/Link';
11
+ import AuthorSocials from '@theme/BlogPostItem/Header/Author/Socials';
11
12
 
12
13
  import type {Props} from '@theme/BlogPostItem/Header/Author';
14
+ import styles from './styles.module.css';
13
15
 
14
16
  function MaybeLink(props: LinkProps): JSX.Element {
15
17
  if (props.href) {
@@ -18,12 +20,24 @@ function MaybeLink(props: LinkProps): JSX.Element {
18
20
  return <>{props.children}</>;
19
21
  }
20
22
 
23
+ function AuthorTitle({title}: {title: string}) {
24
+ return (
25
+ <small className={styles.authorTitle} title={title}>
26
+ {title}
27
+ </small>
28
+ );
29
+ }
30
+
21
31
  export default function BlogPostItemHeaderAuthor({
32
+ // singleAuthor, // may be useful in the future, or for swizzle users
22
33
  author,
23
34
  className,
24
35
  }: Props): JSX.Element {
25
- const {name, title, url, imageURL, email} = author;
36
+ const {name, title, url, socials, imageURL, email} = author;
26
37
  const link = url || (email && `mailto:${email}`) || undefined;
38
+
39
+ const hasSocials = socials && Object.keys(socials).length > 0;
40
+
27
41
  return (
28
42
  <div className={clsx('avatar margin-bottom--sm', className)}>
29
43
  {imageURL && (
@@ -32,14 +46,15 @@ export default function BlogPostItemHeaderAuthor({
32
46
  </MaybeLink>
33
47
  )}
34
48
 
35
- {name && (
49
+ {(name || title) && (
36
50
  <div className="avatar__intro">
37
51
  <div className="avatar__name">
38
52
  <MaybeLink href={link}>
39
- <span>{name}</span>
53
+ <span className={styles.authorName}>{name}</span>
40
54
  </MaybeLink>
41
55
  </div>
42
- {title && <small className="avatar__subtitle">{title}</small>}
56
+ {!!title && <AuthorTitle title={title} />}
57
+ {hasSocials && <AuthorSocials author={author} />}
43
58
  </div>
44
59
  )}
45
60
  </div>
@@ -0,0 +1,21 @@
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
+ .authorName {
9
+ font-size: 1.1rem;
10
+ }
11
+
12
+ .authorTitle {
13
+ margin-top: 0.06rem;
14
+ font-size: 0.8rem;
15
+ line-height: 0.8rem;
16
+ display: -webkit-box;
17
+ overflow: hidden;
18
+ line-clamp: 1;
19
+ -webkit-line-clamp: 1;
20
+ -webkit-box-orient: vertical;
21
+ }
@@ -25,6 +25,7 @@ export default function BlogPostItemHeaderAuthors({
25
25
  return null;
26
26
  }
27
27
  const imageOnly = authors.every(({name}) => !name);
28
+ const singleAuthor = authors.length === 1;
28
29
  return (
29
30
  <div
30
31
  className={clsx(
@@ -35,11 +36,12 @@ export default function BlogPostItemHeaderAuthors({
35
36
  {authors.map((author, idx) => (
36
37
  <div
37
38
  className={clsx(
38
- !imageOnly && 'col col--6',
39
+ !imageOnly && (singleAuthor ? 'col col--12' : 'col col--6'),
39
40
  imageOnly ? styles.imageOnlyAuthorCol : styles.authorCol,
40
41
  )}
41
42
  key={idx}>
42
43
  <BlogPostItemHeaderAuthor
44
+ singleAuthor={singleAuthor}
43
45
  author={{
44
46
  ...author,
45
47
  // Handle author images using relative paths
@@ -7,7 +7,6 @@
7
7
 
8
8
  .authorCol {
9
9
  max-width: inherit !important;
10
- flex-grow: 1 !important;
11
10
  }
12
11
 
13
12
  .imageOnlyAuthorRow {
@@ -0,0 +1,33 @@
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
+ import type {SVGProps} from 'react';
9
+
10
+ // SVG Source: https://tabler.io/
11
+ function DefaultSocial(props: SVGProps<SVGSVGElement>): JSX.Element {
12
+ return (
13
+ <svg
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ width="1em"
16
+ height="1em"
17
+ viewBox="0 0 24 24"
18
+ fill="none"
19
+ stroke="currentColor"
20
+ strokeWidth="2"
21
+ strokeLinecap="round"
22
+ strokeLinejoin="round"
23
+ {...props}>
24
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
25
+ <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" />
26
+ <path d="M3.6 9h16.8" />
27
+ <path d="M3.6 15h16.8" />
28
+ <path d="M11.5 3a17 17 0 0 0 0 18" />
29
+ <path d="M12.5 3a17 17 0 0 1 0 18" />
30
+ </svg>
31
+ );
32
+ }
33
+ export default DefaultSocial;
@@ -0,0 +1,29 @@
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
+ import type {SVGProps} from 'react';
9
+
10
+ import clsx from 'clsx';
11
+ import styles from './styles.module.css';
12
+
13
+ // SVG Source: https://svgl.app/
14
+ function GitHub(props: SVGProps<SVGSVGElement>): JSX.Element {
15
+ return (
16
+ <svg
17
+ viewBox="0 0 256 250"
18
+ width="1em"
19
+ height="1em"
20
+ {...props}
21
+ className={clsx(props.className, styles.githubSvg)}
22
+ xmlns="http://www.w3.org/2000/svg"
23
+ style={{'--dark': '#000', '--light': '#fff'} as React.CSSProperties}
24
+ preserveAspectRatio="xMidYMid">
25
+ <path d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46 6.397 1.185 8.746-2.777 8.746-6.158 0-3.052-.12-13.135-.174-23.83-35.61 7.742-43.124-15.103-43.124-15.103-5.823-14.795-14.213-18.73-14.213-18.73-11.613-7.944.876-7.78.876-7.78 12.853.902 19.621 13.19 19.621 13.19 11.417 19.568 29.945 13.911 37.249 10.64 1.149-8.272 4.466-13.92 8.127-17.116-28.431-3.236-58.318-14.212-58.318-63.258 0-13.975 5-25.394 13.188-34.358-1.329-3.224-5.71-16.242 1.24-33.874 0 0 10.749-3.44 35.21 13.121 10.21-2.836 21.16-4.258 32.038-4.307 10.878.049 21.837 1.47 32.066 4.307 24.431-16.56 35.165-13.12 35.165-13.12 6.967 17.63 2.584 30.65 1.255 33.873 8.207 8.964 13.173 20.383 13.173 34.358 0 49.163-29.944 59.988-58.447 63.157 4.591 3.972 8.682 11.762 8.682 23.704 0 17.126-.148 30.91-.148 35.126 0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002 256 57.307 198.691 0 128.001 0Zm-80.06 182.34c-.282.636-1.283.827-2.194.39-.929-.417-1.45-1.284-1.15-1.922.276-.655 1.279-.838 2.205-.399.93.418 1.46 1.293 1.139 1.931Zm6.296 5.618c-.61.566-1.804.303-2.614-.591-.837-.892-.994-2.086-.375-2.66.63-.566 1.787-.301 2.626.591.838.903 1 2.088.363 2.66Zm4.32 7.188c-.785.545-2.067.034-2.86-1.104-.784-1.138-.784-2.503.017-3.05.795-.547 2.058-.055 2.861 1.075.782 1.157.782 2.522-.019 3.08Zm7.304 8.325c-.701.774-2.196.566-3.29-.49-1.119-1.032-1.43-2.496-.726-3.27.71-.776 2.213-.558 3.315.49 1.11 1.03 1.45 2.505.701 3.27Zm9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033-1.448-.439-2.395-1.613-2.103-2.626.301-1.01 1.747-1.484 3.207-1.028 1.446.436 2.396 1.602 2.095 2.622Zm10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95-1.53.034-2.769-.82-2.786-1.86 0-1.065 1.202-1.932 2.733-1.958 1.522-.03 2.768.818 2.768 1.868Zm10.555-.405c.182 1.03-.875 2.088-2.387 2.37-1.485.271-2.861-.365-3.05-1.386-.184-1.056.893-2.114 2.376-2.387 1.514-.263 2.868.356 3.061 1.403Z" />
26
+ </svg>
27
+ );
28
+ }
29
+ export default GitHub;
@@ -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
+ [data-theme='dark'] .githubSvg {
9
+ fill: var(--light);
10
+ }
11
+
12
+ [data-theme='light'] .githubSvg {
13
+ fill: var(--dark);
14
+ }
@@ -0,0 +1,27 @@
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
+ import type {SVGProps} from 'react';
9
+
10
+ // SVG Source: https://svgl.app/
11
+ function LinkedIn(props: SVGProps<SVGSVGElement>): JSX.Element {
12
+ return (
13
+ <svg
14
+ width="1em"
15
+ height="1em"
16
+ xmlns="http://www.w3.org/2000/svg"
17
+ preserveAspectRatio="xMidYMid"
18
+ viewBox="0 0 256 256"
19
+ {...props}>
20
+ <path
21
+ d="M218.123 218.127h-37.931v-59.403c0-14.165-.253-32.4-19.728-32.4-19.756 0-22.779 15.434-22.779 31.369v60.43h-37.93V95.967h36.413v16.694h.51a39.907 39.907 0 0 1 35.928-19.733c38.445 0 45.533 25.288 45.533 58.186l-.016 67.013ZM56.955 79.27c-12.157.002-22.014-9.852-22.016-22.009-.002-12.157 9.851-22.014 22.008-22.016 12.157-.003 22.014 9.851 22.016 22.008A22.013 22.013 0 0 1 56.955 79.27m18.966 138.858H37.95V95.967h37.97v122.16ZM237.033.018H18.89C8.58-.098.125 8.161-.001 18.471v219.053c.122 10.315 8.576 18.582 18.89 18.474h218.144c10.336.128 18.823-8.139 18.966-18.474V18.454c-.147-10.33-8.635-18.588-18.966-18.453"
22
+ fill="#0A66C2"
23
+ />
24
+ </svg>
25
+ );
26
+ }
27
+ export default LinkedIn;
@@ -0,0 +1,30 @@
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
+ import type {SVGProps} from 'react';
9
+
10
+ // SVG Source: https://svgl.app/
11
+ function StackOverflow(props: SVGProps<SVGSVGElement>): JSX.Element {
12
+ return (
13
+ <svg
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ viewBox="0 0 169.61 200"
16
+ width="1em"
17
+ height="1em"
18
+ {...props}>
19
+ <path
20
+ d="M140.44 178.38v-48.65h21.61V200H0v-70.27h21.61v48.65z"
21
+ fill="#bcbbbb"
22
+ />
23
+ <path
24
+ d="M124.24 140.54l4.32-16.22-86.97-17.83-3.78 17.83zM49.7 82.16L130.72 120l7.56-16.22-81.02-37.83zm22.68-40l68.06 57.3 11.35-13.51-68.6-57.3-11.35 13.51zM116.14 0l-14.59 10.81 53.48 71.89 14.58-10.81zM37.81 162.16h86.43v-16.21H37.81z"
25
+ fill="#f48024"
26
+ />
27
+ </svg>
28
+ );
29
+ }
30
+ export default StackOverflow;
@@ -0,0 +1,27 @@
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
+ import type {SVGProps} from 'react';
9
+
10
+ // SVG Source: https://svgl.app/
11
+ function Twitter(props: SVGProps<SVGSVGElement>): JSX.Element {
12
+ return (
13
+ <svg
14
+ viewBox="0 0 256 209"
15
+ width="1em"
16
+ height="1em"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ preserveAspectRatio="xMidYMid"
19
+ {...props}>
20
+ <path
21
+ d="M256 25.45c-9.42 4.177-19.542 7-30.166 8.27 10.845-6.5 19.172-16.793 23.093-29.057a105.183 105.183 0 0 1-33.351 12.745C205.995 7.201 192.346.822 177.239.822c-29.006 0-52.523 23.516-52.523 52.52 0 4.117.465 8.125 1.36 11.97-43.65-2.191-82.35-23.1-108.255-54.876-4.52 7.757-7.11 16.78-7.11 26.404 0 18.222 9.273 34.297 23.365 43.716a52.312 52.312 0 0 1-23.79-6.57c-.003.22-.003.44-.003.661 0 25.447 18.104 46.675 42.13 51.5a52.592 52.592 0 0 1-23.718.9c6.683 20.866 26.08 36.05 49.062 36.475-17.975 14.086-40.622 22.483-65.228 22.483-4.24 0-8.42-.249-12.529-.734 23.243 14.902 50.85 23.597 80.51 23.597 96.607 0 149.434-80.031 149.434-149.435 0-2.278-.05-4.543-.152-6.795A106.748 106.748 0 0 0 256 25.45"
22
+ fill="#55acee"
23
+ />
24
+ </svg>
25
+ );
26
+ }
27
+ export default Twitter;
@@ -0,0 +1,29 @@
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
+ import type {SVGProps} from 'react';
9
+
10
+ import clsx from 'clsx';
11
+ import styles from './styles.module.css';
12
+
13
+ // SVG Source: https://svgl.app/
14
+ function X(props: SVGProps<SVGSVGElement>): JSX.Element {
15
+ return (
16
+ <svg
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ width="1em"
19
+ height="1em"
20
+ fill="none"
21
+ viewBox="0 0 1200 1227"
22
+ {...props}
23
+ className={clsx(props.className, styles.xSvg)}
24
+ style={{'--dark': '#000', '--light': '#fff'} as React.CSSProperties}>
25
+ <path d="M714.163 519.284 1160.89 0h-105.86L667.137 450.887 357.328 0H0l468.492 681.821L0 1226.37h105.866l409.625-476.152 327.181 476.152H1200L714.137 519.284h.026ZM569.165 687.828l-47.468-67.894-377.686-540.24h162.604l304.797 435.991 47.468 67.894 396.2 566.721H892.476L569.165 687.854v-.026Z" />
26
+ </svg>
27
+ );
28
+ }
29
+ export default X;
@@ -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
+ [data-theme='dark'] .xSvg {
9
+ fill: var(--light);
10
+ }
11
+
12
+ [data-theme='light'] .xSvg {
13
+ fill: var(--dark);
14
+ }
@@ -292,16 +292,30 @@ declare module '@theme/BlogPostItem/Header/Info' {
292
292
  }
293
293
 
294
294
  declare module '@theme/BlogPostItem/Header/Author' {
295
- import type {PropBlogPostContent} from '@docusaurus/plugin-content-blog';
295
+ import type {Author} from '@docusaurus/plugin-content-blog';
296
296
 
297
297
  export interface Props {
298
- readonly author: PropBlogPostContent['metadata']['authors'][number];
298
+ readonly author: Author;
299
+ readonly singleAuthor: boolean;
299
300
  readonly className?: string;
300
301
  }
301
302
 
302
303
  export default function BlogPostItemHeaderAuthor(props: Props): JSX.Element;
303
304
  }
304
305
 
306
+ declare module '@theme/BlogPostItem/Header/Author/Socials' {
307
+ import type {Author} from '@docusaurus/plugin-content-blog';
308
+
309
+ export interface Props {
310
+ readonly author: Author;
311
+ readonly className?: string;
312
+ }
313
+
314
+ export default function BlogPostItemHeaderAuthorSocials(
315
+ props: Props,
316
+ ): JSX.Element;
317
+ }
318
+
305
319
  declare module '@theme/BlogPostItem/Header/Authors' {
306
320
  export interface Props {
307
321
  readonly className?: string;
@@ -1514,6 +1528,54 @@ declare module '@theme/Icon/WordWrap' {
1514
1528
  export default function IconWordWrap(props: Props): JSX.Element;
1515
1529
  }
1516
1530
 
1531
+ declare module '@theme/Icon/Socials/Twitter' {
1532
+ import type {ComponentProps} from 'react';
1533
+
1534
+ export interface Props extends ComponentProps<'svg'> {}
1535
+
1536
+ export default function Twitter(props: Props): JSX.Element;
1537
+ }
1538
+
1539
+ declare module '@theme/Icon/Socials/GitHub' {
1540
+ import type {ComponentProps} from 'react';
1541
+
1542
+ export interface Props extends ComponentProps<'svg'> {}
1543
+
1544
+ export default function Github(props: Props): JSX.Element;
1545
+ }
1546
+
1547
+ declare module '@theme/Icon/Socials/X' {
1548
+ import type {ComponentProps} from 'react';
1549
+
1550
+ export interface Props extends ComponentProps<'svg'> {}
1551
+
1552
+ export default function X(props: Props): JSX.Element;
1553
+ }
1554
+
1555
+ declare module '@theme/Icon/Socials/LinkedIn' {
1556
+ import type {ComponentProps} from 'react';
1557
+
1558
+ export interface Props extends ComponentProps<'svg'> {}
1559
+
1560
+ export default function LinkedIn(props: Props): JSX.Element;
1561
+ }
1562
+
1563
+ declare module '@theme/Icon/Socials/Default' {
1564
+ import type {ComponentProps} from 'react';
1565
+
1566
+ export interface Props extends ComponentProps<'svg'> {}
1567
+
1568
+ export default function DefaultSocialIcon(props: Props): JSX.Element;
1569
+ }
1570
+
1571
+ declare module '@theme/Icon/Socials/StackOverflow' {
1572
+ import type {ComponentProps} from 'react';
1573
+
1574
+ export interface Props extends ComponentProps<'svg'> {}
1575
+
1576
+ export default function StackOverflow(props: Props): JSX.Element;
1577
+ }
1578
+
1517
1579
  declare module '@theme/TagsListByLetter' {
1518
1580
  import type {TagsListItem} from '@docusaurus/utils';
1519
1581