2021-05-30 12:55:44 +09:00
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
|
import Layout from "./components/Layout"
|
|
|
|
import useTranslation from 'next-translate/useTranslation'
|
|
|
|
import { useRouter } from 'next/router'
|
|
|
|
import Minecraft from './components/Minecraft'
|
|
|
|
import Image from 'next/image'
|
2021-05-31 10:09:14 +09:00
|
|
|
import { faMap, faCopy } from '@fortawesome/free-solid-svg-icons'
|
2021-05-30 13:39:48 +09:00
|
|
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
|
|
import Link from 'next/link'
|
2021-06-14 18:44:59 +09:00
|
|
|
import ReactMarkdown from "react-markdown"
|
|
|
|
import gfm from 'remark-gfm';
|
|
|
|
import ja from '../docs/minecraft/ja.md'
|
|
|
|
import en from '../docs/minecraft/en.md'
|
2021-05-30 12:55:44 +09:00
|
|
|
|
|
|
|
export default function About(props) {
|
|
|
|
const router = useRouter()
|
|
|
|
const { locale, locales, defaultLocale, pathname } = router
|
|
|
|
const { t, lang } = useTranslation("minecraft")
|
2021-05-31 10:09:14 +09:00
|
|
|
const copyText = () => {
|
|
|
|
navigator.clipboard.writeText("yude.jp");
|
|
|
|
};
|
2021-05-31 10:06:04 +09:00
|
|
|
|
2021-05-30 12:55:44 +09:00
|
|
|
return (
|
2021-06-14 12:36:18 +09:00
|
|
|
<Layout title={t('title')}>
|
2021-05-30 13:39:48 +09:00
|
|
|
<div>
|
2021-06-14 12:38:00 +09:00
|
|
|
<p className="my-2 text-3xl text-center">{t('title')}</p>
|
2021-05-30 13:39:48 +09:00
|
|
|
<div className="w-full">
|
|
|
|
<Image
|
2021-08-09 10:15:53 +09:00
|
|
|
src = "/images/dynmap.png"
|
2021-05-30 13:39:48 +09:00
|
|
|
alt = "Dynmap Header"
|
|
|
|
unoptimized = {true}
|
|
|
|
width = {1354}
|
|
|
|
height = {619}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="text-center">
|
|
|
|
<Minecraft />
|
2021-05-31 10:09:14 +09:00
|
|
|
<p>
|
2021-06-14 12:36:18 +09:00
|
|
|
<span>{t('address')}: <code>yude.jp</code></span>
|
2021-05-31 10:09:14 +09:00
|
|
|
<button
|
|
|
|
className="bg-pink-600 text-white active:bg-pink-600 font-bold text-sm px-2 py-2 ml-2 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
|
|
|
|
type="button"
|
|
|
|
onClick={() => copyText()}
|
|
|
|
>
|
|
|
|
<FontAwesomeIcon icon={faCopy} className="w-5 h-5 inline"/>
|
|
|
|
</button>
|
|
|
|
</p>
|
2021-06-14 12:36:18 +09:00
|
|
|
<p>{t('version')}: 1.17</p>
|
2021-06-23 13:05:02 +09:00
|
|
|
<Link href="https://bluemap.yude.jp">
|
2021-05-30 13:39:48 +09:00
|
|
|
<a>
|
|
|
|
<button
|
2021-05-31 10:10:09 +09:00
|
|
|
className="bg-pink-600 text-white active:bg-pink-600 mt-3 font-bold text-sm px-6 py-3 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
|
2021-05-30 13:39:48 +09:00
|
|
|
type="button"
|
|
|
|
>
|
2021-06-23 13:06:47 +09:00
|
|
|
<FontAwesomeIcon icon={faMap} className="w-5 h-5 inline"/> BlueMap
|
2021-05-30 13:39:48 +09:00
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
</div>
|
2021-06-14 18:44:59 +09:00
|
|
|
|
|
|
|
{lang === 'ja' ? (
|
|
|
|
<ReactMarkdown plugins={[gfm]} children={ja} />
|
|
|
|
) : (
|
|
|
|
<ReactMarkdown plugins={[gfm]} children={en} />
|
|
|
|
)}
|
|
|
|
|
2021-05-30 13:39:48 +09:00
|
|
|
</div>
|
|
|
|
</Layout>
|
2021-05-30 12:55:44 +09:00
|
|
|
)
|
|
|
|
}
|