mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-12-25 21:54:20 -08:00
renamed downloads page and added header text
This commit is contained in:
parent
da552e3dd2
commit
22eb02d0bc
|
@ -69,9 +69,9 @@ const config = {
|
|||
],
|
||||
},
|
||||
{
|
||||
label: "Firmware",
|
||||
to: "firmware",
|
||||
activeBasePath: "firmware",
|
||||
label: "Downloads",
|
||||
to: "downloads",
|
||||
activeBasePath: "downloads",
|
||||
},
|
||||
{
|
||||
label: "Showcase",
|
||||
|
|
18
src/pages/downloads/_components/HeaderText.tsx
Normal file
18
src/pages/downloads/_components/HeaderText.tsx
Normal file
|
@ -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
|
||||
|
||||
};
|
|
@ -11,6 +11,7 @@ import {
|
|||
FirmwareCard,
|
||||
PlaceholderFirmwareCard,
|
||||
} from './_components/FirmwareCard';
|
||||
import { HeaderText } from './_components/HeaderText'
|
||||
|
||||
const Firmware = (): JSX.Element => {
|
||||
const { data, error } = useSWR<Release[]>(
|
||||
|
@ -23,11 +24,41 @@ const Firmware = (): JSX.Element => {
|
|||
const alpha = data?.filter((release) => release.prerelease === true);
|
||||
return (
|
||||
<Layout
|
||||
title="Firmware"
|
||||
description="Firmware download for the Meshtastic project"
|
||||
title="Downloads"
|
||||
description="Downloads for the Meshtastic project"
|
||||
>
|
||||
<main className="margin-vert--xl">
|
||||
<div className="container">
|
||||
<HeaderText
|
||||
type="h1"
|
||||
text="Downloads"
|
||||
/>
|
||||
</div>
|
||||
<div className="container">
|
||||
<HeaderText
|
||||
type="h2"
|
||||
text="Install Meshtastic"
|
||||
link=""
|
||||
/>
|
||||
</div>
|
||||
<div className="container">
|
||||
<HeaderText
|
||||
type="h2"
|
||||
text="Mobile Downloads"
|
||||
link="mobile-downloads"
|
||||
/>
|
||||
</div>
|
||||
<div className="container">
|
||||
<HeaderText
|
||||
type="h2"
|
||||
text="Advanced"
|
||||
link="advanced"
|
||||
/>
|
||||
<HeaderText
|
||||
type="h3"
|
||||
text="Firmware Downloads"
|
||||
link="firmware-downloads"
|
||||
/>
|
||||
<ul
|
||||
style={{
|
||||
position: "relative",
|
||||
|
@ -77,6 +108,11 @@ const Firmware = (): JSX.Element => {
|
|||
</>
|
||||
)}
|
||||
</ul>
|
||||
<HeaderText
|
||||
type="h3"
|
||||
text="Sideload Android"
|
||||
link="sideload-android"
|
||||
/>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
Loading…
Reference in a new issue