Compare commits

..

2 Commits

5 changed files with 33 additions and 12 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

+2 -6
View File
@@ -1,7 +1,7 @@
import Link from "next/link"; import Link from "next/link";
import styles from "./footer.module.scss"; import styles from "./footer.module.scss";
import { NeonChillPig } from "../general/pigs/fun/NeonChillPig"; import { NeonChillPig } from "../general/pigs/fun/NeonChillPig";
import { ToTop } from "./ToTop"; import { PigPattern } from "./PigPattern";
import { Icon } from "../general/Icon"; import { Icon } from "../general/Icon";
import { import {
getOpeningHours, getOpeningHours,
@@ -145,11 +145,7 @@ export const Footer = () => {
<NeonChillPig /> <NeonChillPig />
</div> </div>
</footer> </footer>
<div className={styles.pigPattern}> <PigPattern />
<div className={styles.toTop}>
<ToTop />
</div>
</div>
</> </>
); );
}; };
+22
View File
@@ -0,0 +1,22 @@
"use client";
import { useInView } from "react-intersection-observer";
import styles from "./footer.module.scss";
import { ToTop } from "./ToTop";
export const PigPattern = () => {
const { ref, inView } = useInView({
triggerOnce: true,
rootMargin: "1000px",
});
return (
<div
ref={ref}
className={`${styles.pigPattern} ${inView ? styles.loaded : ""}`}
>
<div className={styles.toTop}>
<ToTop />
</div>
</div>
);
};
+4 -1
View File
@@ -101,7 +101,6 @@
.pigPattern { .pigPattern {
background-color: var(--color-background); background-color: var(--color-background);
background-image: url("/assets/graphics/grisemonster-800.png");
background-size: 100% auto; background-size: 100% auto;
background-position: 0 100%; background-position: 0 100%;
background-attachment: fixed; background-attachment: fixed;
@@ -111,6 +110,9 @@
position: relative; position: relative;
z-index: 700; z-index: 700;
&.loaded {
background-image: url("/assets/graphics/grisemonster-800.png");
@media (min-width: 601px) { @media (min-width: 601px) {
background-image: url("/assets/graphics/grisemonster-1280.png"); background-image: url("/assets/graphics/grisemonster-1280.png");
} }
@@ -118,6 +120,7 @@
@media (min-width: 1281px) { @media (min-width: 1281px) {
background-image: url("/assets/graphics/grisemonster-2048.png"); background-image: url("/assets/graphics/grisemonster-2048.png");
} }
}
@media (orientation: landscape) { @media (orientation: landscape) {
background-size: 100% auto; background-size: 100% auto;