mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-23 04:30:11 +09:00
Compare commits
4 Commits
94f6c60f23
...
0a6341f2df
Author | SHA1 | Date | |
---|---|---|---|
0a6341f2df | |||
f8b4f7a20a | |||
adfa4106e2 | |||
970d9cf352 |
@ -2,7 +2,7 @@
|
||||
![Vercel](https://vercelbadge.vercel.app/api/yudejp/yude.jp?style=for-the-badge)
|
||||
<img alt="Next JS" src="https://img.shields.io/badge/nextjs-%23000000.svg?style=for-the-badge&logo=next.js&logoColor=white"/>
|
||||
<img alt="TailwindCSS" src="https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white"/>\
|
||||
Front page of [yude.jp](https://yude.jp).\
|
||||
Source code of [yude.jp](https://yude.jp).\
|
||||
Built with [Next.js](https://nextjs.org/) and [Tailwind CSS](https://tailwindcss.com/) and deployed on [Vercel](https://vercel.com).
|
||||
|
||||
## Development
|
||||
@ -13,4 +13,4 @@ Built with [Next.js](https://nextjs.org/) and [Tailwind CSS](https://tailwindcss
|
||||
* Run `yarn dev`.
|
||||
|
||||
## License
|
||||
This repository is licensed under the MIT License.
|
||||
This repository is provided under the MIT License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"footer": "This page is licensed under the MIT License.",
|
||||
"footer": "This page is provided under the MIT License.",
|
||||
"source": "Source code",
|
||||
"tos": "yude.jp Terms of Service",
|
||||
"yes_playing": "Playing {{playing}}",
|
||||
|
@ -13,7 +13,6 @@
|
||||
"date": "November the 19th, 2001",
|
||||
"contact": "Get in touch",
|
||||
"belongs": "Organization",
|
||||
"more": "More...",
|
||||
"grade": "B2",
|
||||
"icon_1": "Icon: ",
|
||||
"icon_2": "",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"footer": "このページは MIT License の下でライセンスされています。",
|
||||
"footer": "このページは MIT License のもと提供されています。",
|
||||
"source": "ソースコード",
|
||||
"tos": "yude.jp サービス利用規約",
|
||||
"yes_playing": "{{playing}} をプレイ中",
|
||||
|
@ -13,7 +13,6 @@
|
||||
"date": "2001年11月19日",
|
||||
"contact": "連絡先 / SNS",
|
||||
"belongs": "所属",
|
||||
"more": "さらに見る...",
|
||||
"grade": "2年",
|
||||
"icon_1": "アイコン: ",
|
||||
"icon_2": "さん",
|
||||
|
@ -7,23 +7,21 @@ export default function Footer(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("common")
|
||||
const footer = t('footer')
|
||||
const source = t('source')
|
||||
const tos = t('tos')
|
||||
return (
|
||||
<>
|
||||
<div className="container mx-auto px-6">
|
||||
<div className="flex flex-col items-center">
|
||||
<div className="sm:w-full text-center py-6">
|
||||
<p className="text-sm font-bold mb-2">
|
||||
{footer} / <Link href="https://github.com/yudejp/yude.jp"><a className="hover:underline">{source}</a></Link>
|
||||
</p>
|
||||
<p className="text-sm font-bold mb-2">
|
||||
<Link href="/tos"><a className="hover:underline">{tos}</a></Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="container mx-auto px-6">
|
||||
<div className="flex flex-col items-center">
|
||||
<div className="sm:w-full text-center py-6">
|
||||
<p className="text-sm font-bold mb-2">
|
||||
{t('footer')} / <Link href="https://github.com/yudejp/yude.jp"><a className="hover:underline">{t('source')}</a></Link>
|
||||
</p>
|
||||
<p className="text-sm font-bold mb-2">
|
||||
<Link href="/tos"><a className="hover:underline">{t('tos')}</a></Link>
|
||||
</p>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
@ -11,7 +11,7 @@ export default function Minecraft(props) {
|
||||
const { t, lang } = useTranslation("minecraft")
|
||||
|
||||
const [data, setData] = useState({ hits: [] });
|
||||
const fail = t('minecraft:fail')
|
||||
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
const result = await axios(
|
||||
@ -25,27 +25,24 @@ export default function Minecraft(props) {
|
||||
if (data === undefined){
|
||||
console.log("[Minecraft Query] データの取得に失敗しました。 / Failed to retrieve data.")
|
||||
return (
|
||||
<p>{fail}</p>
|
||||
<p>{t('minecraft:fail')}</p>
|
||||
)
|
||||
}else{
|
||||
const status = data.online
|
||||
const player = data.players && data.players.online
|
||||
const playing = t('minecraft:playing', {count: player})
|
||||
const no_one = t('minecraft:no_one')
|
||||
const offline = t('minecraft:offline')
|
||||
const loading = t('minecraft:loading')
|
||||
|
||||
return (
|
||||
<div className="text-center">
|
||||
{(() => {
|
||||
if (status == true) {
|
||||
if (player == undefined || player == 0) {
|
||||
return <span>{no_one}</span>
|
||||
return <span>{t('minecraft:no_one')}</span>
|
||||
} else {
|
||||
return <span>{playing}</span>
|
||||
return <span>{t('minecraft:playing', {count: player})}</span>
|
||||
}}else if (status == false) {
|
||||
return <span>{offline}</span>
|
||||
return <span>{t('minecraft:offline')}</span>
|
||||
}else {
|
||||
return <span>{loading}</span>
|
||||
return <span>{t('minecraft:loading')}</span>
|
||||
}
|
||||
})()}
|
||||
|
||||
|
@ -23,8 +23,7 @@ function App () {
|
||||
}else{
|
||||
if (data.isPlaying){
|
||||
const status = data.artist + ' / ' + data.title
|
||||
const listening = t('listening', {listening: status})
|
||||
return <p>{listening}</p>
|
||||
return <p>{t('listening', {listening: status})}</p>
|
||||
}else{
|
||||
return <p></p>
|
||||
}
|
||||
|
@ -11,11 +11,11 @@ export default function Tos(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("hcunews")
|
||||
const hcunews = t('hcunews')
|
||||
|
||||
return(
|
||||
<Layout title={hcunews}>
|
||||
<Layout title={t('hcunews')}>
|
||||
<div>
|
||||
<h1>{hcunews}</h1>
|
||||
<h1>{t('hcunews')}</h1>
|
||||
{lang === 'ja' ? (
|
||||
<ReactMarkdown plugins={[gfm]} children={ja} />
|
||||
) : (
|
||||
@ -23,5 +23,5 @@ export default function Tos(props) {
|
||||
)}
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
)
|
||||
}
|
@ -6,12 +6,11 @@ export default function About(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("house")
|
||||
const house = t('house')
|
||||
|
||||
return (
|
||||
<Layout title={house}>
|
||||
<Layout title={t('house')}>
|
||||
<div>
|
||||
<p className="my-2 text-3xl text-center">{house}</p>
|
||||
<p className="my-2 text-3xl text-center">{t('house')}</p>
|
||||
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/4mVIU29WCRVZgHUxQPzWsfXo953uxiAegbjDb83hTQ7szesCunwdpVkBIzhnLc9i?period=1d" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
</Layout>
|
||||
|
@ -12,17 +12,14 @@ export default function About(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("minecraft")
|
||||
const title = t('title')
|
||||
const address = t('address')
|
||||
const version = t('version')
|
||||
const copyText = () => {
|
||||
navigator.clipboard.writeText("yude.jp");
|
||||
};
|
||||
|
||||
return (
|
||||
<Layout title={title}>
|
||||
<Layout title={t('title')}>
|
||||
<div>
|
||||
<p className="my-2 text-3xl text-center">{title}</p>
|
||||
<p className="my-2 text-3xl text-center">{t('title')}</p>
|
||||
<div className="w-full">
|
||||
<Image
|
||||
src = "/static/images/dynmap.png"
|
||||
@ -35,7 +32,7 @@ export default function About(props) {
|
||||
<div className="text-center">
|
||||
<Minecraft />
|
||||
<p>
|
||||
<span>{address}: <code>yude.jp</code></span>
|
||||
<span>{t('address')}: <code>yude.jp</code></span>
|
||||
<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"
|
||||
@ -44,7 +41,7 @@ export default function About(props) {
|
||||
<FontAwesomeIcon icon={faCopy} className="w-5 h-5 inline"/>
|
||||
</button>
|
||||
</p>
|
||||
<p>{version}: 1.17</p>
|
||||
<p>{t('version')}: 1.17</p>
|
||||
<Link href="https://dynmap.yude.jp">
|
||||
<a>
|
||||
<button
|
||||
|
@ -16,25 +16,10 @@ export default function About(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("profile")
|
||||
const about = t('about')
|
||||
const desc = t('desc')
|
||||
const school = t('school')
|
||||
const contact = t('contact')
|
||||
const location = t('location')
|
||||
const belongs = t('belongs')
|
||||
const hiroshima = t('hiroshima')
|
||||
const birth = t('birth')
|
||||
const date = t('date')
|
||||
const more = t('more')
|
||||
const grade = t('grade')
|
||||
const icon_1 = t('icon_1')
|
||||
const icon_2 = t('icon_2')
|
||||
const account = t('account')
|
||||
const device = t('device')
|
||||
|
||||
return (
|
||||
|
||||
<Layout title={about}>
|
||||
<Layout title={t('about')}>
|
||||
<div className="text-center">
|
||||
|
||||
{
|
||||
@ -64,24 +49,24 @@ export default function About(props) {
|
||||
}
|
||||
<div>
|
||||
<div className="text-left">
|
||||
<p className="text-2xl"><FontAwesomeIcon icon={faInfo} className="w-5 h-5 inline"/> {desc}</p>
|
||||
<p className="text-2xl"><FontAwesomeIcon icon={faInfo} className="w-5 h-5 inline"/> {t('desc')}</p>
|
||||
</div>
|
||||
<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"/>
|
||||
<p className="inline ml-4">{belongs}</p>
|
||||
<p className="ml-9">{school}</p>
|
||||
<p className="ml-9">{grade}</p>
|
||||
<p className="inline ml-4">{t('belongs')}</p>
|
||||
<p className="ml-9">{t('school')}</p>
|
||||
<p className="ml-9">{t('grade')}</p>
|
||||
</div>
|
||||
<div>
|
||||
<FontAwesomeIcon icon={faBirthdayCake} className="w-5 h-5 inline"/>
|
||||
<p className="inline ml-4">{birth}</p>
|
||||
<p className="ml-9">{date}</p>
|
||||
<p className="inline ml-4">{t('birth')}</p>
|
||||
<p className="ml-9">{t('date')}</p>
|
||||
</div>
|
||||
<div>
|
||||
<FontAwesomeIcon icon={faMapPin} className="w-5 h-5 inline"/>
|
||||
<p className="inline ml-4">{location}</p>
|
||||
<p className="ml-9">{hiroshima}</p>
|
||||
<p className="inline ml-4">{t('location')}</p>
|
||||
<p className="ml-9">{t('hiroshima')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -89,7 +74,7 @@ export default function About(props) {
|
||||
// Contact
|
||||
}
|
||||
<div className="text-left my-6">
|
||||
<p className="text-2xl"><FontAwesomeIcon icon={faPhone} className="w-5 h-5 inline"/> {contact}</p>
|
||||
<p className="text-2xl"><FontAwesomeIcon icon={faPhone} className="w-5 h-5 inline"/> {t('contact')}</p>
|
||||
</div>
|
||||
<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">
|
||||
<div className="hover:underline">
|
||||
@ -169,7 +154,7 @@ export default function About(props) {
|
||||
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"
|
||||
type="button"
|
||||
>
|
||||
<FontAwesomeIcon icon={faLink} className="w-5 h-5 inline"/> {account}
|
||||
<FontAwesomeIcon icon={faLink} className="w-5 h-5 inline"/> {t('account')}
|
||||
</button>
|
||||
</a>
|
||||
</Link>
|
||||
@ -180,7 +165,7 @@ export default function About(props) {
|
||||
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"
|
||||
type="button"
|
||||
>
|
||||
<FontAwesomeIcon icon={faMobile} className="w-5 h-5 inline"/> {device}
|
||||
<FontAwesomeIcon icon={faMobile} className="w-5 h-5 inline"/> {t('device')}
|
||||
</button>
|
||||
</a>
|
||||
</Link>
|
||||
@ -189,7 +174,7 @@ export default function About(props) {
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
<p className="mt-3 text-sm font-bold text-gray-900 dark:text-gray-400">{icon_1}<Link href="https://twitter.com/xmnts"><a className="hover:underline">Minkasy {icon_2}</a></Link></p>
|
||||
<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>
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
|
@ -7,46 +7,38 @@ export default function About(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("status")
|
||||
const status = t('status')
|
||||
const location = t('location')
|
||||
const tottori = t('tottori')
|
||||
const hiroshima = t('hiroshima')
|
||||
const model = t('model')
|
||||
const service = t('service')
|
||||
const region = t('region')
|
||||
const shape = t('shape')
|
||||
|
||||
return (
|
||||
|
||||
<Layout title={status}>
|
||||
<Layout title={t('status')}>
|
||||
<div className="my-9 text-center">
|
||||
{
|
||||
// Heading
|
||||
}
|
||||
<div className="mb-5">
|
||||
<p className="text-left text-4xl">{status} <p className="md:inline font-mono text-base sm:">Powered / Generated by Mackerel.</p></p>
|
||||
<p className="text-left text-4xl">{t('status')} <p className="md:inline font-mono text-base sm:">Powered / Generated by Mackerel.</p></p>
|
||||
</div>
|
||||
{
|
||||
// cherry Mackerel
|
||||
// yui Mackerel
|
||||
}
|
||||
<h2 className="text-2xl text-left font-bold leading-7 sm:text-3xl sm:truncate">yui</h2>
|
||||
<div className="flex xl:w-2/3 text-center">
|
||||
<div className="flex-1"><p className="font-bold">CPU </p>i7-2600</div>
|
||||
<div className="flex-1"><p className="font-bold">RAM </p>DDR3 24GB</div>
|
||||
<div className="flex-1"><p className="font-bold">OS </p>Arch Linux</div>
|
||||
<div className="flex-1"><p className="font-bold">{location} </p>{hiroshima}</div>
|
||||
<div className="flex-1"><p className="font-bold">{t('location')} </p>{t('hiroshima')}</div>
|
||||
</div>
|
||||
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/heHnGhDanoIDlf7jjxUe9yPVrsG3deeH5ptD8suErrq5w46crWEIYdLfzLoukzfF?period=24h" height="400" frameBorder="0" scrolling="no"></iframe>
|
||||
|
||||
{
|
||||
// raspberry Mackerel
|
||||
// yukino Mackerel
|
||||
}
|
||||
<h2 className="text-2xl text-left font-bold leading-7 sm:text-3xl sm:truncate">yukino</h2>
|
||||
<div className="flex xl:w-2/3 text-center">
|
||||
<div className="flex-1"><p className="font-bold">{model} </p>Raspberry Pi 4 Model B Rev 1.2</div>
|
||||
<div className="flex-1"><p className="font-bold">{t('model')} </p>Raspberry Pi 4 Model B Rev 1.2</div>
|
||||
<div className="flex-1"><p className="font-bold">RAM </p>4GB</div>
|
||||
<div className="flex-1"><p className="font-bold">OS </p>Raspbian GNU/Linux 10 (buster)</div>
|
||||
<div className="flex-1"><p className="font-bold">{location} </p>{tottori}</div>
|
||||
<div className="flex-1"><p className="font-bold">{t('location')} </p>{t('tottori')}</div>
|
||||
</div>
|
||||
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/5HVbQiwuxrMithyrGjmmQCCOVgJ6Ptf94SDA2qWSTsh2rtz7pjePihYzaW5QEml4?period=24h" height="400" frameBorder="0" scrolling="no"></iframe>
|
||||
|
||||
@ -55,11 +47,11 @@ export default function About(props) {
|
||||
}
|
||||
<h2 className="text-2xl text-left font-bold leading-7 sm:text-3xl sm:truncate">iroha</h2>
|
||||
<div className="flex xl:w-2/3 text-center">
|
||||
<div className="flex-1"><p className="font-bold">{service} </p>Oracle Cloud</div>
|
||||
<div className="flex-1"><p className="font-bold">{shape} </p>VM.Standard.E2.1.Micro</div>
|
||||
<div className="flex-1"><p className="font-bold">{t('service')} </p>Oracle Cloud</div>
|
||||
<div className="flex-1"><p className="font-bold">{t('shape')} </p>VM.Standard.E2.1.Micro</div>
|
||||
<div className="flex-1"><p className="font-bold">RAM </p>1GB</div>
|
||||
<div className="flex-1"><p className="font-bold">OS </p>Ubuntu 20.04 LTS</div>
|
||||
<div className="flex-1"><p className="font-bold">{region} </p>Japan Central (Osaka)</div>
|
||||
<div className="flex-1"><p className="font-bold">{t('region')} </p>Japan Central (Osaka)</div>
|
||||
</div>
|
||||
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/wgmTz7aTgvwfyU6qVHrJJmQlpOHCUJK6qw0W9sJTX68WOI8TFtc27YvJ7dwkQEGv?period=24h" height="400" frameBorder="0" scrolling="no"></iframe>
|
||||
|
||||
@ -69,11 +61,11 @@ export default function About(props) {
|
||||
}
|
||||
<h2 className="text-2xl text-left font-bold leading-7 sm:text-3xl sm:truncate">komachi</h2>
|
||||
<div className="flex xl:w-2/3 text-center">
|
||||
<div className="flex-1"><p className="font-bold">{service} </p>Oracle Cloud</div>
|
||||
<div className="flex-1"><p className="font-bold">{shape} </p>VM.Standard.E2.1.Micro</div>
|
||||
<div className="flex-1"><p className="font-bold">{t('service')} </p>Oracle Cloud</div>
|
||||
<div className="flex-1"><p className="font-bold">{t('shape')} </p>VM.Standard.E2.1.Micro</div>
|
||||
<div className="flex-1"><p className="font-bold">RAM </p>1GB</div>
|
||||
<div className="flex-1"><p className="font-bold">OS </p>Ubuntu 20.04 LTS</div>
|
||||
<div className="flex-1"><p className="font-bold">{region} </p>Japan Central (Osaka)</div>
|
||||
<div className="flex-1"><p className="font-bold">{t('region')} </p>Japan Central (Osaka)</div>
|
||||
</div>
|
||||
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/vcn6LE4P2hh6GzvtMbIAWxsXpDh6eSoNyAXdhfYaj9yDN6FJwOHIiz9ktqToj1HG?period=24h" height="400" frameBorder="0" scrolling="no"></iframe>
|
||||
|
||||
|
@ -11,9 +11,8 @@ export default function Tos(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("tos")
|
||||
const tos = t('tos')
|
||||
return(
|
||||
<Layout title={tos}>
|
||||
<Layout title={t('tos')}>
|
||||
<div>
|
||||
{lang === 'ja' ? (
|
||||
<ReactMarkdown plugins={[gfm]} children={ja} />
|
||||
|
Loading…
Reference in New Issue
Block a user