0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-12-23 04:30:11 +09:00
yude.jp/pages/profile.js

121 lines
4.7 KiB
JavaScript
Raw Normal View History

// Base layout
2021-02-08 16:43:48 +09:00
import Layout from "./components/Layout"
// i18n
2021-02-08 17:40:13 +09:00
import useTranslation from 'next-translate/useTranslation'
// Font Awesome
2021-03-08 14:46:59 +09:00
import { faDiscord, faTwitter, faGithub, faKeybase, faInstagram, faMastodon, faSteam } from '@fortawesome/free-brands-svg-icons'
2021-06-01 10:51:29 +09:00
import { faEnvelope, faBirthdayCake, faMapPin, faSchool, faPhone, faInfo, faLink, faMobile } from '@fortawesome/free-solid-svg-icons'
2021-02-08 17:40:13 +09:00
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
// Next.js, React
2021-02-08 16:43:48 +09:00
import Link from 'next/link'
import Image from 'next/image'
import { useRouter } from 'next/router'
// Discord
import DiscordStatus from './components/Discord/DiscordStatus'
import DiscordPlaying from './components/Discord/DiscordPlaying'
2021-02-08 16:43:48 +09:00
// Custom component
import Spotify from './components/Profile/Spotify'
import WakaTime from './components/Profile/WakaTime'
import PublicKeys from './components/Profile/PublicKeys'
import Button from './components/Profile/Button'
import Contact from './components/Profile/Contact'
import NintendoSW from "./components/Profile/NintendoSW"
export default function Profile(props) {
2021-02-08 16:43:48 +09:00
const router = useRouter()
const { locale, locales, defaultLocale, pathname } = router
2021-02-08 17:40:13 +09:00
const { t, lang } = useTranslation("profile")
2021-03-08 14:46:59 +09:00
2021-02-08 16:43:48 +09:00
return (
2021-06-14 12:36:18 +09:00
<Layout title={t('about')}>
2021-05-26 08:01:02 +09:00
<div className="text-center">
2021-02-21 16:54:51 +09:00
2021-02-08 17:40:13 +09:00
{
// Heading
}
2021-05-30 18:26:40 +09:00
<div>
<div className="flex mb-10 justify-center">
2021-02-21 16:54:51 +09:00
<Image
2021-06-22 17:59:40 +09:00
className = "rounded-full hover:animate-rumble z-0 p-15"
src = "/images/avatar.png"
2021-02-21 16:54:51 +09:00
alt = "yude's avatar"
width = {200}
height = {200}
unoptimized = {true}
2021-05-30 18:26:40 +09:00
/>
<DiscordStatus />
</div>
2021-05-30 18:26:40 +09:00
<p className="text-4xl transform -translate-y-4">yude</p>
2021-05-28 11:55:00 +09:00
<div>
2021-05-25 16:45:46 +09:00
<DiscordPlaying />
2021-05-28 11:07:47 +09:00
<Spotify />
2021-02-21 16:54:51 +09:00
</div>
2021-02-08 17:40:13 +09:00
</div>
{
// Description
}
2021-05-26 08:01:02 +09:00
<div>
2021-02-08 17:40:13 +09:00
<div className="text-left">
2021-06-14 12:36:18 +09:00
<p className="text-2xl"><FontAwesomeIcon icon={faInfo} className="w-5 h-5 inline"/> {t('desc')}</p>
2021-02-08 17:40:13 +09:00
</div>
2021-02-21 16:54:51 +09:00
<div className="my-2 text-left grid lg:grid-cols-3 md:grid-cols-2 sm:grid-cols-1 break-words">
<div>
<FontAwesomeIcon icon={faSchool} className="w-5 h-5 inline"/>
2021-06-14 12:36:18 +09:00
<p className="inline ml-4">{t('belongs')}</p>
<p className="ml-9">{t('school')}</p>
<p className="ml-9">{t('grade')}</p>
2021-02-21 16:54:51 +09:00
</div>
<div>
<FontAwesomeIcon icon={faBirthdayCake} className="w-5 h-5 inline"/>
2021-06-14 12:36:18 +09:00
<p className="inline ml-4">{t('birth')}</p>
<p className="ml-9">{t('date')}</p>
2021-02-21 16:54:51 +09:00
</div>
<div>
<FontAwesomeIcon icon={faMapPin} className="w-5 h-5 inline"/>
2021-06-14 12:36:18 +09:00
<p className="inline ml-4">{t('location')}</p>
<p className="ml-9">{t('hiroshima')}</p>
2021-02-21 16:54:51 +09:00
</div>
2021-02-08 17:40:13 +09:00
</div>
{
2021-02-21 16:54:51 +09:00
// Contact
2021-02-08 17:40:13 +09:00
}
2021-02-21 16:54:51 +09:00
<div className="text-left my-6">
2021-06-14 12:36:18 +09:00
<p className="text-2xl"><FontAwesomeIcon icon={faPhone} className="w-5 h-5 inline"/> {t('contact')}</p>
2021-02-08 17:40:13 +09:00
</div>
2021-02-21 16:54:51 +09:00
<div className="my-2 grid grid-cols-2 lg:grid-cols-5 md:grid-cols-3 sm:grid-cols-2 justify-items-center gap-y-6">
<Contact dest="https://twitter.com/yude_jp" icon={faTwitter} caption="@yude_jp" />
<Contact dest="#" icon={faDiscord} caption="yude#3205" />
<Contact dest="mailto:i@yude.jp" icon={faEnvelope} caption="i@yude.jp" />
<Contact dest="https://github.com/yude" icon={faGithub} caption="yude" />
<Contact dest="https://mstdn.yude.jp/@yude" icon={faMastodon} caption="@yude@mstdn.yude.jp" />
<Contact dest="https://keybase.io/yude" icon={faKeybase} caption="yude" />
<Contact dest="https://instagram.com/yude.jp" icon={faInstagram} caption="yude.jp" />
<Contact dest="https://steamcommunity.com/id/yudejp" icon={faSteam} caption="id/yudejp" />
<NintendoSW />
2021-02-21 16:54:51 +09:00
</div>
2021-03-08 14:46:59 +09:00
2021-05-28 07:24:07 +09:00
{
2021-05-30 11:13:23 +09:00
// Buttons
2021-05-28 07:24:07 +09:00
}
2021-05-30 11:13:23 +09:00
<div className="text-center my-6 space-x-5">
2021-05-30 10:44:57 +09:00
<WakaTime />
2021-05-30 11:13:23 +09:00
<PublicKeys />
<Button dest="https://scrapbox.io/yude/%E3%82%A2%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88" icon={faLink} caption={t('account')}/>
<Button dest="https://scrapbox.io/yude/%E3%83%87%E3%83%90%E3%82%A4%E3%82%B9" icon={faMobile} caption={t('device')}/>
2021-02-08 17:40:13 +09:00
</div>
2021-02-08 16:43:48 +09:00
</div>
2021-06-14 12:36:18 +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/xmnts"><a className="hover:underline">Minkasy {t('icon_2')}</a></Link></p>
2021-02-21 17:22:54 +09:00
</div>
2021-02-08 16:43:48 +09:00
</Layout>
)
}