From 2ccc9a5dcd85b616ed006ec88173ecc56e12c20e Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Mon, 25 Nov 2024 18:24:08 -0800 Subject: Revert "Blurry load" This reverts commit fab698d676d43a46b0fd5df592915ca12111dbcb. --- client/public/EngagmentSession_06.23.2024-131.jpg | Bin 0 -> 2188838 bytes client/public/EngagmentSession_06.23.2024-161.jpg | Bin 0 -> 3150499 bytes client/public/EngagmentSession_06.23.2024-164.jpg | Bin 0 -> 3437736 bytes client/public/EngagmentSession_06.23.2024-259.jpg | Bin 0 -> 1643595 bytes client/public/EngagmentSession_06.23.2024-267.jpg | Bin 0 -> 1699370 bytes client/public/EngagmentSession_06.23.2024-284.jpg | Bin 0 -> 3429096 bytes client/public/divine-shepherd.jpg | Bin 0 -> 202918 bytes client/public/full/divine-shepherd.jpg | Bin 202918 -> 0 bytes client/public/full/engagement1.jpg | Bin 2188838 -> 0 bytes client/public/full/engagement2.jpg | Bin 3150499 -> 0 bytes client/public/full/engagement3.jpg | Bin 3437736 -> 0 bytes client/public/full/engagement4.jpg | Bin 1643595 -> 0 bytes client/public/full/engagement5.jpg | Bin 1699370 -> 0 bytes client/public/full/engagement6.jpg | Bin 3429096 -> 0 bytes client/public/small/divine-shepherd.webp | Bin 87202 -> 0 bytes client/public/small/engagement1.webp | Bin 443490 -> 0 bytes client/public/small/engagement2.webp | Bin 988522 -> 0 bytes client/public/small/engagement3.webp | Bin 1035762 -> 0 bytes client/public/small/engagement4.webp | Bin 400510 -> 0 bytes client/public/small/engagement5.webp | Bin 423440 -> 0 bytes client/public/small/engagement6.webp | Bin 1047326 -> 0 bytes client/src/blurry-load.css | 8 ----- client/src/components/AdminLogin.tsx | 2 +- client/src/components/BlurryLoadImg.tsx | 15 --------- client/src/components/Home.tsx | 28 +++++++--------- client/src/components/Schedule.tsx | 6 ++-- client/src/useBlurryLoad.ts | 38 ---------------------- 27 files changed, 14 insertions(+), 83 deletions(-) create mode 100644 client/public/EngagmentSession_06.23.2024-131.jpg create mode 100644 client/public/EngagmentSession_06.23.2024-161.jpg create mode 100644 client/public/EngagmentSession_06.23.2024-164.jpg create mode 100644 client/public/EngagmentSession_06.23.2024-259.jpg create mode 100644 client/public/EngagmentSession_06.23.2024-267.jpg create mode 100644 client/public/EngagmentSession_06.23.2024-284.jpg create mode 100644 client/public/divine-shepherd.jpg delete mode 100644 client/public/full/divine-shepherd.jpg delete mode 100644 client/public/full/engagement1.jpg delete mode 100644 client/public/full/engagement2.jpg delete mode 100644 client/public/full/engagement3.jpg delete mode 100644 client/public/full/engagement4.jpg delete mode 100644 client/public/full/engagement5.jpg delete mode 100644 client/public/full/engagement6.jpg delete mode 100644 client/public/small/divine-shepherd.webp delete mode 100644 client/public/small/engagement1.webp delete mode 100644 client/public/small/engagement2.webp delete mode 100644 client/public/small/engagement3.webp delete mode 100644 client/public/small/engagement4.webp delete mode 100644 client/public/small/engagement5.webp delete mode 100644 client/public/small/engagement6.webp delete mode 100644 client/src/blurry-load.css delete mode 100644 client/src/components/BlurryLoadImg.tsx delete mode 100644 client/src/useBlurryLoad.ts (limited to 'client') diff --git a/client/public/EngagmentSession_06.23.2024-131.jpg b/client/public/EngagmentSession_06.23.2024-131.jpg new file mode 100644 index 0000000..0657a40 Binary files /dev/null and b/client/public/EngagmentSession_06.23.2024-131.jpg differ diff --git a/client/public/EngagmentSession_06.23.2024-161.jpg b/client/public/EngagmentSession_06.23.2024-161.jpg new file mode 100644 index 0000000..92b5be5 Binary files /dev/null and b/client/public/EngagmentSession_06.23.2024-161.jpg differ diff --git a/client/public/EngagmentSession_06.23.2024-164.jpg b/client/public/EngagmentSession_06.23.2024-164.jpg new file mode 100644 index 0000000..529a324 Binary files /dev/null and b/client/public/EngagmentSession_06.23.2024-164.jpg differ diff --git a/client/public/EngagmentSession_06.23.2024-259.jpg b/client/public/EngagmentSession_06.23.2024-259.jpg new file mode 100644 index 0000000..075480c Binary files /dev/null and b/client/public/EngagmentSession_06.23.2024-259.jpg differ diff --git a/client/public/EngagmentSession_06.23.2024-267.jpg b/client/public/EngagmentSession_06.23.2024-267.jpg new file mode 100644 index 0000000..7222c16 Binary files /dev/null and b/client/public/EngagmentSession_06.23.2024-267.jpg differ diff --git a/client/public/EngagmentSession_06.23.2024-284.jpg b/client/public/EngagmentSession_06.23.2024-284.jpg new file mode 100644 index 0000000..2f06a42 Binary files /dev/null and b/client/public/EngagmentSession_06.23.2024-284.jpg differ diff --git a/client/public/divine-shepherd.jpg b/client/public/divine-shepherd.jpg new file mode 100644 index 0000000..c89749e Binary files /dev/null and b/client/public/divine-shepherd.jpg differ diff --git a/client/public/full/divine-shepherd.jpg b/client/public/full/divine-shepherd.jpg deleted file mode 100644 index c89749e..0000000 Binary files a/client/public/full/divine-shepherd.jpg and /dev/null differ diff --git a/client/public/full/engagement1.jpg b/client/public/full/engagement1.jpg deleted file mode 100644 index 0657a40..0000000 Binary files a/client/public/full/engagement1.jpg and /dev/null differ diff --git a/client/public/full/engagement2.jpg b/client/public/full/engagement2.jpg deleted file mode 100644 index 92b5be5..0000000 Binary files a/client/public/full/engagement2.jpg and /dev/null differ diff --git a/client/public/full/engagement3.jpg b/client/public/full/engagement3.jpg deleted file mode 100644 index 529a324..0000000 Binary files a/client/public/full/engagement3.jpg and /dev/null differ diff --git a/client/public/full/engagement4.jpg b/client/public/full/engagement4.jpg deleted file mode 100644 index 075480c..0000000 Binary files a/client/public/full/engagement4.jpg and /dev/null differ diff --git a/client/public/full/engagement5.jpg b/client/public/full/engagement5.jpg deleted file mode 100644 index 7222c16..0000000 Binary files a/client/public/full/engagement5.jpg and /dev/null differ diff --git a/client/public/full/engagement6.jpg b/client/public/full/engagement6.jpg deleted file mode 100644 index 2f06a42..0000000 Binary files a/client/public/full/engagement6.jpg and /dev/null differ diff --git a/client/public/small/divine-shepherd.webp b/client/public/small/divine-shepherd.webp deleted file mode 100644 index 14a82df..0000000 Binary files a/client/public/small/divine-shepherd.webp and /dev/null differ diff --git a/client/public/small/engagement1.webp b/client/public/small/engagement1.webp deleted file mode 100644 index b8ce0f1..0000000 Binary files a/client/public/small/engagement1.webp and /dev/null differ diff --git a/client/public/small/engagement2.webp b/client/public/small/engagement2.webp deleted file mode 100644 index 2c8b01a..0000000 Binary files a/client/public/small/engagement2.webp and /dev/null differ diff --git a/client/public/small/engagement3.webp b/client/public/small/engagement3.webp deleted file mode 100644 index 84e8adc..0000000 Binary files a/client/public/small/engagement3.webp and /dev/null differ diff --git a/client/public/small/engagement4.webp b/client/public/small/engagement4.webp deleted file mode 100644 index 6098083..0000000 Binary files a/client/public/small/engagement4.webp and /dev/null differ diff --git a/client/public/small/engagement5.webp b/client/public/small/engagement5.webp deleted file mode 100644 index b9faf7e..0000000 Binary files a/client/public/small/engagement5.webp and /dev/null differ diff --git a/client/public/small/engagement6.webp b/client/public/small/engagement6.webp deleted file mode 100644 index 3e85e1f..0000000 Binary files a/client/public/small/engagement6.webp and /dev/null differ diff --git a/client/src/blurry-load.css b/client/src/blurry-load.css deleted file mode 100644 index df1dd09..0000000 --- a/client/src/blurry-load.css +++ /dev/null @@ -1,8 +0,0 @@ -.blurry-load { - filter: blur(6px); - transition: all .6s ease-in; -} - -.blur-out { - filter: none!important -} \ No newline at end of file diff --git a/client/src/components/AdminLogin.tsx b/client/src/components/AdminLogin.tsx index 4d722e8..f1f676f 100644 --- a/client/src/components/AdminLogin.tsx +++ b/client/src/components/AdminLogin.tsx @@ -107,7 +107,7 @@ function GuestLogin() { endAdornment: ( - {showPassword ? : } + {showPassword ? : } ), diff --git a/client/src/components/BlurryLoadImg.tsx b/client/src/components/BlurryLoadImg.tsx deleted file mode 100644 index c28aa45..0000000 --- a/client/src/components/BlurryLoadImg.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import { ClassAttributes, ImgHTMLAttributes } from 'react'; -import { JSX } from 'react/jsx-runtime'; -import { useBlurryLoad } from '../useBlurryLoad.ts'; - -export const BlurryLoadImg = ( - props: JSX.IntrinsicAttributes & - ClassAttributes & - ImgHTMLAttributes & { 'data-large': string } -) => { - useBlurryLoad(); - return ( - - ); -}; diff --git a/client/src/components/Home.tsx b/client/src/components/Home.tsx index 79743a5..f735195 100644 --- a/client/src/components/Home.tsx +++ b/client/src/components/Home.tsx @@ -1,33 +1,30 @@ import React from 'react'; import { useEffect, useState } from 'react'; import './Carousel.css'; -import { BlurryLoadImg } from './BlurryLoadImg'; - -const images = [ - { small: '/small/engagement1.webp', full: '/full/engagement1.jpg' }, - { small: '/small/engagement2.webp', full: '/full/engagement2.jpg' }, - { small: '/small/engagement3.webp', full: '/full/engagement3.jpg' }, - { small: '/small/engagement4.webp', full: '/full/engagement4.jpg' }, - { small: '/small/engagement5.webp', full: '/full/engagement5.jpg' }, - { small: '/small/engagement6.webp', full: '/full/engagement6.jpg' }, -]; +import p0 from '/EngagmentSession_06.23.2024-131.jpg'; +import p1 from '/EngagmentSession_06.23.2024-161.jpg'; +import p2 from '/EngagmentSession_06.23.2024-164.jpg'; +import p3 from '/EngagmentSession_06.23.2024-259.jpg'; +import p4 from '/EngagmentSession_06.23.2024-267.jpg'; +import p5 from '/EngagmentSession_06.23.2024-284.jpg'; function Home() { const [currentIndex, setIndex] = useState(0); + const photos = [p0, p1, p2, p3, p4, p5]; useEffect(() => { const interval = setInterval(() => { setIndex((prevIndex) => - prevIndex === images.length - 1 ? 0 : prevIndex + 1 + prevIndex === photos.length - 1 ? 0 : prevIndex + 1 ); }, 3000); return () => clearInterval(interval); - }, [images.length]); + }, [photos.length]); return (
- {images.map((image, index) => ( + {photos.map((photo, index) => (
- +
))}
diff --git a/client/src/components/Schedule.tsx b/client/src/components/Schedule.tsx index fc1fb64..64140e4 100644 --- a/client/src/components/Schedule.tsx +++ b/client/src/components/Schedule.tsx @@ -6,6 +6,7 @@ import { useMediaQuery, useTheme, } from '@mui/material'; +import divineShepherd from '/divine-shepherd.jpg'; import InsertInvitationIcon from '@mui/icons-material/InsertInvitation'; import { useAppDispatch } from '../hooks'; import { showDialog } from '../slices/uiSlice'; @@ -26,12 +27,9 @@ function Schedule() { display: 'flex', justifyContent: 'center', alignItems: 'center', - backgroundImage: `url(${ - isMobile ? 'none' : '/small/divine-shepherd.webp' - })`, + backgroundImage: `url(${isMobile ? 'none' : divineShepherd})`, backgroundSize: 'cover', }} - data-large="/full/divine-shepherd.jpg" > { - const { toBlurImages = [] } = props ?? {}; - - useEffect(() => { - const images: Element[] = [...toBlurImages]; - if (toBlurImages.length === 0) { - images.push(...document.querySelectorAll('.blurry-load')); - } - - const lazyImageObserver = new IntersectionObserver(function (entries) { - entries.forEach(function (entry) { - if (!entry.isIntersecting) return; - - const image = entry.target; - const currentImage = new Image(); - currentImage.setAttribute( - 'src', - image.getAttribute('data-large') ?? '' - ); - - currentImage.onload = () => { - image.setAttribute('src', currentImage.src); - image.classList.add('blur-out'); - }; - lazyImageObserver.unobserve(image); - }); - }); - - images.forEach((img) => lazyImageObserver.observe(img)); - }, [toBlurImages]); -}; -- cgit v1.2.3