mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
feat: favicon
This commit is contained in:
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 5.2 KiB |
@@ -1,4 +1,4 @@
|
||||
import { createStyles, Group, Text, Box } from '@mantine/core';
|
||||
import { createStyles, Group, Text, Box, Stack } from '@mantine/core';
|
||||
import { VscListSelection } from 'react-icons/vsc';
|
||||
import type { ApiClassJSON, ApiInterfaceJSON } from '~/DocModel/ApiNodeJSONEncoder';
|
||||
|
||||
@@ -68,18 +68,20 @@ export function TableOfContentItems({
|
||||
<VscListSelection size={20} />
|
||||
<Text>Table of content</Text>
|
||||
</Group>
|
||||
{propertyItems.length ? (
|
||||
<>
|
||||
<Text>Properties</Text>
|
||||
{propertyItems}
|
||||
</>
|
||||
) : null}
|
||||
{methodItems.length ? (
|
||||
<>
|
||||
<Text>Methods</Text>
|
||||
{methodItems}
|
||||
</>
|
||||
) : null}
|
||||
<Stack>
|
||||
{propertyItems.length ? (
|
||||
<Box>
|
||||
<Text>Properties</Text>
|
||||
{propertyItems}
|
||||
</Box>
|
||||
) : null}
|
||||
{methodItems.length ? (
|
||||
<Box>
|
||||
<Text>Methods</Text>
|
||||
{methodItems}
|
||||
</Box>
|
||||
) : null}
|
||||
</Stack>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { ColorScheme, ColorSchemeProvider, MantineProvider } from '@mantine/core';
|
||||
import { useColorScheme } from '@mantine/hooks';
|
||||
import type { AppProps } from 'next/app';
|
||||
import Head from 'next/head';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { RouterTransition } from '~/components/RouterTransition';
|
||||
import '../styles/unocss.css';
|
||||
@@ -18,40 +17,34 @@ export default function MyApp({ Component, pageProps }: AppProps) {
|
||||
}, [preferredColorScheme]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
|
||||
</Head>
|
||||
|
||||
<ColorSchemeProvider colorScheme={colorScheme} toggleColorScheme={toggleColorScheme}>
|
||||
<MantineProvider
|
||||
theme={{
|
||||
fontFamily: 'Inter',
|
||||
colorScheme,
|
||||
colors: {
|
||||
blurple: [
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
],
|
||||
},
|
||||
primaryColor: 'blurple',
|
||||
}}
|
||||
withCSSVariables
|
||||
withNormalizeCSS
|
||||
withGlobalStyles
|
||||
>
|
||||
<RouterTransition />
|
||||
<Component {...pageProps} />
|
||||
</MantineProvider>
|
||||
</ColorSchemeProvider>
|
||||
</>
|
||||
<ColorSchemeProvider colorScheme={colorScheme} toggleColorScheme={toggleColorScheme}>
|
||||
<MantineProvider
|
||||
theme={{
|
||||
fontFamily: 'Inter',
|
||||
colorScheme,
|
||||
colors: {
|
||||
blurple: [
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
'#5865F2',
|
||||
],
|
||||
},
|
||||
primaryColor: 'blurple',
|
||||
}}
|
||||
withCSSVariables
|
||||
withNormalizeCSS
|
||||
withGlobalStyles
|
||||
>
|
||||
<RouterTransition />
|
||||
<Component {...pageProps} />
|
||||
</MantineProvider>
|
||||
</ColorSchemeProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,18 @@ export default class _Document extends Document {
|
||||
public override render() {
|
||||
return (
|
||||
<Html>
|
||||
<Head />
|
||||
<Head>
|
||||
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#090a16" />
|
||||
<meta name="apple-mobile-web-app-title" content="discord.js" />
|
||||
<meta name="application-name" content="discord.js" />
|
||||
<meta name="msapplication-TileColor" content="#090a16" />
|
||||
<meta name="theme-color" content="#1a1b1e" />
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
|
||||
@@ -2,7 +2,6 @@ import { createStyles, Container, Title, Button, Group, Text, Center } from '@ma
|
||||
import Image from 'next/future/image';
|
||||
import Link from 'next/link';
|
||||
import codeSample from '../assets/code-sample.png';
|
||||
import vercelLogo from '../assets/powered-by-vercel.svg';
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
inner: {
|
||||
@@ -62,8 +61,6 @@ const useStyles = createStyles((theme) => ({
|
||||
},
|
||||
|
||||
vercel: {
|
||||
height: '100%',
|
||||
maxWidth: 250,
|
||||
paddingBottom: theme.spacing.xl * 4,
|
||||
},
|
||||
}));
|
||||
@@ -103,9 +100,11 @@ export default function IndexRoute() {
|
||||
<Link href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss" passHref>
|
||||
<a title="Vercel">
|
||||
<Image
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
src={vercelLogo}
|
||||
src="/powered-by-vercel.svg"
|
||||
alt="Vercel"
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ height: '100%', width: '100%', maxWidth: 250 }}
|
||||
className={classes.vercel}
|
||||
/>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user