mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-30 11:45:21 -04:00
re-add <meta name="theme-color" ...> tag
This commit is contained in:
+19
-9
@@ -1,16 +1,26 @@
|
|||||||
|
import Head from "next/head";
|
||||||
|
import { useTheme } from "next-themes";
|
||||||
import Header from "./page-header/Header";
|
import Header from "./page-header/Header";
|
||||||
import Footer from "./page-footer/Footer";
|
import Footer from "./page-footer/Footer";
|
||||||
|
|
||||||
import styles from "./Layout.module.css";
|
import styles from "./Layout.module.css";
|
||||||
|
|
||||||
const Layout = ({ children }) => (
|
const Layout = ({ children }) => {
|
||||||
<>
|
const { resolvedTheme } = useTheme();
|
||||||
<Header />
|
|
||||||
<main className={styles.main}>
|
return (
|
||||||
<div className={styles.container}>{children}</div>
|
<>
|
||||||
</main>
|
<Head>
|
||||||
<Footer />
|
<meta name="theme-color" content={resolvedTheme === "dark" ? "#252525" : "#fcfcfc"} />
|
||||||
</>
|
</Head>
|
||||||
);
|
|
||||||
|
<Header />
|
||||||
|
<main className={styles.main}>
|
||||||
|
<div className={styles.container}>{children}</div>
|
||||||
|
</main>
|
||||||
|
<Footer />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default Layout;
|
export default Layout;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { memo } from "react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { HeartIcon, NextjsIcon } from "../icons";
|
import { HeartIcon, NextjsIcon } from "../icons";
|
||||||
import * as config from "../../lib/config";
|
import * as config from "../../lib/config";
|
||||||
@@ -48,4 +49,4 @@ const Footer = () => (
|
|||||||
</footer>
|
</footer>
|
||||||
);
|
);
|
||||||
|
|
||||||
export default Footer;
|
export default memo(Footer);
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { memo } from "react";
|
||||||
import Name from "./Name";
|
import Name from "./Name";
|
||||||
import Menu from "./Menu";
|
import Menu from "./Menu";
|
||||||
|
|
||||||
@@ -12,4 +13,4 @@ const Header = () => (
|
|||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
|
|
||||||
export default Header;
|
export default memo(Header);
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { memo } from "react";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
import { BulbOffIcon, BulbOnIcon } from "../icons";
|
import { BulbOffIcon, BulbOnIcon } from "../icons";
|
||||||
|
|
||||||
@@ -25,4 +26,4 @@ const ThemeToggle = ({ className = "" }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ThemeToggle;
|
export default memo(ThemeToggle);
|
||||||
|
|||||||
Reference in New Issue
Block a user