Files
yongyuancv.cn/pages/_app.js
2022-04-06 03:17:50 +08:00

88 lines
1.8 KiB
JavaScript

import Link from "next/link";
import Head from "next/head";
import styles from "../styles/Home.module.css";
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}>
<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>
<Typography variant="body1">使用 Next.js 构建</Typography>
</footer>
</Container>
</ThemeProvider>
);
}
export default MyApp;