mirror of
https://github.com/meshtastic/meshtastic.git
synced 2025-03-05 21:00:08 -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",
|
label: "Downloads",
|
||||||
to: "firmware",
|
to: "downloads",
|
||||||
activeBasePath: "firmware",
|
activeBasePath: "downloads",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Showcase",
|
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,
|
FirmwareCard,
|
||||||
PlaceholderFirmwareCard,
|
PlaceholderFirmwareCard,
|
||||||
} from './_components/FirmwareCard';
|
} from './_components/FirmwareCard';
|
||||||
|
import { HeaderText } from './_components/HeaderText'
|
||||||
|
|
||||||
const Firmware = (): JSX.Element => {
|
const Firmware = (): JSX.Element => {
|
||||||
const { data, error } = useSWR<Release[]>(
|
const { data, error } = useSWR<Release[]>(
|
||||||
|
@ -23,11 +24,41 @@ const Firmware = (): JSX.Element => {
|
||||||
const alpha = data?.filter((release) => release.prerelease === true);
|
const alpha = data?.filter((release) => release.prerelease === true);
|
||||||
return (
|
return (
|
||||||
<Layout
|
<Layout
|
||||||
title="Firmware"
|
title="Downloads"
|
||||||
description="Firmware download for the Meshtastic project"
|
description="Downloads for the Meshtastic project"
|
||||||
>
|
>
|
||||||
<main className="margin-vert--xl">
|
<main className="margin-vert--xl">
|
||||||
<div className="container">
|
<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
|
<ul
|
||||||
style={{
|
style={{
|
||||||
position: "relative",
|
position: "relative",
|
||||||
|
@ -77,6 +108,11 @@ const Firmware = (): JSX.Element => {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
|
<HeaderText
|
||||||
|
type="h3"
|
||||||
|
text="Sideload Android"
|
||||||
|
link="sideload-android"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</Layout>
|
</Layout>
|
Loading…
Reference in a new issue