diff --git a/docusaurus.config.js b/docusaurus.config.js index bea49df2..9d996bd2 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -69,9 +69,9 @@ const config = { ], }, { - label: "Firmware", - to: "firmware", - activeBasePath: "firmware", + label: "Downloads", + to: "downloads", + activeBasePath: "downloads", }, { label: "Showcase", diff --git a/src/pages/firmware/_components/FirmwareCard.tsx b/src/pages/downloads/_components/FirmwareCard.tsx similarity index 100% rename from src/pages/firmware/_components/FirmwareCard.tsx rename to src/pages/downloads/_components/FirmwareCard.tsx diff --git a/src/pages/downloads/_components/HeaderText.tsx b/src/pages/downloads/_components/HeaderText.tsx new file mode 100644 index 00000000..38ec8d77 --- /dev/null +++ b/src/pages/downloads/_components/HeaderText.tsx @@ -0,0 +1,18 @@ +import React from 'react'; + +export const HeaderText = ({type, text, link}): JSX.Element => { + + const anchor = React.createElement( + 'a', + {className: "hash-link", href: `#${link}`, title: "Direct link to heading"} + ) + + const heading = React.createElement( + type || 'h1', + link ? {className: "anchor anchorWithHideOnScrollNavbar_node_modules-@docusaurus-theme-classic-lib-next-theme-Heading-styles-module"} : null, + text, link ? anchor : null + ) + + return heading + +}; diff --git a/src/pages/firmware/index.tsx b/src/pages/downloads/index.tsx similarity index 73% rename from src/pages/firmware/index.tsx rename to src/pages/downloads/index.tsx index c6518704..f54efd19 100644 --- a/src/pages/firmware/index.tsx +++ b/src/pages/downloads/index.tsx @@ -11,6 +11,7 @@ import { FirmwareCard, PlaceholderFirmwareCard, } from './_components/FirmwareCard'; +import { HeaderText } from './_components/HeaderText' const Firmware = (): JSX.Element => { const { data, error } = useSWR( @@ -23,11 +24,41 @@ const Firmware = (): JSX.Element => { const alpha = data?.filter((release) => release.prerelease === true); return (
+ +
+
+ +
+
+ +
+
+ +
    { )}
+