1
Fork 0
theorangeone.net-legacy/layouts/_default/flickr.html

28 lines
996 B
HTML

{{ define "main" }}
<div id="main">
<div class="container">
{{ 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_k,url_q" }}
{{ $photoset := (getJSON "https://api.flickr.com/services/rest/?" $query "&" $method).photoset }}
<div id="light-gallery" class="row">
{{ range $element := $photoset.photo }}
<a href="{{ $element.url_k }}" title="{{ $element.title }}" class="col-md-2 col-xs-12">
<img src="{{ $element.url_q }}" alt="{{ $element.title }}"/>
</a>
{{ end }}
</div>
<h4>
<a href="{{ .Site.Data.social.accounts.flickr.link }}sets/{{ $id }}/">
View entire <i>{{ $photoset.title }}</i> album on Flickr
</a>
</h4>
</div>
{{ partial "share.html" . }}
</div>
{{ end }}