Add: background

This commit is contained in:
2022-04-06 10:35:13 +08:00
parent 9907163234
commit c9b7f9024c
4 changed files with 24 additions and 0 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
public/SprbScan021.png.webp filter=lfs diff=lfs merge=lfs -text

18
components/Background.js Normal file
View File

@@ -0,0 +1,18 @@
import Image from "next/image";
import bgImage from "../public/SprbScan021.png.webp";
export default function Background() {
return (
<div
style={{
position: "fixed",
height: "100vh",
width: "100vw",
overflow: "hidden",
zIndex: "-1",
}}
>
<Image src={bgImage} alt="background" layout="fill" objectFit="cover" />
</div>
);
}

View File

@@ -1,6 +1,7 @@
import Link from "next/link";
import Head from "next/head";
import styles from "../styles/Home.module.css";
import Background from "../components/Background";
import {
Box,
@@ -27,6 +28,7 @@ const theme = createTheme({
function MyApp({ Component, pageProps }) {
return (
<ThemeProvider theme={theme}>
<Background />
<Container
sx={{
p: 3,

BIN
public/SprbScan021.png.webp (Stored with Git LFS) Normal file

Binary file not shown.