+
{data.length
- ? data.map((d: string) => (
- -
- {({ ref, open }) => }
-
+ ? data.map((d: string, index: number) => (
+ {
+ setPhotoIndex(index)
+ setIsOpen(true)
+ }}
+ src={d}
+ className="w-full cursor-pointer object-cover"
+ width="300px"
+ height="300px"
+ />
))
: null}
-
+
+ {isOpen && (
+ setIsOpen(false)}
+ onMovePrevRequest={() => setPhotoIndex((photoIndex + data.length - 1) % data.length)}
+ onMoveNextRequest={() => setPhotoIndex((photoIndex + 1) % data.length)}
+ />
+ )}
+
)
}
diff --git a/data/mediaData.ts b/data/mediaData.ts
index b879625..072e07b 100644
--- a/data/mediaData.ts
+++ b/data/mediaData.ts
@@ -1,9 +1,19 @@
const mediaData = [
{
type: 'video',
- title: ' Beatus - live @ Trois-Rivières Metal Fest 2004',
+ title: 'Beatus - live @ Trois-Rivières Metal Fest 2004',
data: 'GC65l2Fo1q8',
},
+ {
+ type: 'photos',
+ title: 'Ashes of Autumn',
+ data: [
+ '/static/images/media/photos/ashes-of-autumn/01.jpg',
+ '/static/images/media/photos/ashes-of-autumn/02.jpg',
+ '/static/images/media/photos/ashes-of-autumn/03.jpg',
+ '/static/images/media/photos/ashes-of-autumn/04.jpg',
+ ],
+ },
]
export default mediaData
diff --git a/package-lock.json b/package-lock.json
index 89f1540..e010265 100644
Binary files a/package-lock.json and b/package-lock.json differ
diff --git a/package.json b/package.json
index f8effcf..935843a 100644
--- a/package.json
+++ b/package.json
@@ -24,12 +24,10 @@
"mdx-bundler": "^8.0.0",
"next": "12.1.0",
"next-themes": "^0.0.14",
- "photoswipe": "^5.2.7",
"postcss": "^8.4.5",
"preact": "^10.6.2",
"react": "17.0.2",
"react-dom": "17.0.2",
- "react-photoswipe-gallery": "^2.2.1",
"reading-time": "1.3.0",
"rehype-autolink-headings": "^6.1.0",
"rehype-citation": "^0.2.0",
@@ -66,6 +64,7 @@
"next-remote-watch": "^1.0.0",
"prettier": "^2.5.1",
"prettier-plugin-tailwindcss": "^0.1.4",
+ "react-image-lightbox": "^5.1.4",
"socket.io": "^4.4.0",
"socket.io-client": "^4.4.0",
"typescript": "^4.6.1-rc"
diff --git a/public/static/images/media/photos/ashes-of-autumn/01.jpg b/public/static/images/media/photos/ashes-of-autumn/01.jpg
new file mode 100755
index 0000000..c23f667
Binary files /dev/null and b/public/static/images/media/photos/ashes-of-autumn/01.jpg differ
diff --git a/public/static/images/media/photos/ashes-of-autumn/02.jpg b/public/static/images/media/photos/ashes-of-autumn/02.jpg
new file mode 100755
index 0000000..fcbeede
Binary files /dev/null and b/public/static/images/media/photos/ashes-of-autumn/02.jpg differ
diff --git a/public/static/images/media/photos/ashes-of-autumn/03.jpg b/public/static/images/media/photos/ashes-of-autumn/03.jpg
new file mode 100755
index 0000000..7f02f5c
Binary files /dev/null and b/public/static/images/media/photos/ashes-of-autumn/03.jpg differ
diff --git a/public/static/images/media/photos/ashes-of-autumn/04.jpg b/public/static/images/media/photos/ashes-of-autumn/04.jpg
new file mode 100755
index 0000000..3141db9
Binary files /dev/null and b/public/static/images/media/photos/ashes-of-autumn/04.jpg differ