diff --git a/views/index.erb b/views/index.erb index 163f6f8..20a6682 100644 --- a/views/index.erb +++ b/views/index.erb @@ -53,7 +53,7 @@ <% if ENV["INSTAGRAM_ACCESS_TOKEN"] %>
- + diff --git a/views/instagram_feed.erb b/views/instagram_feed.erb index 2e93b95..95c4551 100644 --- a/views/instagram_feed.erb +++ b/views/instagram_feed.erb @@ -8,15 +8,19 @@ <%- @data.each do |post| -%> - instagram:post:<%= post["id"] %>:<%= Digest::SHA2.hexdigest((post["caption"]["text"] rescue "")) %> - <%= post["caption"]["text"] rescue "Image" %> + instagram:post:<%= post["id"] %>:<%= Digest::SHA2.hexdigest((post["caption"]["text"] rescue "")) %><%= ":#{params[:cachebuster]}" if params[:cachebuster] %> + <%= "Video: " if post["type"] == "video" %><%= post["caption"]["text"] rescue "No title" %> " /> <%= Time.at(post["created_time"].to_i) %> <%= post["user"]["full_name"] %> +<% if post["videos"] %> +<iframe src="<%= post["link"] %>/embed/" width="612" height="710" frameborder="0" scrolling="no" allowfullscreen></iframe> +<% else %> <img src="<%= post["images"]["standard_resolution"]["url"] %>"> <p>Filter: <%= post["filter"] %></p> +<% end %> <%- end -%>