From 9d121eed990975bf7eff99ed5275d8b7cb90e3ae Mon Sep 17 00:00:00 2001 From: Duncan Mackenzie Date: Fri, 3 May 2024 08:42:02 -0700 Subject: [PATCH] Fixing script, adding buy links to NYC photos --- content/albums/brooklyn-bridge.md | 119 +++++++++++++++--- .../assets/js/galleries/click-to-buy.js | 2 +- 2 files changed, 106 insertions(+), 15 deletions(-) diff --git a/content/albums/brooklyn-bridge.md b/content/albums/brooklyn-bridge.md index e2bc048b..4d97587f 100644 --- a/content/albums/brooklyn-bridge.md +++ b/content/albums/brooklyn-bridge.md @@ -1,5 +1,6 @@ --- { + "Outputs": ["html", "purchase"], "Title": "Brooklyn Bridge", "Description": "A set of photos taken starting in the early morning from the bridge.", "BaseURL": "https://photos.duncanmackenzie.net/images/nyc", @@ -7,9 +8,15 @@ "Pictures": [ { "Title": "Sunrise view of the Manhattan Bridge from the Brooklyn Bridge", + "uniqueID": "191b96e339b43604fd66308ffb95a345", "Caption": "The Suspension Tower of a large bridge visible with cables and the sun rising behind it", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF18-55mm F2.8-4 R LM OIS", + "FocalLength": "55", + "fStop": "4", + "DateTimeOriginal": "2023-10-24T03:41:12-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-01-2160.jpg", @@ -31,13 +38,20 @@ "Width": 220, "Height": 147 } - ] + ], + "PaymentLink": "https://buy.stripe.com/eVacNU5vddVw93y8x4" }, { "Title": "Shot through cables", + "uniqueID": "0357d3be39e0c52109267980d5bc4ccb", "Caption": "A view of the Manhattan bridge, sun rising behind it, shot through a grid of cables, car moving quickly by visible in a blur on the road.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF18-55mm F2.8-4 R LM OIS", + "FocalLength": "18", + "fStop": "4", + "DateTimeOriginal": "2023-10-24T03:50:07-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-02-2160.jpg", @@ -59,13 +73,20 @@ "Width": 220, "Height": 147 } - ] + ], + "PaymentLink": "https://buy.stripe.com/4gweW26zh9FgbbG28H" }, { "Title": "One of the rare moments I could get a shot of the bridge support", + "uniqueID": "fc9fb908f512f4af0155d2b156c52fa4", "Caption": "Close shot of the bridge support, no one on the walkway between myself and it, cables rise up and away from the view point.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T03:52:46-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-03-2160.jpg", @@ -87,13 +108,20 @@ "Width": 220, "Height": 330 } - ] + ], + "PaymentLink": "https://buy.stripe.com/fZeg060aTaJk6VqaFe" }, { "Title": "Black and white shot of one of the bridge supports", + "uniqueID": "ff59e7b76d489976fd4ed7b4e518a8ac", "Caption": "Black and white photo of the wooden walkway, cables rising upwards, single light visible close to the camera on the left side.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T03:55:18-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-04-2160.jpg", @@ -115,13 +143,20 @@ "Width": 220, "Height": 330 } - ] + ], + "PaymentLink": "https://buy.stripe.com/5kA29g7Dl3gS2FacNn" }, { "Title": "Towards the Financial District", + "uniqueID": "76c711cdbd87d8cf5f4fef30c4ab2ea2", "Caption": "Looking west towards Manhattan, a large number of skyscrapers are lit up by the rising sun.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T03:57:11-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-05-2160.jpg", @@ -143,13 +178,20 @@ "Width": 220, "Height": 147 } - ] + ], + "PaymentLink": "https://buy.stripe.com/8wMaFM5vd04GcfKcNo" }, { "Title": "Heading back", + "uniqueID": "53f673d320361eb63bb67578badccd25", "Caption": "Looking towards the Manhattan side of the bridge this is a straight shot along the walkway towards one of the large supports.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T04:01:59-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-06-2160.jpg", @@ -171,13 +213,20 @@ "Width": 220, "Height": 330 } - ] + ], + "PaymentLink": "https://buy.stripe.com/4gwg064r96t4frWcNp" }, { "Title": "Wide shot of the Manhattan Bridge", + "uniqueID": "8188f1663cf24d9d06486af4ee643416", "Caption": "Manhattan bridge visible in front of the sunrise, with some of Brooklyn\u0027s buildings visible.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T04:02:44-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-07-2160.jpg", @@ -199,13 +248,20 @@ "Width": 220, "Height": 147 } - ] + ], + "PaymentLink": "https://buy.stripe.com/bIY6pw2j118K4NibJm" }, { "Title": "Locks on the wire", + "uniqueID": "4496d394f3225a80c6ac7696fbfbb0b5", "Caption": "A view from the bridge walkway down to the road, thin supports run between a light and bolts on the frame of the bridge and along that thin support many locks have been placed, similar to what you see on bridges in Paris and other tourist destinations.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T04:04:24-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-08-2160.jpg", @@ -227,13 +283,20 @@ "Width": 220, "Height": 147 } - ] + ], + "PaymentLink": "https://buy.stripe.com/8wMdRY4r904GdjO7t7" }, { "Title": "Almost full daylight, more and more people showing up", + "uniqueID": "551e03f7b2f09b2c6ca8eb42a2cfe9ee", "Caption": "View towards Manhattan, bridge support and walkway visible, but a few more people starting to show up.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T04:04:58-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-09-2160.jpg", @@ -255,13 +318,20 @@ "Width": 220, "Height": 330 } - ] + ], + "PaymentLink": "https://buy.stripe.com/5kA29gcXFg3E93y14K" }, { "Title": "Crowds increasing, waiting their turn to take selfies", + "uniqueID": "6d954b2ba03f33ca998f08c1d474b1c7", "Caption": "View towards the Manhattan Bridge, sunrise still filling the sky with an orange glow. Many people visible in the foreground, leaning against the bridge edge.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.6", + "DateTimeOriginal": "2023-10-24T04:09:19-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-10-2160.jpg", @@ -283,13 +353,20 @@ "Width": 220, "Height": 147 } - ] + ], + "PaymentLink": "https://buy.stripe.com/6oE4hobTBg3E93y8xd" }, { "Title": "View of the Financial District from closer to the Manhattan side", + "uniqueID": "0c4503a85dd20933d446529d557ddaec", "Caption": "A shot of the various skyscrapers of the financial district from a point on the bridge that is already over land on the Manhattan side.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T04:13:32-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-11-2160.jpg", @@ -311,13 +388,20 @@ "Width": 220, "Height": 147 } - ] + ], + "PaymentLink": "https://buy.stripe.com/5kA7tA9Lt2cObbG3cU" }, { "Title": "Runners at Dawn", + "uniqueID": "12ba13b5adb04127c9fd14010470ed41", "Caption": "A group of four runners coming towards me on the bridge, sunrise and the manhattan bridge visible behind them.", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T04:15:09-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-12-2160.jpg", @@ -339,13 +423,20 @@ "Width": 220, "Height": 147 } - ] + ], + "PaymentLink": "https://buy.stripe.com/00g4ho3n52cOdjO6p7" }, { "Title": "Good for them", + "uniqueID": "1b8bd6accb731f1407d3c24cd093a72a", "Caption": "A single runner heads towards Brooklyn on the bridge, sky is orange and a few of the walkway\u0027s lights are visible", "Latitude": "", "Longitude": "", + "Camera": "FUJIFILM X-T5", + "Lens": "FUJIFILM XF16mm F1.4 R WR", + "FocalLength": "", + "fStop": "1.4", + "DateTimeOriginal": "2023-10-24T04:15:12-07:00", "Links": [ { "Url": "https://photos.duncanmackenzie.net/images/nyc/newyork-13-2160.jpg", @@ -367,9 +458,9 @@ "Width": 220, "Height": 154 } - ] + ], + "PaymentLink": "https://buy.stripe.com/cN23dk8Hp04G2Fa4h0" } ] - } --- diff --git a/themes/hello-friend-ng/assets/js/galleries/click-to-buy.js b/themes/hello-friend-ng/assets/js/galleries/click-to-buy.js index fc98b6a1..e2eb90f6 100644 --- a/themes/hello-friend-ng/assets/js/galleries/click-to-buy.js +++ b/themes/hello-friend-ng/assets/js/galleries/click-to-buy.js @@ -7,7 +7,7 @@ if (gallery) { const visible = sessionStorage.getItem(showBuyButtons); - if (visible) { + if (visible == "true") { document.body.classList.add(showBuyButtons); } else {