mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-21 19:50:10 +09:00
WIP
This commit is contained in:
parent
c856a34867
commit
d9559dd072
15
i18n.json
15
i18n.json
@ -1,15 +0,0 @@
|
||||
{
|
||||
"locales": ["en", "ja"],
|
||||
"defaultLocale": "ja",
|
||||
"pages": {
|
||||
"*": ["common"],
|
||||
"/": ["index", "minecraft", "common"],
|
||||
"/profile": ["profile", "common"],
|
||||
"/server": ["server", "common"],
|
||||
"/house": ["house", "common"],
|
||||
"/tos": ["tos", "common"],
|
||||
"/hcunews": ["hcunews", "common"],
|
||||
"/minecraft": ["minecraft", "common"],
|
||||
"/404": ["404", "common"]
|
||||
}
|
||||
}
|
12
i18n/index.js
Normal file
12
i18n/index.js
Normal file
@ -0,0 +1,12 @@
|
||||
var ja = require('./translations.en.json');
|
||||
var en = require('./translations.ja.json')
|
||||
|
||||
const i18n = {
|
||||
translations: {
|
||||
ja: ja,
|
||||
en: en,
|
||||
},
|
||||
defaultLang: 'ja'
|
||||
}
|
||||
|
||||
module.exports = i18n;
|
64
i18n/translations.en.json
Normal file
64
i18n/translations.en.json
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
"caption": "The requested page does not exist on this website.",
|
||||
"return": "Return to top",
|
||||
"footer": "This page is provided under the MIT License.",
|
||||
"source": "Source code",
|
||||
"tos": "yude.jp Terms of Service",
|
||||
"yes_playing": "Playing {{playing}}",
|
||||
"listening": "Listening to {{listening}}",
|
||||
"close": "Close",
|
||||
"mutual": "Mutual links",
|
||||
"status": "Service Status",
|
||||
"icon_1": "Icon: ",
|
||||
"icon_2": "",
|
||||
"post_list": "Posts listing",
|
||||
"hcunews": "About @hcunews",
|
||||
"house": "yude's house",
|
||||
"home": "Home",
|
||||
"profile": "yude's profile",
|
||||
"blog": "yude's blog",
|
||||
"status": "yude.jp Server Status",
|
||||
"house": "yude's house",
|
||||
"discord": "yude.jp Discord Server",
|
||||
"mastodon": "Mastodon instance",
|
||||
"title": "Minecraft Multiplayer",
|
||||
"playing": "{{count}} player(s) online.",
|
||||
"no_one": "No one is playing.",
|
||||
"offline": "Server is down.",
|
||||
"address": "Server address",
|
||||
"fail": "Failed to retrieve server status.",
|
||||
"loading": "Retrieving server status...",
|
||||
"version": "Version",
|
||||
"about": "About yude",
|
||||
"desc": "Description",
|
||||
"school": "Faculty of Information Science, Hiroshima City University.",
|
||||
"hiroshima": "Hiroshima, Japan",
|
||||
"location": "Location",
|
||||
"link": "Links",
|
||||
"link_all": "To see all of yude's account, please visit ",
|
||||
"link_all_late": ".",
|
||||
"here": "here",
|
||||
"mail": "E-mail",
|
||||
"birth": "Birthday",
|
||||
"date": "November the 19th, 2001",
|
||||
"contact": "Accounts",
|
||||
"belongs": "Organization",
|
||||
"grade": "B2",
|
||||
"keys": "Public keys",
|
||||
"download": "Download",
|
||||
"fingerprint": "Digital fingerprint",
|
||||
"view": "View",
|
||||
"device": "Devices",
|
||||
"account": "Accounts",
|
||||
"wishlist": "Amazon Wishlist",
|
||||
"status": "Server Status",
|
||||
"location": "Location",
|
||||
"tottori": "Tottori, Japan",
|
||||
"hiroshima": "Hiroshima, Japan",
|
||||
"model": "Model",
|
||||
"region": "Region",
|
||||
"service": "Service",
|
||||
"shape": "Shape",
|
||||
"tos": "yude.jp Terms of Service",
|
||||
"input": "en"
|
||||
}
|
64
i18n/translations.ja.json
Normal file
64
i18n/translations.ja.json
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
"caption": "要求されたページはこのウェブサイト上に存在しません。",
|
||||
"return": "トップページへ戻る",
|
||||
"footer": "このページは MIT License のもと提供されています。",
|
||||
"source": "ソースコード",
|
||||
"tos": "yude.jp サービス利用規約",
|
||||
"yes_playing": "{{playing}} をプレイ中",
|
||||
"listening": "{{listening}} を再生中",
|
||||
"close": "閉じる",
|
||||
"mutual": "相互リンク",
|
||||
"status": "サービスの状態",
|
||||
"icon_1": "アイコン: ",
|
||||
"icon_2": "さん",
|
||||
"post_list": "記事一覧",
|
||||
"hcunews": "@hcunews について",
|
||||
"house": "ゆでハウス",
|
||||
"home": "ホーム",
|
||||
"profile": "yude のプロフィール",
|
||||
"blog": "yude のブログ",
|
||||
"status": "yude.jp サーバー情報",
|
||||
"house": "ゆでハウス",
|
||||
"discord": "yude.jp Discord サーバー",
|
||||
"mastodon": "Mastodon インスタンス",
|
||||
"title": "Minecraft マルチプレイ",
|
||||
"playing": "{{count}} 人がプレイしています。",
|
||||
"no_one": "現在、誰もログインしていません。",
|
||||
"offline": "サーバーがオフラインのようです。",
|
||||
"address": "サーバー アドレス",
|
||||
"fail": "サーバーの状態を取得できませんでした。",
|
||||
"loading": "サーバーの状態を取得しています...",
|
||||
"version": "バージョン",
|
||||
"about": "yude について",
|
||||
"desc": "概要",
|
||||
"school": "広島市立大学 情報科学部",
|
||||
"hiroshima": "日本, 広島県",
|
||||
"location": "所在地",
|
||||
"link": "リンク",
|
||||
"link_all": "yude が所持しているすべてのアカウントの一覧は、",
|
||||
"link_all_late": "にあります。",
|
||||
"here": "こちら",
|
||||
"mail": "メール",
|
||||
"birth": "生年月日",
|
||||
"date": "2001年11月19日",
|
||||
"contact": "アカウント",
|
||||
"belongs": "所属",
|
||||
"grade": "2年",
|
||||
"keys": "公開鍵",
|
||||
"download": "ダウンロード",
|
||||
"fingerprint": "電子指紋",
|
||||
"view": "閲覧",
|
||||
"device": "デバイス",
|
||||
"account": "アカウント",
|
||||
"wishlist": "Amazon ほしいものリスト",
|
||||
"status": "サーバー情報",
|
||||
"location": "場所",
|
||||
"tottori": "日本, 鳥取県",
|
||||
"hiroshima": "日本, 広島県",
|
||||
"model": "モデル",
|
||||
"region": "リージョン",
|
||||
"service": "サービス",
|
||||
"shape": "シェイプ",
|
||||
"tos": "yude.jp サービス利用規約",
|
||||
"input": "ja"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"caption": "The requested page does not exist on this website.",
|
||||
"return": "Return to top"
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"footer": "This page is provided under the MIT License.",
|
||||
"source": "Source code",
|
||||
"tos": "yude.jp Terms of Service",
|
||||
"yes_playing": "Playing {{playing}}",
|
||||
"listening": "Listening to {{listening}}",
|
||||
"close": "Close",
|
||||
"mutual": "Mutual links",
|
||||
"status": "Service Status",
|
||||
"icon_1": "Icon: ",
|
||||
"icon_2": "",
|
||||
"post_list": "Posts listing"
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"hcunews": "About @hcunews"
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"house": "yude's house"
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"home": "Home",
|
||||
"profile": "yude's profile",
|
||||
"blog": "yude's blog",
|
||||
"status": "yude.jp Server Status",
|
||||
"house": "yude's house",
|
||||
"discord": "yude.jp Discord Server",
|
||||
"mastodon": "Mastodon instance"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"title": "Minecraft Multiplayer",
|
||||
"playing": "{{count}} player(s) online.",
|
||||
"no_one": "No one is playing.",
|
||||
"offline": "Server is down.",
|
||||
"address": "Server address",
|
||||
"fail": "Failed to retrieve server status.",
|
||||
"loading": "Retrieving server status...",
|
||||
"version": "Version"
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"about": "About yude",
|
||||
"desc": "Description",
|
||||
"school": "Faculty of Information Science, Hiroshima City University.",
|
||||
"hiroshima": "Hiroshima, Japan",
|
||||
"location": "Location",
|
||||
"link": "Links",
|
||||
"link_all": "To see all of yude's account, please visit ",
|
||||
"link_all_late": ".",
|
||||
"here": "here",
|
||||
"mail": "E-mail",
|
||||
"birth": "Birthday",
|
||||
"date": "November the 19th, 2001",
|
||||
"contact": "Accounts",
|
||||
"belongs": "Organization",
|
||||
"grade": "B2",
|
||||
"keys": "Public keys",
|
||||
"download": "Download",
|
||||
"fingerprint": "Digital fingerprint",
|
||||
"view": "View",
|
||||
"device": "Devices",
|
||||
"account": "Accounts",
|
||||
"wishlist": "Amazon Wishlist"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"status": "Server Status",
|
||||
"location": "Location",
|
||||
"tottori": "Tottori, Japan",
|
||||
"hiroshima": "Hiroshima, Japan",
|
||||
"model": "Model",
|
||||
"region": "Region",
|
||||
"service": "Service",
|
||||
"shape": "Shape"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"tos": "yude.jp Terms of Service",
|
||||
"input": "en"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"caption": "要求されたページはこのウェブサイト上に存在しません。",
|
||||
"return": "トップページへ戻る"
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"footer": "このページは MIT License のもと提供されています。",
|
||||
"source": "ソースコード",
|
||||
"tos": "yude.jp サービス利用規約",
|
||||
"yes_playing": "{{playing}} をプレイ中",
|
||||
"listening": "{{listening}} を再生中",
|
||||
"close": "閉じる",
|
||||
"mutual": "相互リンク",
|
||||
"status": "サービスの状態",
|
||||
"icon_1": "アイコン: ",
|
||||
"icon_2": "さん",
|
||||
"post_list": "記事一覧"
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"hcunews": "@hcunews について"
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"house": "ゆでハウス"
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"home": "ホーム",
|
||||
"profile": "yude のプロフィール",
|
||||
"blog": "yude のブログ",
|
||||
"status": "yude.jp サーバー情報",
|
||||
"house": "ゆでハウス",
|
||||
"discord": "yude.jp Discord サーバー",
|
||||
"mastodon": "Mastodon インスタンス"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"title": "Minecraft マルチプレイ",
|
||||
"playing": "{{count}} 人がプレイしています。",
|
||||
"no_one": "現在、誰もログインしていません。",
|
||||
"offline": "サーバーがオフラインのようです。",
|
||||
"address": "サーバー アドレス",
|
||||
"fail": "サーバーの状態を取得できませんでした。",
|
||||
"loading": "サーバーの状態を取得しています...",
|
||||
"version": "バージョン"
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"about": "yude について",
|
||||
"desc": "概要",
|
||||
"school": "広島市立大学 情報科学部",
|
||||
"hiroshima": "日本, 広島県",
|
||||
"location": "所在地",
|
||||
"link": "リンク",
|
||||
"link_all": "yude が所持しているすべてのアカウントの一覧は、",
|
||||
"link_all_late": "にあります。",
|
||||
"here": "こちら",
|
||||
"mail": "メール",
|
||||
"birth": "生年月日",
|
||||
"date": "2001年11月19日",
|
||||
"contact": "アカウント",
|
||||
"belongs": "所属",
|
||||
"grade": "2年",
|
||||
"keys": "公開鍵",
|
||||
"download": "ダウンロード",
|
||||
"fingerprint": "電子指紋",
|
||||
"view": "閲覧",
|
||||
"device": "デバイス",
|
||||
"account": "アカウント",
|
||||
"wishlist": "Amazon ほしいものリスト"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"status": "サーバー情報",
|
||||
"location": "場所",
|
||||
"tottori": "日本, 鳥取県",
|
||||
"hiroshima": "日本, 広島県",
|
||||
"model": "モデル",
|
||||
"region": "リージョン",
|
||||
"service": "サービス",
|
||||
"shape": "シェイプ"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"tos": "yude.jp サービス利用規約",
|
||||
"input": "ja"
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
const nextTranslate = require('next-translate')
|
||||
|
||||
const rewrites = async () => {
|
||||
return [
|
||||
{
|
||||
@ -13,11 +11,7 @@ const rewrites = async () => {
|
||||
]
|
||||
}
|
||||
|
||||
module.exports = nextTranslate({
|
||||
i18n: {
|
||||
locales: ['ja', 'en'],
|
||||
defaultLocale: 'ja',
|
||||
},
|
||||
module.exports = {
|
||||
images: {
|
||||
domains: ['mackerel.io', 'mc-heads.net', 'crafatar.com'],
|
||||
},
|
||||
@ -43,4 +37,4 @@ module.exports = nextTranslate({
|
||||
]
|
||||
},
|
||||
rewrites,
|
||||
})
|
||||
}
|
@ -34,9 +34,10 @@
|
||||
"microcms-js-sdk": "^1.2.0",
|
||||
"moment": "^2.29.1",
|
||||
"next": "^11.1.3",
|
||||
"next-export-i18n": "^1.2.1",
|
||||
"next-seo": "^4.28.1",
|
||||
"next-themes": "^0.0.15",
|
||||
"next-translate": "^1.1.0",
|
||||
"next-translate": "^1.2.0",
|
||||
"popper.js": "^1.16.1",
|
||||
"postcss": "^8.3.6",
|
||||
"prop-types": "^15.7.2",
|
||||
|
29
pages/404.js
29
pages/404.js
@ -1,29 +0,0 @@
|
||||
// Base layout
|
||||
import Layout from "./components/Layout"
|
||||
|
||||
// React Router
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
// Next.js
|
||||
import Link from 'next/link'
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
|
||||
export default function Custom404(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("404")
|
||||
|
||||
return (
|
||||
<Layout title="404">
|
||||
<div className="text-center mb-10 mt-10">
|
||||
<p className="text-3xl">404</p>
|
||||
<p className="text-xl">{t('caption')}</p>
|
||||
<Link href="/">
|
||||
<a>
|
||||
<p className="mt-5">{t('return')}</p>
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
}
|
@ -4,9 +4,6 @@ import useTranslation from 'next-translate/useTranslation'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
function App (){
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("common")
|
||||
const [data, setData] = useState({ hits: [] });
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
|
@ -1,13 +1,9 @@
|
||||
import "tailwindcss/tailwind.css";
|
||||
import Link from 'next/link';
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
import { useRouter } from 'next/router'
|
||||
export default function Footer(props) {
|
||||
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("common")
|
||||
// i18n
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
|
||||
export default function Footer(props) {
|
||||
return (
|
||||
<>
|
||||
<div className="container mx-auto px-6">
|
||||
|
@ -6,9 +6,6 @@ import { faLanguage } from '@fortawesome/free-solid-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
|
||||
const Dropdown = ({ color }) => {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
|
||||
// dropdown props
|
||||
const [dropdownPopoverShow, setDropdownPopoverShow] = React.useState(false);
|
||||
const btnDropdownRef = React.createRef();
|
||||
|
@ -1,21 +1,19 @@
|
||||
// Next.js
|
||||
import Head from "next/head"
|
||||
|
||||
// Tailwind CSS
|
||||
import "tailwindcss/tailwind.css";
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
// React
|
||||
import React, { useEffect, useState } from 'react'
|
||||
|
||||
// Components
|
||||
import Footer from "./Footer/Footer"
|
||||
import Navbar from "./Navbar"
|
||||
|
||||
const Layout = (props) => {
|
||||
const { title, children } = props
|
||||
const siteTitle = "yude.jp"
|
||||
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="page">
|
||||
<Head>
|
||||
|
@ -6,10 +6,6 @@ import Image from 'next/image'
|
||||
import { list } from 'postcss';
|
||||
|
||||
export default function Minecraft(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("minecraft")
|
||||
|
||||
const [data, setData] = useState({ hits: [] });
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -6,9 +6,6 @@ import LastPlayed from './LastPlayed'
|
||||
|
||||
function App (props) {
|
||||
const uuid = props;
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("common")
|
||||
const [data, setData] = useState({ hits: [] });
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -16,7 +16,8 @@ const Navbar = () => {
|
||||
</Link>
|
||||
<div className="absolute right-0">
|
||||
<ThemeSelector />
|
||||
<LangSelector />
|
||||
{/* <LangSelector /> */}
|
||||
<LanguageSwitcher lang="ja" />
|
||||
</div>
|
||||
</nav>
|
||||
</>
|
||||
|
@ -8,8 +8,6 @@ import Link from 'next/link'
|
||||
export default function Modal() {
|
||||
const [showModal, setShowModal] = React.useState(false);
|
||||
const router = useRouter()
|
||||
const { t, lang } = useTranslation("common")
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const close = t('common:close')
|
||||
const keys = t('profile:keys')
|
||||
const view = t('profile:view')
|
||||
|
@ -4,9 +4,6 @@ import useTranslation from 'next-translate/useTranslation'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
function App () {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("common")
|
||||
const [data, setData] = useState({ hits: [] });
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
|
@ -6,10 +6,7 @@ import { useRouter } from 'next/router'
|
||||
|
||||
export default function Modal() {
|
||||
const [showModal, setShowModal] = React.useState(false);
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("common")
|
||||
const close = t('common:close')
|
||||
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
|
@ -7,9 +7,6 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
|
||||
const ThemeSelector = (props) => {
|
||||
const { title, children } = props
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
|
||||
const [isMounted, setIsMounted] = useState(false);
|
||||
const { theme, setTheme, getTheme } = useTheme();
|
||||
useEffect(() => {
|
||||
|
@ -1,8 +1,12 @@
|
||||
// Base layout
|
||||
import Layout from "./components/Layout"
|
||||
|
||||
// React, i18n
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
// i18n
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
const { t } = useTranslation();
|
||||
const [query] = useLanguageQuery();
|
||||
|
||||
// React
|
||||
import React from "react"
|
||||
import ReactMarkdown from "react-markdown"
|
||||
|
||||
|
@ -1,12 +1,15 @@
|
||||
// Base layout
|
||||
import Layout from "./components/Layout"
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
|
||||
// i18n
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
const { t } = useTranslation();
|
||||
const [query] = useLanguageQuery();
|
||||
|
||||
// Next.js router
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
export default function About(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("house")
|
||||
|
||||
return (
|
||||
<Layout title={t('house')}>
|
||||
<div>
|
||||
|
@ -13,7 +13,7 @@ import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
|
||||
// i18n
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
|
||||
// React Router
|
||||
import { useRouter } from 'next/router'
|
||||
@ -24,10 +24,8 @@ import { faDiscord, faGit, faMastodon, faGithub } from '@fortawesome/free-brands
|
||||
import { faBook, faUser, faServer, faHouseUser, faHeart } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
export default function Index(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("index")
|
||||
|
||||
const { t } = useTranslation();
|
||||
const [query] = useLanguageQuery();
|
||||
return (
|
||||
<>
|
||||
<Layout title={t('home')}>
|
||||
|
@ -6,7 +6,9 @@ import React, { useState, useEffect } from 'react';
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
// i18n
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
const { t } = useTranslation();
|
||||
const [query] = useLanguageQuery();
|
||||
|
||||
// Next.js
|
||||
import Image from 'next/image'
|
||||
@ -29,12 +31,6 @@ import en from '../docs/minecraft/en.md'
|
||||
import { NextSeo } from 'next-seo';
|
||||
|
||||
export default function About(props) {
|
||||
const router = useRouter()
|
||||
|
||||
// i18n
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("minecraft")
|
||||
|
||||
// Copy server address to clipboard
|
||||
const copyText = () => {
|
||||
navigator.clipboard.writeText("yude.jp");
|
||||
|
@ -2,7 +2,9 @@
|
||||
import Layout from "./components/Layout"
|
||||
|
||||
// i18n
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
const { t } = useTranslation();
|
||||
const [query] = useLanguageQuery();
|
||||
|
||||
// React Router etc.
|
||||
import { useRouter } from 'next/router'
|
||||
@ -18,9 +20,6 @@ import en from '../docs/mutual/en.md'
|
||||
import { NextSeo } from 'next-seo';
|
||||
|
||||
export default function Tos(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("common")
|
||||
return(
|
||||
<>
|
||||
<NextSeo
|
||||
|
@ -4,9 +4,13 @@ import Layout from "./components/Layout"
|
||||
// Next.js
|
||||
import Link from "next/link";
|
||||
|
||||
// i18n
|
||||
// React
|
||||
import { useRouter } from 'next/router'
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
|
||||
// i18n
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
const { t } = useTranslation();
|
||||
const [query] = useLanguageQuery();
|
||||
|
||||
// microCMS library
|
||||
import { client } from "../libs/client";
|
||||
@ -15,9 +19,6 @@ import { client } from "../libs/client";
|
||||
import { NextSeo } from 'next-seo';
|
||||
|
||||
export default function Home({ blog }) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("common")
|
||||
return (
|
||||
<>
|
||||
<NextSeo
|
||||
|
@ -2,7 +2,9 @@
|
||||
import Layout from "./components/Layout"
|
||||
|
||||
// i18n
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
const { t } = useTranslation();
|
||||
const [query] = useLanguageQuery();
|
||||
|
||||
// Font Awesome
|
||||
import { faDiscord, faTwitter, faGithub, faKeybase, faInstagram, faMastodon, faSteam, faAmazon } from '@fortawesome/free-brands-svg-icons'
|
||||
@ -30,9 +32,6 @@ import NintendoSW from "./components/Profile/NintendoSW"
|
||||
import { NextSeo } from 'next-seo';
|
||||
|
||||
export default function Profile(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("profile")
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -2,7 +2,9 @@
|
||||
import Layout from "./components/Layout"
|
||||
|
||||
// i18n
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
const { t } = useTranslation();
|
||||
const [query] = useLanguageQuery();
|
||||
|
||||
// React Router
|
||||
import { useRouter } from 'next/router'
|
||||
@ -11,10 +13,6 @@ import { useRouter } from 'next/router'
|
||||
import { NextSeo } from 'next-seo';
|
||||
|
||||
export default function Server(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("server")
|
||||
|
||||
return (
|
||||
<>
|
||||
<NextSeo
|
||||
|
14
pages/tos.js
14
pages/tos.js
@ -1,16 +1,22 @@
|
||||
// Base layout
|
||||
import Layout from "./components/Layout"
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
|
||||
// i18n
|
||||
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
|
||||
const { t } = useTranslation();
|
||||
const [query] = useLanguageQuery();
|
||||
|
||||
// Next.js, React
|
||||
import { useRouter } from 'next/router'
|
||||
import React from "react"
|
||||
|
||||
// React Markdown
|
||||
import ReactMarkdown from "react-markdown"
|
||||
import gfm from 'remark-gfm';
|
||||
import ja from '../docs/tos/ja.md'
|
||||
import en from '../docs/tos/en.md'
|
||||
|
||||
export default function Tos(props) {
|
||||
const router = useRouter()
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
const { t, lang } = useTranslation("tos")
|
||||
return(
|
||||
<Layout title={t('tos')}>
|
||||
<div>
|
||||
|
20
yarn.lock
20
yarn.lock
@ -3423,6 +3423,11 @@ ms@^2.1.1:
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
||||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
||||
|
||||
mustache@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64"
|
||||
integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==
|
||||
|
||||
nanoid@^3.1.23:
|
||||
version "3.1.25"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.25.tgz#09ca32747c0e543f0e1814b7d3793477f9c8e152"
|
||||
@ -3445,6 +3450,13 @@ neo-async@^2.6.2:
|
||||
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
|
||||
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
|
||||
|
||||
next-export-i18n@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/next-export-i18n/-/next-export-i18n-1.2.1.tgz#06f7653134e1cce89dbeabdb9355c46b2337eeca"
|
||||
integrity sha512-ra7TelbYaDbwTetABLIeT09SXmWoymetMgmJhwsiJ4VNh26pkjLmtvKU+5plyYrkSSgDb7RhtXLFfgNTcrbgCg==
|
||||
dependencies:
|
||||
mustache "^4.2.0"
|
||||
|
||||
next-seo@^4.28.1:
|
||||
version "4.28.1"
|
||||
resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-4.28.1.tgz#c98ee559c8ab7196c62d0f6903afd7a8cde47a03"
|
||||
@ -3455,10 +3467,10 @@ next-themes@^0.0.15:
|
||||
resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.0.15.tgz#ab0cee69cd763b77d41211f631e108beab39bf7d"
|
||||
integrity sha512-LTmtqYi03c4gMTJmWwVK9XkHL7h0/+XrtR970Ujvtu3s0kZNeJN24aJsi4rkZOI8i19+qq6f8j+8Duwy5jqcrQ==
|
||||
|
||||
next-translate@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/next-translate/-/next-translate-1.1.0.tgz#a5a041a1e83ab5bb5b9afe8a305c0bb5ebbe9d7a"
|
||||
integrity sha512-2fTgGJgHvOEKlxuyibchvKAo5uQy7BA2GAcC21LUaUxBDyLqZUKqOJDvdow75jsy3S1preR3zymzx8Is8fenbw==
|
||||
next-translate@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/next-translate/-/next-translate-1.2.0.tgz#e178b4c93fce7c8b78b3fa5cbb112f75fa631188"
|
||||
integrity sha512-L15JCfvj6BhQfx7i3nsJReUF7wrHe1RlzK7h25QlBT40prGQLZ5nJ6gx9Vd3Ew0V9QMqaVELUeQQ1u51yyDu0Q==
|
||||
|
||||
next@^11.1.3:
|
||||
version "11.1.3"
|
||||
|
Loading…
Reference in New Issue
Block a user