diff --git a/app/gallery/#components/AnimatedImage/AnimatedImage.tsx b/app/gallery/#components/AnimatedImage/AnimatedImage.tsx
deleted file mode 100644
index b9fb175..0000000
--- a/app/gallery/#components/AnimatedImage/AnimatedImage.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {m} from 'framer-motion';
-import Image from 'next/image';
-
-/**
- * Props.
- */
-export type LazyImageProps = {
- src: string;
- blurDataURL: string;
-};
-
-const hiddenMask = `repeating-linear-gradient(to right, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 30px,
- rgba(0,0,0,1) 30px, rgba(0,0,0,1) 30px)`;
-const visibleMask = `repeating-linear-gradient(to right, rgba(0,0,0,0) 0px,
- rgba(0,0,0,0) 0px, rgba(0,0,0,1) 0px, rgba(0,0,0,1) 30px)`;
-
-/**
- * @param {LazyImageProps} props Props.
- * @returns React component.
- */
-export default function AnimatedImage({src, blurDataURL}: LazyImageProps) {
- const [isInView, setIsInView] = useState(false);
-
- return (
- setIsInView(true)}
- >
-
-
- );
-}
diff --git a/app/gallery/#constants/config.ts b/app/gallery/#constants/config.ts
deleted file mode 100644
index 3556825..0000000
--- a/app/gallery/#constants/config.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * @file Gallery images configuration.
- */
-
-const config: Array<{fileName: string}> = [
- {fileName: '/0.png'},
- {fileName: '/1.png'},
- {fileName: '/2.png'},
- {fileName: '/3.png'},
- {fileName: '/4.png'},
- {fileName: '/5.png'},
- {fileName: '/6.png'},
- {fileName: '/7.png'},
- {fileName: '/8.png'},
- {fileName: '/9.png'},
- {fileName: '/10.png'},
- {fileName: '/11.png'},
-];
-
-export default config.map(({fileName}) => ({
- src: `/images/${fileName}`,
- blurDataURL: `/images/blured/${fileName}`,
-}));
diff --git a/app/gallery/page.tsx b/app/gallery/page.tsx
index 60b60e9..8051c7c 100644
--- a/app/gallery/page.tsx
+++ b/app/gallery/page.tsx
@@ -1,4 +1,5 @@
import {Metadata} from 'next';
+import Gallery from '@/components/Gallery/Gallery';
export const metadata: Metadata = {
title: 'Gallery',
@@ -11,6 +12,6 @@ export const metadata: Metadata = {
/**
* @returns React component.
*/
-export default function Gallery() {
- return
Gallery
;
+export default function GalleryPage() {
+ return ;
}
diff --git a/app/globals.css b/app/globals.css
index 534d526..ff50fcb 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -31,4 +31,8 @@
.animated-link:focus:after {
width: 100%;
}
+
+ .focus-ring {
+ @apply focus:ring-2 focus:outline-none focus:ring-white;
+ }
}
diff --git a/app/layout.tsx b/app/layout.tsx
index c394b9a..9345126 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -18,6 +18,7 @@ const bodyCn = clsx(
'flex-col',
'min-h-screen',
'bg-[radial-gradient(ellipse_at_top_right,_var(--tw-gradient-stops))] from-black via-alternate to-black',
+ 'bg-fixed',
);
const mainCn = clsx('flex', 'flex-col', 'items-center', 'justify-center', 'p-24');
diff --git a/components/Button/Button.tsx b/components/Button/Button.tsx
index a868437..55fa796 100644
--- a/components/Button/Button.tsx
+++ b/components/Button/Button.tsx
@@ -43,9 +43,7 @@ const baseButtonCn = clsx(
'relative',
'overflow-hidden',
'select-none',
- 'focus:ring-4',
- 'focus:outline-none',
- 'focus:ring-white',
+ 'focus-ring',
);
const buttonDefaultCn = clsx(
diff --git a/components/Gallery/Gallery.tsx b/components/Gallery/Gallery.tsx
new file mode 100644
index 0000000..20e99e2
--- /dev/null
+++ b/components/Gallery/Gallery.tsx
@@ -0,0 +1,52 @@
+'use client';
+
+import {MutableRefObject} from 'react';
+import clsx from 'clsx';
+import {Gallery as PSGallery, Item, GalleryProps} from 'react-photoswipe-gallery';
+import 'photoswipe/dist/photoswipe.css';
+import useNetworkSpeed from '@/lib/shared/useNetworkSpeed';
+import config from './config';
+import GalleryItem from './GalleryItem';
+
+const containerCn = clsx('flex', 'flex-wrap', 'gap-4', 'justify-center');
+
+const photoSwipeOptions: GalleryProps['options'] = {
+ zoom: false,
+ bgOpacity: 0.9,
+};
+
+/**
+ * @returns React component.
+ */
+export default function Gallery() {
+ const [, isFast] = useNetworkSpeed();
+
+ return (
+
+
+ {config.map(({src, lowQualitySrc, dimensions: {width, height}, blurDataURL}) => {
+ const computedSrc = isFast ? src : lowQualitySrc;
+ return (
+ -
+ {({open, ref}) => (
+ }
+ blurDataURL={blurDataURL}
+ src={computedSrc}
+ />
+ )}
+
+ );
+ })}
+
+
+ );
+}
diff --git a/components/Gallery/GalleryItem.tsx b/components/Gallery/GalleryItem.tsx
new file mode 100644
index 0000000..ab66b4a
--- /dev/null
+++ b/components/Gallery/GalleryItem.tsx
@@ -0,0 +1,77 @@
+import {MouseEvent} from 'react';
+import clsx from 'clsx';
+import Image from 'next/image';
+import {forwardRef} from 'react';
+import {useHotkeys} from 'react-hotkeys-hook';
+import AppearInViewport from '../AppearInViewport/AppearInViewport';
+
+/**
+ * Props.
+ */
+type GalleryItemProps = {
+ src: string;
+ blurDataURL: string;
+ open: (e: MouseEvent) => void;
+};
+
+const imgCn = clsx('rounded-md', 'overflow-hidden');
+const overflowCn = clsx(
+ 'cursor-pointer',
+ 'relative',
+ 'after:absolute',
+ 'after:content-[""]',
+ 'after:w-full',
+ 'after:h-full',
+ 'after:top-0',
+ 'after:left-0',
+ 'after:bg-[radial-gradient(circle,_var(--tw-gradient-stops))] from-white to-transparent',
+ 'after:transition-opacity',
+ 'after:duration-300',
+ 'after:ease-out',
+ 'after:opacity-0',
+ 'hover:after:opacity-20',
+ 'transition-transform',
+ 'duration-500',
+ 'ease-out',
+ 'hover:translate-y-1',
+ 'rounded-md',
+ 'focus-ring',
+);
+
+/**
+ * @returns React component.
+ */
+const GalleryItem = forwardRef(function GalleryItem(
+ {open, src, blurDataURL},
+ ref,
+) {
+ const hotkeysRef = useHotkeys(['enter', 'space'], open as any, {
+ preventDefault: true,
+ });
+
+ return (
+
+ {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
+
+
+
+
+ );
+});
+
+export default GalleryItem;
diff --git a/components/Gallery/config.ts b/components/Gallery/config.ts
new file mode 100644
index 0000000..f6492fc
--- /dev/null
+++ b/components/Gallery/config.ts
@@ -0,0 +1,28 @@
+/**
+ * Gallery images configuration.
+ */
+const config = [
+ {fileName: 'gallery.0.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.1.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.2.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.3.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.4.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.5.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.6.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.7.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.8.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.9.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.10.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.11.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.12.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.13.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.14.jpg', dimensions: {width: 920, height: 600}},
+ {fileName: 'gallery.15.jpg', dimensions: {width: 920, height: 600}},
+] as const;
+
+export default config.map(({fileName, dimensions}) => ({
+ dimensions,
+ src: `/images/${fileName}`,
+ blurDataURL: `/images/blured/${fileName}`,
+ lowQualitySrc: `/images/low-quality/${fileName}`,
+}));
diff --git a/components/Loader/Loader.tsx b/components/Loader/Loader.tsx
index 94dbd21..0213ee7 100644
--- a/components/Loader/Loader.tsx
+++ b/components/Loader/Loader.tsx
@@ -1,5 +1,5 @@
/**
- * @file In order to always render loader on the server we don't use framer motion here.
+ * @file In order to render loader on the server we don't use framer motion here.
*/
import clsx from 'clsx';
diff --git a/components/ScrollToTop/ScrollToTop.tsx b/components/ScrollToTop/ScrollToTop.tsx
index 71f23f1..edaa590 100644
--- a/components/ScrollToTop/ScrollToTop.tsx
+++ b/components/ScrollToTop/ScrollToTop.tsx
@@ -5,6 +5,7 @@ import {m} from 'framer-motion';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faCircleArrowUp} from '@fortawesome/free-solid-svg-icons';
import useScroll, {ScrollHandler} from '@/lib/shared/useScroll';
+import isPrefersReducedMotion from '@/utils/isPrefersReducedMotion';
/**
* Props.
@@ -15,8 +16,8 @@ type ScrollToTopButtonProps = {
} & Pick;
const variants = {
- visible: {opacity: 1, x: 0},
- hidden: {opacity: 0, x: '-100%'},
+ visible: {opacity: 1, y: 0},
+ hidden: {opacity: 0, y: '2rem'},
};
/**
@@ -37,14 +38,19 @@ export default function ScrollToTopButton({offset = 1000, ...position}: ScrollTo
return (
scrollToTop()}
+ transition={{duration: 0.5, ease: 'easeOut'}}
+ onClick={() => scrollToTop(!isPrefersReducedMotion())}
aria-hidden={true}
style={position}
>
-
+
);
}
diff --git a/lib/shared/useNetworkSpeed.ts b/lib/shared/useNetworkSpeed.ts
index de2b496..f2ea2bb 100644
--- a/lib/shared/useNetworkSpeed.ts
+++ b/lib/shared/useNetworkSpeed.ts
@@ -1,3 +1,5 @@
+'use client';
+
import {useEffect, useState} from 'react';
import {isServer} from '@/utils/isServer';
diff --git a/package-lock.json b/package-lock.json
index 0fcf699..3e502e6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,11 +22,13 @@
"framer-motion": "^10.12.16",
"lodash": "^4.17.21",
"next": "^13.4.12",
+ "photoswipe": "^5.3.8",
"postcss": "8.4.23",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hotkeys-hook": "^4.4.0",
"react-page-visibility": "^7.0.0",
+ "react-photoswipe-gallery": "^2.2.7",
"tailwind-merge": "^1.13.1",
"tailwindcss": "3.3.2",
"typescript": "5.0.4"
@@ -5604,6 +5606,14 @@
"integrity": "sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA==",
"dev": true
},
+ "node_modules/photoswipe": {
+ "version": "5.3.8",
+ "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.3.8.tgz",
+ "integrity": "sha512-4vTzOQt8GP4Chsm0s+8j2xDtVHAEN252PxrU12A1zXauNn0zD5HRHgjALKO2GKTyBnTnOrJUOxbV8LTrFIMrYw==",
+ "engines": {
+ "node": ">= 0.12.0"
+ }
+ },
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
@@ -5966,6 +5976,16 @@
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
}
},
+ "node_modules/react-photoswipe-gallery": {
+ "version": "2.2.7",
+ "resolved": "https://registry.npmjs.org/react-photoswipe-gallery/-/react-photoswipe-gallery-2.2.7.tgz",
+ "integrity": "sha512-AEYNoL4/IIRosIUonn4haaFQNn1ui4vdVgAY9LHd/imVamNCkqUcyWeT6317UILp/yJI2gohsd3lWmcJEbjCag==",
+ "peerDependencies": {
+ "photoswipe": ">= 5.2.2",
+ "prop-types": ">= 15.7.0",
+ "react": ">= 16.8.0"
+ }
+ },
"node_modules/read-cache": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
@@ -11413,6 +11433,11 @@
"integrity": "sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA==",
"dev": true
},
+ "photoswipe": {
+ "version": "5.3.8",
+ "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.3.8.tgz",
+ "integrity": "sha512-4vTzOQt8GP4Chsm0s+8j2xDtVHAEN252PxrU12A1zXauNn0zD5HRHgjALKO2GKTyBnTnOrJUOxbV8LTrFIMrYw=="
+ },
"picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
@@ -11632,6 +11657,12 @@
"prop-types": "^15.7.2"
}
},
+ "react-photoswipe-gallery": {
+ "version": "2.2.7",
+ "resolved": "https://registry.npmjs.org/react-photoswipe-gallery/-/react-photoswipe-gallery-2.2.7.tgz",
+ "integrity": "sha512-AEYNoL4/IIRosIUonn4haaFQNn1ui4vdVgAY9LHd/imVamNCkqUcyWeT6317UILp/yJI2gohsd3lWmcJEbjCag==",
+ "requires": {}
+ },
"read-cache": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
diff --git a/package.json b/package.json
index d44e413..6d28bdc 100644
--- a/package.json
+++ b/package.json
@@ -27,11 +27,13 @@
"framer-motion": "^10.12.16",
"lodash": "^4.17.21",
"next": "^13.4.12",
+ "photoswipe": "^5.3.8",
"postcss": "8.4.23",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hotkeys-hook": "^4.4.0",
"react-page-visibility": "^7.0.0",
+ "react-photoswipe-gallery": "^2.2.7",
"tailwind-merge": "^1.13.1",
"tailwindcss": "3.3.2",
"typescript": "5.0.4"
diff --git a/public/images/blured/gallery.0.jpg b/public/images/blured/gallery.0.jpg
new file mode 100644
index 0000000..9ff443e
Binary files /dev/null and b/public/images/blured/gallery.0.jpg differ
diff --git a/public/images/blured/gallery.1.jpg b/public/images/blured/gallery.1.jpg
new file mode 100644
index 0000000..da3ebef
Binary files /dev/null and b/public/images/blured/gallery.1.jpg differ
diff --git a/public/images/blured/gallery.10.jpg b/public/images/blured/gallery.10.jpg
new file mode 100644
index 0000000..af92848
Binary files /dev/null and b/public/images/blured/gallery.10.jpg differ
diff --git a/public/images/blured/gallery.11.jpg b/public/images/blured/gallery.11.jpg
new file mode 100644
index 0000000..ee4b57f
Binary files /dev/null and b/public/images/blured/gallery.11.jpg differ
diff --git a/public/images/blured/gallery.12.jpg b/public/images/blured/gallery.12.jpg
new file mode 100644
index 0000000..7fe25fa
Binary files /dev/null and b/public/images/blured/gallery.12.jpg differ
diff --git a/public/images/blured/gallery.13.jpg b/public/images/blured/gallery.13.jpg
new file mode 100644
index 0000000..b77b0d2
Binary files /dev/null and b/public/images/blured/gallery.13.jpg differ
diff --git a/public/images/blured/gallery.14.jpg b/public/images/blured/gallery.14.jpg
new file mode 100644
index 0000000..71d8826
Binary files /dev/null and b/public/images/blured/gallery.14.jpg differ
diff --git a/public/images/blured/gallery.15.jpg b/public/images/blured/gallery.15.jpg
new file mode 100644
index 0000000..2e902a9
Binary files /dev/null and b/public/images/blured/gallery.15.jpg differ
diff --git a/public/images/blured/gallery.2.jpg b/public/images/blured/gallery.2.jpg
new file mode 100644
index 0000000..bc3c75b
Binary files /dev/null and b/public/images/blured/gallery.2.jpg differ
diff --git a/public/images/blured/gallery.3.jpg b/public/images/blured/gallery.3.jpg
new file mode 100644
index 0000000..b652916
Binary files /dev/null and b/public/images/blured/gallery.3.jpg differ
diff --git a/public/images/blured/gallery.4.jpg b/public/images/blured/gallery.4.jpg
new file mode 100644
index 0000000..06d3de8
Binary files /dev/null and b/public/images/blured/gallery.4.jpg differ
diff --git a/public/images/blured/gallery.5.jpg b/public/images/blured/gallery.5.jpg
new file mode 100644
index 0000000..402b767
Binary files /dev/null and b/public/images/blured/gallery.5.jpg differ
diff --git a/public/images/blured/gallery.6.jpg b/public/images/blured/gallery.6.jpg
new file mode 100644
index 0000000..402b767
Binary files /dev/null and b/public/images/blured/gallery.6.jpg differ
diff --git a/public/images/blured/gallery.7.jpg b/public/images/blured/gallery.7.jpg
new file mode 100644
index 0000000..402b767
Binary files /dev/null and b/public/images/blured/gallery.7.jpg differ
diff --git a/public/images/blured/gallery.8.jpg b/public/images/blured/gallery.8.jpg
new file mode 100644
index 0000000..9a3da58
Binary files /dev/null and b/public/images/blured/gallery.8.jpg differ
diff --git a/public/images/blured/gallery.9.jpg b/public/images/blured/gallery.9.jpg
new file mode 100644
index 0000000..7859e1b
Binary files /dev/null and b/public/images/blured/gallery.9.jpg differ
diff --git a/public/images/gallery.0.jpg b/public/images/gallery.0.jpg
new file mode 100644
index 0000000..294aa0c
Binary files /dev/null and b/public/images/gallery.0.jpg differ
diff --git a/public/images/gallery.1.jpg b/public/images/gallery.1.jpg
new file mode 100644
index 0000000..4a63e1a
Binary files /dev/null and b/public/images/gallery.1.jpg differ
diff --git a/public/images/gallery.10.jpg b/public/images/gallery.10.jpg
new file mode 100644
index 0000000..28e2935
Binary files /dev/null and b/public/images/gallery.10.jpg differ
diff --git a/public/images/gallery.11.jpg b/public/images/gallery.11.jpg
new file mode 100644
index 0000000..76470ca
Binary files /dev/null and b/public/images/gallery.11.jpg differ
diff --git a/public/images/gallery.12.jpg b/public/images/gallery.12.jpg
new file mode 100644
index 0000000..c040602
Binary files /dev/null and b/public/images/gallery.12.jpg differ
diff --git a/public/images/gallery.13.jpg b/public/images/gallery.13.jpg
new file mode 100644
index 0000000..f53fbd6
Binary files /dev/null and b/public/images/gallery.13.jpg differ
diff --git a/public/images/gallery.14.jpg b/public/images/gallery.14.jpg
new file mode 100644
index 0000000..daef674
Binary files /dev/null and b/public/images/gallery.14.jpg differ
diff --git a/public/images/gallery.15.jpg b/public/images/gallery.15.jpg
new file mode 100644
index 0000000..b94690c
Binary files /dev/null and b/public/images/gallery.15.jpg differ
diff --git a/public/images/gallery.2.jpg b/public/images/gallery.2.jpg
new file mode 100644
index 0000000..8a5c132
Binary files /dev/null and b/public/images/gallery.2.jpg differ
diff --git a/public/images/gallery.3.jpg b/public/images/gallery.3.jpg
new file mode 100644
index 0000000..808b48d
Binary files /dev/null and b/public/images/gallery.3.jpg differ
diff --git a/public/images/gallery.4.jpg b/public/images/gallery.4.jpg
new file mode 100644
index 0000000..136c5e9
Binary files /dev/null and b/public/images/gallery.4.jpg differ
diff --git a/public/images/gallery.5.jpg b/public/images/gallery.5.jpg
new file mode 100644
index 0000000..1444863
Binary files /dev/null and b/public/images/gallery.5.jpg differ
diff --git a/public/images/gallery.6.jpg b/public/images/gallery.6.jpg
new file mode 100644
index 0000000..1444863
Binary files /dev/null and b/public/images/gallery.6.jpg differ
diff --git a/public/images/gallery.7.jpg b/public/images/gallery.7.jpg
new file mode 100644
index 0000000..1444863
Binary files /dev/null and b/public/images/gallery.7.jpg differ
diff --git a/public/images/gallery.8.jpg b/public/images/gallery.8.jpg
new file mode 100644
index 0000000..c77d4a8
Binary files /dev/null and b/public/images/gallery.8.jpg differ
diff --git a/public/images/gallery.9.jpg b/public/images/gallery.9.jpg
new file mode 100644
index 0000000..19f4b43
Binary files /dev/null and b/public/images/gallery.9.jpg differ
diff --git a/public/images/low-quality/gallery.0.jpg b/public/images/low-quality/gallery.0.jpg
new file mode 100644
index 0000000..d12758f
Binary files /dev/null and b/public/images/low-quality/gallery.0.jpg differ
diff --git a/public/images/low-quality/gallery.1.jpg b/public/images/low-quality/gallery.1.jpg
new file mode 100644
index 0000000..8f543b3
Binary files /dev/null and b/public/images/low-quality/gallery.1.jpg differ
diff --git a/public/images/low-quality/gallery.10.jpg b/public/images/low-quality/gallery.10.jpg
new file mode 100644
index 0000000..86af37b
Binary files /dev/null and b/public/images/low-quality/gallery.10.jpg differ
diff --git a/public/images/low-quality/gallery.11.jpg b/public/images/low-quality/gallery.11.jpg
new file mode 100644
index 0000000..8978252
Binary files /dev/null and b/public/images/low-quality/gallery.11.jpg differ
diff --git a/public/images/low-quality/gallery.12.jpg b/public/images/low-quality/gallery.12.jpg
new file mode 100644
index 0000000..b983116
Binary files /dev/null and b/public/images/low-quality/gallery.12.jpg differ
diff --git a/public/images/low-quality/gallery.13.jpg b/public/images/low-quality/gallery.13.jpg
new file mode 100644
index 0000000..db210df
Binary files /dev/null and b/public/images/low-quality/gallery.13.jpg differ
diff --git a/public/images/low-quality/gallery.14.jpg b/public/images/low-quality/gallery.14.jpg
new file mode 100644
index 0000000..719052e
Binary files /dev/null and b/public/images/low-quality/gallery.14.jpg differ
diff --git a/public/images/low-quality/gallery.15.jpg b/public/images/low-quality/gallery.15.jpg
new file mode 100644
index 0000000..06b3e97
Binary files /dev/null and b/public/images/low-quality/gallery.15.jpg differ
diff --git a/public/images/low-quality/gallery.2.jpg b/public/images/low-quality/gallery.2.jpg
new file mode 100644
index 0000000..725e30d
Binary files /dev/null and b/public/images/low-quality/gallery.2.jpg differ
diff --git a/public/images/low-quality/gallery.3.jpg b/public/images/low-quality/gallery.3.jpg
new file mode 100644
index 0000000..c9aab0c
Binary files /dev/null and b/public/images/low-quality/gallery.3.jpg differ
diff --git a/public/images/low-quality/gallery.4.jpg b/public/images/low-quality/gallery.4.jpg
new file mode 100644
index 0000000..1bab1d0
Binary files /dev/null and b/public/images/low-quality/gallery.4.jpg differ
diff --git a/public/images/low-quality/gallery.5.jpg b/public/images/low-quality/gallery.5.jpg
new file mode 100644
index 0000000..321e385
Binary files /dev/null and b/public/images/low-quality/gallery.5.jpg differ
diff --git a/public/images/low-quality/gallery.6.jpg b/public/images/low-quality/gallery.6.jpg
new file mode 100644
index 0000000..321e385
Binary files /dev/null and b/public/images/low-quality/gallery.6.jpg differ
diff --git a/public/images/low-quality/gallery.7.jpg b/public/images/low-quality/gallery.7.jpg
new file mode 100644
index 0000000..321e385
Binary files /dev/null and b/public/images/low-quality/gallery.7.jpg differ
diff --git a/public/images/low-quality/gallery.8.jpg b/public/images/low-quality/gallery.8.jpg
new file mode 100644
index 0000000..33d6ab4
Binary files /dev/null and b/public/images/low-quality/gallery.8.jpg differ
diff --git a/public/images/low-quality/gallery.9.jpg b/public/images/low-quality/gallery.9.jpg
new file mode 100644
index 0000000..8f3303e
Binary files /dev/null and b/public/images/low-quality/gallery.9.jpg differ
diff --git a/public/manifest.json b/public/manifest.json
index c31d304..21de43d 100644
--- a/public/manifest.json
+++ b/public/manifest.json
@@ -10,18 +10,18 @@
"start_url": "/",
"icons": [
{
- "src": "/logo/logo.png",
+ "src": "/icons/logo.png",
"type": "image/png",
"sizes": "192x192"
},
{
- "src": "/logo/logo_maskable.png",
+ "src": "/icons/logo_maskable.png",
"type": "image/png",
"sizes": "192x192",
"purpose": "maskable"
},
{
- "src": "/logo/logo_512.png",
+ "src": "/icons/logo_512.png",
"type": "image/png",
"sizes": "512x512"
}
diff --git a/utils/isPrefersReducedMotion.ts b/utils/isPrefersReducedMotion.ts
new file mode 100644
index 0000000..75695a2
--- /dev/null
+++ b/utils/isPrefersReducedMotion.ts
@@ -0,0 +1,15 @@
+import {isServer} from './isServer';
+
+const query = '(prefers-reduced-motion: reduce)';
+
+/**
+ * @returns True if the user has requested reduced motion.
+ */
+export default function isPrefersReducedMotion() {
+ if (isServer()) {
+ return false;
+ }
+
+ const mediaQueryList = window.matchMedia(query);
+ return mediaQueryList.matches;
+}