From 9a5b16934dc0f9841fbb8fea933ea48ceb894801 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 1 Dec 2018 21:19:13 +0000 Subject: [PATCH] Use high quality images in gallery, and make only 1 API call --- layouts/_default/flickr.html | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/layouts/_default/flickr.html b/layouts/_default/flickr.html index 19d3916..0f442b1 100644 --- a/layouts/_default/flickr.html +++ b/layouts/_default/flickr.html @@ -6,24 +6,20 @@ {{ $id := .Params.photoset }} {{ $query := querify "format" "json" "nojsoncallback" "1" "api_key" .Site.Data.flickr.api_key }} - {{ $method := querify "method" "flickr.photosets.getPhotos" "user_id" .Site.Data.flickr.user_id "photoset_id" $id "extras" "url_l" }} - {{ $photoset_orig:= (getJSON "https://api.flickr.com/services/rest/?" $query "&" $method).photoset }} - - {{ $method := querify "method" "flickr.photosets.getPhotos" "user_id" .Site.Data.flickr.user_id "photoset_id" $id "extras" "url_sq" }} - {{ $photoset_thumb := (getJSON "https://api.flickr.com/services/rest/?" $query "&" $method).photoset }} + {{ $method := querify "method" "flickr.photosets.getPhotos" "user_id" .Site.Data.flickr.user_id "photoset_id" $id "extras" "url_k,url_q" }} + {{ $photoset := (getJSON "https://api.flickr.com/services/rest/?" $query "&" $method).photoset }}

- View entire {{ $photoset_orig.title }} album on Flickr + View entire {{ $photoset.title }} album on Flickr