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 => { const Advertisement = (): JSX.Element => {
if(process.env.NODE_ENV === 'production') return <ins className="mb-5 adsbygoogle" if (process.env.NODE_ENV === 'production')
style={{ display: 'block' }} return (
data-ad-client="ca-pub-4856582423981759" <ins
data-ad-slot="3250141451" className="adsbygoogle mb-5"
data-ad-format="auto" style={{ display: 'block' }}
data-adtest="on" data-ad-client="ca-pub-4856582423981759"
data-full-width-responsive="true"></ins> data-ad-slot="3250141451"
else return <div className='bg-gray-700 text-white text-center w-full py-12 my-5'>Advertisement</div> 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' import NextImage from 'next/image'
const DiscordImage = (props: { size?: number, userID: string, avatarHash: string, tag: number|string, className?: string }) => { const DiscordImage = (props: {
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'/> 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 export default DiscordImage

View File

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

View File

@ -2,73 +2,75 @@ import Link from 'next/link'
import Container from './Container' import Container from './Container'
import Wave from './Wave' import Wave from './Wave'
const Footer = ():JSX.Element => { const Footer = (): JSX.Element => {
return <div className='releative'> return (
<Wave color='currentColor' className='text-white dark:text-discord-dark bg-discord-black'/> <div className="releative">
<div className='bottom-0 bg-discord-black text-white'> <Wave color="currentColor" className="dark:text-discord-dark text-white bg-discord-black" />
<Container className='w-11/12 lg:w-3/5 pt-10 lg:pt-0 pb-20 lg:flex' ignoreColor> <div className="bottom-0 text-white bg-discord-black">
<div className='w-full lg:flex-grow'> <Container className="pb-20 pt-10 w-11/12 lg:flex lg:pt-0 lg:w-3/5" ignoreColor>
<h1 className='text-koreanbots-blue text-3xl font-extrabold'> .</h1> <div className="w-full lg:flex-grow">
<span className='text-base'>2020 Koreanbots, All rights reserved.</span> <h1 className="text-koreanbots-blue text-3xl font-extrabold"> .</h1>
<div className='text-2xl'> <span className="text-base">2020 Koreanbots, All rights reserved.</span>
<Link href='/discord'> <div className="text-2xl">
<a className='mr-2'> <Link href="/discord">
<i className='fab fa-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> </a>
</Link> </div>
<a href='https://github.com/koreanbots' className='mr-2'>
<i className='fab fa-github' />
</a>
</div> </div>
</div> <div className="flex-col mb-2 w-full lg:w-1/3">
<div className='flex-col w-full lg:w-1/3 mb-2'> <h2 className="text-koreanbots-blue text-base font-bold"> </h2>
<h2 className='text-base text-koreanbots-blue font-bold'> </h2> <ul className="text-sm">
<ul className='text-sm'> <li>
<li> <Link href="/about">
<Link href='/about'> <a className="hover:text-gray-300"></a>
<a className='hover:text-gray-300'></a> </Link>
</Link> </li>
</li> <li>
<li> <Link href="/api">
<Link href='/api'> <a className="hover:text-gray-300">API</a>
<a className='hover:text-gray-300'>API</a> </Link>
</Link> </li>
</li> </ul>
</ul> </div>
</div> <div className="flex-col mb-2 w-full lg:w-1/5">
<div className='flex-col w-full lg:w-1/5 mb-2'> <h2 className="text-koreanbots-blue text-base font-bold"></h2>
<h2 className='text-base text-koreanbots-blue font-bold'></h2> <ul className="text-sm">
<ul className='text-sm'> <li>
<li> <Link href="/partners">
<Link href='/partners'> <a className="hover:text-gray-300"></a>
<a className='hover:text-gray-300'></a> </Link>
</Link> </li>
</li> <li>
<li> <Link href="/verification">
<Link href='/verification'> <a className="hover:text-gray-300"></a>
<a className='hover:text-gray-300'></a> </Link>
</Link> </li>
</li> </ul>
</ul> </div>
</div> <div className="flex-col mb-2 w-full lg:w-1/5">
<div className='flex-col w-full lg:w-1/5 mb-2'> <h2 className="text-koreanbots-blue text-base font-bold"></h2>
<h2 className='text-base text-koreanbots-blue font-bold'></h2> <ul className="text-sm">
<ul className='text-sm'> <li>
<li> <Link href="/privacy">
<Link href='/privacy'> <a className="hover:text-gray-300"></a>
<a className='hover:text-gray-300'></a> </Link>
</Link> </li>
</li> <li>
<li> <Link href="/guidelines">
<Link href='/guidelines'> <a className="hover:text-gray-300"></a>
<a className='hover:text-gray-300'></a> </Link>
</Link> </li>
</li> </ul>
</ul> </div>
</div> </Container>
</Container> </div>
</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) const [navbarOpen, setNavbarOpen] = useState<boolean>(false)
return ( 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="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 <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" 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="/" href="/"
@ -22,42 +22,40 @@ const Navbar = (): JSX.Element => {
<i className={`fas ${!navbarOpen ? 'fa-bars' : 'fa-times'}`}></i> <i className={`fas ${!navbarOpen ? 'fa-bars' : 'fa-times'}`}></i>
</button> </button>
</div> </div>
<div <div className="hidden flex-grow items-center bg-white lg:flex lg:bg-transparent lg:shadow-none">
className='lg:flex flex-grow items-center bg-white lg:bg-transparent lg:shadow-none hidden'
>
<ul className="flex flex-col list-none lg:flex-row lg:ml-auto"> <ul className="flex flex-col list-none lg:flex-row lg:ml-auto">
<li className="flex items-center"> <li className="flex items-center">
<a <a
href="/discord" 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> </a>
</li> </li>
<li className="flex items-center"> <li className="flex items-center">
<Link href="/about"> <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> </a>
</Link> </Link>
</li> </li>
<li className="flex items-center"> <li className="flex items-center">
<Link href="/api"> <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 API
</a> </a>
</Link> </Link>
</li> </li>
<li className="flex items-center"> <li className="flex items-center">
<Link href="/addbot"> <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> </a>
</Link> </Link>
</li> </li>
<li className="flex items-center"> <li className="flex items-center">
<Link href="/api/auth/discord"> <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> </a>
</Link> </Link>
@ -66,52 +64,60 @@ const Navbar = (): JSX.Element => {
</div> </div>
</div> </div>
</nav> </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"> <nav className="mt-20">
<Link href='/about'> <Link href="/about">
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300"> <a className="flex items-center px-8 py-2 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"> <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"/> 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> </svg>
<span className="px-2 font-medium"></span>
<span className='px-2 font-medium'></span>
</a> </a>
</Link> </Link>
<Link href='/about'> <Link href="/about">
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300"> <a className="flex items-center px-8 py-2 text-gray-100 hover:text-gray-300">
<i className="fas fa-tools"/> <i className="fas fa-tools" />
<span className="px-2 font-medium">API</span>
<span className='px-2 font-medium'>API</span>
</a> </a>
</Link> </Link>
<Link href='/addbot'> <Link href="/addbot">
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300"> <a className="flex items-center px-8 py-2 text-gray-100 hover:text-gray-300">
<i className="fas fa-plus"></i> <i className="fas fa-plus"></i>
<span className='px-2 font-medium'> </span> <span className="px-2 font-medium"> </span>
</a> </a>
</Link> </Link>
<Link href='/api/auth/login'> <Link href="/api/auth/login">
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300"> <a className="flex items-center px-8 py-2 text-gray-100 hover:text-gray-300">
<i className="far fa-user"/> <i className="far fa-user" />
<span className='px-2 font-medium'></span> <span className="px-2 font-medium"></span>
</a> </a>
</Link> </Link>
</nav> </nav>
<div className="absolute bottom-0 my-10"> <div className="absolute bottom-0 my-10">
<a className="flex items-center py-2 px-8 text-gray-100 hover:text-gray-300"> <a className="flex items-center px-8 py-2 text-gray-100 hover:text-gray-300">
<i className='fab fa-discord' /> <i className="fab fa-discord" />
<Link href="/discord">
<Link href='/discord'> <a className="px-2 font-medium"> </a>
<a className='px-2 font-medium'> </a>
</Link> </Link>
</a> </a>
</div> </div>

View File

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

View File

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

View File

@ -1,7 +1,9 @@
const Segment = ({ children }):JSX.Element => { const Segment = ({ children }): JSX.Element => {
return <div className='bg-little-white dark:bg-discord-black text-black dark:text-white p-5 rounded-sm'> return (
{children} <div className="p-5 text-black dark:text-white dark:bg-discord-black bg-little-white rounded-sm">
</div> {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 ( return (
<svg viewBox="0 0 1440 320" className={className}> <svg viewBox="0 0 1440 320" className={className}>
<path <path
@ -10,8 +10,8 @@ const Wave = ({ color, className }:WaveProps):JSX.Element => {
} }
interface WaveProps { interface WaveProps {
color: string color: string
className?: string className?: string
} }
export default Wave export default Wave

View File

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

View File

@ -28,7 +28,7 @@ class MyDocument extends Document {
}} }}
/> />
</Head> </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 /> <Main />
<NextScript /> <NextScript />
</body> </body>

View File

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

View File

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

View File

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

View File

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

View File

@ -3,13 +3,15 @@ import * as Query from './Query'
const Fetch = { const Fetch = {
bot: new DataLoader( 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), batchScheduleFn: callback => setTimeout(callback, 1000),
} }
), ),
user: new DataLoader( 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), 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> { 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 }) const res = await knex('bots')
if(res[0]) { .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].category = JSON.parse(res[0].category)
res[0].owners = JSON.parse(res[0].owners) 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))) if (owners)
res[0].owners = res[0].owners.filter((el: User|null)=> el).map((row: User)=> ({...row})) res[0].owners = await Promise.all(res[0].owners.map(async (u: string) => await getUser(u)))
res[0].vanity = res[0].vanity && ( res[0].boosted || res[0].trusted || res[0].partnered ) 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 return res[0] || null
} }
export async function getUser(id: string, bots=true):Promise<User> { export async function getUser(id: string, bots = true): Promise<User> {
const res = await knex('users').select(['id', 'avatar', 'tag', 'username', 'perm', 'github']).where({ id }) const res = await knex('users')
if(res[0]) { .select(['id', 'avatar', 'tag', 'username', 'perm', 'github'])
const owned = await knex('bots').select(['id']).where('owners', 'like', `%${id}%`) .where({ id })
if(bots) res[0].bots = await Promise.all(owned.map(async b=> await getBot(b.id, false))) if (res[0]) {
else res[0].bots = owned.map(async b=> b.id) const owned = await knex('bots')
res[0].bots = res[0].bots.filter((el:Bot|null)=> el).map((row: User)=> ({...row})) .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 return res[0] || null
} }