2016-10-02 12:19:21 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="author" content="Ryan Kes">
|
|
|
|
<meta name="generator" content="Hugo 0.16" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta name="description" content="A page that demonstrates Hugo working with the Instagram api">
|
|
|
|
<meta name="keywords" content="Instagram, Hugo, api, tutorial, demo">
|
2019-06-18 08:57:50 +00:00
|
|
|
<meta name="generation-date" content="{{ now }}">
|
2016-10-02 12:19:21 +00:00
|
|
|
|
|
|
|
<title>Instagram Hugo Demo</title>
|
|
|
|
<link href="/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
|
|
|
|
<link rel="stylesheet" href="/css/style.css" type="text/css"/>
|
|
|
|
{{ template "_internal/google_analytics_async.html" . }}
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<a href="https://github.com/alrayyes/instagram-hugo-demo-theme"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a>
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row text-center">
|
|
|
|
<h3 style="color:white;font-family:verdana;">
|
2016-10-07 17:28:40 +00:00
|
|
|
<a href="https://www.instagram.com/" target="_new">Instagram</a> <a href="https://gohugo.io/" target="_new">Hugo</a> Demo<br><small><a href="http://ryankes.eu">Ryan Kes</a></small><br><br>
|
|
|
|
<a href="https://app.wercker.com/project/byKey/dc30c64139b94a8024dd86e33b9e642b"><img alt="Wercker status" src="https://app.wercker.com/status/dc30c64139b94a8024dd86e33b9e642b/m/master"></a><br><br>
|
2016-10-02 12:19:21 +00:00
|
|
|
Design inspired by <a href="http://bootsnipp.com/snippets/featured/image-tiles-full-width" target="_new">Snap TightImage Tiles snippet</a><br>
|
|
|
|
See <a href="https://ryankes.eu/post/integrating-instagram-into-your-hugo-site/">blog post</a> for more information
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
{{ $dataJ := getJSON (printf "https://api.instagram.com/v1/users/self/media/recent/?access_token=%s" .Site.Params.access_token) }}
|
|
|
|
{{ range $dataJ.data }}
|
|
|
|
<a href="{{ .link }}" target="_new">
|
|
|
|
|
|
|
|
<div class="cover-card col-sm-4" style="background: url({{ .images.standard_resolution.url }}) no-repeat center top;background-size:cover;">
|
2016-10-02 12:34:05 +00:00
|
|
|
<p>
|
|
|
|
{{ with .caption }}{{ .text }}<br>
|
|
|
|
-<br>{{ end }}
|
|
|
|
<span class="play-date" data-date="{{ .created_time }}"></span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</a>
|
2016-10-02 12:19:21 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script src="/js/jquery-1.10.2.min.js"></script>
|
|
|
|
<script src="/js/bootstrap.min.js"></script>
|
|
|
|
<script src="/js/moment.min.js"></script>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('span.play-date').each(function(i, e) {
|
|
|
|
var date = moment.unix($(e).data('date'));
|
|
|
|
$(e).html(date.fromNow());
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|