feat: add footer links

This commit is contained in:
iCrawl
2022-08-23 10:11:07 +02:00
parent ffafde0b6b
commit 103e1bd843
2 changed files with 65 additions and 19 deletions

View File

@@ -17,10 +17,11 @@ import {
Menu,
ActionIcon,
useMantineColorScheme,
Center,
Stack,
Skeleton,
LoadingOverlay,
Container,
Title,
} from '@mantine/core';
import { NextLink } from '@mantine/next';
import type { MDXRemoteSerializeResult } from 'next-mdx-remote';
@@ -314,21 +315,60 @@ export function SidebarLayout({
paddingLeft: 24,
},
})}
pt={70}
pt={50}
>
<Center>
<Link href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss" passHref>
<a title="Vercel">
<Image
src="/powered-by-vercel.svg"
alt="Vercel"
width={0}
height={0}
style={{ height: '100%', width: '100%', maxWidth: 250 }}
/>
</a>
</Link>
</Center>
<Container>
<Group position="apart">
<Link href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss" passHref>
<a title="Vercel">
<Image
src="/powered-by-vercel.svg"
alt="Vercel"
width={0}
height={0}
style={{ height: '100%', width: '100%', maxWidth: 200 }}
/>
</a>
</Link>
<Group align="flex-start" spacing={48}>
<Stack spacing={8}>
<Title order={4}>Community</Title>
<Stack spacing={0}>
<Link href="https://discord.gg/djs" passHref>
<Anchor component="a" target="_blank" rel="noopener noreferrer">
Discord
</Anchor>
</Link>
<Link href="https://github.com/discordjs/discord.js/discussions" passHref>
<Anchor component="a" target="_blank" rel="noopener noreferrer">
GitHub discussions
</Anchor>
</Link>
</Stack>
</Stack>
<Stack spacing={8}>
<Title order={4}>Project</Title>
<Stack spacing={0}>
<Link href="https://github.com/discordjs/discord.js" passHref>
<Anchor component="a" target="_blank" rel="noopener noreferrer">
discord.js
</Anchor>
</Link>
<Link href="https://discordjs.guide" passHref>
<Anchor component="a" target="_blank" rel="noopener noreferrer">
discord.js guide
</Anchor>
</Link>
<Link href="https://discord-api-types.dev" passHref>
<Anchor component="a" target="_blank" rel="noopener noreferrer">
discord-api-types
</Anchor>
</Link>
</Stack>
</Stack>
</Group>
</Group>
</Container>
</Box>
</article>
</AppShell>

View File

@@ -1,7 +1,7 @@
import { readFile } from 'node:fs/promises';
import { join } from 'node:path';
import { cwd } from 'node:process';
import { Affix, Box, Button, LoadingOverlay, Transition } from '@mantine/core';
import { ActionIcon, Affix, Box, LoadingOverlay, Transition } from '@mantine/core';
import { useMediaQuery, useWindowScroll } from '@mantine/hooks';
import { ApiFunction, ApiItemKind, type ApiPackage } from '@microsoft/api-extractor-model';
import { MDXRemote } from 'next-mdx-remote';
@@ -255,9 +255,15 @@ export default function SlugPage(props: Partial<SidebarLayoutProps & { error?: s
>
<Transition transition="slide-up" mounted={scroll.y > 200}>
{(transitionStyles) => (
<Button leftIcon={<VscChevronUp size={20} />} style={transitionStyles} onClick={() => scrollTo({ y: 0 })}>
Scroll to top
</Button>
<ActionIcon
variant="filled"
color="blurple"
size={30}
style={transitionStyles}
onClick={() => scrollTo({ y: 0 })}
>
<VscChevronUp size={20} />
</ActionIcon>
)}
</Transition>
</Affix>