mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-23 12:40:11 +09:00
Compare commits
No commits in common. "d1f0180c130acda2d769e22be313eedff4f4d26a" and "1131a1f9dc4453fb7a3d63eeaa06847da0f3e543" have entirely different histories.
d1f0180c13
...
1131a1f9dc
@ -13,23 +13,17 @@ const Layout = (props) => {
|
|||||||
const { locale, locales, defaultLocale, pathname } = router
|
const { locale, locales, defaultLocale, pathname } = router
|
||||||
|
|
||||||
const [isMounted, setIsMounted] = useState(false);
|
const [isMounted, setIsMounted] = useState(false);
|
||||||
const { theme, setTheme, getTheme } = useTheme();
|
const { theme, setTheme } = useTheme();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setIsMounted(true);
|
setIsMounted(true);
|
||||||
}, []);
|
}, []);
|
||||||
const switchTheme = () => {
|
const switchTheme = () => {
|
||||||
if (isMounted) {
|
if (isMounted) {
|
||||||
setTheme(theme === "light" ? "dark" : "light");
|
setTheme(theme === "light" ? "dark" : "light");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<button className="my-4 mx-3 text-2xl" onClick={switchTheme}>
|
<button className="my-4 mx-3 text-2xl" onClick={switchTheme}>🌙</button>
|
||||||
{theme === 'light' ? (
|
|
||||||
<span>🌙</span>
|
|
||||||
) : (
|
|
||||||
<span>🌄</span>
|
|
||||||
)}
|
|
||||||
</button>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default Layout
|
export default Layout
|
@ -40,7 +40,7 @@ export default function About(props) {
|
|||||||
<div className="flex-1"><p className="font-bold">OS </p>Arch Linux</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">{location} </p>{hiroshima}</div>
|
||||||
</div>
|
</div>
|
||||||
<iframe src="https://mackerel.io/embed/public/embed/heHnGhDanoIDlf7jjxUe9yPVrsG3deeH5ptD8suErrq5w46crWEIYdLfzLoukzfF?period=24h" height="400" className="w-2/3" frameBorder="0"></iframe>
|
<iframe src="https://mackerel.io/embed/public/embed/heHnGhDanoIDlf7jjxUe9yPVrsG3deeH5ptD8suErrq5w46crWEIYdLfzLoukzfF?period=24h" height="400" className="w-2/3" frameborder="0"></iframe>
|
||||||
|
|
||||||
{
|
{
|
||||||
// raspberry Datadog
|
// raspberry Datadog
|
||||||
@ -52,7 +52,7 @@ export default function About(props) {
|
|||||||
<div className="flex-1"><p className="font-bold">OS </p>Raspbian GNU/Linux 10 (buster)</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">{location} </p>{tottori}</div>
|
||||||
</div>
|
</div>
|
||||||
<iframe src="https://mackerel.io/embed/public/embed/5HVbQiwuxrMithyrGjmmQCCOVgJ6Ptf94SDA2qWSTsh2rtz7pjePihYzaW5QEml4?period=24h" height="400" className="w-2/3" frameBorder="0"></iframe>
|
<iframe src="https://mackerel.io/embed/public/embed/5HVbQiwuxrMithyrGjmmQCCOVgJ6Ptf94SDA2qWSTsh2rtz7pjePihYzaW5QEml4?period=24h" height="400" className="w-2/3" frameborder="0"></iframe>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user