diff --git a/src/theme/Footer/Copyright/index.module.css b/src/theme/Footer/Copyright/index.module.css new file mode 100644 index 00000000..cc9d5415 --- /dev/null +++ b/src/theme/Footer/Copyright/index.module.css @@ -0,0 +1,4 @@ +.wrap { + display: flex; + justify-content: space-between; +} \ No newline at end of file diff --git a/src/theme/Footer/Copyright/index.tsx b/src/theme/Footer/Copyright/index.tsx new file mode 100644 index 00000000..872aa246 --- /dev/null +++ b/src/theme/Footer/Copyright/index.tsx @@ -0,0 +1,18 @@ +import React from "react"; +import Copyright from "@theme-original/Footer/Copyright"; +import type CopyrightType from "@theme/Footer/Copyright"; +import type { WrapperProps } from "@docusaurus/types"; +import styles from "./index.module.css"; + +type Props = WrapperProps; + +export default function CopyrightWrapper(props: Props): JSX.Element { + return ( + <> +
+ + social +
+ + ); +} diff --git a/src/theme/Footer/Links/MultiColumn/index.tsx b/src/theme/Footer/Links/MultiColumn/index.tsx new file mode 100644 index 00000000..03ebb366 --- /dev/null +++ b/src/theme/Footer/Links/MultiColumn/index.tsx @@ -0,0 +1,49 @@ +import React from "react"; +import LinkItem from "@theme/Footer/LinkItem"; +import type { Props } from "@theme/Footer/Links/MultiColumn"; + +type ColumnType = Props["columns"][number]; +type ColumnItemType = ColumnType["items"][number]; + +function ColumnLinkItem({ item }: { item: ColumnItemType }) { + return item.html ? ( +
  • + ) : ( +
  • + +
  • + ); +} + +function Column({ column }: { column: ColumnType }) { + return ( +
    +
    {column.title}
    + +
    + ); +} + +export default function FooterLinksMultiColumn({ + columns, +}: Props): JSX.Element { + return ( +
    +
    + +
    + {columns.map((column, i) => ( + + ))} +
    + ); +} diff --git a/src/theme/Footer/Links/Simple/index.tsx b/src/theme/Footer/Links/Simple/index.tsx new file mode 100644 index 00000000..65744e4e --- /dev/null +++ b/src/theme/Footer/Links/Simple/index.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import LinkItem from '@theme/Footer/LinkItem'; +import type {Props} from '@theme/Footer/Links/Simple'; + +function Separator() { + return ยท; +} + +function SimpleLinkItem({item}: {item: Props['links'][number]}) { + return item.html ? ( + + ) : ( + + ); +} + +export default function FooterLinksSimple({links}: Props): JSX.Element { + return ( +
    +
    + {links.map((item, i) => ( + + + {links.length !== i + 1 && } + + ))} +
    +
    + ); +} diff --git a/src/theme/Footer/Links/index.tsx b/src/theme/Footer/Links/index.tsx new file mode 100644 index 00000000..d9ec3db7 --- /dev/null +++ b/src/theme/Footer/Links/index.tsx @@ -0,0 +1,14 @@ +import React from 'react'; + +import {isMultiColumnFooterLinks} from '@docusaurus/theme-common'; +import FooterLinksMultiColumn from '@theme/Footer/Links/MultiColumn'; +import FooterLinksSimple from '@theme/Footer/Links/Simple'; +import type {Props} from '@theme/Footer/Links'; + +export default function FooterLinks({links}: Props): JSX.Element { + return isMultiColumnFooterLinks(links) ? ( + + ) : ( + + ); +}