diff options
Diffstat (limited to 'src/theme/Footer/Copyright.tsx')
-rw-r--r-- | src/theme/Footer/Copyright.tsx | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/theme/Footer/Copyright.tsx b/src/theme/Footer/Copyright.tsx new file mode 100644 index 0000000..3125c05 --- /dev/null +++ b/src/theme/Footer/Copyright.tsx | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (c) Facebook, Inc. and its affiliates. | ||
3 | * Copyright (c) 2024 Kristóf Marussy <kristof@marussy.com> | ||
4 | * | ||
5 | * SPDX-License-Identifier: MIT | ||
6 | * | ||
7 | * This file was derived from | ||
8 | * https://github.com/facebook/docusaurus/blob/cc0bceab9c1678303f6237f5526753edc1b12fc3/packages/docusaurus-theme-classic/src/theme/Footer/Copyright/index.tsx | ||
9 | * via the `swizzle` mechanism of Docusaurus. | ||
10 | * | ||
11 | * It was modified to embed JSX content directly in the footer. | ||
12 | */ | ||
13 | |||
14 | import Link from '@docusaurus/Link'; | ||
15 | import type { Props } from '@theme/Footer/Copyright'; | ||
16 | import clsx from 'clsx'; | ||
17 | import React from 'react'; | ||
18 | |||
19 | import { CCLicenseLink, LicenseLink } from '@site/src/components/licenses'; | ||
20 | |||
21 | import styles from './Copyright.module.css'; | ||
22 | |||
23 | export default function FooterCopyright({ copyright }: Props) { | ||
24 | return ( | ||
25 | <div className="footer__copyright"> | ||
26 | Most content on this site is{' '} | ||
27 | <CCLicenseLink | ||
28 | to="/license#content" | ||
29 | rel="license" | ||
30 | className={clsx(styles.link, styles['link--license'])} | ||
31 | > | ||
32 | CC-BY-4.0 | ||
33 | </CCLicenseLink> | ||
34 | . The{' '} | ||
35 | <Link to="https://git.marussy.com/blog/" className={styles.link}> | ||
36 | code for this site | ||
37 | </Link>{' '} | ||
38 | is{' '} | ||
39 | <LicenseLink | ||
40 | to="/license#code" | ||
41 | rel="license" | ||
42 | className={clsx(styles.link, styles['link--license'])} | ||
43 | > | ||
44 | MIT | ||
45 | </LicenseLink> | ||
46 | .<br /> | ||
47 | <span dangerouslySetInnerHTML={{ __html: copyright }} /> | ||
48 | </div> | ||
49 | ); | ||
50 | } | ||