diff --git a/website/src/components/scarf/Scarf.jsx b/website/src/components/scarf/Scarf.jsx new file mode 100644 index 00000000..84e6e118 --- /dev/null +++ b/website/src/components/scarf/Scarf.jsx @@ -0,0 +1,13 @@ +import React from 'react' + +const ScarfTag = () => { + return ( + scarf + ) +} + +export { ScarfTag } diff --git a/website/src/components/scarf/index.js b/website/src/components/scarf/index.js new file mode 100644 index 00000000..32b87524 --- /dev/null +++ b/website/src/components/scarf/index.js @@ -0,0 +1 @@ +export * from './Scarf' diff --git a/website/src/theme/Footer/index.js b/website/src/theme/Footer/index.js new file mode 100644 index 00000000..79c37a22 --- /dev/null +++ b/website/src/theme/Footer/index.js @@ -0,0 +1,167 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import React from 'react' +import clsx from 'clsx' +import Link from '@docusaurus/Link' +import { useThemeConfig } from '@docusaurus/theme-common' +import useBaseUrl from '@docusaurus/useBaseUrl' +import isInternalUrl from '@docusaurus/isInternalUrl' +import styles from './styles.module.css' +import ThemedImage from '@theme/ThemedImage' +import IconExternalLink from '@theme/IconExternalLink' +import { ScarfTag } from '../../components/scarf' + +function FooterLink({ to, href, label, prependBaseUrlToHref, ...props }) { + const toUrl = useBaseUrl(to) + const normalizedHref = useBaseUrl(href, { + forcePrependBaseUrl: true + }) + return ( + + {href && !isInternalUrl(href) ? ( + + {label} + + + ) : ( + label + )} + + ) +} + +function FooterLogo({ sources, alt, width, height }) { + return +} + +function MultiColumnLinks({ links }) { + return ( + <> + {links.map((linkItem, i) => ( +
+
{linkItem.title}
+ +
+ ))} + + ) +} + +function SimpleLinks({ links }) { + return ( +
+ {links.map((item, key) => ( + <> + {item.html ? ( + + ) : ( + + )} + {links.length !== key + 1 && ยท} + + ))} +
+ ) +} + +function isMultiColumnFooterLinks(links) { + return 'title' in links[0] +} + +function Footer() { + const { footer } = useThemeConfig() + const { copyright, links = [], logo = {} } = footer || {} + const sources = { + light: useBaseUrl(logo.src), + dark: useBaseUrl(logo.srcDark || logo.src) + } + + if (!footer) { + return null + } + + return ( + + ) +} + +export default React.memo(Footer) diff --git a/website/src/theme/Footer/styles.module.css b/website/src/theme/Footer/styles.module.css new file mode 100644 index 00000000..f68a4f9f --- /dev/null +++ b/website/src/theme/Footer/styles.module.css @@ -0,0 +1,15 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +.footerLogoLink { + opacity: 0.5; + transition: opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default); +} + +.footerLogoLink:hover { + opacity: 1; +}