diff --git a/content/robotics/smallpeice/2017/gallery.md b/content/robotics/smallpeice/2017/gallery.md index 9ebe091..daf06e7 100644 --- a/content/robotics/smallpeice/2017/gallery.md +++ b/content/robotics/smallpeice/2017/gallery.md @@ -1,7 +1,6 @@ --- title: Gallery image: https://c1.staticflickr.com/5/4433/36343562896_0226cc3535_k.jpg +layout: flickr +photoset: 72157683796439222 --- - -{{% flickr 72157683796439222 %}} - diff --git a/content/robotics/student-robotics/2014/gallery.md b/content/robotics/student-robotics/2014/gallery.md index b3d1164..2cde864 100644 --- a/content/robotics/student-robotics/2014/gallery.md +++ b/content/robotics/student-robotics/2014/gallery.md @@ -1,7 +1,6 @@ --- title: Gallery image: https://c2.staticflickr.com/8/7670/17115168179_1ef30ac6e9_b.jpg +layout: flickr +photoset: 72157651820386449 --- - -{{% flickr 72157651820386449 %}} - diff --git a/content/robotics/student-robotics/2015/gallery.md b/content/robotics/student-robotics/2015/gallery.md index a052a79..b15f0c4 100644 --- a/content/robotics/student-robotics/2015/gallery.md +++ b/content/robotics/student-robotics/2015/gallery.md @@ -1,7 +1,6 @@ --- title: Gallery image: https://c2.staticflickr.com/8/7674/17308375182_a172a341d6_h.jpg +layout: flickr +photoset: 72157651794923357 --- - -{{% flickr 72157651794923357 %}} - diff --git a/content/robotics/student-robotics/2016.md b/content/robotics/student-robotics/2016.md index b031699..53979ef 100644 --- a/content/robotics/student-robotics/2016.md +++ b/content/robotics/student-robotics/2016.md @@ -2,6 +2,6 @@ title: Student Robotics 2016 linkTitle: 2016 image: https://farm2.staticflickr.com/1466/26707090961_9b44a94f31_o_d.jpg +layout: flickr +photoset: 72157667801651676 --- - -{{% flickr 72157667801651676 %}} diff --git a/content/robotics/student-robotics/2017.md b/content/robotics/student-robotics/2017.md index 8e41ed8..6231a89 100644 --- a/content/robotics/student-robotics/2017.md +++ b/content/robotics/student-robotics/2017.md @@ -2,6 +2,6 @@ title: Student Robotics 2017 linkTitle: 2017 image: https://farm3.staticflickr.com/2837/33771948196_bd306d2a8f_o_d.jpg +layout: flickr +photoset: 72157679850996831 --- - -{{% flickr 72157679850996831 %}} diff --git a/layouts/_default/flickr.html b/layouts/_default/flickr.html new file mode 100644 index 0000000..9289a92 --- /dev/null +++ b/layouts/_default/flickr.html @@ -0,0 +1,31 @@ +{{ define "main" }} +
+
+ {{ partial "content.html" . }} + + {{ $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 }} + + + +

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

+
+
+{{ end }} diff --git a/layouts/shortcodes/flickr.html b/layouts/shortcodes/flickr.html deleted file mode 100644 index 17c6f54..0000000 --- a/layouts/shortcodes/flickr.html +++ /dev/null @@ -1,24 +0,0 @@ -{{ $id := .Get 0 }} -{{ $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 }} - - - -

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

-