0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-06-09 23:36:01 +09:00
This commit is contained in:
yude 2021-12-11 18:17:20 +09:00
parent d9559dd072
commit a72a778a03
Signed by: yude
GPG Key ID: EB0FE5D925C4A968
5 changed files with 24 additions and 7 deletions

View File

@ -10,7 +10,7 @@
"mutual": "Mutual links", "mutual": "Mutual links",
"status": "Service Status", "status": "Service Status",
"icon_1": "Icon: ", "icon_1": "Icon: ",
"icon_2": "", "icon_2": " ",
"post_list": "Posts listing", "post_list": "Posts listing",
"hcunews": "About @hcunews", "hcunews": "About @hcunews",
"house": "yude's house", "house": "yude's house",

View File

@ -1,9 +1,15 @@
// Tailwind CSS
import "tailwindcss/tailwind.css"; import "tailwindcss/tailwind.css";
// Next.js
import Link from 'next/link'; import Link from 'next/link';
// i18n // i18n
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n'; import { useTranslation, useLanguageQuery } from 'next-export-i18n';
export default function Footer(props) { export default function Footer(props) {
const { t } = useTranslation();
const [query] = useLanguageQuery();
return ( return (
<> <>
<div className="container mx-auto px-6"> <div className="container mx-auto px-6">

View File

@ -1,9 +1,20 @@
// Tailwind CSS
import "tailwindcss/tailwind.css"; import "tailwindcss/tailwind.css";
// Next.js
import Link from 'next/link'; import Link from 'next/link';
// Components
import LangSelector from "./LangSelector" import LangSelector from "./LangSelector"
import ThemeSelector from "./ThemeSelector" import ThemeSelector from "./ThemeSelector"
// i18n
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
const Navbar = () => { const Navbar = () => {
const { t } = useTranslation();
const [query] = useLanguageQuery();
return ( return (
<> <>
<nav className='flex items-center flex-wrap p-3'> <nav className='flex items-center flex-wrap p-3'>

View File

@ -3,8 +3,6 @@ import Layout from "./components/Layout"
// i18n // i18n
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n'; import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n';
const { t } = useTranslation();
const [query] = useLanguageQuery();
// React // React
import React from "react" import React from "react"
@ -16,7 +14,8 @@ import ja from '../docs/hcunews/ja.md'
import en from '../docs/hcunews/en.md' import en from '../docs/hcunews/en.md'
export default function HcuNews() { export default function HcuNews() {
const { t, lang } = useTranslation("hcunews") const { t } = useTranslation();
const [query] = useLanguageQuery();
return( return(
<Layout title={t('hcunews')}> <Layout title={t('hcunews')}>

View File

@ -13,7 +13,7 @@ import Image from 'next/image'
import Link from 'next/link' import Link from 'next/link'
// i18n // i18n
import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n'; import { useTranslation, useLanguageQuery } from 'next-export-i18n';
// React Router // React Router
import { useRouter } from 'next/router' import { useRouter } from 'next/router'
@ -26,6 +26,7 @@ import { faBook, faUser, faServer, faHouseUser, faHeart } from '@fortawesome/fre
export default function Index(props) { export default function Index(props) {
const { t } = useTranslation(); const { t } = useTranslation();
const [query] = useLanguageQuery(); const [query] = useLanguageQuery();
return ( return (
<> <>
<Layout title={t('home')}> <Layout title={t('home')}>
@ -60,7 +61,7 @@ export default function Index(props) {
</div> </div>
{/* Avatar by */} {/* Avatar by */}
<p className="mt-3 text-sm font-bold text-gray-900 dark:text-gray-400">{t('common:icon_1')}<Link href="https://twitter.com/R_I_R_U_"><a className="hover:underline">梨留りる {t('common: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/R_I_R_U_"><a className="hover:underline">梨留りる {t('icon_2')}</a></Link></p>
</div> </div>
</Layout> </Layout>
</> </>