mirror of
https://github.com/yudejp/yude.jp.git
synced 2025-05-12 23:18:41 +00:00
Merge Keys and Links into Identifier tab
This commit is contained in:
parent
fad638d05a
commit
f4291f6dc0
@ -8,7 +8,7 @@ import LanguageMenu from "./components/LanguageMenu"
|
|||||||
import ContentRenderer from "./components/ContentRenderer"
|
import ContentRenderer from "./components/ContentRenderer"
|
||||||
import Footer from "./components/Footer"
|
import Footer from "./components/Footer"
|
||||||
import { ThemeProvider, ThemeSwitcher } from "./components/Theme"
|
import { ThemeProvider, ThemeSwitcher } from "./components/Theme"
|
||||||
|
import Weather from "./components/Weather"
|
||||||
|
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { useRecoilState } from 'recoil'
|
import { useRecoilState } from 'recoil'
|
||||||
|
|
||||||
import Profile from "./Profile"
|
import Profile from "./Profile"
|
||||||
import Links from "./Links"
|
import Identifier from "./Identifier"
|
||||||
import Keys from "./Keys"
|
|
||||||
import Spotify from "./Spotify"
|
import Spotify from "./Spotify"
|
||||||
import Services from "./Services"
|
import Services from "./Services"
|
||||||
import Chat from "./Chat"
|
import Chat from "./Chat"
|
||||||
@ -14,8 +13,7 @@ export default function ContentRenderer() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{page === Pages.Profile && <><Profile /><Spotify /></>}
|
{page === Pages.Profile && <><Profile /><Spotify /></>}
|
||||||
{ page === Pages.Links && <Links /> }
|
{page === Pages.Identifier && <Identifier />}
|
||||||
{ page === Pages.Keys && <Keys /> }
|
|
||||||
{page === Pages.Services && <Services />}
|
{page === Pages.Services && <Services />}
|
||||||
{page === Pages.Chat && <Chat />}
|
{page === Pages.Chat && <Chat />}
|
||||||
</>
|
</>
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
|
import Weather from "./Weather"
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
return (
|
return (
|
||||||
<div className="text-center text-gray-500 mb-5">
|
<div className="text-center text-gray-500 mb-5">
|
||||||
<img alt="yude.jp banner" src="./banner_new.png" className="h-12 inline" />
|
<img alt="yude.jp banner" src="./banner_new.png" className="h-12 inline" />
|
||||||
<img alt="happybusy" src="./busy_banner.webp" className="h-12 inline" />
|
<img alt="happybusy" src="./busy_banner.webp" className="h-12 inline" />
|
||||||
<img alt="Page view counter" src="https://moe-counter-cf.yude.workers.dev/yude.jp:home" className="h-20 mx-auto" />
|
<img alt="Page view counter" src="https://moe-counter-cf.yude.workers.dev/yude.jp:home" className="h-20 mx-auto" />
|
||||||
|
<div>
|
||||||
|
<Weather />
|
||||||
|
</div>
|
||||||
<p className="mt-5">
|
<p className="mt-5">
|
||||||
<a href="https://github.com/yudejp/yude.jp">
|
<a href="https://github.com/yudejp/yude.jp">
|
||||||
© 2024 yude
|
© 2024 yude
|
||||||
@ -12,4 +17,3 @@ export default function Footer() {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
import { faUser, faStar, faComments } from '@fortawesome/free-regular-svg-icons'
|
import { faUser, faStar, faComments } from '@fortawesome/free-regular-svg-icons'
|
||||||
import { faLink, faKey } from '@fortawesome/free-solid-svg-icons'
|
import { faPassport } from "@fortawesome/free-solid-svg-icons"
|
||||||
import { Pages } from "./VerticalMenu"
|
import { Pages } from "./VerticalMenu"
|
||||||
|
|
||||||
import { RecoilRoot, atom, useRecoilState } from 'recoil'
|
import { RecoilRoot, atom, useRecoilState } from 'recoil'
|
||||||
@ -24,16 +24,10 @@ export default function HorizontalMenu() {
|
|||||||
<FontAwesomeIcon icon={faUser} />{" "}
|
<FontAwesomeIcon icon={faUser} />{" "}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={`self-start py-3 rounded-lg${page === Pages.Links ? activeColor : ""}`}
|
className={`self-start py-3 rounded-lg${page === Pages.Identifier ? activeColor : ""}`}
|
||||||
onClick={() => {setPage(Pages.Links)}}
|
onClick={() => { setPage(Pages.Identifier) }}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faLink} />{" "}
|
<FontAwesomeIcon icon={faPassport} />{" "}
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={`self-start py-3 rounded-lg${page === Pages.Keys ? activeColor : ""}`}
|
|
||||||
onClick={() => {setPage(Pages.Keys)}}
|
|
||||||
>
|
|
||||||
<FontAwesomeIcon icon={faKey} />{" "}
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={`self-start py-3 rounded-lg${page === Pages.Services ? activeColor : ""}`}
|
className={`self-start py-3 rounded-lg${page === Pages.Services ? activeColor : ""}`}
|
||||||
@ -51,4 +45,3 @@ export default function HorizontalMenu() {
|
|||||||
</RecoilRoot>
|
</RecoilRoot>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
18
src/components/Identifier.tsx
Normal file
18
src/components/Identifier.tsx
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import Links from "./Links"
|
||||||
|
import Keys from "./Keys"
|
||||||
|
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
export default function Identifier() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<p className="text-center mb-5 text-2xl">{t("links")}</p>
|
||||||
|
<Links />
|
||||||
|
|
||||||
|
<p className="text-center mt-10 mb-5 text-2xl">{t("public_keys")}</p>
|
||||||
|
<Keys />
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
@ -24,7 +24,6 @@ export default function Keys() {
|
|||||||
<a className="underline" href="https://github.com/yude.keys">GitHub</a> <FontAwesomeIcon icon={faArrowUpRightFromSquare} />
|
<a className="underline" href="https://github.com/yude.keys">GitHub</a> <FontAwesomeIcon icon={faArrowUpRightFromSquare} />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -148,4 +148,3 @@ export default function Links() {
|
|||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
import { faUser, faStar, faComments } from '@fortawesome/free-regular-svg-icons'
|
import { faUser, faStar, faComments } from '@fortawesome/free-regular-svg-icons'
|
||||||
import { faLink, faKey } from '@fortawesome/free-solid-svg-icons'
|
import { faPassport } from "@fortawesome/free-solid-svg-icons"
|
||||||
|
|
||||||
import { RecoilRoot, atom, useRecoilState } from 'recoil'
|
import { RecoilRoot, atom, useRecoilState } from 'recoil'
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export enum Pages {
|
export enum Pages {
|
||||||
Profile = 0,
|
Profile = 0,
|
||||||
Links = 1,
|
Identifier = 1,
|
||||||
Keys = 2,
|
Activities = 2,
|
||||||
Activities = 3,
|
Spotify = 3,
|
||||||
Spotify = 4,
|
Services = 4,
|
||||||
Services = 5,
|
Chat = 5,
|
||||||
Chat = 6,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const currentPage = atom({
|
export const currentPage = atom({
|
||||||
@ -34,35 +33,28 @@ export default function VerticalMenu() {
|
|||||||
className={`w-full px-4 py-2 rounded-lg${page === Pages.Profile ? activeColor : ""}`}
|
className={`w-full px-4 py-2 rounded-lg${page === Pages.Profile ? activeColor : ""}`}
|
||||||
onClick={() => { setPage(Pages.Profile) }}
|
onClick={() => { setPage(Pages.Profile) }}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faUser} />{" "}
|
<FontAwesomeIcon icon={faUser} className="w-10 h-10" />{" "}
|
||||||
<p>{t("profile")}</p>
|
<p>{t("profile")}</p>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
className={`w-full px-4 py-2 rounded-lg${page === Pages.Links ? activeColor : ""}`}
|
className={`w-full px-4 py-2 rounded-lg${page === Pages.Identifier ? activeColor : ""}`}
|
||||||
onClick={() => { setPage(Pages.Links) }}
|
onClick={() => { setPage(Pages.Identifier) }}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faLink} />{" "}
|
<FontAwesomeIcon icon={faPassport} className="w-10 h-10" />{" "}
|
||||||
<p>{t("links")}</p>
|
<p>{t("identifier")}</p>
|
||||||
</li>
|
|
||||||
<li
|
|
||||||
className={`w-full px-4 py-2 rounded-lg${page === Pages.Keys ? activeColor : ""}`}
|
|
||||||
onClick={() => { setPage(Pages.Keys) }}
|
|
||||||
>
|
|
||||||
<FontAwesomeIcon icon={faKey} />{" "}
|
|
||||||
<p>{t("public_keys")}</p>
|
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
className={`w-full px-4 py-2 rounded-lg${page === Pages.Services ? activeColor : ""}`}
|
className={`w-full px-4 py-2 rounded-lg${page === Pages.Services ? activeColor : ""}`}
|
||||||
onClick={() => { setPage(Pages.Services) }}
|
onClick={() => { setPage(Pages.Services) }}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faStar} />{" "}
|
<FontAwesomeIcon icon={faStar} className="w-10 h-10" />{" "}
|
||||||
<p>{t("services")}</p>
|
<p>{t("services")}</p>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
className={`w-full px-4 py-2 rounded-lg${page === Pages.Chat ? activeColor : ""}`}
|
className={`w-full px-4 py-2 rounded-lg${page === Pages.Chat ? activeColor : ""}`}
|
||||||
onClick={() => { setPage(Pages.Chat) }}
|
onClick={() => { setPage(Pages.Chat) }}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faComments} />{" "}
|
<FontAwesomeIcon icon={faComments} className="w-10 h-10" />{" "}
|
||||||
<p>{t("chat")}</p>
|
<p>{t("chat")}</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
7
src/components/Weather.tsx
Normal file
7
src/components/Weather.tsx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export default function Weather() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="inline-block"><iframe src="https://www.tenki-yoho.com/blogparts/img.php?all,acrweb" width={200} height={200}><a href="https://www.tenki-yoho.com/">天気予報</a></iframe></div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"translation": {
|
"translation": {
|
||||||
"profile": "Profile",
|
"profile": "Profile",
|
||||||
"links": "Links",
|
"links": "Links",
|
||||||
|
"identifier": "Identifier",
|
||||||
"public_keys": "Public keys",
|
"public_keys": "Public keys",
|
||||||
"services": "Services",
|
"services": "Services",
|
||||||
"chat": "Chat",
|
"chat": "Chat",
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"translation": {
|
"translation": {
|
||||||
"profile": "プロフィール",
|
"profile": "プロフィール",
|
||||||
"links": "リンク",
|
"links": "リンク",
|
||||||
|
"identifier": "識別子",
|
||||||
"public_keys": "公開鍵",
|
"public_keys": "公開鍵",
|
||||||
"services": "サービス",
|
"services": "サービス",
|
||||||
"chat": "チャット",
|
"chat": "チャット",
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"translation": {
|
"translation": {
|
||||||
"profile": "关于我",
|
"profile": "关于我",
|
||||||
"links": "超级链接",
|
"links": "超级链接",
|
||||||
|
"identifier": "識別符",
|
||||||
"public_keys": "公钥",
|
"public_keys": "公钥",
|
||||||
"services": "服务",
|
"services": "服务",
|
||||||
"chat": "聊天",
|
"chat": "聊天",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user