Reputation: 77
I have been able to make my photos large for single photo posts on my blog, http://blog.seans.ws, but Tumblr photosets limit me to a width of 500px
How can I either make the layout of photosets larger, or just diable the feature and display my photos in high-res one after the other? Here's the photoset code:
{block:Photoset}
<article>
<span class="break" style="padding-bottom: 19px;"></span>
{Photoset-500}
{block:Caption}
<p>{Caption}</p>
{/block:Caption}
<p></p>
<time>{TimeAgo}</time>
</article>
{/block:Photoset}
and here's the single photo code, where I am able to make photos huge:
{block:Photo}
<article>
<span class="break"></span>
<img src="{PhotoURL-HighRes}" class="highres">
<p>{Caption}</p>
<time>{TimeAgo}</time>
</article>
{/block:Photo}
Thank you!
Upvotes: 1
Views: 19377
Reputation: 51
Add this script before the ending body tag. This will increase or decrease the size of the photoset
<script type="text/javascript">
//This will change the source address and display the correct size.
$(".photoset").each(function() {
var newSrc = $(this).attr("src").replace('700','860');
$(this).attr("src", newSrc);
});
//This will get the new size of the iframe and resize the iframe holder accordingly.
$(function(){
var iFrames = $('.photoset');
function iResize() {
for (var i = 0, j = iFrames.length; i < j; i++) {
iFrames[i].style.height = iFrames[i].contentWindow.document.body.offsetHeight + 'px';}
}
if ($.browser.safari || $.browser.opera) {
iFrames.load(function(){
setTimeout(iResize, 0);
});
for (var i = 0, j = iFrames.length; i < j; i++) {
var iSource = iFrames[i].src;
iFrames[i].src = '';
iFrames[i].src = iSource;
}
} else {
iFrames.load(function() {
this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
});
}
});
</script>
Upvotes: 2
Reputation: 1768
If you want to keep Tumblr's photoset grid style, check out this little jQuery plugin: https://github.com/PixelUnion/Extended-Tumblr-Photoset
It extends Tumblr's default photoset with EXIF data, rounded corners, different gutter sizes, etc.
Disclaimer: I had a little part in helping create it ;)
Upvotes: 1
Reputation: 541
It's really not necessary to use Javascript & the Tumblr API.
You can go through the Photos in each Photoset individually using the {block:Photos}.
Eg in your Example:
{block:Photoset}
<article>
<span class="break" style="padding-bottom: 19px;"></span>
<!-- Go through each Photo in the Photoset -->
{block:Photos}
<img src="{PhotoURL-HighRes}" class="highres">
{/block:Photos}
{block:Caption}
<p>{Caption}</p>
{/block:Caption}
<p></p>
<time>{TimeAgo}</time>
</article>
{/block:Photoset}
Remember, the Documentation is your friend :)
Upvotes: 9
Reputation: 77
This guy solved it :)
https://github.com/ram-nadella/Tumblr-Photoset-Alternative/blob/master/mod.html
Upvotes: 0