Files
yongyuancv.cn/pages/_app.js
2022-04-30 01:57:37 +08:00

110 lines
2.4 KiB
JavaScript

import Link from "next/link";
import Head from "next/head";
import Image from "next/image";
import styles from "../styles/Home.module.css";
import Background from "../components/Background";
import beiantubaioImage from "../public/images/beiantubiao.webp";
import {
Box,
Container,
Typography,
AppBar,
Toolbar,
ThemeProvider,
createTheme,
CssBaseline,
} from "@mui/material";
const theme = createTheme({
palette: {
primary: {
main: "#39ceff",
},
secondary: {
main: "#f50057",
},
},
});
function MyApp({ Component, pageProps }) {
return (
<ThemeProvider theme={theme}>
<Background />
<Container
sx={{
p: 3,
}}
>
<Head>
<title>前端技术分享</title>
<meta name="description" content="乐" />
<link rel="icon" href="/favicon.ico" />
<CssBaseline />
</Head>
<AppBar position="relative">
<Toolbar>
<Link
passHref
href="/"
style={{
textDecoration: "none",
}}
>
<Typography variant="h6">前端技术分享</Typography>
</Link>
</Toolbar>
</AppBar>
<main
style={{
minHeight: "100vh",
paddingTop: "2rem",
}}
>
<Component {...pageProps} />
</main>
<hr />
<footer
style={{
display: "flex",
justifyContent: "space-evenly",
}}
>
<Link
href="https://beian.miit.gov.cn/"
target="_blank"
rel="noopener noreferrer"
passHref
>
<Typography variant="body1">粤ICP备2022033906号-1</Typography>
</Link>
<Link
target="_blank"
href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44049102496865"
rel="noopener noreferrer"
passHref
>
<div>
<Image
alt="公安图标"
src={beiantubaioImage}
height={16}
width={16}
/>
<span>粤公网安备 44049102496865</span>
</div>
</Link>
<Typography variant="body1">使用 Next.js 构建</Typography>
</footer>
</Container>
</ThemeProvider>
);
}
export default MyApp;