downloadstable section
This commit is contained in:
parent
dcca953d15
commit
9017e57ac8
|
@ -10,7 +10,14 @@ interface Props {
|
||||||
sectionTitle: string;
|
sectionTitle: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DownloadsSection: FC<Props> = ({ children, imgSrc, imgAltText, sectionDescription, sectionTitle, id }) => {
|
export const DownloadsSection: FC<Props> = ({
|
||||||
|
children,
|
||||||
|
imgSrc,
|
||||||
|
imgAltText,
|
||||||
|
sectionDescription,
|
||||||
|
sectionTitle,
|
||||||
|
id
|
||||||
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Stack border='2px solid' borderColor='brand.light.primary' id={id}>
|
<Stack border='2px solid' borderColor='brand.light.primary' id={id}>
|
||||||
{!!imgSrc && (
|
{!!imgSrc && (
|
||||||
|
@ -25,11 +32,7 @@ export const DownloadsSection: FC<Props> = ({ children, imgSrc, imgAltText, sect
|
||||||
borderColor='brand.light.primary'
|
borderColor='brand.light.primary'
|
||||||
flexDirection={{ base: 'column', md: 'row' }}
|
flexDirection={{ base: 'column', md: 'row' }}
|
||||||
>
|
>
|
||||||
<Flex
|
<Flex p={4} sx={{ mt: '0 !important' }} flex='none'>
|
||||||
p={4}
|
|
||||||
sx={{ mt: '0 !important' }}
|
|
||||||
flex='none'
|
|
||||||
>
|
|
||||||
<Center>
|
<Center>
|
||||||
<Text as='h2' textStyle='h2'>
|
<Text as='h2' textStyle='h2'>
|
||||||
{sectionTitle}
|
{sectionTitle}
|
||||||
|
@ -37,22 +40,20 @@ export const DownloadsSection: FC<Props> = ({ children, imgSrc, imgAltText, sect
|
||||||
</Center>
|
</Center>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
{
|
{sectionDescription && (
|
||||||
sectionDescription && (
|
|
||||||
<Stack
|
<Stack
|
||||||
p={4}
|
p={4}
|
||||||
borderLeft={{ base: 'none', md: '2px solid #11866f' }}
|
borderLeft={{ base: 'none', md: '2px solid #11866f' }}
|
||||||
borderTop={{ base: '2px solid #11866f', md: 'none' }}
|
borderTop={{ base: '2px solid #11866f', md: 'none' }}
|
||||||
>
|
>
|
||||||
<Center>
|
<Center>{sectionDescription}</Center>
|
||||||
{sectionDescription}
|
|
||||||
</Center>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
)
|
)}
|
||||||
}
|
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Stack spacing={4} sx={{ mt: '0 !important' }} >{children}</Stack>
|
<Stack spacing={4} sx={{ mt: '0 !important' }}>
|
||||||
|
{children}
|
||||||
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ interface Props {
|
||||||
export const SpecificVersionsSection: FC<Props> = ({ children }) => {
|
export const SpecificVersionsSection: FC<Props> = ({ children }) => {
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
id="specificversions"
|
id='specificversions'
|
||||||
border='2px solid'
|
border='2px solid'
|
||||||
borderColor='brand.light.primary'
|
borderColor='brand.light.primary'
|
||||||
flexDir={{ base: 'column', md: 'row' }}
|
flexDir={{ base: 'column', md: 'row' }}
|
||||||
|
@ -24,9 +24,7 @@ export const SpecificVersionsSection: FC<Props> = ({ children }) => {
|
||||||
{/* TODO: use NextImage */}
|
{/* TODO: use NextImage */}
|
||||||
<Image src='/images/pages/gopher-home-side-desktop.svg' alt='Gopher facing right' />
|
<Image src='/images/pages/gopher-home-side-desktop.svg' alt='Gopher facing right' />
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex
|
<Flex flexDir='column'>
|
||||||
flexDir='column'
|
|
||||||
>
|
|
||||||
<Stack
|
<Stack
|
||||||
p={4}
|
p={4}
|
||||||
borderBottom='2px solid'
|
borderBottom='2px solid'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export * from './DownloadsHero';
|
export * from './DownloadsHero';
|
||||||
export * from './DownloadsSection';
|
export * from './DownloadsSection';
|
||||||
export * from './DownloadsTable';
|
export * from './DownloadsTable';
|
||||||
export * from './SpecificVersionsSection'
|
export * from './SpecificVersionsSection';
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
import { Code, Link, ListItem, Stack, Text, UnorderedList } from '@chakra-ui/react';
|
import { Center, Code, Flex, Link, ListItem, Stack, Text, UnorderedList } from '@chakra-ui/react';
|
||||||
import type { NextPage } from 'next';
|
import type { NextPage } from 'next';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
import { DownloadsHero, DownloadsSection, DownloadsTable, SpecificVersionsSection } from '../components/UI/downloads';
|
import {
|
||||||
|
DownloadsHero,
|
||||||
|
DownloadsSection,
|
||||||
|
DownloadsTable,
|
||||||
|
SpecificVersionsSection
|
||||||
|
} from '../components/UI/downloads';
|
||||||
import { DataTable } from '../components/UI';
|
import { DataTable } from '../components/UI';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -105,7 +110,24 @@ const DownloadsPage: NextPage = () => {
|
||||||
{/* TODO: swap test data for real data */}
|
{/* TODO: swap test data for real data */}
|
||||||
<DownloadsTable data={testDownloadData.slice(0, amountStableReleases)} />
|
<DownloadsTable data={testDownloadData.slice(0, amountStableReleases)} />
|
||||||
|
|
||||||
<Stack sx={{ mt: '0 !important' }}>
|
<Flex
|
||||||
|
sx={{ mt: '0 !important' }}
|
||||||
|
flexDirection={{ base: 'column', md: 'row' }}
|
||||||
|
justifyContent='space-between'
|
||||||
|
>
|
||||||
|
<Stack p={4} display={{ base: 'none', md: 'block' }}>
|
||||||
|
<Center>
|
||||||
|
{/* TODO: swap testDownloadData with actual data */}
|
||||||
|
<Text>
|
||||||
|
Showing {amountStableReleases} latest releases of a total{' '}
|
||||||
|
{testDownloadData.length} releases
|
||||||
|
</Text>
|
||||||
|
</Center>
|
||||||
|
</Stack>
|
||||||
|
<Stack
|
||||||
|
sx={{ mt: '0 !important' }}
|
||||||
|
borderLeft={{ base: 'none', md: '2px solid #11866f' }}
|
||||||
|
>
|
||||||
<Link as='button' variant='button-link-secondary' onClick={showMoreStableReleases}>
|
<Link as='button' variant='button-link-secondary' onClick={showMoreStableReleases}>
|
||||||
<Text
|
<Text
|
||||||
fontFamily='"JetBrains Mono", monospace'
|
fontFamily='"JetBrains Mono", monospace'
|
||||||
|
@ -118,6 +140,7 @@ const DownloadsPage: NextPage = () => {
|
||||||
</Text>
|
</Text>
|
||||||
</Link>
|
</Link>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
</Flex>
|
||||||
</DownloadsSection>
|
</DownloadsSection>
|
||||||
|
|
||||||
<DownloadsSection
|
<DownloadsSection
|
||||||
|
@ -136,8 +159,25 @@ const DownloadsPage: NextPage = () => {
|
||||||
{/* TODO: swap for real data */}
|
{/* TODO: swap for real data */}
|
||||||
<DownloadsTable data={testDownloadData.slice(0, amountDevelopBuilds)} />
|
<DownloadsTable data={testDownloadData.slice(0, amountDevelopBuilds)} />
|
||||||
|
|
||||||
<Stack sx={{ mt: '0 !important' }}>
|
<Flex
|
||||||
<Link as='button' variant='button-link-secondary' onClick={showMoreDevelopBuilds}>
|
sx={{ mt: '0 !important' }}
|
||||||
|
flexDirection={{ base: 'column', md: 'row' }}
|
||||||
|
justifyContent='space-between'
|
||||||
|
>
|
||||||
|
<Stack p={4} display={{ base: 'none', md: 'block' }}>
|
||||||
|
<Center>
|
||||||
|
{/* TODO: swap testDownloadData with actual data */}
|
||||||
|
<Text>
|
||||||
|
Showing {amountDevelopBuilds} latest releases of a total{' '}
|
||||||
|
{testDownloadData.length} releases
|
||||||
|
</Text>
|
||||||
|
</Center>
|
||||||
|
</Stack>
|
||||||
|
<Stack
|
||||||
|
sx={{ mt: '0 !important' }}
|
||||||
|
borderLeft={{ base: 'none', md: '2px solid #11866f' }}
|
||||||
|
>
|
||||||
|
<Link as='button' variant='button-link-secondary' onClick={showMoreStableReleases}>
|
||||||
<Text
|
<Text
|
||||||
fontFamily='"JetBrains Mono", monospace'
|
fontFamily='"JetBrains Mono", monospace'
|
||||||
fontWeight={700}
|
fontWeight={700}
|
||||||
|
@ -149,6 +189,7 @@ const DownloadsPage: NextPage = () => {
|
||||||
</Text>
|
</Text>
|
||||||
</Link>
|
</Link>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
</Flex>
|
||||||
</DownloadsSection>
|
</DownloadsSection>
|
||||||
|
|
||||||
<DownloadsSection
|
<DownloadsSection
|
||||||
|
|
Loading…
Reference in New Issue