{% assign: blog_feed_url = 'http://srrhardware.tumblr.com/rss' %}
.popup_info {
background: none repeat scroll 0 0 rgba(255, 255, 255, 0.6);
}
.popup_caption {
font-size: 12px;
}
.content_container {
background: transparent;
}
.buy {
display: block;
margin: 0 auto 25px;
}
.portfolio { max-width: 1100px; margin: 0 auto;}
(function ($) {
$(document).ready(function(){
$("#rss-feeds").rss("{{blog_feed_url}}", {
limit: 100,
entryTemplate: '<div class="post_wrap"><span class="title">{title}</span><span class="img_url">{body}</span><span class="post_link">{url}</span></div>',
outputMode: 'json_xml',
success: isLoaded
})
function isLoaded(){
var blogPosts = [];
$('.post_wrap').each(function(){
var post = {
itemText: '',
imageLink: '',
secondaryImages: [],
iframe: null
};
post.itemText = $(this).find('.title').text();
if ($(this).find('.img_url img').length !== 0)
post.imageLink = $(this).find('.img_url img').eq(0).prop('src');
else if ($(this).find('.img_url iframe').length !== 0) {
post.imageLink = 'iframe';
post.iframe = $(this).find('.img_url iframe');
} else {
post.imageLink = "none";
}
post.secondaryImages = [$(this).find('.post_link').text()];
blogPosts.push(post);
});
$('.portfolio_page').createPortfolio({
imagesPerRow: 3,
gridType: 'crop', /*grid-type: fit, crop, masonry*/
captionType: 'popup', /*options are 'popup' and 'static'*/
paginationPosition: 'scroll', /*options are 'scroll' (loads more images when scrolling to bottom of window), 'top', 'bottom' and 'both'*/
imageWidth: 1000,
imageHeight: 1000,
imagesPerPage: 20,
enablePopupInfo: true,
portfolioItems: blogPosts
});
}
});
})(jQuery);