Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 337407c771 | |||
| cb9b108526 |
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 |
@@ -1,7 +1,7 @@
|
||||
import Link from "next/link";
|
||||
import styles from "./footer.module.scss";
|
||||
import { NeonChillPig } from "../general/pigs/fun/NeonChillPig";
|
||||
import { ToTop } from "./ToTop";
|
||||
import { PigPattern } from "./PigPattern";
|
||||
import { Icon } from "../general/Icon";
|
||||
import {
|
||||
getOpeningHours,
|
||||
@@ -145,11 +145,7 @@ export const Footer = () => {
|
||||
<NeonChillPig />
|
||||
</div>
|
||||
</footer>
|
||||
<div className={styles.pigPattern}>
|
||||
<div className={styles.toTop}>
|
||||
<ToTop />
|
||||
</div>
|
||||
</div>
|
||||
<PigPattern />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
};
|
||||
@@ -101,7 +101,6 @@
|
||||
|
||||
.pigPattern {
|
||||
background-color: var(--color-background);
|
||||
background-image: url("/assets/graphics/grisemonster-800.png");
|
||||
background-size: 100% auto;
|
||||
background-position: 0 100%;
|
||||
background-attachment: fixed;
|
||||
@@ -111,12 +110,16 @@
|
||||
position: relative;
|
||||
z-index: 700;
|
||||
|
||||
@media (min-width: 601px) {
|
||||
background-image: url("/assets/graphics/grisemonster-1280.png");
|
||||
}
|
||||
&.loaded {
|
||||
background-image: url("/assets/graphics/grisemonster-800.png");
|
||||
|
||||
@media (min-width: 1281px) {
|
||||
background-image: url("/assets/graphics/grisemonster-2048.png");
|
||||
@media (min-width: 601px) {
|
||||
background-image: url("/assets/graphics/grisemonster-1280.png");
|
||||
}
|
||||
|
||||
@media (min-width: 1281px) {
|
||||
background-image: url("/assets/graphics/grisemonster-2048.png");
|
||||
}
|
||||
}
|
||||
|
||||
@media (orientation: landscape) {
|
||||
|
||||
Reference in New Issue
Block a user