diff --git a/gallery.json b/gallery.json new file mode 100644 index 0000000..7d134fa --- /dev/null +++ b/gallery.json @@ -0,0 +1,14 @@ +{ + "images_data_file": "./images_data.json", + "public_path": "./public", + "templates_path": "./templates", + "images_path": "./public/images/photos", + "thumbnails_path": "./public/images/thumbnails", + "thumbnail_height": 160, + "title": "MatrixAI Bot Gallery", + "description": "Images generated with AI by users", + "background_photo": "", + "url": "https://gallery-0xmrtt.p.projectsegfau.lt", + "background_photo_offset": 30, + "disable_captions": false +} \ No newline at end of file diff --git a/images_data.json b/images_data.json new file mode 100644 index 0000000..2164ecb --- /dev/null +++ b/images_data.json @@ -0,0 +1,1026 @@ +{ + "0809d0e5-16b0-440d-ab4d-96a30641b847.png": { + "src": "images/photos/0809d0e5-16b0-440d-ab4d-96a30641b847.png", + "mtime": 1686249956.8606188, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/0809d0e5-16b0-440d-ab4d-96a30641b847.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "08328c29-d0a0-41b4-818b-f41d4dc27952.png": { + "src": "images/photos/08328c29-d0a0-41b4-818b-f41d4dc27952.png", + "mtime": 1686249181.6727116, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/08328c29-d0a0-41b4-818b-f41d4dc27952.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "0dceaae7-9d34-450f-b327-6cd0f2e6f637.png": { + "src": "images/photos/0dceaae7-9d34-450f-b327-6cd0f2e6f637.png", + "mtime": 1686249265.954459, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/0dceaae7-9d34-450f-b327-6cd0f2e6f637.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "0f70c312-61ce-4d97-9a28-4657e2ca5036.png": { + "src": "images/photos/0f70c312-61ce-4d97-9a28-4657e2ca5036.png", + "mtime": 1686254875.025772, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/0f70c312-61ce-4d97-9a28-4657e2ca5036.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "12b754a9-05ee-4191-aacb-ecdabf2a0d2c.png": { + "src": "images/photos/12b754a9-05ee-4191-aacb-ecdabf2a0d2c.png", + "mtime": 1686249545.8642228, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/12b754a9-05ee-4191-aacb-ecdabf2a0d2c.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "1a360b91-3ae5-493c-9345-4fc0c27a153a.png": { + "src": "images/photos/1a360b91-3ae5-493c-9345-4fc0c27a153a.png", + "mtime": 1686248605.1404817, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/1a360b91-3ae5-493c-9345-4fc0c27a153a.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "1d21766c-5442-434e-a3a5-b069ff37d337.png": { + "src": "images/photos/1d21766c-5442-434e-a3a5-b069ff37d337.png", + "mtime": 1686251015.2953205, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/1d21766c-5442-434e-a3a5-b069ff37d337.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "1fe81fc1-a229-4814-97b4-553c711c8bbd.png": { + "src": "images/photos/1fe81fc1-a229-4814-97b4-553c711c8bbd.png", + "mtime": 1686247556.242757, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/1fe81fc1-a229-4814-97b4-553c711c8bbd.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "206698d6-1267-445c-908f-2b38e370c697.png": { + "src": "images/photos/206698d6-1267-445c-908f-2b38e370c697.png", + "mtime": 1686249100.8990302, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/206698d6-1267-445c-908f-2b38e370c697.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "26586135-6611-4b4a-9d67-61617b8ad854.png": { + "src": "images/photos/26586135-6611-4b4a-9d67-61617b8ad854.png", + "mtime": 1686249002.5489726, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/26586135-6611-4b4a-9d67-61617b8ad854.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "2ce04ec0-b1e9-4c6c-adca-6165531f2e0d.png": { + "src": "images/photos/2ce04ec0-b1e9-4c6c-adca-6165531f2e0d.png", + "mtime": 1686253069.3690116, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/2ce04ec0-b1e9-4c6c-adca-6165531f2e0d.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "2fd42066-1a41-4da4-bec3-c7bcd0015e7a.png": { + "src": "images/photos/2fd42066-1a41-4da4-bec3-c7bcd0015e7a.png", + "mtime": 1686247235.0723286, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/2fd42066-1a41-4da4-bec3-c7bcd0015e7a.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "3509a1be-3988-4782-b357-ceedd1c97807.png": { + "src": "images/photos/3509a1be-3988-4782-b357-ceedd1c97807.png", + "mtime": 1686254510.2846828, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/3509a1be-3988-4782-b357-ceedd1c97807.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "3b909157-3583-4106-846d-d8b5f592ceff.png": { + "src": "images/photos/3b909157-3583-4106-846d-d8b5f592ceff.png", + "mtime": 1686246981.0472186, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/3b909157-3583-4106-846d-d8b5f592ceff.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "41b46ec6-db4f-42a6-bbee-1874455cc41f.png": { + "src": "images/photos/41b46ec6-db4f-42a6-bbee-1874455cc41f.png", + "mtime": 1686250491.8585727, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/41b46ec6-db4f-42a6-bbee-1874455cc41f.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "4389a7a7-3207-408a-8f63-47450588ef26.png": { + "src": "images/photos/4389a7a7-3207-408a-8f63-47450588ef26.png", + "mtime": 1686251956.9288042, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/4389a7a7-3207-408a-8f63-47450588ef26.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "43a244a3-0db8-41e4-a5b0-e11d589c5dac.png": { + "src": "images/photos/43a244a3-0db8-41e4-a5b0-e11d589c5dac.png", + "mtime": 1686247184.7473185, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/43a244a3-0db8-41e4-a5b0-e11d589c5dac.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "485da192-2454-43cf-a94b-431bb6296536.png": { + "src": "images/photos/485da192-2454-43cf-a94b-431bb6296536.png", + "mtime": 1686250879.2529297, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/485da192-2454-43cf-a94b-431bb6296536.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "4acd6d18-1111-4386-8dc9-a4bda35d2e3e.png": { + "src": "images/photos/4acd6d18-1111-4386-8dc9-a4bda35d2e3e.png", + "mtime": 1686254456.0992043, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/4acd6d18-1111-4386-8dc9-a4bda35d2e3e.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "4df88000-2494-41a3-871d-dbb536e7ec5d.png": { + "src": "images/photos/4df88000-2494-41a3-871d-dbb536e7ec5d.png", + "mtime": 1686256469.2312367, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/4df88000-2494-41a3-871d-dbb536e7ec5d.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "5308ce50-9989-4555-8168-57cc835bfdc6.png": { + "src": "images/photos/5308ce50-9989-4555-8168-57cc835bfdc6.png", + "mtime": 1686253033.116349, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/5308ce50-9989-4555-8168-57cc835bfdc6.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "56740b3c-d25e-41aa-b907-96222c78c873.png": { + "src": "images/photos/56740b3c-d25e-41aa-b907-96222c78c873.png", + "mtime": 1686254500.2204113, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/56740b3c-d25e-41aa-b907-96222c78c873.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "5e8ba554-1970-47a5-85ec-d6e9569fba98.png": { + "src": "images/photos/5e8ba554-1970-47a5-85ec-d6e9569fba98.png", + "mtime": 1686249189.840881, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/5e8ba554-1970-47a5-85ec-d6e9569fba98.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "5f9da27b-65b3-4829-ba27-0b5a281cd67a.png": { + "src": "images/photos/5f9da27b-65b3-4829-ba27-0b5a281cd67a.png", + "mtime": 1686247583.5833032, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/5f9da27b-65b3-4829-ba27-0b5a281cd67a.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "61bc4bc7-78d4-4377-9380-fa398cbbabee.png": { + "src": "images/photos/61bc4bc7-78d4-4377-9380-fa398cbbabee.png", + "mtime": 1686247472.4570825, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/61bc4bc7-78d4-4377-9380-fa398cbbabee.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "63fdeaa9-6459-4122-8e69-9074521be2d8.png": { + "src": "images/photos/63fdeaa9-6459-4122-8e69-9074521be2d8.png", + "mtime": 1686247139.8984175, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/63fdeaa9-6459-4122-8e69-9074521be2d8.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "6806c70e-c93e-4516-8a85-26b412551049.png": { + "src": "images/photos/6806c70e-c93e-4516-8a85-26b412551049.png", + "mtime": 1686247314.3859189, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/6806c70e-c93e-4516-8a85-26b412551049.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "68f381d7-8b48-4b15-bbef-17633414147d.png": { + "src": "images/photos/68f381d7-8b48-4b15-bbef-17633414147d.png", + "mtime": 1686249531.1319206, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/68f381d7-8b48-4b15-bbef-17633414147d.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "6e852e5f-97dd-46dc-999b-a38bd2c5e6a9.png": { + "src": "images/photos/6e852e5f-97dd-46dc-999b-a38bd2c5e6a9.png", + "mtime": 1686249044.5698533, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/6e852e5f-97dd-46dc-999b-a38bd2c5e6a9.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "71601114-0e45-4b5b-b0ab-7ca47a214b3b.png": { + "src": "images/photos/71601114-0e45-4b5b-b0ab-7ca47a214b3b.png", + "mtime": 1686247248.256593, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/71601114-0e45-4b5b-b0ab-7ca47a214b3b.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "72166ef9-aa46-480b-be26-f308e103c628.png": { + "src": "images/photos/72166ef9-aa46-480b-be26-f308e103c628.png", + "mtime": 1686249027.941505, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/72166ef9-aa46-480b-be26-f308e103c628.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "797ac671-62be-4d23-aa87-6ee106e6fc2e.png": { + "src": "images/photos/797ac671-62be-4d23-aa87-6ee106e6fc2e.png", + "mtime": 1686247241.3444545, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/797ac671-62be-4d23-aa87-6ee106e6fc2e.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "7a877a69-35c1-4d7f-a953-3b6dc1b0869b.png": { + "src": "images/photos/7a877a69-35c1-4d7f-a953-3b6dc1b0869b.png", + "mtime": 1686247390.295439, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/7a877a69-35c1-4d7f-a953-3b6dc1b0869b.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "7b467a49-57e9-464d-8887-6998377c3bd5.png": { + "src": "images/photos/7b467a49-57e9-464d-8887-6998377c3bd5.png", + "mtime": 1686247327.3981795, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/7b467a49-57e9-464d-8887-6998377c3bd5.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "7e816894-cc91-47cf-a9cb-21ce607d698b.png": { + "src": "images/photos/7e816894-cc91-47cf-a9cb-21ce607d698b.png", + "mtime": 1686247264.7809246, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/7e816894-cc91-47cf-a9cb-21ce607d698b.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "812f8089-b0e4-423c-aa4c-a1289f6b1389.png": { + "src": "images/photos/812f8089-b0e4-423c-aa4c-a1289f6b1389.png", + "mtime": 1686247191.0314445, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/812f8089-b0e4-423c-aa4c-a1289f6b1389.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "82e8721c-8b89-46a1-a6e4-624e7abf2dae.png": { + "src": "images/photos/82e8721c-8b89-46a1-a6e4-624e7abf2dae.png", + "mtime": 1686247568.4430008, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/82e8721c-8b89-46a1-a6e4-624e7abf2dae.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "8cb312a3-c8a0-4100-a40d-7db241686798.png": { + "src": "images/photos/8cb312a3-c8a0-4100-a40d-7db241686798.png", + "mtime": 1686250547.3034275, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/8cb312a3-c8a0-4100-a40d-7db241686798.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "9497d512-1ae1-450d-ac76-1e91d7f658f9.png": { + "src": "images/photos/9497d512-1ae1-450d-ac76-1e91d7f658f9.png", + "mtime": 1686248972.6123435, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/9497d512-1ae1-450d-ac76-1e91d7f658f9.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "951c18d9-6cb2-49e5-abdc-254b7695d7f3.png": { + "src": "images/photos/951c18d9-6cb2-49e5-abdc-254b7695d7f3.png", + "mtime": 1686249162.0003028, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/951c18d9-6cb2-49e5-abdc-254b7695d7f3.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "96328d0c-3b66-4b21-ad52-a0fe63a23a77.png": { + "src": "images/photos/96328d0c-3b66-4b21-ad52-a0fe63a23a77.png", + "mtime": 1686249589.981127, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/96328d0c-3b66-4b21-ad52-a0fe63a23a77.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "96809398-dc7d-413b-a3f2-e2f9c3780e86.png": { + "src": "images/photos/96809398-dc7d-413b-a3f2-e2f9c3780e86.png", + "mtime": 1686254846.3570998, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/96809398-dc7d-413b-a3f2-e2f9c3780e86.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "97140950-4949-4fa0-a87e-cf9606efb001.png": { + "src": "images/photos/97140950-4949-4fa0-a87e-cf9606efb001.png", + "mtime": 1686250044.7504082, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/97140950-4949-4fa0-a87e-cf9606efb001.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "a4ea1777-fef1-42db-9056-1ae7548ba496.png": { + "src": "images/photos/a4ea1777-fef1-42db-9056-1ae7548ba496.png", + "mtime": 1686253369.9545588, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/a4ea1777-fef1-42db-9056-1ae7548ba496.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "abd07ddf-6f6d-4701-8ce7-f9428b673d2f.png": { + "src": "images/photos/abd07ddf-6f6d-4701-8ce7-f9428b673d2f.png", + "mtime": 1686252505.6269848, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/abd07ddf-6f6d-4701-8ce7-f9428b673d2f.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "ae9786d9-2822-46f0-93df-843ada12cdec.png": { + "src": "images/photos/ae9786d9-2822-46f0-93df-843ada12cdec.png", + "mtime": 1686254289.1678088, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/ae9786d9-2822-46f0-93df-843ada12cdec.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "b36685e7-0df8-49dd-8b01-ab0e0d2b9eae.png": { + "src": "images/photos/b36685e7-0df8-49dd-8b01-ab0e0d2b9eae.png", + "mtime": 1686247433.2962992, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/b36685e7-0df8-49dd-8b01-ab0e0d2b9eae.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "b3a0d8b5-b967-47ee-9a6b-a531a14cc98a.png": { + "src": "images/photos/b3a0d8b5-b967-47ee-9a6b-a531a14cc98a.png", + "mtime": 1686249315.2314775, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/b3a0d8b5-b967-47ee-9a6b-a531a14cc98a.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "b503d495-5829-462f-8d57-8383d5978147.png": { + "src": "images/photos/b503d495-5829-462f-8d57-8383d5978147.png", + "mtime": 1686247425.6641467, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/b503d495-5829-462f-8d57-8383d5978147.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "b8ccab42-e33e-4bc7-9375-5e45b0d81dd1.png": { + "src": "images/photos/b8ccab42-e33e-4bc7-9375-5e45b0d81dd1.png", + "mtime": 1686252496.458829, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/b8ccab42-e33e-4bc7-9375-5e45b0d81dd1.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "b99552cf-9457-4dc2-95ff-eea335e478ce.png": { + "src": "images/photos/b99552cf-9457-4dc2-95ff-eea335e478ce.png", + "mtime": 1686253459.9362333, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/b99552cf-9457-4dc2-95ff-eea335e478ce.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "bf11f044-7897-4d39-adc4-ca7cd35a88c3.png": { + "src": "images/photos/bf11f044-7897-4d39-adc4-ca7cd35a88c3.png", + "mtime": 1686247466.5889652, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/bf11f044-7897-4d39-adc4-ca7cd35a88c3.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "c0961324-ca34-4b16-82fa-8623bbae0f7b.png": { + "src": "images/photos/c0961324-ca34-4b16-82fa-8623bbae0f7b.png", + "mtime": 1686249217.4054532, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/c0961324-ca34-4b16-82fa-8623bbae0f7b.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "c24e5042-833b-44c4-8df8-343f71f87365.png": { + "src": "images/photos/c24e5042-833b-44c4-8df8-343f71f87365.png", + "mtime": 1686252268.3427384, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/c24e5042-833b-44c4-8df8-343f71f87365.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "c62ea865-35ee-4519-8d6c-5fdac79255d0.png": { + "src": "images/photos/c62ea865-35ee-4519-8d6c-5fdac79255d0.png", + "mtime": 1686249645.6142662, + "date": "", + "size": [ + 512, + 512 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/c62ea865-35ee-4519-8d6c-5fdac79255d0.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "ceb76b51-0b84-45ac-856f-ae8125fbb780.png": { + "src": "images/photos/ceb76b51-0b84-45ac-856f-ae8125fbb780.png", + "mtime": 1686254435.6026337, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/ceb76b51-0b84-45ac-856f-ae8125fbb780.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "d988dad3-c68f-431f-9e47-f0bc373bdead.png": { + "src": "images/photos/d988dad3-c68f-431f-9e47-f0bc373bdead.png", + "mtime": 1686248941.2596834, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/d988dad3-c68f-431f-9e47-f0bc373bdead.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "e1e5c95d-0fd6-436a-be51-4dcd67e29d69.png": { + "src": "images/photos/e1e5c95d-0fd6-436a-be51-4dcd67e29d69.png", + "mtime": 1686249368.516577, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/e1e5c95d-0fd6-436a-be51-4dcd67e29d69.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "e3b88a73-d439-4ca2-8704-c19af53db894.png": { + "src": "images/photos/e3b88a73-d439-4ca2-8704-c19af53db894.png", + "mtime": 1686249234.285803, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/e3b88a73-d439-4ca2-8704-c19af53db894.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "e8fa00fe-26f9-4dfc-8007-c96dcda01715.png": { + "src": "images/photos/e8fa00fe-26f9-4dfc-8007-c96dcda01715.png", + "mtime": 1686248964.2081666, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/e8fa00fe-26f9-4dfc-8007-c96dcda01715.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "edca303f-0ab7-4bae-bcf2-e5e5034e5641.png": { + "src": "images/photos/edca303f-0ab7-4bae-bcf2-e5e5034e5641.png", + "mtime": 1686250949.3861547, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/edca303f-0ab7-4bae-bcf2-e5e5034e5641.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "f088b16e-3c75-4932-8712-d28384d3cd2c.png": { + "src": "images/photos/f088b16e-3c75-4932-8712-d28384d3cd2c.png", + "mtime": 1686252218.3777843, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/f088b16e-3c75-4932-8712-d28384d3cd2c.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "fd3de702-81d0-4e2e-b627-9c03ae826ba9.png": { + "src": "images/photos/fd3de702-81d0-4e2e-b627-9c03ae826ba9.png", + "mtime": 1686246556.6825836, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/fd3de702-81d0-4e2e-b627-9c03ae826ba9.jpg", + "thumbnail_size": [ + 160, + 160 + ] + }, + "ff7fe46c-8c06-4aa4-a9a6-b3585c63d33e.png": { + "src": "images/photos/ff7fe46c-8c06-4aa4-a9a6-b3585c63d33e.png", + "mtime": 1686247071.7730472, + "date": "", + "size": [ + 768, + 768 + ], + "type": "image", + "description": "", + "thumbnail": "images/thumbnails/ff7fe46c-8c06-4aa4-a9a6-b3585c63d33e.jpg", + "thumbnail_size": [ + 160, + 160 + ] + } +} \ No newline at end of file diff --git a/public/css/default-skin.css b/public/css/default-skin.css new file mode 100644 index 0000000..9ebeee8 --- /dev/null +++ b/public/css/default-skin.css @@ -0,0 +1,483 @@ +/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */ +/* + + Contents: + + 1. Buttons + 2. Share modal and links + 3. Index indicator ("1 of X" counter) + 4. Caption + 5. Loading indicator + 6. Additional styles (root element, top bar, idle state, hidden state, etc.) + +*/ +/* + + 1. Buttons + + */ +/* + + + + +
+
+
+
+
+
+
+ + +
+
+
+ + + + +
+
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/js/main.js b/public/js/main.js new file mode 100644 index 0000000..2042ff7 --- /dev/null +++ b/public/js/main.js @@ -0,0 +1,97 @@ +var slides = {} + +function createSlides() { + $("a.gallery-photo").each(function (photo_id, photo) { + var slide = { + w: photo.getAttribute('data-width'), + h: photo.getAttribute('data-height'), + msrc: photo.getElementsByTagName('img')[0].getAttribute('src'), + title: photo.getElementsByTagName('img')[0].getAttribute('alt'), + date: photo.getAttribute('data-date'), + }; + + if (photo.getAttribute('data-type') == 'image') + slide['src'] = photo.getAttribute('href'); + else + slide['html'] = ''; + + var gallery_id = photo.getAttribute('data-gallery'); + if (!(gallery_id in slides)) + slides[gallery_id] = []; + + slides[gallery_id].push(slide); + }); +} + +function getThumbBounds(gallery, index) { + var thumbnail = $('div.gallery a[data-gallery="'+gallery+'"][data-index="'+index+'"]')[0]; + var pageYScroll = window.pageYOffset || document.documentElement.scrollTop; + var rect = thumbnail.getBoundingClientRect(); + return {x: rect.left, y: rect.top + pageYScroll, w: rect.width}; +} + +function addCaptionHTML(item, captionEl, isFake) { + if(!item.title && !item.date) { + captionEl.children[0].innerText = ''; + return false; + } + captionEl.children[0].innerHTML = item.title; + if (item.date) { + captionEl.children[0].innerHTML += '

' + item.date + '

'; + } + return true; +} + +function openPhotoSwipe() { + var index = parseInt($(this).attr('data-index')) + var gallery_id = $(this).attr('data-gallery') + + var options = { + index: index, + getThumbBoundsFn: function (id) { return getThumbBounds(gallery_id, id) }, + addCaptionHTMLFn: addCaptionHTML, + preload: [2,5], + zoomEl: false, + shareEl: true, + barsSize: {top:0, bottom:0}, + bgOpacity: 1, + loop: false, + mainClass: 'pswp--minimal--dark', + shareButtons: [ + {id:'download', label:'Download image', url:'{{raw_image_url}}', download:true} + ], + }; + + var gallery = new PhotoSwipe( $('.pswp')[0], PhotoSwipeUI_Default, slides[gallery_id], options); + + gallery.listen('initialZoomOut', function() { + if (this.currItem.html) { + var videos = $('div.pswp__item video[data-index='+this.getCurrentIndex()+']') + if (videos.length > 0) + videos[0].pause() + } + }); + + gallery.listen('afterChange', function() { + var videos = $('div.pswp__item video') + for (var i=0; i 0) + videos[0].play() + } + }); + + gallery.init(); + + return false; +} + + +$( document ).ready(function() { + createSlides() + $('div.gallery a').on('click', openPhotoSwipe) +}); diff --git a/public/js/photoswipe-ui-default.min.js b/public/js/photoswipe-ui-default.min.js new file mode 100644 index 0000000..ab7bedc --- /dev/null +++ b/public/js/photoswipe-ui-default.min.js @@ -0,0 +1,4 @@ +/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08 +* http://photoswipe.com +* Copyright (c) 2019 Dmitry Semenov; */ +!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.getAttribute("class")||"",g=0;g-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>q.fitControlsWidth},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),!!c.href&&(!!c.hasAttribute("download")||(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1))},H=function(){for(var a,b,c,d,e,f="",g=0;g