style: prettier

This commit is contained in:
원더 2021-01-08 22:17:59 +09:00
parent 73eaf5d21b
commit 7bee44c955
18 changed files with 505 additions and 406 deletions

View File

@ -1,12 +1,18 @@
const Advertisement = ():JSX.Element => {
if(process.env.NODE_ENV === 'production') return <ins className="mb-5 adsbygoogle"
style={{ display: 'block' }}
data-ad-client="ca-pub-4856582423981759"
data-ad-slot="3250141451"
data-ad-format="auto"
data-adtest="on"
data-full-width-responsive="true"></ins>
else return <div className='bg-gray-700 text-white text-center w-full py-12 my-5'>Advertisement</div>
const Advertisement = (): JSX.Element => {
if (process.env.NODE_ENV === 'production')
return (
<ins
className="adsbygoogle mb-5"
style={{ display: 'block' }}
data-ad-client="ca-pub-4856582423981759"
data-ad-slot="3250141451"
data-ad-format="auto"
data-adtest="on"
data-full-width-responsive="true"
></ins>
)
else
return <div className="my-5 py-12 w-full text-center text-white bg-gray-700">Advertisement</div>
}
export default Advertisement
export default Advertisement

View File

@ -1,7 +1,25 @@
import NextImage from 'next/image'
const DiscordImage = (props: { size?: number, userID: string, avatarHash: string, tag: number|string, className?: string }) => {
return <NextImage className={props.className} src={props.avatarHash ? `https://cdn.discordapp.com/avatars/${props.userID}/${props.avatarHash}.png?size=1024` : `https://cdn.discordapp.com/embed/avatars/${Number(props.tag) % 5}.png?size=1024`} width={props.size || 256} height={props.size || 256} data-fallback-image='/img/default.png'/>
const DiscordImage = (props: {
size?: number
userID: string
avatarHash: string
tag: number | string
className?: string
}) => {
return (
<NextImage
className={props.className}
src={
props.avatarHash
? `https://cdn.discordapp.com/avatars/${props.userID}/${props.avatarHash}.png?size=1024`
: `https://cdn.discordapp.com/embed/avatars/${Number(props.tag) % 5}.png?size=1024`
}
width={props.size || 256}
height={props.size || 256}
data-fallback-image="/img/default.png"
/>
)
}
export default DiscordImage

View File

@ -1,5 +1,13 @@
const Divider = ({ className }:{ className?: string }) => {
return <div className={`my-2 px-5 ${className || ''}`} style={{ borderTop: '1px solid rgba(34,36,38,.15)', borderBottom: '1px solid hsla(0,0%,100%,.1)' }}/>
const Divider = ({ className }: { className?: string }) => {
return (
<div
className={`my-2 px-5 ${className || ''}`}
style={{
borderTop: '1px solid rgba(34,36,38,.15)',
borderBottom: '1px solid hsla(0,0%,100%,.1)',
}}
/>
)
}
export default Divider
export default Divider

View File

@ -1,29 +1,38 @@
import Container from './Container'
import Wave from './Wave'
const Docs = ({ header, description, subheader, children }:DocsProps):JSX.Element => {
return <>
<div className='bg-discord-blurple dark:bg-discord-black'>
<Container className='pt-20 pb-28' ignoreColor>
<h1 className='mt-10 text-4xl text-gray-100 font-bold sm:text-left text-center'>{header}</h1>
<h2 className='mt-5 text-2xl text-gray-200 font-medium sm:text-left text-center'>{description}</h2>
<h2 className='mt-5 text-2xl text-gray-200 font-medium sm:text-left text-center'>{subheader}</h2>
</Container>
</div>
<Wave color='currentColor' className='text-discord-blurple dark:text-discord-black bg-white dark:bg-discord-dark'/>
<Container>
<div>
{children}
const Docs = ({ header, description, subheader, children }: DocsProps): JSX.Element => {
return (
<>
<div className="dark:bg-discord-black bg-discord-blurple">
<Container className="pb-28 pt-20" ignoreColor>
<h1 className="mt-10 text-center text-gray-100 text-4xl font-bold sm:text-left">
{header}
</h1>
<h2 className="mt-5 text-center text-gray-200 text-2xl font-medium sm:text-left">
{description}
</h2>
<h2 className="mt-5 text-center text-gray-200 text-2xl font-medium sm:text-left">
{subheader}
</h2>
</Container>
</div>
</Container>
</>
<Wave
color="currentColor"
className="dark:text-discord-black text-discord-blurple dark:bg-discord-dark bg-white"
/>
<Container>
<div>{children}</div>
</Container>
</>
)
}
export default Docs
interface DocsProps {
header: string
description?: string
subheader?: string
children: JSX.Element | JSX.Element[]
}
header: string
description?: string
subheader?: string
children: JSX.Element | JSX.Element[]
}

View File

@ -2,73 +2,75 @@ import Link from 'next/link'
import Container from './Container'
import Wave from './Wave'
const Footer = ():JSX.Element => {
return <div className='releative'>
<Wave color='currentColor' className='text-white dark:text-discord-dark bg-discord-black'/>
<div className='bottom-0 bg-discord-black text-white'>
<Container className='w-11/12 lg:w-3/5 pt-10 lg:pt-0 pb-20 lg:flex' ignoreColor>
<div className='w-full lg:flex-grow'>
<h1 className='text-koreanbots-blue text-3xl font-extrabold'> .</h1>
<span className='text-base'>2020 Koreanbots, All rights reserved.</span>
<div className='text-2xl'>
<Link href='/discord'>
<a className='mr-2'>
<i className='fab fa-discord' />
const Footer = (): JSX.Element => {
return (
<div className="releative">
<Wave color="currentColor" className="dark:text-discord-dark text-white bg-discord-black" />
<div className="bottom-0 text-white bg-discord-black">
<Container className="pb-20 pt-10 w-11/12 lg:flex lg:pt-0 lg:w-3/5" ignoreColor>
<div className="w-full lg:flex-grow">
<h1 className="text-koreanbots-blue text-3xl font-extrabold"> .</h1>
<span className="text-base">2020 Koreanbots, All rights reserved.</span>
<div className="text-2xl">
<Link href="/discord">
<a className="mr-2">
<i className="fab fa-discord" />
</a>
</Link>
<a href="https://github.com/koreanbots" className="mr-2">
<i className="fab fa-github" />
</a>
</Link>
<a href='https://github.com/koreanbots' className='mr-2'>
<i className='fab fa-github' />
</a>
</div>
</div>
</div>
<div className='flex-col w-full lg:w-1/3 mb-2'>
<h2 className='text-base text-koreanbots-blue font-bold'> </h2>
<ul className='text-sm'>
<li>
<Link href='/about'>
<a className='hover:text-gray-300'></a>
</Link>
</li>
<li>
<Link href='/api'>
<a className='hover:text-gray-300'>API</a>
</Link>
</li>
</ul>
</div>
<div className='flex-col w-full lg:w-1/5 mb-2'>
<h2 className='text-base text-koreanbots-blue font-bold'></h2>
<ul className='text-sm'>
<li>
<Link href='/partners'>
<a className='hover:text-gray-300'></a>
</Link>
</li>
<li>
<Link href='/verification'>
<a className='hover:text-gray-300'></a>
</Link>
</li>
</ul>
</div>
<div className='flex-col w-full lg:w-1/5 mb-2'>
<h2 className='text-base text-koreanbots-blue font-bold'></h2>
<ul className='text-sm'>
<li>
<Link href='/privacy'>
<a className='hover:text-gray-300'></a>
</Link>
</li>
<li>
<Link href='/guidelines'>
<a className='hover:text-gray-300'></a>
</Link>
</li>
</ul>
</div>
</Container>
<div className="flex-col mb-2 w-full lg:w-1/3">
<h2 className="text-koreanbots-blue text-base font-bold"> </h2>
<ul className="text-sm">
<li>
<Link href="/about">
<a className="hover:text-gray-300"></a>
</Link>
</li>
<li>
<Link href="/api">
<a className="hover:text-gray-300">API</a>
</Link>
</li>
</ul>
</div>
<div className="flex-col mb-2 w-full lg:w-1/5">
<h2 className="text-koreanbots-blue text-base font-bold"></h2>
<ul className="text-sm">
<li>
<Link href="/partners">
<a className="hover:text-gray-300"></a>
</Link>
</li>
<li>
<Link href="/verification">
<a className="hover:text-gray-300"></a>
</Link>
</li>
</ul>
</div>
<div className="flex-col mb-2 w-full lg:w-1/5">
<h2 className="text-koreanbots-blue text-base font-bold"></h2>
<ul className="text-sm">
<li>
<Link href="/privacy">
<a className="hover:text-gray-300"></a>
</Link>
</li>
<li>
<Link href="/guidelines">
<a className="hover:text-gray-300"></a>
</Link>
</li>
</ul>
</div>
</Container>
</div>
</div>
</div>
)
}
export default Footer
export default Footer

View File

@ -5,9 +5,9 @@ const Navbar = (): JSX.Element => {
const [navbarOpen, setNavbarOpen] = useState<boolean>(false)
return (
<>
<nav className="fixed lg:absolute bg-transparent z-20 top-0 flex flex-wrap items-center justify-between px-2 py-3 w-full text-gray-100 bg-discord-blurple dark:bg-discord-black">
<nav className="fixed z-20 top-0 flex flex-wrap items-center justify-between px-2 py-3 w-full text-gray-100 dark:bg-discord-black bg-discord-blurple bg-transparent lg:absolute">
<div className="container flex flex-wrap items-center justify-between mx-auto px-4">
<div className="relative flex justify-between w-full static block lg:justify-start lg:w-auto">
<div className="relative static block flex justify-between w-full lg:justify-start lg:w-auto">
<a
className="logofont text-large whitespace-no-wrap inline-block mr-4 py-2 hover:text-gray-300 font-semibold leading-relaxed uppercase sm:text-2xl"
href="/"
@ -22,42 +22,40 @@ const Navbar = (): JSX.Element => {
<i className={`fas ${!navbarOpen ? 'fa-bars' : 'fa-times'}`}></i>
</button>
</div>
<div
className='lg:flex flex-grow items-center bg-white lg:bg-transparent lg:shadow-none hidden'
>
<div className="hidden flex-grow items-center bg-white lg:flex lg:bg-transparent lg:shadow-none">
<ul className="flex flex-col list-none lg:flex-row lg:ml-auto">
<li className="flex items-center">
<a
href="/discord"
className="lg:text-gray-100 lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2"
className="lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2 lg:text-gray-100"
>
</a>
</li>
<li className="flex items-center">
<Link href="/about">
<a className="lg:text-gray-100 lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2">
<a className="lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2 lg:text-gray-100">
</a>
</Link>
</li>
<li className="flex items-center">
<Link href="/api">
<a className="lg:text-gray-100 lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2">
<a className="lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2 lg:text-gray-100">
API
</a>
</Link>
</li>
<li className="flex items-center">
<Link href="/addbot">
<a className="lg:text-gray-100 lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2">
<a className="lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2 lg:text-gray-100">
</a>
</Link>
</li>
<li className="flex items-center">
<Link href="/api/auth/discord">
<a className="lg:text-gray-100 lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2">
<a className="lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2 lg:text-gray-100">
</a>
</Link>
@ -66,52 +64,60 @@ const Navbar = (): JSX.Element => {
</div>
</div>
</nav>
<div className={`w-full h-full fixed bg-discord-blurple dark:bg-discord-black mt-8 sm:mt-0 z-19 ${navbarOpen ? 'block' : 'hidden'}`}>
<div
className={`w-full h-full fixed bg-discord-blurple dark:bg-discord-black mt-8 sm:mt-0 z-19 ${
navbarOpen ? 'block' : 'hidden'
}`}
>
<nav className="mt-20">
<Link href='/about'>
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300">
<svg className="h-5 w-5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 11H5M19 11C20.1046 11 21 11.8954 21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V13C3 11.8954 3.89543 11 5 11M19 11V9C19 7.89543 18.1046 7 17 7M5 11V9C5 7.89543 5.89543 7 7 7M7 7V5C7 3.89543 7.89543 3 9 3H15C16.1046 3 17 3.89543 17 5V7M7 7H17" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
<Link href="/about">
<a className="flex items-center px-8 py-2 text-gray-100 hover:text-gray-300">
<svg
className="w-5 h-5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M19 11H5M19 11C20.1046 11 21 11.8954 21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V13C3 11.8954 3.89543 11 5 11M19 11V9C19 7.89543 18.1046 7 17 7M5 11V9C5 7.89543 5.89543 7 7 7M7 7V5C7 3.89543 7.89543 3 9 3H15C16.1046 3 17 3.89543 17 5V7M7 7H17"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span className='px-2 font-medium'></span>
<span className="px-2 font-medium"></span>
</a>
</Link>
<Link href='/about'>
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300">
<i className="fas fa-tools"/>
<Link href="/about">
<a className="flex items-center px-8 py-2 text-gray-100 hover:text-gray-300">
<i className="fas fa-tools" />
<span className='px-2 font-medium'>API</span>
<span className="px-2 font-medium">API</span>
</a>
</Link>
<Link href='/addbot'>
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300">
<Link href="/addbot">
<a className="flex items-center px-8 py-2 text-gray-100 hover:text-gray-300">
<i className="fas fa-plus"></i>
<span className='px-2 font-medium'> </span>
<span className="px-2 font-medium"> </span>
</a>
</Link>
<Link href='/api/auth/login'>
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300">
<i className="far fa-user"/>
<span className='px-2 font-medium'></span>
<Link href="/api/auth/login">
<a className="flex items-center px-8 py-2 text-gray-100 hover:text-gray-300">
<i className="far fa-user" />
<span className="px-2 font-medium"></span>
</a>
</Link>
</nav>
<div className="absolute bottom-0 my-10">
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300">
<i className='fab fa-discord' />
<a className="flex items-center px-8 py-2 text-gray-100 hover:text-gray-300">
<i className="fab fa-discord" />
<Link href='/discord'>
<a className='px-2 font-medium'> </a>
<Link href="/discord">
<a className="px-2 font-medium"> </a>
</Link>
</a>
</div>

View File

@ -1,24 +1,22 @@
import Head from 'next/head'
const SEO = ({ title, description, image }:SEOProps):JSX.Element => {
return <Head>
<title>{title} - </title>
{ description && <meta
name="description"
content={description}
/> }
<meta name="og:site_name" content="한국 디스코드봇 리스트" />
<meta name="og:title" content={title} />
{ description && <meta name="og:description" content={description} /> }
{ image && <meta name="og:image" content={image} /> }
</Head>
const SEO = ({ title, description, image }: SEOProps): JSX.Element => {
return (
<Head>
<title>{title} - </title>
{description && <meta name="description" content={description} />}
<meta name="og:site_name" content="한국 디스코드봇 리스트" />
<meta name="og:title" content={title} />
{description && <meta name="og:description" content={description} />}
{image && <meta name="og:image" content={image} />}
</Head>
)
}
export default SEO
interface SEOProps {
title: string
description?: string
image?: string
}
title: string
description?: string
image?: string
}

View File

@ -1,6 +1,6 @@
import { useState } from 'react'
const Search = ({query, result}:SearchProps):JSX.Element => {
const Search = ({ query, result }: SearchProps): JSX.Element => {
return (
<div>
<input />
@ -9,8 +9,8 @@ const Search = ({query, result}:SearchProps):JSX.Element => {
}
interface SearchProps {
query: string
result: string
query: string
result: string
}
export default Search

View File

@ -1,7 +1,9 @@
const Segment = ({ children }):JSX.Element => {
return <div className='bg-little-white dark:bg-discord-black text-black dark:text-white p-5 rounded-sm'>
{children}
</div>
const Segment = ({ children }): JSX.Element => {
return (
<div className="p-5 text-black dark:text-white dark:bg-discord-black bg-little-white rounded-sm">
{children}
</div>
)
}
export default Segment
export default Segment

View File

@ -1,4 +1,4 @@
const Wave = ({ color, className }:WaveProps):JSX.Element => {
const Wave = ({ color, className }: WaveProps): JSX.Element => {
return (
<svg viewBox="0 0 1440 320" className={className}>
<path
@ -10,8 +10,8 @@ const Wave = ({ color, className }:WaveProps):JSX.Element => {
}
interface WaveProps {
color: string
className?: string
color: string
className?: string
}
export default Wave
export default Wave

View File

@ -2,9 +2,11 @@ import { NextPage } from 'next'
import Container from '../components/Container'
const NotFound: NextPage = () => {
return <Container paddingTop>
<h1>Not Found</h1>
</Container>
return (
<Container paddingTop>
<h1>Not Found</h1>
</Container>
)
}
export default NotFound

View File

@ -28,7 +28,7 @@ class MyDocument extends Document {
}}
/>
</Head>
<body className="h-full text-black dark:text-gray-100 bg-white dark:bg-discord-dark">
<body className="h-full text-black dark:text-gray-100 dark:bg-discord-dark bg-white">
<Main />
<NextScript />
</body>

View File

@ -1,84 +1,89 @@
import { NextPage } from 'next'
import Docs from '../components/Docs'
const Privacy:NextPage = () => {
return <Docs header='가이드라인' description='리스트에 등재되는 모든 봇들이 지켜야하는 가이드라인입니다!' subheader='최초 작성: 2020-04-30 수정: 2020-05-15'>
<h1 className='font-bold text-4xl mb-3'>KOREANBOTS에 .</h1>
<p> .</p>
<p>
,
.
</p>
<h2 className='font-semibold text-3xl mt-10' id="봇"></h2>
<p> .</p>
<ul className='list-inside list-disc'>
<li> .</li>
<li>
(NSFW의 NSFW를
.)
</li>
<li>
(
)
</li>
<li>
100 ,
.
</li>
<li> , </li>
<li> ( )</li>
<li>
, <strong></strong>
. ,
.
<ul className='pl-3 list-inside list-disc'>
<li>
<strong> </strong>(MIT
) ,
.</li>
<li> , (:
Just Some Bot을 , RedBot .)<br/>
, .
</li>
</ul>
</li>
</ul>
<h3 className='font-semibold text-lg mt-x' id="금지사항"></h3>
<p> .</p>
<ul className='list-inside list-disc'>
<li> .</li>
<li>
<strong>TOS</strong> <strong></strong>,{' '}
<strong> </strong> .
</li>
<li>
, , /
</li>
<li>
, API
</li>
</ul>
<h2 className='font-semibold text-3xl mt-10' id="유저"></h2>
<p>
(
) .
</p>
<ul className='list-inside list-disc'>
<li>
<strong>TOS</strong> <strong></strong>,{' '}
<strong> </strong> <strong> </strong>,{' '}
<strong> </strong>, <strong> </strong>
</li>
</ul>
<p className='mt-10'>
. ,
.
</p>
<p> <strong> </strong> .</p>
</Docs>
const Privacy: NextPage = () => {
return (
<Docs
header="가이드라인"
description="리스트에 등재되는 모든 봇들이 지켜야하는 가이드라인입니다!"
subheader="최초 작성: 2020-04-30 수정: 2020-05-15"
>
<h1 className="mb-3 text-4xl font-bold">KOREANBOTS에 .</h1>
<p> .</p>
<p> , .</p>
<h2 className="mt-10 text-3xl font-semibold" id="봇">
</h2>
<p> .</p>
<ul className="list-inside list-disc">
<li> .</li>
<li> (NSFW의 NSFW를 .)</li>
<li>
(
)
</li>
<li>
100 ,
.
</li>
<li> , </li>
<li> ( )</li>
<li>
, <strong></strong> .
, .
<ul className="pl-3 list-inside list-disc">
<li>
<strong> </strong>(MIT )
, .
</li>
<li>
, (예시: Just Some Bot을
, RedBot .)
<br />
, .
</li>
</ul>
</li>
</ul>
<h3 className="mt-x text-lg font-semibold" id="금지사항">
</h3>
<p> .</p>
<ul className="list-inside list-disc">
<li> .</li>
<li>
<strong>TOS</strong> <strong></strong>, <strong> </strong>
.
</li>
<li>
, , /
</li>
<li> , API </li>
</ul>
<h2 className="mt-10 text-3xl font-semibold" id="유저">
</h2>
<p>
( )
.
</p>
<ul className="list-inside list-disc">
<li>
<strong>TOS</strong> <strong></strong>, <strong> </strong>{' '}
<strong> </strong>, <strong> </strong>,{' '}
<strong> </strong>
</li>
</ul>
<p className="mt-10">
. ,
.
</p>
<p>
<strong> </strong> .
</p>
</Docs>
)
}
export default Privacy

View File

@ -3,23 +3,36 @@ import Container from '../components/Container'
import Wave from '../components/Wave'
const Index: NextPage = () => {
return <>
<div className='bg-discord-blurple dark:bg-discord-black'>
<Container className='pt-20 pb-28' ignoreColor>
<h1 className='text-3xl text-gray-100 font-bold sm:text-left text-center'> </h1>
</Container>
</div>
<Wave color='currentColor' className='text-discord-blurple dark:text-discord-black bg-white dark:bg-discord-dark'/>
return (
<>
<div className="dark:bg-discord-black bg-discord-blurple">
<Container className="pb-28 pt-20" ignoreColor>
<h1 className="text-center text-gray-100 text-3xl font-bold sm:text-left">
</h1>
</Container>
</div>
<Wave
color="currentColor"
className="dark:text-discord-black text-discord-blurple dark:bg-discord-dark bg-white"
/>
<Container>
<h1 className='text-3xl font-bold'><i className='far fa-heart text-pink-600 mr-3' /> </h1>
<p className='text-base'> !</p>
<h1 className='text-3xl font-bold'><i className='far fa-star text-yellow-500 mt-10 mr-3' /> </h1>
<p className='text-base'> .</p>
<h1 className='text-3xl font-bold'><i className='fa fa-check text-green-500 mt-10 mr-3' /> </h1>
<p className='text-base'>KOREANBOTS에서 !!</p>
</Container>
</>
<Container>
<h1 className="text-3xl font-bold">
<i className="far fa-heart mr-3 text-pink-600" />
</h1>
<p className="text-base"> !</p>
<h1 className="text-3xl font-bold">
<i className="far fa-star mr-3 mt-10 text-yellow-500" />
</h1>
<p className="text-base"> .</p>
<h1 className="text-3xl font-bold">
<i className="fa fa-check mr-3 mt-10 text-green-500" />
</h1>
<p className="text-base">KOREANBOTS에서 !!</p>
</Container>
</>
)
}
export default Index

View File

@ -1,127 +1,123 @@
import { NextPage } from 'next'
import Docs from '../components/Docs'
const Privacy:NextPage = () => {
return <Docs header='개인정보취급방침' description='저희가 개인정보를 취급하는 방침입니다.'>
<h2 className='font-medium text-3xl mt-10'> </h2>
<p>
"한국 디스코드봇 리스트"('https://koreanbots.dev')
, .
</p>
<ul className='list-inside list-disc'>
<li> </li>
<li> </li>
<li> </li>
</ul>
<h2 className='font-medium text-3xl mt-10'> </h2>
<ul className='list-inside list-disc'>
<li>
유저: 디스코드 Oauth를 (, ID, , , ), (IP주소, ), | 선택항목: Github
</li>
<li>
: 등록일, ID, , , , , ,
, , , , , Status | :
, GIT URL, ,
</li>
</ul>
<h2 className='font-medium text-3xl mt-10'> </h2>
<p>
<strong> </strong> ,
.
</p>
<h2 className='font-medium text-3xl mt-10'> </h2>
<p>
.
</p>
<p>
,
.
</p>
<h2 className='font-medium text-3xl mt-10'> </h2>
<p>
,
.
</p>
<h2 className='font-medium text-3xl mt-10'> </h2>
<p>
.
</p>
<h3> </h3>
<ul className='list-inside list-disc'>
<li>성명: 박준서</li>
<li>직책: 대표</li>
<li>
: <a href="mailto:wonderlandpark@callisto.team"></a>
@wonderlandpark#9999
</li>
</ul>
<h2 className='font-medium text-3xl mt-10'> </h2>
<p>
7
.
</p>
<h2 className='font-medium text-3xl mt-10'> </h2>
<p>
,
.
</p>
<p>
,
,
.
</p>
<p>
(, )
<br />
- 소관업무 : 개인정보 ,
<br />
- 신고 : privacy.kisa.or.kr
<br />
- 신고 : privacyclean@kisa.or.kr
<br />
- 신고 : 118 (ARS 2)
<br />
- : 061-820-2619
<br />
- / : (58324) 9( 301-2) 3
<br />
</p>
<p>
<br />
- 소관업무 : 개인정보 ,
<br />
- 신청 : www.kopico.go.kr
<br />
- () : (03171) 209
4 (1833-6972)
<br />
</p>
<p>
<br />
- 소관업무 : 각종 /
<br />
- 신고 : cybercid@spo.go.kr
<br />
- : () 1301, 02-3480-3570
<br />
</p>
<p>
<br />
- 소관업무 : 개인정보 ,
<br />
- 신고 : cyberbureau.police.go.kr
<br />
- 전화 : 182( )
<br />
</p>
</Docs>
const Privacy: NextPage = () => {
return (
<Docs header="개인정보취급방침" description="저희가 개인정보를 취급하는 방침입니다.">
<h2 className="mt-10 text-3xl font-medium"> </h2>
<p>
"한국 디스코드봇 리스트"('https://koreanbots.dev')
, .
</p>
<ul className="list-inside list-disc">
<li> </li>
<li> </li>
<li> </li>
</ul>
<h2 className="mt-10 text-3xl font-medium"> </h2>
<ul className="list-inside list-disc">
<li>
유저: 디스코드 Oauth를 (, ID, , ,
), (IP주소, ), | 선택항목: Github
</li>
<li>
: 등록일, ID, , , , , , , ,
, , , Status | 선택항목: 웹사이트, GIT URL, ,
</li>
</ul>
<h2 className="mt-10 text-3xl font-medium"> </h2>
<p>
<strong> </strong> ,
.
</p>
<h2 className="mt-10 text-3xl font-medium"> </h2>
<p>
.
</p>
<p>
,
.
</p>
<h2 className="mt-10 text-3xl font-medium"> </h2>
<p>
,
.
</p>
<h2 className="mt-10 text-3xl font-medium"> </h2>
<p>
.
</p>
<h3> </h3>
<ul className="list-inside list-disc">
<li>성명: 박준서</li>
<li>직책: 대표</li>
<li>
: <a href="mailto:wonderlandpark@callisto.team"></a>
@wonderlandpark#9999
</li>
</ul>
<h2 className="mt-10 text-3xl font-medium"> </h2>
<p> 7 .</p>
<h2 className="mt-10 text-3xl font-medium"> </h2>
<p> , .</p>
<p>
, ,
.
</p>
<p>
(, )
<br />
- 소관업무 : 개인정보 ,
<br />
- 신고 : privacy.kisa.or.kr
<br />
- 신고 : privacyclean@kisa.or.kr
<br />
- 신고 : 118 (ARS 2)
<br />
- : 061-820-2619
<br />
- / : (58324) 9( 301-2) 3
<br />
</p>
<p>
<br />
- 소관업무 : 개인정보 ,
<br />
- 신청 : www.kopico.go.kr
<br />
- () : (03171) 209 4
(1833-6972)
<br />
</p>
<p>
<br />
- 소관업무 : 각종 /
<br />
- 신고 : cybercid@spo.go.kr
<br />
- : () 1301, 02-3480-3570
<br />
</p>
<p>
<br />
- 소관업무 : 개인정보 ,
<br />
- 신고 : cyberbureau.police.go.kr
<br />
- 전화 : 182( )
<br />
</p>
</Docs>
)
}
export default Privacy

View File

@ -4,4 +4,4 @@ import relativeTime from 'dayjs/plugin/relativeTime'
Day.extend(relativeTime)
Day.locale('ko')
export default Day
export default Day

View File

@ -3,13 +3,15 @@ import * as Query from './Query'
const Fetch = {
bot: new DataLoader(
async (ids: string[]) => (await Promise.all(ids.map((el: string) => Query.getBot(el)))).map(row => ({ ...row })),
async (ids: string[]) =>
(await Promise.all(ids.map((el: string) => Query.getBot(el)))).map(row => ({ ...row })),
{
batchScheduleFn: callback => setTimeout(callback, 1000),
}
),
user: new DataLoader(
async (ids: string[]) => (await Promise.all(ids.map((el: string) => Query.getUser(el)))).map(row => ({ ...row })),
async (ids: string[]) =>
(await Promise.all(ids.map((el: string) => Query.getUser(el)))).map(row => ({ ...row })),
{
batchScheduleFn: callback => setTimeout(callback, 1000),
}

View File

@ -17,29 +17,61 @@ export const knex = knsexy({
},
})
export async function getBot(id: string, owners=true):Promise<Bot> {
const res = await knex('bots').select(['id', 'owners', 'lib', 'prefix', 'votes', 'servers', 'intro', 'desc', 'web', 'git', 'url', 'category', 'status', 'name', 'avatar', 'tag', 'verified', 'trusted', 'partnered', 'discord', 'boosted', 'state', 'vanity', 'bg', 'banner']).where({ id }).orWhere({ vanity: id, boosted: 1 })
if(res[0]) {
export async function getBot(id: string, owners = true): Promise<Bot> {
const res = await knex('bots')
.select([
'id',
'owners',
'lib',
'prefix',
'votes',
'servers',
'intro',
'desc',
'web',
'git',
'url',
'category',
'status',
'name',
'avatar',
'tag',
'verified',
'trusted',
'partnered',
'discord',
'boosted',
'state',
'vanity',
'bg',
'banner',
])
.where({ id })
.orWhere({ vanity: id, boosted: 1 })
if (res[0]) {
res[0].category = JSON.parse(res[0].category)
res[0].owners = JSON.parse(res[0].owners)
if(owners) res[0].owners = await Promise.all(res[0].owners.map(async (u: string) => await getUser(u)))
res[0].owners = res[0].owners.filter((el: User|null)=> el).map((row: User)=> ({...row}))
res[0].vanity = res[0].vanity && ( res[0].boosted || res[0].trusted || res[0].partnered )
if (owners)
res[0].owners = await Promise.all(res[0].owners.map(async (u: string) => await getUser(u)))
res[0].owners = res[0].owners.filter((el: User | null) => el).map((row: User) => ({ ...row }))
res[0].vanity = res[0].vanity && (res[0].boosted || res[0].trusted || res[0].partnered)
}
return res[0] || null
}
export async function getUser(id: string, bots=true):Promise<User> {
const res = await knex('users').select(['id', 'avatar', 'tag', 'username', 'perm', 'github']).where({ id })
if(res[0]) {
const owned = await knex('bots').select(['id']).where('owners', 'like', `%${id}%`)
if(bots) res[0].bots = await Promise.all(owned.map(async b=> await getBot(b.id, false)))
else res[0].bots = owned.map(async b=> b.id)
res[0].bots = res[0].bots.filter((el:Bot|null)=> el).map((row: User)=> ({...row}))
export async function getUser(id: string, bots = true): Promise<User> {
const res = await knex('users')
.select(['id', 'avatar', 'tag', 'username', 'perm', 'github'])
.where({ id })
if (res[0]) {
const owned = await knex('bots')
.select(['id'])
.where('owners', 'like', `%${id}%`)
if (bots) res[0].bots = await Promise.all(owned.map(async b => await getBot(b.id, false)))
else res[0].bots = owned.map(async b => b.id)
res[0].bots = res[0].bots.filter((el: Bot | null) => el).map((row: User) => ({ ...row }))
}
return res[0] || null
}