0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-12-22 20:20:09 +09:00
yude.jp/pages/index.js

69 lines
2.1 KiB
JavaScript
Raw Normal View History

2021-09-24 08:10:26 +09:00
// Base layout
2021-02-06 02:38:26 +09:00
import Layout from "./components/Layout"
2021-08-09 12:46:10 +09:00
2021-08-09 11:00:58 +09:00
// Menu
2021-08-09 12:29:42 +09:00
import FAMenu from "./components/Menu/FontAwesomeMenu"
2021-08-09 12:46:10 +09:00
2021-08-09 11:04:26 +09:00
// Banner
import HappyBusy from "./components/Footer/HappyBusy"
2021-08-09 12:46:10 +09:00
2021-08-09 11:00:58 +09:00
// Next.js
2021-08-15 16:59:54 +09:00
import Link from 'next/link'
2021-08-09 12:46:10 +09:00
2021-08-09 11:00:58 +09:00
// i18n
2021-12-11 18:17:20 +09:00
import { useTranslation, useLanguageQuery } from 'next-export-i18n';
2021-08-09 12:46:10 +09:00
2021-08-09 11:00:58 +09:00
// React Router
import MinecraftMenu from "./components/Menu/MinecraftMenu"
2021-08-09 12:46:10 +09:00
2021-08-09 11:33:00 +09:00
// Font Awesome
2021-12-11 21:32:42 +09:00
import { faDiscord, faGit, faGithub } from '@fortawesome/free-brands-svg-icons'
2021-12-26 07:35:41 +09:00
import { faBook, faUser, faServer, faScrewdriver, faHeart } from '@fortawesome/free-solid-svg-icons'
2021-08-09 11:33:00 +09:00
2021-02-06 14:05:36 +09:00
export default function Index(props) {
2021-12-11 18:07:22 +09:00
const { t } = useTranslation();
const [query] = useLanguageQuery();
2021-12-11 18:17:20 +09:00
2021-12-11 18:55:57 +09:00
if (!query) {
return <p>Loading...</p>
} else {
2021-02-06 14:05:36 +09:00
return (
2021-08-14 10:16:41 +09:00
<>
<Layout title={t('home')}>
<div className="my-9 text-center">
<div className="m-10">
2021-12-11 19:19:50 +09:00
<img
2021-12-11 21:32:42 +09:00
className = "mx-auto"
2021-08-15 16:59:54 +09:00
src = "/images/avatar_riru.png"
2021-08-14 10:16:41 +09:00
alt = "yude's avatar"
width = {200}
height = {200}
/>
</div>
{/* Index menu */}
<div className="grid grid-cols-3 gap-10">
2021-12-11 18:55:57 +09:00
<FAMenu dest="/profile" query={query} icon={faUser} />
<FAMenu dest="/server" query={query} icon={faServer} />
2021-12-26 07:35:41 +09:00
<FAMenu dest="/services" query={query} icon={faScrewdriver} />
<FAMenu dest="https://discord.gg/X6srY7X" icon={faDiscord} />
<FAMenu dest="https://github.com/yudejp" icon={faGithub} />
<FAMenu dest="https://git.yude.jp" icon={faGit} />
2021-12-11 18:55:57 +09:00
<MinecraftMenu query={query} />
<FAMenu dest="/mutual" icon={faHeart} query={query} />
2021-08-14 10:16:41 +09:00
</div>
{/* Banner */}
<div className="mx-auto mt-10">
<HappyBusy />
</div>
2021-08-15 16:59:54 +09:00
{/* Avatar by */}
2021-12-11 18:17:20 +09:00
<p className="mt-3 text-sm font-bold text-gray-900 dark:text-gray-400">{t('icon_1')}<Link href="https://twitter.com/R_I_R_U_"><a className="hover:underline">梨留りる {t('icon_2')}</a></Link></p>
2021-02-07 17:40:43 +09:00
</div>
2021-08-14 10:16:41 +09:00
</Layout>
</>
2021-02-06 02:31:04 +09:00
)
}
2021-12-11 18:55:57 +09:00
}